Reference·JavaScript · @bimworks/viewer3dJavaScript

ShadowOptions

Interface in @bimworks/viewer3d.

API catalogue · @bimworks/viewer3d · Interface

TypeScript#
interface ShadowOptions

Members#

Member Kind Description
groundElevation Property Height of the ground that catches the shadow, in metres in display coordinates; null for the lowest visible geometry
mode Property "off" (the default), "ground" or "sun"
quality Property "auto" (the default: standard on touch-only devices, high elsewhere); "standard": a 2048² map; "high": a 4096² map at finer depth precision and, once the cam…
sectionPlanesCutShadows Property Default true: what a section plane cuts away casts no shadow
threshold Property The opacity (0..1) from which a transparent object casts with "threshold". Default 0.9
transparentCasters Property What transparent objects cast in the sun: "attenuate" (the default) lets through as much light as the object lets the background through on screen; "tint" th…

groundElevation#

TypeScript#
groundElevation?: number | null

Height of the ground that catches the shadow, in metres in display coordinates; null for the lowest visible geometry

mode#

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

"off" (the default), "ground" or "sun"

quality#

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

"auto" (the default: standard on touch-only devices, high elsewhere); "standard": a 2048² map; "high": a 4096² map at finer depth precision and, once the camera rests, a 2048² view map of what it sees nearby and soft edges from the sun's disc

sectionPlanesCutShadows#

TypeScript#
sectionPlanesCutShadows?: boolean

Default true: what a section plane cuts away casts no shadow

threshold#

TypeScript#
threshold?: number

The opacity (0..1) from which a transparent object casts with "threshold". Default 0.9

transparentCasters#

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

What transparent objects cast in the sun: "attenuate" (the default) lets through as much light as the object lets the background through on screen; "tint" the same in the hue of its colour; "threshold" a full shadow from the threshold opacity up and none below; "none" nothing. The ground shadow knows "threshold" and "none" only