Quellcode durchsuchen

Removing HighlightLayer effects, way to costly in VR :-(

davrous vor 8 Jahren
Ursprung
Commit
d6c24f1cbb

Datei-Diff unterdrückt, da er zu groß ist
+ 768 - 771
dist/preview release/babylon.d.ts


Datei-Diff unterdrückt, da er zu groß ist
+ 7 - 7
dist/preview release/babylon.js


+ 0 - 17
dist/preview release/babylon.max.js

@@ -52268,8 +52268,6 @@ var BABYLON;
                 - button_enter
                 */
                 _this._defaultModel = newMeshes[1];
-                _this._hlButtonA = new BABYLON.HighlightLayer("hlButtonA", scene);
-                _this._hlButtonB = new BABYLON.HighlightLayer("hlButtonB", scene);
                 if (meshLoaded) {
                     meshLoaded(_this._defaultModel);
                 }
@@ -52361,12 +52359,6 @@ var BABYLON;
                         else {
                             (this._defaultModel.getChildren()[1]).position.y = 0;
                         }
-                        if (notifyObject.touched) {
-                            this._hlButtonA.addMesh(this._defaultModel.getChildren()[1], BABYLON.Color3.White());
-                        }
-                        else {
-                            this._hlButtonA.removeMesh(this._defaultModel.getChildren()[1]);
-                        }
                     }
                     this.onMainButtonStateChangedObservable.notifyObservers(notifyObject);
                     return;
@@ -52378,12 +52370,6 @@ var BABYLON;
                         else {
                             (this._defaultModel.getChildren()[2]).position.y = 0;
                         }
-                        if (notifyObject.touched) {
-                            this._hlButtonB.addMesh(this._defaultModel.getChildren()[2], BABYLON.Color3.White());
-                        }
-                        else {
-                            this._hlButtonB.removeMesh(this._defaultModel.getChildren()[2]);
-                        }
                     }
                     this.onSecondaryButtonStateChangedObservable.notifyObservers(notifyObject);
                     return;
@@ -52417,7 +52403,6 @@ var BABYLON;
                 - LED
                 */
                 _this._defaultModel = newMeshes[1];
-                _this._hlButtonMenu = new BABYLON.HighlightLayer("hlButtonMenu", scene);
                 if (meshLoaded) {
                     meshLoaded(_this._defaultModel);
                 }
@@ -52471,11 +52456,9 @@ var BABYLON;
                     if (this._defaultModel) {
                         if (notifyObject.pressed) {
                             (this._defaultModel.getChildren()[2]).position.y = -0.001;
-                            this._hlButtonMenu.addMesh(this._defaultModel.getChildren()[2], BABYLON.Color3.White());
                         }
                         else {
                             (this._defaultModel.getChildren()[2]).position.y = 0;
-                            this._hlButtonMenu.removeMesh(this._defaultModel.getChildren()[2]);
                         }
                     }
                     this.onSecondaryButtonStateChangedObservable.notifyObservers(notifyObject);

Datei-Diff unterdrückt, da er zu groß ist
+ 768 - 771
dist/preview release/babylon.module.d.ts


Datei-Diff unterdrückt, da er zu groß ist
+ 7 - 7
dist/preview release/babylon.noworker.js


+ 0 - 20
src/Tools/babylon.extendedGamepad.ts

@@ -247,8 +247,6 @@ module BABYLON {
 
     export class OculusTouchController extends WebVRController {
         private _defaultModel: BABYLON.AbstractMesh;
-        private _hlButtonA: BABYLON.HighlightLayer;
-        private _hlButtonB: BABYLON.HighlightLayer;
 
         public onSecondaryTriggerStateChangedObservable = new Observable<ExtendedGamepadButton>();
 
@@ -274,8 +272,6 @@ module BABYLON {
                 */
 
                 this._defaultModel = newMeshes[1];
-                this._hlButtonA = new BABYLON.HighlightLayer("hlButtonA", scene);
-                this._hlButtonB = new BABYLON.HighlightLayer("hlButtonB", scene);
                 if (meshLoaded) {
                     meshLoaded(this._defaultModel);
                 }
@@ -353,12 +349,6 @@ module BABYLON {
                         else {
                             (<AbstractMesh>(this._defaultModel.getChildren()[1])).position.y = 0;
                         }
-                        if (notifyObject.touched) {
-                            this._hlButtonA.addMesh((<Mesh>this._defaultModel.getChildren()[1]), BABYLON.Color3.White());
-                        }
-                        else {
-                            this._hlButtonA.removeMesh((<Mesh>this._defaultModel.getChildren()[1]));
-                        }
                     }
                     this.onMainButtonStateChangedObservable.notifyObservers(notifyObject);
                     return;
@@ -370,12 +360,6 @@ module BABYLON {
                         else {
                             (<AbstractMesh>(this._defaultModel.getChildren()[2])).position.y = 0;
                         }
-                        if (notifyObject.touched) {
-                            this._hlButtonB.addMesh((<Mesh>this._defaultModel.getChildren()[2]), BABYLON.Color3.White());
-                        }
-                        else {
-                            this._hlButtonB.removeMesh((<Mesh>this._defaultModel.getChildren()[2]));
-                        }
                     }
                     this.onSecondaryButtonStateChangedObservable.notifyObservers(notifyObject);
                     return;
@@ -389,7 +373,6 @@ module BABYLON {
 
     export class ViveController extends WebVRController {
         private _defaultModel: BABYLON.AbstractMesh;
-        private _hlButtonMenu: BABYLON.HighlightLayer;
 
         constructor(vrGamepad) {
             super(vrGamepad);
@@ -410,7 +393,6 @@ module BABYLON {
                 - LED
                 */
                 this._defaultModel = newMeshes[1];
-                this._hlButtonMenu = new BABYLON.HighlightLayer("hlButtonMenu", scene);
                 if (meshLoaded) {
                     meshLoaded(this._defaultModel);
                 }
@@ -457,11 +439,9 @@ module BABYLON {
                     if (this._defaultModel) {
                         if (notifyObject.pressed) {
                             (<AbstractMesh>(this._defaultModel.getChildren()[2])).position.y = -0.001;
-                             this._hlButtonMenu.addMesh((<Mesh>this._defaultModel.getChildren()[2]), BABYLON.Color3.White());
                         }
                         else {
                             (<AbstractMesh>(this._defaultModel.getChildren()[2])).position.y = 0;
-                            this._hlButtonMenu.removeMesh((<Mesh>this._defaultModel.getChildren()[2]));
                         }
                     }
                     this.onSecondaryButtonStateChangedObservable.notifyObservers(notifyObject);