Skip to content

Trying to load .glb into Proton.MeshZone produces error #18

@samyH

Description

@samyH

Hi,

I was hoping to spawn particles from a mesh (teapot example), but seems that the .json exporter for Blender has been deprecated in favour of the gltf workflow.

But when I try to pass the mesh data I get the below error:

three.proton.min.js:10 Uncaught (in promise) TypeError: Right-hand side of 'instanceof' is not an object at new ba (three.proton.min.js:10:882) at createEmitter ((index):136:55) at initProton ((index):112:31) at initAll ((index):51:13) at (index):128:17 at GLTFLoader.js:127:7 at GLTFLoader.js:2239:6

Using your example code I have changed the loadModel function to the below:

function loadModel(callback) { // var objectLoader = new THREE.ObjectLoader(); // objectLoader.load("assets/teapot.json", function (obj) { // mesh = obj; // console.log(obj); // callback(); // }); var loader = new THREE.GLTFLoader(); loader.load('./models/logo.glb', function(gltf) { mesh = gltf.scene.children[0]; console.log(gltf.scene.children[0]); callback(); }) }

Any help on getting this working is much appreciated.

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions