WebGLLights constructor
WebGLLights(
- WebGLExtensions extensions,
- WebGLCapabilities capabilities
Implementation
WebGLLights(this.extensions, this.capabilities) {
cache = UniformsCache();
shadowCache = ShadowUniformsCache();
state = LightState({
"version": 0,
"hash": {
"directionalLength": -1,
"pointLength": -1,
"spotLength": -1,
"rectAreaLength": -1,
"hemiLength": -1,
"numDirectionalShadows": -1,
"numPointShadows": -1,
"numSpotShadows": -1
},
"ambient": List<double>.from([0.0, 0.0, 0.0]),
"probe": [],
"directional": [],
"directionalShadow": [],
"directionalShadowMap": [],
"directionalShadowMatrix": [],
"spot": [],
"spotShadow": [],
"spotShadowMap": [],
"spotShadowMatrix": [],
"rectArea": [],
"rectAreaLTC1": null,
"rectAreaLTC2": null,
"point": [],
"pointShadow": [],
"pointShadowMap": [],
"pointShadowMatrix": [],
"hemi": []
});
for (int i = 0; i < 9; i++) {
state.probe.add(Vector3());
}
vector3 = Vector3();
matrix4 = Matrix4();
matrix42 = Matrix4();
}