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 (A14 / M1 and newer – A13 is apple6); 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+. |
'softShadows' | Blurred shadow edges on a spot light – shadow: { edges: 'soft' | 'softer' } on createSpotLight(...). Where this is false the light still casts, with a hard edge, and lightSize does nothing. Point lights cast no shadow at all on any OS, which is a model fact rather than a platform one. |
'shadowCascades' | Splitting a directional light's shadow across several maps – shadow: { cascades }. Where this is false the light uses one map, which is what every OS below the flag does. |
'projectedLightTexture' | A texture a spot light projects through its cone – projectedTexture on createSpotLight(...), and light.projectedTextureRotation. Where this is false the light projects a plain cone and the texture is ignored. |
'surroundingsLight' | Letting a spot or point light spill onto real surfaces rather than only onto virtual objects. Apple declares this unavailable on iOS and Mac Catalyst outright, so of the platforms this app ships it exists on Apple Vision Pro alone – a portable script must not assume a lit room. |
'bloom' | Scene-wide bloom via scene.setBloom(...). Needs both a new enough OS and an Apple-7-family GPU (A14 / M1 and newer), so it is false on hardware where the rest of the scene renders fine. On visionOS it additionally needs an immersive space, which nothing outside the running app can report. |
'toneMapping' | A custom tone curve via scene.setToneMapping(...). Where this is false the scene keeps the platform's default curve. |
'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[]