Lamplight and shadows in North Haven. What This Module Does
An extension of Reactor3D (reactor_3d.js): the lights of a 3D map and the shadows they cast. Loaded right after the core, in the game from scriptUrls, in the editor from Reactor3D.EXTENSIONS, and in Node by the core's own tail so require("./reactor_3d.js") returns the whole API.
Classes & Namespaces
Reactor3D
137 functions →
Reactor3D.LightGrid
2 functions →
Reactor3D.MapScene
3 functions →
Reactor3D.LightShims
2 functions →
Reactor3D.LightShims.nova
1 function →
Reactor3D.LightShims.rave
1 function →
Design Notes from the Source Code
An extension of Reactor3D (reactor_3d.js): the lights of a 3D map and the shadows they cast. Loaded right after the core, in the game from scriptUrls, in the editor from Reactor3D.EXTENSIONS, and in Node by the core's own tail so require("./reactor_3d.js") returns the whole API.
Four parts, in order: the light model and its shader (light kinds, the light grid, the lit-material shader injection, the cutaway and dissolve that share it, GPU tiering); the shadow atlas; the shims that read a 2D lighting plugin's lights; and the native lights a map carries in its sidecar, with the event commands that switch and move them.
View reactor_3d_lighting.js on GitHub · Show internal (_) functions