Closed canadaduane closed 3 years ago
I think I mostly have this working now. It turned out that in order to create mixed-mode HTML+WebGL, I needed an Object3D anyway, so although it might be nice to not add Object3D when unnecessary, it's no longer pressing for me.
Yeah hecs-plugin-three
might be a confusing name but the intention was to only support the WebGLRenderer.
It would probably be better to have a separate plugin but I might be wrong?
I think we can close this. It was flexible enough for me, and I agree a more complex setup might merit a separate plugin.
I'm having a bit of difficulty getting Three's CSS3DRenderer to work in conjunction with
hecs-plugin-three
.I want the ability to render both Object3D-type objects as well as CSS3DObject-type objects. Each is added to a separate three.js scene graph, but both share the same camera and transform data.
The problem seems to be that
hecs-plugin-three
assumes that an entity with componentWorldTransform
should automatically get anObject3D
component added:WorldTransform
is part ofhecs-plugin-core
, and gets added automatically when aTransform
component is added to the entity. If I includehecs-plugin-three
, then every entity automatically also gets anObject3D
added as well.I'm trying to think of a way to tell
hecs-plugin-three
that for this particular entity withWorldTransform
, don't add theObject3D
component to it, and don't add it to thepresentation.scene
graph. Let me handle it elsewhere (i.e. by aCSSObject3DSystem
, for example).