| 123456789101112131415161718192021222324 |
- import * as THREE from "three";
- import { Line2 } from 'three/examples/jsm/lines/Line2.js';
- import { LineGeometry } from 'three/examples/jsm/lines/LineGeometry.js';
- export default class TouchEdge extends THREE.Group {
- constructor(positions, matLine) {
- super()
- positions.forEach((i, j) => { //top left bottom right
- const geometry = new LineGeometry();
- geometry.setPositions( i );
- const line = new Line2( geometry, matLine );
- line.scale.set( 1, 1, 1 );
- line.position.y += 0.5
- line.name = j
- line.visible = false
- line.x = i[0]
- line.y = i[2]
- this.add( line );
- });
- console.log(this)
- }
- }
|