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

Chapter 08- 04-load-save-json-scene #35

Open
ashleynguci opened this issue Jan 10, 2020 · 1 comment
Open

Chapter 08- 04-load-save-json-scene #35

ashleynguci opened this issue Jan 10, 2020 · 1 comment

Comments

@ashleynguci
Copy link

ashleynguci commented Jan 10, 2020

Codes don't work since THREE.SceneExporter isn't supported.

"Attempted import error: 'SceneExporter' is not exported from 'three' (imported as 'THREE')"

Is there any way to replace THREE.SceneExoprter? Thanks

@ashleynguci
Copy link
Author

ashleynguci commented Jan 13, 2020

I found the replacement if someone faced the same issue.
GLTFExporter. GLTFExporter works exactly the same as SceneExporter or ObjectExporter, depends on what you want to export.

exporter.parse( [ scene1, object1, object2, scene2 ], ... )

var exporter = new THREE.GLTFExporter();

// Parse the input and generate the glTF output
exporter.parse( scene, function ( gltf ) {
console.log( gltf );
downloadJSON( gltf );
}, options );

Hope it help.

https://threejs.org/docs/#examples/en/exporters/GLTFExporter

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant