How to let line object to JSON?

Hey, guys,
How to use object3D.toJSON() method for line object in three.js ??
I have an object3D object and there are some lines of it’s children. when I use object3d.toJSON(), I got “caught (in promise) TypeError: Cannot convert undefined or null to object”…
also got undefined as result when I try to using a for loop to let every line.toJSON()…
this object3d can be display in scene…three.js is r146

1 Like