Appearance
EnvironmentFeatures
Capability registry exposed at environment.features.
Set-style membership semantics: has(name) returns false for any name it doesn't recognise, so forward-looking scripts can query features that may land in a later runtime version without crashing on today's runtime. See the Available Features table below for the queryable strings and what each gates, and the Feature Detection guide for the full per-platform matrix. Use list() for the live set on the current device / runtime.
Available Features
Every string you can pass to has() (and that list() may return). Support varies by platform and runtime version – see the Feature Detection guide for the full per-platform matrix.
| Feature | Availability |
|---|---|
'compute' | GPU compute-kernel dispatch on dynamic meshes via Kernel.fromSource(...) + mesh.runCompute(...). Currently Apple-GPU only, on iOS 18 / visionOS 2 / macOS 15+ with an Apple-7-family GPU or later (roughly A13 / M1 and newer); false on older devices and unsupported simulators. Web / WebXR support is planned. |
'dynamicMesh' | Scriptable dynamic mesh creation via createMesh(...) + entity.representation.mesh. Gated only by the OS floor (iOS 18 / visionOS 2 / macOS 15+). |
'sharedActivities' | Multi-user / SharePlay session support. true when the app build includes it; false in the App Clip and builds where it isn't included. |
'cameraFeed' | Live camera-feed texture (via Texture.cameraFeed()). Currently iPhone / iPad only – not Mac, and visionOS uses a different passthrough surface. |
'screenGestures' | Screen-space drag / pinch / rotate gestures – scene.on('pan'|'pinch'|'rotate') and the consume camera claim. Wired on iPhone / iPad / Mac (a flat screen with a one-finger pan). On Apple Vision Pro input is spatial (eyes + pinch), so these screen gestures aren't delivered – drive interaction from UI panels / buttons there instead. Gate a portable script on this and fall back accordingly. |
'instancing' | GPU mesh instancing via rep.setInstances(...) – render hundreds of copies of a mesh with per-instance transforms at a fraction of the cost of real entities. Rendering-only (no physics / collision / per-instance identity). Requires iOS 26 / visionOS 26 / macOS 26+. |
'handTracking' | Articulated hand-joint tracking via scene.tracking.hands – opt into the hand-tracking provider and read (or script-drive) per-joint transforms without planting a hand-anchored element. Currently Apple Vision Pro only; the hand-tracking data provider is a visionOS capability. false on iOS / iPadOS / Mac. |
Methods
has()
javascript
has(name: string): booleanWhether the named feature is supported on the current platform and runtime version. Unknown names return false (WebGPU Set.has semantic).
Example:
javascript
if (environment.features.has('compute')) {
mesh.runCompute('advect', { uniforms });
} else {
stepOnCPU();
}Parameters:
name(string) - Feature identifier; calllist()for the set supported on this device/runtime.
Returns: boolean
list()
javascript
list(): string[]Every feature string currently supported on this device/runtime. Useful for debugging ("why isn't my branch firing?") and for reflecting the capability set into telemetry.
Example:
javascript
console.log(environment.features.list());
// → ['sharedActivities']Returns: string[]