I want to create a custom colored box with different colored edges. To accomplish this, I'm using the following code to generate the box and its edges. I've encapsulated both elements within an object3D since there will be multiple objects in the scene that require this styling.
var mesh = new THREE.Mesh( geo, material );
var edge = new THREE.EdgesHelper( mesh, 0xffffff );
var container = new THREE.Object3D();
container.add(mesh);
container.add(edge);
scene.add(container);
Executing the above code results in:
However, upon changing the position of the parent object like this:
container.position.set(0,30,0);
Only the edges are impacted by the movement. Why is this happening?
Even after attempting to use .updateMatrix() on the container, mesh, or edges objects, the outcome remains the same. How can I ensure that all children elements of the parent object move together when adjusting the position?