Three.js kamera és kijelölés
Azt a tárgyat jelöli ki, amelyre a játékos ténylegesen mutat. Figyelembe veszi a kamerát, vászonhelyzetet és menüket, a látványobjektumot pedig stabil játékazonosítóhoz kapcsolja.
threejs-camera-picking
Nézd meg, miben segítMikor hasznos?
Akkor használd, ha beágyazott 3D-jelenetben rossz objektumra kattintasz.
Miben segít neked?
- Vászonhoz relatív mutatóhelyet normalizált eszközkoordinátává alakít.
- Korlátozza a sugárteszt jelöltjeit, stabil azonosítóhoz kapcsolja az objektumot.
- Játékművelet előtt tisztázza a felületi bemenetfogást.
Például ezt kérheted
A 3D stratégiai játékomban jelölj ki egységet a minitérkép mellett. Próbáld átméretezés, oldalgörgetés és kameranagyítás után. A mutató alatti egység legyen kijelölve, a díszítőelemek ne fogják el a találatot, a minitérképre kattintás pedig ne jelöljön mögötte.
Részletes dokumentáció
Itt a skill eredeti útmutatóját, példáit és ellenőrzési szempontjait olvashatod az eredeti nyelven.
Összecsukás
Three.js — camera picking
Use when implementing Three.js cameras, raycasting, pointer lock, selection or world-space UI.
Version and project gate
Inspect Three.js revision, renderer/backend, addons import style, bundler, color-management conventions, animation loop owner, scene scale, glTF/decoder versions and existing physics wrapper. Never turn a task into an engine upgrade without the user’s intent. Read the version-matching official reference when an API decision depends on it.
Work
Define camera projection, world scale and input action ownership. Convert pointer coordinates from the canvas bounding rectangle into normalized device coordinates. Limit raycast candidates and map render objects to stable game identifiers. Resolve UI capture before gameplay input.
Deliver
A coordinate-space diagram and working select/move/interact behavior under resize and canvas offsets. Keep the change in the existing project structure; separate actual observations from the proposed acceptance scenario below.
Failure to prevent
Using the window size for an embedded canvas creates offset picking; smooth camera visuals must not change simulation authority.
Acceptance scenario
Pick the same object before and after resize, CSS layout shifts, device-pixel-ratio changes and overlapping UI. Follow the project’s execution and verification permissions. If execution or a target device is unavailable, provide the reproduction steps and name the remaining uncertainty; do not mark it passed.
Scope and sources
This skill belongs to Vex. Agent selection is restricted by Orqestria’s assigned-agent policy, including forced skill selection; instruction text alone is not an access control. These are original task workflows researched from official documentation, not a copied or endorsed vendor skill.
Csomagban lévő fájlok 1
SKILL.md
