ThreePipe
    Preparing search index...

    Class GLTFLightsAmbientExtension

    WEBGI_lights_ambient: saves ambient and hemisphere lights in glTF, which KHR_lights_punctual leaves out (it has only directional, point and spot lights; its first draft also had ambient and hemisphere lights).

    It is laid out like KHR_lights_punctual: the lights are in a lights array in the extension at the root of the file, and a node uses one with {"light": <index>} in its own extension. On import, the node is the light (AmbientLight2 or HemisphereLight2), with the node's name, transform and extras.

    "extensions": {"WEBGI_lights_ambient": {"lights": [
    {"type": "ambient", "color": [1, 1, 1], "intensity": 0.5},
    {"type": "hemisphere", "color": [0.6, 0.8, 1], "groundColor": [0.3, 0.25, 0.2], "intensity": 1}
    ]}},
    "nodes": [{"name": "Ambient", "extensions": {"WEBGI_lights_ambient": {"light": 0}}}]

    The light comes from all directions, so the node's rotation and scale are not used. A hemisphere light, as three.js HemisphereLight, takes its sky direction from the world origin to the node's world position ([0, 1, 0] in three.js by default, so the sky is up).

    The other properties of the light object (visible, the userData and so on) are saved by WEBGI_object3d_extras.

    Index
    WebGiLightsAmbientExtension: "WEBGI_lights_ambient" = 'WEBGI_lights_ambient'