用Three.js画?
可以,有demo么
1 // 初始化几何形状 2 var geometry = new THREE.Geometry(); 3 //点 4 geometry.vertices.push(new THREE.Vector3(-1, 2, -1)); 5 geometry.vertices.push(new THREE.Vector3(1, 2, -1)); 6 geometry.vertices.push(new THREE.Vector3(1, 2, 1)); 7 geometry.vertices.push(new THREE.Vector3(-1, 2, 1)); 8 //面 9 geometry.faces.push(new THREE.Face4(0, 1, 2, 3)); 10 var material = new THREE.MeshBasicMaterial({ 11 color: 0xffff00, 12 wireframe: true 13 14 }); 15 16 var mesh = new THREE.Mesh(geometry, material); 17 mesh.drawMode = THREE.TrianglesDrawMode; //default 18 19 scene.add(mesh); 20 renderer.render(scene, camera);
问题解决了吗?有demo吗