MCPcopy Create free account
hub / github.com/microsoft/SandDance / LightingEffect1

Function LightingEffect1

docs/app/js/sanddance-app.js:80912–80945  ·  view source on GitHub ↗
(props)

Source from the content-addressed store, hash-verified

80910 (0, _inheritsDefault.default)(LightingEffect1, _Effect);
80911 var _super = _createSuper(LightingEffect1);
80912 function LightingEffect1(props) {
80913 var _this;
80914 (0, _classCallCheckDefault.default)(this, LightingEffect1);
80915 _this = _super.call(this, props);
80916 _this.ambientLight = null;
80917 _this.directionalLights = [];
80918 _this.pointLights = [];
80919 _this.shadowColor = DEFAULT_SHADOW_COLOR;
80920 _this.shadowPasses = [];
80921 _this.shadowMaps = [];
80922 _this.dummyShadowMap = null;
80923 _this.shadow = false;
80924 _this.programManager = null;
80925 for(var key in props){
80926 var lightSource = props[key];
80927 switch(lightSource.type){
80928 case "ambient":
80929 _this.ambientLight = lightSource;
80930 break;
80931 case "directional":
80932 _this.directionalLights.push(lightSource);
80933 break;
80934 case "point":
80935 _this.pointLights.push(lightSource);
80936 break;
80937 default:
80938 }
80939 }
80940 _this._applyDefaultLights();
80941 _this.shadow = _this.directionalLights.some(function(light) {
80942 return light.shadow;
80943 });
80944 return _this;
80945 }
80946 (0, _createClassDefault.default)(LightingEffect1, [
80947 {
80948 key: "preRender",

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected