checkpoint rebuilder
This commit is contained in:
parent
d847640feb
commit
d634a0ce1c
4 changed files with 116 additions and 55 deletions
|
|
@ -160,14 +160,8 @@ mesh.model = class MeshModel extends mesh.object {
|
|||
}).then(data => {
|
||||
console.log({rebuild: this.id, data});
|
||||
let points = [];
|
||||
for (let arr of data) {
|
||||
arr.push(arr[0]);
|
||||
for (let i=0; i<arr.length-1; i++) {
|
||||
let p1 = arr[i];
|
||||
let p2 = arr[i+1];
|
||||
points.push(new THREE.Vector3().fromArray(p1));
|
||||
points.push(new THREE.Vector3().fromArray(p2));
|
||||
}
|
||||
for (let i=0; i<data.length;) {
|
||||
points.push(new THREE.Vector3(data[i++], data[i++], data[i++]));
|
||||
}
|
||||
let material = new THREE.LineBasicMaterial( { color: 0xdddddd } );
|
||||
let geometry = new THREE.BufferGeometry().setFromPoints(points);
|
||||
|
|
|
|||
Loading…
Reference in a new issue