Skip to main content

Class: EnvironmentDescriptor

Defined in: environment.ts:15

The platform environment a service is running in: a name plus the capability strings the host offers, such as "dom" or "render-loop". Configuration profiles gate on it, so a service can register differently on a browser page and in a headless test.

Not to be confused with EnvironmentSpec from @realitycollective/webxr-environment, which describes the visual environment - sky, fog and lighting. The two are unrelated, and an app can hold both at once: this one answers "what can the host do", that one answers "what does the world look like".

Implements

Constructors

Constructor

new EnvironmentDescriptor(name: string, capabilities?: Iterable<string>): EnvironmentDescriptor;

Defined in: environment.ts:18

Parameters

ParameterTypeDefault value
namestringundefined
capabilitiesIterable<string>[]

Returns

EnvironmentDescriptor

Properties

PropertyModifierTypeDefined in
capabilitiesreadonlyReadonlySet<string>environment.ts:16
namereadonlystringenvironment.ts:18

Methods

hasCapability()

hasCapability(capability: string): boolean;

Defined in: environment.ts:22

Parameters

ParameterType
capabilitystring

Returns

boolean

Implementation of

IEnvironmentDescriptor.hasCapability