File tree 2 files changed +247
-251
lines changed
2 files changed +247
-251
lines changed Original file line number Diff line number Diff line change @@ -59,14 +59,16 @@ for (let j = 0; j < Math.PI; j += (2 * Math.PI) / 100) {
59
59
}
60
60
```
61
61
62
- ``` MeshLine ``` also accepts a ``` Geometry ``` or ``` BufferGeometry ``` looking up the vertices in it.
62
+ ``` MeshLine ``` also accepts a ``` BufferGeometry ``` looking up the vertices in it.
63
63
64
64
``` js
65
- const geometry = new THREE.Geometry () ;
65
+ const points = [] ;
66
66
for (let j = 0 ; j < Math .PI ; j += 2 * Math .PI / 100 ) {
67
- const v = new THREE.Vector3 (Math .cos (j), Math .sin (j), 0 );
68
- geometry .vertices .push (v);
67
+ points .push (new THREE.Vector3 (Math .cos (j), Math .sin (j), 0 ));
69
68
}
69
+ const geometry = new THREE.BufferGeometry ().setFromPoints (points);
70
+ const line = new MeshLine ();
71
+ line .setGeometry (geometry);
70
72
```
71
73
72
74
##### Create a MeshLine and assign the points #####
You can’t perform that action at this time.
0 commit comments