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

Error in JSON file loader #13375

Closed
3 of 11 tasks
especimenraro opened this issue Feb 20, 2018 · 10 comments
Closed
3 of 11 tasks

Error in JSON file loader #13375

especimenraro opened this issue Feb 20, 2018 · 10 comments
Labels
Milestone

Comments

@especimenraro
Copy link

especimenraro commented Feb 20, 2018

Description of the problem

Three.js gives me an error when load a json file exported from Blender 2.76
threejs_error

"TypeError: vertices is undefined"

but if I use the example made with r69 it works
there is a difference between json exported file.
modelos.zip

Three.js version
  • Dev
  • r90
  • r89
Browser
  • [] All of them
  • Chrome
  • Firefox
  • Internet Explorer
OS
  • [] All of them
  • Windows
  • macOS
  • Linux
  • Android
  • iOS
@donmccurdy
Copy link
Collaborator

Could you include the .blend file, as well?

@especimenraro
Copy link
Author

misc_chair01.blend.zip
misc_chair01.js is included in the example inside the book "Learning Three.js" by Jos Dirksen I buyed from threejs web site. The second json file I created with io_three addon I downloaded from the main page and the .blend file included in the example

@donmccurdy
Copy link
Collaborator

donmccurdy commented Feb 20, 2018

Thanks — FWIW the file exports correctly and can be loaded with the glTF Blender exporter and THREE.GLTFLoader.

screen shot 2018-02-20 at 12 15 41 pm

@especimenraro
Copy link
Author

especimenraro commented Feb 20, 2018

ok, you installed exporter in Blender and after used GTLFLoader. I'll try
Thank you

@Mugen87
Copy link
Collaborator

Mugen87 commented Feb 20, 2018

FYI #12903

@mrdoob mrdoob added this to the r91 milestone Feb 20, 2018
@olgageletina
Copy link

+1 on this issue – what is quite annoying is that I have a JSON file with a Geometry, which by default gets converted BufferGeometry once imported and added to a Mesh, when I attempt THREE.Geometry().fromBufferGeometry( mesh.geometry ) I get the TypeError: attributes.position is undefined error. Ideally, I would love some guidance on how to preserve the data I am importing in its original form or a way of modifying the position of the individual mesh vertices based on user input using some other approach...

@looeee
Copy link
Collaborator

looeee commented Feb 25, 2018

THREE.Geometry().fromBufferGeometry( mesh.geometry )

@olgageletina you should not be converting a BufferGeometry back to a Geometry. If you want a more detailed explanation or help with this, please ask over on the forum.

@mrdoob mrdoob modified the milestones: r91, r92 Mar 3, 2018
@especimenraro
Copy link
Author

especimenraro commented Mar 10, 2018

I did the export with gltf from Blender 2.79, but when I try to import with glTFLoader() I get an error:
Error de lectura XML: mal formado
Ubicación: file:///home/ricardo/Documentos/ProyectoHTML5/etnika/modelos/gltf/Pioneer.gltf
Número de línea 1, columna 1: Pioneer.gltf:1:1
TypeError: path is undefined glTF-parser.js:91:17

@donmccurdy
Copy link
Collaborator

@especimenraro what is glTF-parser.js? Something has gone very wrong if XML is in the error message. 🤔

@especimenraro
Copy link
Author

I fixed! I use GLTFLoader code on github and it works. I was using glTFLoader included in R89 libs

thanks

@Mugen87 Mugen87 closed this as completed Mar 10, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants