Tools are unusable if any unserializable objects are in the scene
jsantell opened this issue · comments
Adjacent to #16, any scene with an object that cannot be serialized (WebGLRenderTarget, DataTexture, InterleavedBufferAttribute) throws an error during serialization, preventing any information from the scene being parseable without reimplementing toJSON()
, which is something I'd like to avoid.
While a stretch goal would be to somehow interpret these dynamic objects, the minimum needed in order for a scene to be debugged would be for these unserializable objects to return stubs (e.g. { width, height, type }
for WebGLRenderTarget maybe), or less preferably, skipped during serialization (I'd rather be aware of the objects and not be able to represent them fully).
Requires a handful of fixes upstream:
- InterleavedBufferAttribute.toJSON (mrdoob/three.js#17328)
- Handling dynamic textures (WebGLRenderTarget, DataTexture) (mrdoob/three.js#16816)
- Related, scene.background support #16, mrdoob/three.js#16764
- ParametricBufferGeometry serialization (mrdoob/three.js#17381)