Deltakosh 12 năm trước cách đây
mục cha
commit
a8c28625d2

+ 20 - 0
Babylon/Lights/babylon.hemisphericLight.js

@@ -0,0 +1,20 @@
+var BABYLON = BABYLON || {};
+
+(function () {
+    BABYLON.HemisphericLight = function (name, direction, scene) {
+        this.name = name;
+        this.id = name;
+        this.direction = direction;
+        this.diffuse = new BABYLON.Color3(1.0, 1.0, 1.0);
+        this.specular = new BABYLON.Color3(1.0, 1.0, 1.0);
+        this.groundColor = new BABYLON.Color3(0.0, 0.0, 0.0);
+        this._scene = scene;
+
+        scene.lights.push(this);
+
+        // Animations
+        this.animations = [];
+    };
+    
+    BABYLON.HemisphericLight.prototype = Object.create(BABYLON.Light.prototype);
+})();

+ 22 - 0
Babylon/Lights/babylon.spotLight.js

@@ -0,0 +1,22 @@
+var BABYLON = BABYLON || {};
+
+(function () {
+    BABYLON.SpotLight = function (name, position, direction, angle, exponent, scene) {
+        this.name = name;
+        this.id = name;
+        this.position = position;
+        this.direction = direction;
+        this.angle = angle;
+        this.exponent = exponent;
+        this.diffuse = new BABYLON.Color3(1.0, 1.0, 1.0);
+        this.specular = new BABYLON.Color3(1.0, 1.0, 1.0);
+        this._scene = scene;
+
+        scene.lights.push(this);
+
+        // Animations
+        this.animations = [];
+    };
+    
+    BABYLON.SpotLight.prototype = Object.create(BABYLON.Light.prototype);
+})();