babylon.hemisphericLight.js 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. var __extends = this.__extends || function (d, b) {
  2. for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
  3. function __() { this.constructor = d; }
  4. __.prototype = b.prototype;
  5. d.prototype = new __();
  6. };
  7. var BABYLON;
  8. (function (BABYLON) {
  9. var HemisphericLight = (function (_super) {
  10. __extends(HemisphericLight, _super);
  11. function HemisphericLight(name, direction, scene) {
  12. _super.call(this, name, scene);
  13. this.direction = direction;
  14. this.groundColor = new BABYLON.Color3(0.0, 0.0, 0.0);
  15. }
  16. HemisphericLight.prototype.getShadowGenerator = function () {
  17. return null;
  18. };
  19. HemisphericLight.prototype.transferToEffect = function (effect, directionUniformName, groundColorUniformName) {
  20. var normalizeDirection = BABYLON.Vector3.Normalize(this.direction);
  21. effect.setFloat4(directionUniformName, normalizeDirection.x, normalizeDirection.y, normalizeDirection.z, 0);
  22. effect.setColor3(groundColorUniformName, this.groundColor.scale(this.intensity));
  23. };
  24. HemisphericLight.prototype._getWorldMatrix = function () {
  25. if (!this._worldMatrix) {
  26. this._worldMatrix = BABYLON.Matrix.Identity();
  27. }
  28. return this._worldMatrix;
  29. };
  30. return HemisphericLight;
  31. })(BABYLON.Light);
  32. BABYLON.HemisphericLight = HemisphericLight;
  33. })(BABYLON || (BABYLON = {}));
  34. //# sourceMappingURL=babylon.hemisphericLight.js.map