Class: IWSDKEnvironmentPort
Defined in: packages/iwsdk-environment/src/environment-port.ts:101
Applies an environment to a scene.
Every method takes the whole slot, or null to remove it. The director
calls a method ONLY when that slot's value actually changed, so an adapter
may treat each call as "this is new, act on it" and does not need to diff.
That matters on IWSDK, where applying a change means setting _needsUpdate
and re-running a system.
Implements
Constructors
Constructor
new IWSDKEnvironmentPort(world: World, options?: IWSDKEnvironmentPortOptions): IWSDKEnvironmentPort;
Defined in: packages/iwsdk-environment/src/environment-port.ts:117
Parameters
| Parameter | Type |
|---|---|
world | World |
options | IWSDKEnvironmentPortOptions |
Returns
IWSDKEnvironmentPort
Methods
applyAmbient()
applyAmbient(light: AmbientLightSpec | null): void;
Defined in: packages/iwsdk-environment/src/environment-port.ts:351
Parameters
| Parameter | Type |
|---|---|
light | AmbientLightSpec | null |
Returns
void
Implementation of
applyFog()
applyFog(fog: FogSpec | null): void;
Defined in: packages/iwsdk-environment/src/environment-port.ts:326
Parameters
| Parameter | Type |
|---|---|
fog | FogSpec | null |
Returns
void
Implementation of
applyIbl()
applyIbl(ibl: IblSpec | null): void;
Defined in: packages/iwsdk-environment/src/environment-port.ts:189
The environment map, as IWSDK's own image-based lighting components.
room is not an approximation here: IWSDK's IBLTexture takes the string
"room" for its built-in probe, so the one kind three.js has to fake is
the one kind this host has natively.
Parameters
| Parameter | Type |
|---|---|
ibl | IblSpec | null |
Returns
void
Implementation of
applyKeyLight()
applyKeyLight(light: KeyLightSpec | null): void;
Defined in: packages/iwsdk-environment/src/environment-port.ts:364
Parameters
| Parameter | Type |
|---|---|
light | KeyLightSpec | null |
Returns
void
Implementation of
applyLightEstimation()
applyLightEstimation(estimation:
| ResolvedLightEstimation
| null): void;
Defined in: packages/iwsdk-environment/src/environment-port.ts:310
IWSDK 0.5.3 has no light estimation at all - no probe, no session hook, nothing in its typings. This says so instead of leaving the app to wonder why the room never lights anything, and the request is recorded in docs/UPSTREAM_ENHANCEMENTS.md.
Parameters
| Parameter | Type |
|---|---|
estimation | | ResolvedLightEstimation | null |
Returns
void
Implementation of
EnvironmentPort.applyLightEstimation
applyOcclusion()
applyOcclusion(spec: OcclusionSpec | null): void;
Defined in: packages/iwsdk-environment/src/environment-port.ts:244
Depth occlusion, through IWSDK's DepthSensingSystem and the per-entity
DepthOccludable component.
IWSDK patches the materials under each opted-in entity, which is why the scope matters more here than on three.js: there is no global mode to turn on, and an entity nobody opted in is an entity the real world will not hide. Whatever this port adds, it remembers, so turning occlusion off never strips a component the app put there itself.
Parameters
| Parameter | Type |
|---|---|
spec | OcclusionSpec | null |
Returns
void
Implementation of
EnvironmentPort.applyOcclusion
applySky()
applySky(sky: SkySpec | null): void;
Defined in: packages/iwsdk-environment/src/environment-port.ts:131
Parameters
| Parameter | Type |
|---|---|
sky | SkySpec | null |
Returns
void
Implementation of
dispose()
dispose(): void;
Defined in: packages/iwsdk-environment/src/environment-port.ts:388
Release anything the port created. Optional.
Returns
void
Implementation of
observe()
observe(host: EnvironmentPortHost): () => void;
Defined in: packages/iwsdk-environment/src/environment-port.ts:124
Hand the port the object it talks back through.
Called once, at construction, before anything is applied. The returned
function is called on dispose. This is the ONLY inbound path: see
sensing.ts for why there is one and why it carries what it does.
Parameters
| Parameter | Type |
|---|---|
host | EnvironmentPortHost |
Returns
() => void