Explorar o código

More fluent API for internal query

David Catuhe %!s(int64=8) %!d(string=hai) anos
pai
achega
2cc4688459

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 4189 - 4189
dist/preview release/babylon.d.ts


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 4189 - 4189
dist/preview release/babylon.module.d.ts


+ 1 - 1
src/Mesh/babylon.abstractMesh.ts

@@ -139,7 +139,7 @@
         }
 
         private _isOcclusionQueryInProgress = false;
-        public get isOcclusionQueryInProgress() {
+        public get isOcclusionQueryInProgress(): boolean {
             return this._isOcclusionQueryInProgress;
         }
 

+ 6 - 2
src/babylon.engine.ts

@@ -4395,8 +4395,10 @@
             return this._gl.createQuery();
         }
 
-        public deleteQuery(query: WebGLQuery): void {
+        public deleteQuery(query: WebGLQuery): Engine {
             this.deleteQuery(query);
+
+            return this;
         }
 
         public isQueryResultAvailable(query: WebGLQuery): boolean {
@@ -4412,9 +4414,11 @@
             this._gl.beginQuery(glAlgorithm, query);
         }
 
-        public endQuery(algorithmType: number) {
+        public endQuery(algorithmType: number): Engine {
             var glAlgorithm = this.getGlAlgorithmType(algorithmType);
             this._gl.endQuery(glAlgorithm);
+
+            return this;
         }
 
         private getGlAlgorithmType(algorithmType: number): number {