唐润平:视角切换修改版-重新提交
This commit is contained in:
@@ -164,7 +164,6 @@ export default class Demo {
|
||||
// 匹配附着点(这里不适合对单个模型进行保存,批量对模型进行操作)
|
||||
if (child.isMesh && /^point+/.test(child.name)) {
|
||||
this.points.push(child);
|
||||
console.log(child.name);
|
||||
// 改变为基础材质
|
||||
child.material = new this.THREE.MeshBasicMaterial();
|
||||
child.scale.set(0.01, 0.01, 0.01);
|
||||
@@ -420,10 +419,10 @@ export default class Demo {
|
||||
);
|
||||
this.opacityTween.start();
|
||||
this.opacityTween.onUpdate((obj) => {
|
||||
mesh.material.opacity = obj.opacity;
|
||||
mesh2.material.opacity = obj.opacity;
|
||||
mesh3.material.opacity = obj.opacity;
|
||||
mesh4.material.opacity = obj.opacity;
|
||||
// mesh.material.opacity = obj.opacity;
|
||||
// mesh2.material.opacity = obj.opacity;
|
||||
// mesh3.material.opacity = obj.opacity;
|
||||
// mesh4.material.opacity = obj.opacity;
|
||||
if (!isNeedLookAt) return;
|
||||
this.camera.lookAt(obj.lookX, obj.lookY, obj.lookZ);
|
||||
this.orbitControls.target.set(obj.lookX, obj.lookY, obj.lookZ);
|
||||
|
||||
Reference in New Issue
Block a user