Closed iDerekLi closed 4 years ago
import * as THREE from "three"; import { Interaction } from "three.interaction"; new Interaction(renderer, scene, camera); var cube = new THREE.Mesh( new THREE.BoxGeometry(3, 3, 3), new THREE.MeshPhongMaterial({ color: 0xffffff }) ); scene.add(cube); cube.on("click", () => { console.log("click"); }); cube.on("mousemove", () => { console.log("mousemove"); }); cube.on("mousedown", () => { console.log("mousedown"); }); cube.on("mouseup", () => { console.log("mouseup"); }); cube.on("mouseout", () => { console.log("mouseout"); }); cube.on("mouseover", () => { console.log("mouseover"); });