Geometry.fromBufferGeometry(): Cannot read property 'clone' of undefined
See original GitHub issueUsing BufferGeometry#setFromObject
and Geometry#fromBufferGeometry
in sequence causes an error.
Here’s the repro. (Scroll down in the JS)
Error:
Uncaught TypeError: Cannot read property 'clone' of undefined
at addFace (VM444 three.js:9158)
at Geometry.fromBufferGeometry (VM444 three.js:9219)
at VM445 pen.js:15
Code:
let points = new THREE.Points(geom);
const bufGeom = new THREE.BufferGeometry().setFromObject(points);
points = new THREE.Points(new THREE.Geometry().fromBufferGeometry(bufGeom));
Related: #10339
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Cannot read property 'geometry' of undefined three.js
When you use var obj = scene.getObjectByProperty('uuid', ID); , it's getting undefined because it didn't find any objects with that name.
Read more >BufferGeometry – three.js docs
Creates a clone of this BufferGeometry. # .computeBoundingBox () : undefined. Computes bounding box of the geometry, updating .boundingBox attribute. Bounding ...
Read more >TypeError: Cannot read property 'geometry' of undefined
Trying to set up a zap to integrate with an app I use to allow a form to trigger an order. I get...
Read more >Team:Munich/Hardware/threeJS
throw new TypeError( 'Cannot convert undefined or null to object' ); ... Matrix4: the constructor no longer reads arguments. use .set() instead.' );....
Read more >three.js
Matrix4: the constructor no longer reads arguments. use .set() instead. ... var geometry = node.geometry; if ( geometry !== undefined ) { if...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I will try to spend some for this ticket later this week/weekend!
Closing. See https://github.com/mrdoob/three.js/pull/14022#issuecomment-412400720.