撮箕2020-3-8

Posted wangshixi12

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了撮箕2020-3-8相关的知识,希望对你有一定的参考价值。

技术图片
 1 export function spheredo($step: Step) {
 2   const $solid = $step.$(x-solid) as Solid;
 3 
 4   $solid.addMesh(() => {
 5 
 6     $solid.addPoint([2.3/2.3, -1/2.3, 0], 0x22ab24);
 7     $solid.addLabel(P, [2.3/2.3, -1/2.3, 0], 0x22ab24, 0 0 0 -15px);
 8 
 9     $solid.addPoint([2.3/2.3, 3/2.3, 1/2.3], 0x22ab24);
10     $solid.addLabel(Q, [2.3/2.3, 3/2.3, 1/2.3], 0x22ab24, 0 0 0 -15px);
11 
12 
13     $solid.addSegment([2.3/2.3, -1/2.3, 0], [2.3/2.3, 3/2.3, 1/2.3], 0xcd0e66);
14     // $solid.addLabel(‘r‘, [0.9, 0, 0], 0xcd0e66);
15 
16 
17     $solid.addPoint([4.6/2.3, -2/2.3, 0], 0x22ab24);
18     $solid.addLabel(A, [4.6/2.3, -2/2.3, 0], 0x22ab24, 0 0 0 -15px);
19 
20     $solid.addPoint([4.6/2.3, 4/2.3, 0], 0x22ab24);
21     $solid.addLabel(B, [4.6/2.3, 4/2.3, 0], 0x22ab24, 0 0 0 -15px);
22 
23     $solid.addPoint([0, 2/2.3, 0], 0x22ab24);
24     $solid.addLabel(C, [0, 2/2.3, 0], 0x22ab24, 0 0 0 -15px);
25 
26     $solid.addPoint([0, 0, 0], 0x22ab24);
27     $solid.addLabel(D, [0, 0, 0], 0x22ab24, 0 0 0 -15px);
28 
29     $solid.addPoint([0, 2/2.3, 2/2.3], 0x22ab24);
30     $solid.addLabel(E, [0, 2/2.3, 2/2.3], 0x22ab24, 0 0 0 -15px);
31 
32     $solid.addPoint([0, 0, 2/2.3], 0x22ab24);
33     $solid.addLabel(F, [0, 0, 2/2.3], 0x22ab24, 0 0 0 -15px);
34 
35    var geometry = new THREE.Geometry();
36 
37    // 添加6个顶点
38    geometry.vertices.push(new THREE.Vector3(4.6/2.3, -2/2.3, 0));
39    geometry.vertices.push(new THREE.Vector3(4.6/2.3, 4/2.3, 0));
40    geometry.vertices.push(new THREE.Vector3(0, 2/2.3, 0));
41    geometry.vertices.push(new THREE.Vector3(0, 0, 0));
42    geometry.vertices.push(new THREE.Vector3(0, 2/2.3, 2/2.3));
43    geometry.vertices.push(new THREE.Vector3(0, 0, 2/2.3));
44 
45     // 添加6个三角形的面
46     geometry.faces.push(new THREE.Face3(0, 3, 1));
47     geometry.faces.push(new THREE.Face3(1, 3, 2));
48     geometry.faces.push(new THREE.Face3(3, 5, 2));
49     geometry.faces.push(new THREE.Face3(2, 5, 4));
50     geometry.faces.push(new THREE.Face3(0, 5, 3));
51     geometry.faces.push(new THREE.Face3(1, 2, 4));
52 
53     // $solid.addSolid(geometry, 0x0f82f2);
54 
55     $solid.addOutlined(geometry, 0x0f82f2);
56 
57     $solid.object.rotateX((Math.PI / 2)*3);
58     $solid.object.rotateZ((Math.PI / 2)*3);
59 
60 
61 
62   });
63 }
functions.ts

 

以上是关于撮箕2020-3-8的主要内容,如果未能解决你的问题,请参考以下文章

2020-3-8刷题

[2020.3.8]改错2

微信小程序代码片段

VSCode自定义代码片段——CSS选择器

谷歌浏览器调试jsp 引入代码片段,如何调试代码片段中的js

片段和活动之间的核心区别是啥?哪些代码可以写成片段?