Hello!
I am trying to implement .obj exporter in my Verge3D app.
I have added this code to myawesomeapp.js runCode(app) function:
https://gist.github.com/jcarletto27/35b19f811c657ec73b0238d78413f88d
and created a Cube to test the exporter with this code in prepareExternalInterface(app) function:
var geometry = new v3d.BoxGeometry(1, 1, 1);
var material = new v3d.MeshBasicMaterial({ color: 0x00ff00 });
var cube = new v3d.Mesh(geometry, material);
app.scene.add(cube);
var exporter = new THREE.OBJExporter();
console.log(exporter.parse( cube ));
But the problem is, when I try to export the cube, the following error is encountered:
Uncaught TypeError: Right-hand side of 'instanceof' is not an object
at parseMesh (my_awesome_app.js:259:19)
at my_awesome_app.js:546:7
at Hi.traverse (v3d.js:1:73935)
at Ws.traverse (v3d.js:1:74001)
at THREE.OBJExporter.parse (my_awesome_app.js:542:12)
at my_awesome_app.js:210:26
at Ws.traverse (v3d.js:1:73935)
at app.ExternalInterface.myJSFunction (my_awesome_app.js:209:14)
at HTMLButtonElement.<anonymous> (visual_logic.js:1577:32)
Do you know what am I doing wrong ?
Greetings,
KK