Reference·JavaScript · @bimworks/viewer3dJavaScript

ShadowState

Interface in @bimworks/viewer3d.

API catalogue · @bimworks/viewer3d · Interface

TypeScript#
interface ShadowState

Members#

Member Kind Description
active Property Whether shadows are drawn now: "sun" draws none while the sun is off or below the horizon
groundElevation Property
lastPass Property The last shadow map drawn: CPU ms to submit it, ms from start to finish, the frames it was drawn in, triangles (all passes), triangles of the transparent cas…
mapSize Property The shadow map's size in texels, null before the first
mode Property
quality Property
sectionPlanesCutShadows Property
texelSize Property One texel of the shadow map in mm
threshold Property
transparentCasters Property
updating Property Whether a new shadow map is being drawn over several frames (large scenes); the previous one shows meanwhile
viewMap Property The view map in use (high quality, drawn when the camera rests close by): its size, texel in mm, and its last pass (subset: drawn from the casters over its w…

active#

TypeScript#
active: boolean

Whether shadows are drawn now: "sun" draws none while the sun is off or below the horizon

groundElevation#

TypeScript#
groundElevation: number | null

lastPass#

TypeScript#
lastPass: { elapsedMs: number; ms: number; size: number; steps: number; subset: boolean; texelSize: number; translucentTriangles: number; triangles: number } | null

The last shadow map drawn: CPU ms to submit it, ms from start to finish, the frames it was drawn in, triangles (all passes), triangles of the transparent casters, size, texel, and whether it held only the largest casters (drawn while the sun moves over a large scene)

mapSize#

TypeScript#
mapSize: number | null

The shadow map's size in texels, null before the first

mode#

TypeScript#
mode: "off" | "sun" | "ground"

quality#

TypeScript#
quality: "auto" | "standard" | "high"

sectionPlanesCutShadows#

TypeScript#
sectionPlanesCutShadows: boolean

texelSize#

TypeScript#
texelSize: number | null

One texel of the shadow map in mm

threshold#

TypeScript#
threshold: number

transparentCasters#

TypeScript#
transparentCasters: "none" | "threshold" | "attenuate" | "tint"

updating#

TypeScript#
updating: boolean

Whether a new shadow map is being drawn over several frames (large scenes); the previous one shows meanwhile

viewMap#

TypeScript#
viewMap: { lastPass: { elapsedMs: number; ms: number; steps: number; subset: boolean; triangles: number }; size: number; texelSize: number } | null

The view map in use (high quality, drawn when the camera rests close by): its size, texel in mm, and its last pass (subset: drawn from the casters over its window only)