相关疑难解决方法(0)

显示线框和纯色

是否可以在同一对象上显示对象的线框以及其面的纯色?我找到了一种方法,使用对象的克隆并分配不同的材料,例如

var geometry = new THREE.PlaneGeometry(plane.width, plane.height,width - 1, height - 1);
var materialWireframe = new THREE.MeshPhongMaterial({color:"red",wireframe:true});
var materialSolid = new THREE.MeshPhongMaterial({color:"green",wireframe:false});
var plane = new THREE.Mesh(geometry, materialWireframe );
var plane1 = plane.clone();
plane1.material = materialSolid ;
plane1.material.needsUpdate = true;
Run Code Online (Sandbox Code Playgroud)

有什么想法吗?

mesh material three.js

13
推荐指数
2
解决办法
2万
查看次数

标签 统计

material ×1

mesh ×1

three.js ×1