Can not even get started
See original GitHub issueHello! I am trying to load the drone demo, but no luck so far. I am using pixi 5.3.9 and this code does not seem to work. Unfortunately I can’t update pixi to v6, because the project is huge and this will take days and days.
`app.loader.add(“assets/buster_drone/scene.gltf”)
app.loader.load((loader, resources) => { let model = app.stage.addChild( PIXI3D.Model.from(resources[“assets/buster_drone/scene.gltf”].gltf)) })`
the property gltf
is always undefined (it is even missing, because the resource is of type Resource).
I noticed that there is a static method for loading gltf from array, but I did not try this yet. I guess I should load the bin or the model file there?
Thanks for your time.
Edit. I just tried the 3d cube code. It does not work for me too. Idk what’s wrong since Mesh3D extends DisplayObject.
Maybe I am missing some npm package?
Edit2: The cube works with a hack. I cast the cube to any, then to DisplayObject and the code compiles and runs.
Issue Analytics
- State:
- Created 2 years ago
- Comments:8 (4 by maintainers)
Top GitHub Comments
I looked closer at this specific error you are getting and unfortunately it’s because of an error in PixiJS types (in matrix) before v6.0. Two options:
// @ts-ignore
above that line which caused the error.let mesh = app.stage.addChild(<DisplayObject><unknown>Mesh3D.createCube())
You are great! Thank you again. It was pleasure to meet you. Closing this.
Kind regards, Ivan