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

USDZExporter: Rename parse to parseAsync #28049

Merged
merged 1 commit into from Apr 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion editor/js/Menubar.File.js
Expand Up @@ -278,7 +278,7 @@ function MenubarFile( editor ) {

const exporter = new USDZExporter();

saveArrayBuffer( await exporter.parse( editor.scene ), 'model.usdz' );
saveArrayBuffer( await exporter.parseAsync( editor.scene ), 'model.usdz' );

} );
options.add( option );
Expand Down
8 changes: 7 additions & 1 deletion examples/jsm/exporters/USDZExporter.js
Expand Up @@ -12,7 +12,13 @@ import { decompress } from './../utils/TextureUtils.js';

class USDZExporter {

async parse( scene, options = {} ) {
parse( scene, onDone, onError, options ) {

this.parseAsync( scene, options ).then( onDone ).catch( onError );
Mugen87 marked this conversation as resolved.
Show resolved Hide resolved

}

async parseAsync( scene, options = {} ) {

options = Object.assign( {
ar: {
Expand Down
2 changes: 1 addition & 1 deletion examples/misc_exporter_usdz.html
Expand Up @@ -97,7 +97,7 @@
// USDZ

const exporter = new USDZExporter();
const arraybuffer = await exporter.parse( gltf.scene );
const arraybuffer = await exporter.parseAsync( gltf.scene );
const blob = new Blob( [ arraybuffer ], { type: 'application/octet-stream' } );

const link = document.getElementById( 'link' );
Expand Down