UNPKG

cione-comp-lib

Version:

`$ yarn add cione-comp-lib` 或者 `$ npm i cione-comp-lib -S`

37 lines (36 loc) 866 B
import Light from "../Light.mjs"; var PointLight = Light.extend({ range: 100, castShadow: false }, { type: "POINT_LIGHT", uniformTemplates: { pointLightPosition: { type: "3f", value: function(instance) { return instance.getWorldPosition().array; } }, pointLightRange: { type: "1f", value: function(instance) { return instance.range; } }, pointLightColor: { type: "3f", value: function(instance) { var color = instance.color; var intensity = instance.intensity; return [color[0] * intensity, color[1] * intensity, color[2] * intensity]; } } }, clone: function() { var light = Light.prototype.clone.call(this); light.range = this.range; return light; } }); var PointLight$1 = PointLight; export { PointLight$1 as default };