Creates a copy of an existing ThreeMouseEvent.
The ThreeMouseEvent to clone
New ThreeMouseEvent with the same type, handler reference, and pointerId
Clones a ThreeMouseEvent by regenerating it using the original event's type, interaction handler, and pointerId. Selection state is recalculated from current handler state, which may differ from the original if selection changed.
const originalEvent = createThreeMouseEvent("select", checkbox, 2);
const clonedEvent = cloneThreeMouseEvent(originalEvent);
// Events have same structure but selection state reflects current handler
// state
console.log(originalEvent.type === clonedEvent.type); // true
console.log(originalEvent.pointerId === clonedEvent.pointerId); // true
console.log(originalEvent.interactionHandler === clonedEvent.interactionHandler);
// true
createThreeMouseEvent - Primary event creation function
Deprecated
Use named exports directly from "@masatomakino/threejs-interactive-object" instead.