本文整理汇总了TypeScript中THREE.Mesh.rotateX方法的典型用法代码示例。如果您正苦于以下问题:TypeScript Mesh.rotateX方法的具体用法?TypeScript Mesh.rotateX怎么用?TypeScript Mesh.rotateX使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类THREE.Mesh
的用法示例。
在下文中一共展示了Mesh.rotateX方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1:
spotLight2.position.x = -4;
spotLight2.position.y = 6;
spotLight2.position.z = -2;
root.add(spotLight2);
const spotLight3 = new THREE.PointLight(0xffffff, 0.2);
spotLight3.castShadow = true;
spotLight3.shadow.mapSize.set(1024, 1024);
spotLight3.position.x = 0;
spotLight3.position.y = 6;
spotLight3.position.z = 2;
root.add(spotLight3);
const floor = new THREE.Mesh(new THREE.PlaneBufferGeometry(shared.court.width + shared.court.border * 2, shared.court.depth + shared.court.border * 2), floorMaterial);
floor.receiveShadow = true;
floor.rotateX(-Math.PI / 2);
root.add(floor);
const largerWallGeometry = new THREE.PlaneBufferGeometry(shared.court.width + shared.court.border * 2, 5);
const smallerWallGeometry = new THREE.PlaneBufferGeometry(shared.court.depth + shared.court.border * 2, 5);
const backWall = new THREE.Mesh(largerWallGeometry, wallMaterial);
(backWall.geometry as THREE.BufferGeometry).getAttribute("uv").setX(1, 2.8);
(backWall.geometry as THREE.BufferGeometry).getAttribute("uv").setX(3, 2.8);
backWall.receiveShadow = true;
backWall.position.y = 2.5;
backWall.position.z = -5;
root.add(backWall);
const frontWall = new THREE.Mesh(largerWallGeometry, wallMaterial);
(frontWall.geometry as THREE.BufferGeometry).getAttribute("uv").setX(1, 2.8);