aframe - Getting the bounding box or centers of models -
i wondering if there way obtain bounding box models inserted via 3dio.js, or otherwise calculate center points? i'm looking center them on origin.
the images below show 2 models relative scene origin indicated red box.
you can access three.js object of 3d.io entity this:
var threeelem = document.getelementbyid("custom-id").components['io3d-data3d'].data3dview.threeparent then can use native bounding box three.js:
var bbox = new three.box3().setfromobject(threeelem) like min/max bounds can use determine origin.
i hope answers question. let me know!
edit: furniture be
var threeelem = document.getelementbyid("custom-id").components['io3d-furniture'].data3dview.threeparent 

Comments
Post a Comment