gaia-pointer-events
Installation
SKILL.md
Pointer Events via @pmndrs/pointer-events
How to use
We can use forwardHtmlEvents to forward the html document events into the 3D scene.
import * as THREE from 'three'
import { forwardHtmlEvents, PointerEvent } from '@pmndrs/pointer-events'
const scene = new THREE.Scene()
const camera = new THREE.PerspectiveCamera(70, width / height, 0.01, 10)
camera.position.z = 1
const { update } = forwardHtmlEvents(document.body, () => camera, scene)
const width = window.innerWidth,
height = window.innerHeight