Using the following code snippet, I am able to generate a box:
let v = [
new THREE.Vector3(-100,30,10),
new THREE.Vector3(-100,30,-10),
new THREE.Vector3(-100,-10,10),
new THREE.Vector3(-100,-10,-10),
new THREE.Vector3(-110,30,-10),
new THREE.Vector3(-110,30,10),
new THREE.Vector3(-110,-10,-10),
new THREE.Vector3(-110,-10,10)
];
let f = [
new THREE.Face3(0,2,1),
new THREE.Face3(2,3,1),
new THREE.Face3(4,6,5),
new THREE.Face3(6,7,5),
new THREE.Face3(4,5,1),
new THREE.Face3(5,0,1),
new THREE.Face3(7,6,2),
new THREE.Face3(6,3,2),
new THREE.Face3(5,7,0),
new THREE.Face3(7,2,0),
new THREE.Face3(1,3,4),
new THREE.Face3(3,6,4)
];
let g = new THREE.Geometry();
g.mergeVertices();
g.vertices = v;g.faces = f;
let m = new THREE.MeshBasicMaterial({color:0xff0000,side:THREE.DoubleSide});
let mesh = new THREE.Mesh(g,m);
scene.add(mesh);
However, when attempting to use THREE.transformControls, it does not appear on the mesh and instead remains in the center of the scene. Should I adjust the box's matrix or make other modifications?