skills/threejs-skills/threejs-webxr/SKILL.md
WebXR integration for three.js: WebXRManager and XRManager on the renderer, session initialization patterns, VRButton and ARButton helpers, XRControllerModelFactory and hand model families, XREstimatedLight, XRPlanes, and related addon Webxr utilities. Use for immersive sessions and controller/hand tracking—not for standard desktop camera projection (threejs-camera) or composer post effects (threejs-postprocessing).
npx skillsauth add partme-ai/full-stack-skills threejs-webxrInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
ALWAYS use this skill when the user mentions:
navigator.xr, reference spaces, session requestAnimationFrame loop via rendererVRButton, ARButton, XRButton creation patterns from examplesIMPORTANT: webxr vs renderers vs camera
| Topic | Skill | |-------|--------| | Enable XR on renderer, sizing | threejs-renderers (basics) + threejs-webxr (session) | | Desktop projection | threejs-camera |
Trigger phrases include:
renderer.xr.enabled = true patterns per docs; prefer setAnimationLoop for XR loops.XREstimatedLight for AR realism—combine with threejs-lights cautiously.import { VRButton } from 'three/addons/webxr/VRButton.js';
// Feature detection and session start
if ('xr' in navigator) {
renderer.xr.enabled = true;
document.body.appendChild(VRButton.createButton(renderer));
renderer.xr.addEventListener('sessionstart', () => {
console.log('XR session started');
});
renderer.xr.addEventListener('sessionend', () => {
console.log('XR session ended — restoring desktop view');
});
} else {
console.warn('WebXR not supported in this browser');
}
See examples/workflow-xr-button.md.
| Docs section | Representative links | |--------------|----------------------| | Renderer XR | https://threejs.org/docs/WebXRManager.html | | Webxr addons | https://threejs.org/docs/VRButton.html | | Webxr addons | https://threejs.org/docs/ARButton.html | | Webxr addons | https://threejs.org/docs/XRControllerModelFactory.html |
WebXR entry points span Addons → Webxr and renderer WebXRManager in three.js docs. Browser and device capabilities vary—answers should cite the official example name and three.js version when possible.
When answering under this skill, prefer responses that:
WebXRManager, VRButton, ARButton, or controller factories as relevant.setAnimationLoop patterns with threejs-renderers for XR render loops.English: webxr, vr, ar, xr session, controller, hand tracking, three.js
中文: WebXR、VR、AR、VRButton、手柄、手部追踪、沉浸式、three.js
development
Provides per-component and per-API examples with cross-platform compatibility details for uni-app, covering built-in components, uni-ui components, and APIs (network, storage, device, UI, navigation, media). Use when the user needs official uni-app components or APIs, wants per-component examples with doc links, or needs platform compatibility checks.
tools
Creates new uni-app projects via the official CLI or HBuilderX with Vue 2/Vue 3 template selection, manifest.json and pages.json configuration, and directory structure setup. Use when the user wants to scaffold a new uni-app project, initialize project files with a single command, or set up the development environment.
tools
Browses, installs, configures, and manages plugins from the uni-app plugin market (ext.dcloud.net.cn) including component plugins, API plugins, and template plugins with dependency handling. Use when the user needs to find and install uni-app plugins, configure plugin settings, manage plugin dependencies, or integrate third-party components.
tools
Develops native Android and iOS plugins for uni-app including module creation, JavaScript-to-native communication, and plugin packaging for distribution. Use when the user needs to build custom native modules, extend uni-app with native capabilities (camera, Bluetooth, sensors), or create publishable native plugins.