UNPKG

gpu-curtains

Version:

gpu-curtains is a 3D WebGPU rendering engine. It can be used as a standalone 3D engine, but also includes extra classes focused on mapping 3d objects to DOM elements; It allows users to synchronize values such as position, sizing, or scale between them.

21 lines (18 loc) 662 B
import { Light } from './Light.mjs'; import { Vec3 } from '../../math/Vec3.mjs'; class AmbientLight extends Light { /** * AmbientLight constructor * @param renderer - {@link CameraRenderer} or {@link GPUCurtains} used to create this {@link AmbientLight}. * @param parameters - {@link LightBaseParams} used to create this {@link AmbientLight}. */ constructor(renderer, { label = "AmbientLight", color = new Vec3(1), intensity = 0.1 } = {}) { const type = "ambientLights"; super(renderer, { label, color, intensity, type }); } // explicitly disable position as well /** @ignore */ applyPosition() { } } export { AmbientLight };