Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add parseAsync to GLTFExporter doc #28649

Merged
merged 2 commits into from
Jun 13, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 18 additions & 6 deletions docs/examples/en/exporters/GLTFExporter.html
Original file line number Diff line number Diff line change
Expand Up @@ -136,18 +136,30 @@ <h3>[method:undefined parse]( [param:Object3D input], [param:Function onComplete
[page:Function onError] — Will be called if there are any errors during the gltf generation.<br />
[page:Options options] — Export options<br />
<ul>
<li>trs - bool. Export position, rotation and scale instead of matrix per node. Default is false</li>
<li>onlyVisible - bool. Export only visible objects. Default is true.</li>
<li>binary - bool. Export in binary (.glb) format, returning an ArrayBuffer. Default is false.</li>
<li>maxTextureSize - int. Restricts the image maximum size (both width and height) to the given value. Default is Infinity.</li>
<li>animations - Array<[page:AnimationClip AnimationClip]>. List of animations to be included in the export.</li>
<li>includeCustomExtensions - bool. Export custom glTF extensions defined on an object's `userData.gltfExtensions` property. Default is false.</li>
<li>`trs` - bool. Export position, rotation and scale instead of matrix per node. Default is false</li>
<li>`onlyVisible` - bool. Export only visible objects. Default is true.</li>
<li>`binary` - bool. Export in binary (.glb) format, returning an ArrayBuffer. Default is false.</li>
<li>`maxTextureSize` - int. Restricts the image maximum size (both width and height) to the given value. Default is Infinity.</li>
<li>`animations` - Array<[page:AnimationClip AnimationClip]>. List of animations to be included in the export.</li>
<li>`includeCustomExtensions` - bool. Export custom glTF extensions defined on an object's `userData.gltfExtensions` property. Default is false.</li>
</ul>
</p>
<p>
Generates a .gltf (JSON) or .glb (binary) output from the input (Scenes or Objects)
</p>

<h3>[method:Promise parseAsync]( [param:Object3D input], [param:Object options] )</h3>

<p>
Generates a .gltf (JSON) or .glb (binary) output from the input (Scenes or Objects).
</p>
<p>
This is just like the [page:.parse]() method, but instead of
accepting callbacks it returns a promise that resolves with the
result, and otherwise accepts the same options. Use try-catch around
the promise, or `promise.catch()`, to catch errors.
</p>

<h2>Source</h2>

<p>
Expand Down