Global ambient light

Is there some way to set the omni-directional “ambient” amount of light?
for all objects

Unfortunately at the moment, no.

The “global light” are the ambientColor and ambientFactor properties on Phong Opaque (textured), but those require to be set for every material.

What you could do, but is quite a bit of effort (less so, if you’re already using a custom Phong.frag) is use a constant in a shader. Yet that would not be dynamic for runtime.

An alternative would be to run through all materials in JavaScript and set the ambient factor on the Phong materials, but this is risky, use with caution, this is not API!

for(let i =  0; i < someFixMaterialIndex; ++i) {
    const m = WL.Mateiral.wrap(i); // Warning: Not officially supported API, might break in future versions.
    if(m.shader == "Phong Opaque Textured") m.ambientFactor = globalFactor;
}

I need the light to be dynamic.
How expensive are the directional “sun” lights?

Slightly less expensive than point lights currently (0.8.9, 0.8.10)