Writes a Document instance to a local path.
(uri: string, doc: Document)
| 129 | |
| 130 | /** Writes a {@link Document} instance to a local path. */ |
| 131 | public async write(uri: string, doc: Document): Promise<void> { |
| 132 | await this.init(); |
| 133 | const isGLB = !!uri.match(/\.glb$/); |
| 134 | await (isGLB ? this._writeGLB(uri, doc) : this._writeGLTF(uri, doc)); |
| 135 | } |
| 136 | |
| 137 | /********************************************************************************************** |
| 138 | * Private. |
no test coverage detected