Export Model in Any format

Hi Guys is there any way we can customize model in runtime and then export the model in any format in runtime application

Hi @Jack,

There is a gltf exporter in the engine repo:

And some users added it in the PlayCanvas editor as a runtime script:

1 Like

Note the current limitations:

2 Likes

Hi @Jack

You can check out my project: PlayCanvas 3D HTML5 Game Engine

I’ve implemented USDZ export extension from playcanvas examples

3 Likes

Thank you lemme check your project

Brother i have question same technique use for gltf format.

Check out the code for gltf exporter from playcanvas examples website under loaders section:
https://playcanvas.github.io/#/loaders/gltf-export
You can grab core-exporter and glft-exporter scripts from Github repo under extras: https://github.com/playcanvas/engine/tree/main/extras/exporters

1 Like

Brother when i use these script
these error coming
can you help me
SyntaxError: Cannot use import statement outside a module

Hi @Jack,

That exporter is meant to be used in a ES6 codebase, unfortunately editor based project don’t support that yet.

Check this forum post, it includes an example on how to load a module script in the editor:

Hello,

You have to disable preload option for core-exporter.js and usdz-exporter.js script in editor.

That solved the problem for me.

1 Like