Deltakosh 8 vuotta sitten
vanhempi
commit
d0f4f35dfb

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 716 - 716
dist/preview release/babylon.d.ts


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 716 - 716
dist/preview release/babylon.module.d.ts


+ 1 - 0
dist/preview release/gui/babylon.gui.d.ts

@@ -261,6 +261,7 @@ declare module BABYLON.GUI {
             isHorizontal: boolean;
             isHorizontal: boolean;
             controlFirst: boolean;
             controlFirst: boolean;
         }): StackPanel;
         }): StackPanel;
+        protected static drawEllipse(x: number, y: number, width: number, height: number, context: CanvasRenderingContext2D): void;
     }
     }
 }
 }
 
 

+ 14 - 12
dist/preview release/gui/babylon.gui.js

@@ -1424,6 +1424,15 @@ var BABYLON;
                 }
                 }
                 return panel;
                 return panel;
             };
             };
+            Control.drawEllipse = function (x, y, width, height, context) {
+                context.translate(x, y);
+                context.scale(width, height);
+                context.beginPath();
+                context.arc(0, 0, 1, 0, 2 * Math.PI);
+                context.closePath();
+                context.scale(1 / width, 1 / height);
+                context.translate(-x, -y);
+            };
             return Control;
             return Control;
         }());
         }());
         // Statics
         // Statics
@@ -1867,9 +1876,7 @@ var BABYLON;
             };
             };
             Ellipse.prototype._localDraw = function (context) {
             Ellipse.prototype._localDraw = function (context) {
                 context.save();
                 context.save();
-                context.beginPath();
-                context.ellipse(this._currentMeasure.left + this._currentMeasure.width / 2, this._currentMeasure.top + this._currentMeasure.height / 2, this._currentMeasure.width / 2 - this._thickness / 2, this._currentMeasure.height / 2 - this._thickness / 2, 0, 0, 2 * Math.PI);
-                context.closePath();
+                GUI.Control.drawEllipse(this._currentMeasure.left + this._currentMeasure.width / 2, this._currentMeasure.top + this._currentMeasure.height / 2, this._currentMeasure.width / 2 - this._thickness / 2, this._currentMeasure.height / 2 - this._thickness / 2, context);
                 if (this._background) {
                 if (this._background) {
                     context.fillStyle = this._background;
                     context.fillStyle = this._background;
                     context.fill();
                     context.fill();
@@ -1891,8 +1898,7 @@ var BABYLON;
                 this._measureForChildren.top += this._thickness;
                 this._measureForChildren.top += this._thickness;
             };
             };
             Ellipse.prototype._clipForChildren = function (context) {
             Ellipse.prototype._clipForChildren = function (context) {
-                context.beginPath();
-                context.ellipse(this._currentMeasure.left + this._currentMeasure.width / 2, this._currentMeasure.top + this._currentMeasure.height / 2, this._currentMeasure.width / 2, this._currentMeasure.height / 2, 0, 0, 2 * Math.PI);
+                GUI.Control.drawEllipse(this._currentMeasure.left + this._currentMeasure.width / 2, this._currentMeasure.top + this._currentMeasure.height / 2, this._currentMeasure.width / 2, this._currentMeasure.height / 2, context);
                 context.clip();
                 context.clip();
             };
             };
             return Ellipse;
             return Ellipse;
@@ -2557,10 +2563,8 @@ var BABYLON;
                 if (this._processMeasures(parentMeasure, context)) {
                 if (this._processMeasures(parentMeasure, context)) {
                     var actualWidth = this._currentMeasure.width - this._thickness;
                     var actualWidth = this._currentMeasure.width - this._thickness;
                     var actualHeight = this._currentMeasure.height - this._thickness;
                     var actualHeight = this._currentMeasure.height - this._thickness;
-                    // Outer                
-                    context.beginPath();
-                    context.ellipse(this._currentMeasure.left + this._currentMeasure.width / 2, this._currentMeasure.top + this._currentMeasure.height / 2, this._currentMeasure.width / 2 - this._thickness / 2, this._currentMeasure.height / 2 - this._thickness / 2, 0, 0, 2 * Math.PI);
-                    context.closePath();
+                    // Outer
+                    GUI.Control.drawEllipse(this._currentMeasure.left + this._currentMeasure.width / 2, this._currentMeasure.top + this._currentMeasure.height / 2, this._currentMeasure.width / 2 - this._thickness / 2, this._currentMeasure.height / 2 - this._thickness / 2, context);
                     context.fillStyle = this._background;
                     context.fillStyle = this._background;
                     context.fill();
                     context.fill();
                     context.strokeStyle = this.color;
                     context.strokeStyle = this.color;
@@ -2571,9 +2575,7 @@ var BABYLON;
                         context.fillStyle = this.color;
                         context.fillStyle = this.color;
                         var offsetWidth = actualWidth * this._checkSizeRatio;
                         var offsetWidth = actualWidth * this._checkSizeRatio;
                         var offseHeight = actualHeight * this._checkSizeRatio;
                         var offseHeight = actualHeight * this._checkSizeRatio;
-                        context.beginPath();
-                        context.ellipse(this._currentMeasure.left + this._currentMeasure.width / 2, this._currentMeasure.top + this._currentMeasure.height / 2, offsetWidth / 2 - this._thickness / 2, offseHeight / 2 - this._thickness / 2, 0, 0, 2 * Math.PI);
-                        context.closePath();
+                        GUI.Control.drawEllipse(this._currentMeasure.left + this._currentMeasure.width / 2, this._currentMeasure.top + this._currentMeasure.height / 2, offsetWidth / 2 - this._thickness / 2, offseHeight / 2 - this._thickness / 2, context);
                         context.fill();
                         context.fill();
                     }
                     }
                 }
                 }

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 2 - 2
dist/preview release/gui/babylon.gui.min.js


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 2 - 2
dist/preview release/inspector/babylon.inspector.bundle.js


+ 0 - 6
dist/preview release/inspector/babylon.inspector.js

@@ -3516,12 +3516,6 @@ var INSPECTOR;
                     elem: elemValue,
                     elem: elemValue,
                     updateFct: function () { return _this._scene.lights.length.toString(); }
                     updateFct: function () { return _this._scene.lights.length.toString(); }
                 });
                 });
-                elemLabel = _this._createStatLabel("Total lights", _this._panel);
-                elemValue = INSPECTOR.Helpers.CreateDiv('stat-value', _this._panel);
-                _this._updatableProperties.push({
-                    elem: elemValue,
-                    updateFct: function () { return _this._scene.lights.length.toString(); }
-                });
                 elemLabel = _this._createStatLabel("Total vertices", _this._panel);
                 elemLabel = _this._createStatLabel("Total vertices", _this._panel);
                 elemValue = INSPECTOR.Helpers.CreateDiv('stat-value', _this._panel);
                 elemValue = INSPECTOR.Helpers.CreateDiv('stat-value', _this._panel);
                 _this._updatableProperties.push({
                 _this._updatableProperties.push({

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 2 - 2
dist/preview release/inspector/babylon.inspector.min.js


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 1 - 1
dist/preview release/loaders/babylon.objFileLoader.min.js