import * as THREE from "three"; import TouchEdge from "./TouchEdge"; export default class ImgLabel extends THREE.Mesh { constructor(texture, matLine) { const width = 1.5; const height = 0.85; const g = new THREE.PlaneGeometry(width, height); g.rotateX(-Math.PI / 2); const m = new THREE.MeshBasicMaterial({ map: texture, }); super(g, m); // console.log(g); const p = [ [-0.75, 0, -0.425, 0.75, 0, -0.425], [-0.75, 0, -0.425, -0.75, 0, 0.425], [-0.75, 0, 0.425, 0.75, 0, 0.425], [0.75, 0, 0.425, 0.75, 0, -0.425], ]; this.touchLines = new TouchEdge(p, matLine); this.touchLines.position.y += 0.5; this.add(this.touchLines); this.name = "imglabel"; } }