get method
Implementation
Map<String, dynamic>? get(light) {
if (lights[light.id] != null) {
return lights[light.id];
}
Map<String, dynamic> uniforms = {};
switch (light.type) {
case 'DirectionalLight':
uniforms = {"shadowBias": 0, "shadowNormalBias": 0, "shadowRadius": 1, "shadowMapSize": Vector2.zero()};
break;
case 'SpotLight':
uniforms = {"shadowBias": 0, "shadowNormalBias": 0, "shadowRadius": 1, "shadowMapSize": Vector2.zero()};
break;
case 'PointLight':
uniforms = {
"shadowBias": 0,
"shadowNormalBias": 0,
"shadowRadius": 1,
"shadowMapSize": Vector2.zero(),
"shadowCameraNear": 1,
"shadowCameraFar": 1000
};
break;
}
lights[light.id] = uniforms;
return uniforms;
}