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

Function PointLight1

docs/app/js/sanddance-app.js:81758–81771  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

81756var idCount = 0;
81757var PointLight = function() {
81758 function PointLight1() {
81759 var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
81760 (0, _classCallCheckDefault.default)(this, PointLight1);
81761 var _props$color = props.color, color = _props$color === void 0 ? DEFAULT_LIGHT_COLOR : _props$color;
81762 var _props$intensity = props.intensity, intensity = _props$intensity === void 0 ? DEFAULT_LIGHT_INTENSITY : _props$intensity;
81763 var _props$position = props.position, position = _props$position === void 0 ? DEFAULT_LIGHT_POSITION : _props$position;
81764 this.id = props.id || "point-".concat(idCount++);
81765 this.color = color;
81766 this.intensity = intensity;
81767 this.type = "point";
81768 this.position = position;
81769 this.attenuation = getAttenuation(props);
81770 this.projectedLight = Object.assign({}, this);
81771 }
81772 (0, _createClassDefault.default)(PointLight1, [
81773 {
81774 key: "getProjectedLight",

Callers

nothing calls this directly

Calls 1

getAttenuationFunction · 0.70

Tested by

no test coverage detected