babylon.directionalLight.js 604 B

1234567891011121314151617181920
  1. var BABYLON = BABYLON || {};
  2. (function () {
  3. BABYLON.DirectionalLight = function (name, direction, scene) {
  4. this.name = name;
  5. this.id = name;
  6. this.position = direction.scale(-1);
  7. this.direction = direction;
  8. this.diffuse = new BABYLON.Color3(1.0, 1.0, 1.0);
  9. this.specular = new BABYLON.Color3(1.0, 1.0, 1.0);
  10. this._scene = scene;
  11. scene.lights.push(this);
  12. // Animations
  13. this.animations = [];
  14. };
  15. BABYLON.DirectionalLight.prototype = Object.create(BABYLON.Light.prototype);
  16. })();