MCPcopy
hub / github.com/donmccurdy/glTF-Transform / write

Method write

packages/core/src/io/node-io.ts:131–135  ·  view source on GitHub ↗

Writes a Document instance to a local path.

(uri: string, doc: Document)

Source from the content-addressed store, hash-verified

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.

Callers 1

writeJSONFunction · 0.45

Calls 4

initMethod · 0.95
_writeGLBMethod · 0.95
_writeGLTFMethod · 0.95
matchMethod · 0.65

Tested by

no test coverage detected