var cubeGeometry = new THREE.BoxGeometry(4, 4, 4);
var cubeMaterial = new THREE.MeshBasicMaterial({
color: 0xFF0000,
wireframe: true
});
var cube = new THREE.Mesh(cubeGeometry, cubeMaterial);
cube.position.set(-4, 3, 0);
var cubeGeometry1 = new THREE.BoxGeometry(4, 4, 4);
var cubeMaterial1 = new THREE.MeshBasicMaterial({
color: 0xFF0000,
wireframe: true
});
var cube1 = new THREE.Mesh(cubeGeometry1, cubeMaterial1);
cube1.position.set(-10, 10, 0);
// 组对象,盛放两个正方体
var group = new THREE.Group();
group.position.set(3, 4, 0);
group.scale.set(3,3,3); // 组对象的x,y,z各自扩大3倍
console.log(group.type)
console.log(group.children)// 查看子元素的各种属性
// add the cube to the scene
group.add(cube);
group.add(cube1);
console.log(group.position.x,group.position.y,group.position.z)
在浏览器中打印子对象,发现子对象cube没有变化,但是浏览器的画面却变大了,这是为啥啊?