瀏覽代碼

More fluent API for internal query

David Catuhe 8 年之前
父節點
當前提交
2cc4688459
共有 4 個文件被更改,包括 8385 次插入8381 次删除
  1. 4189 4189
      dist/preview release/babylon.d.ts
  2. 4189 4189
      dist/preview release/babylon.module.d.ts
  3. 1 1
      src/Mesh/babylon.abstractMesh.ts
  4. 6 2
      src/babylon.engine.ts

File diff suppressed because it is too large
+ 4189 - 4189
dist/preview release/babylon.d.ts


File diff suppressed because it is too large
+ 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 {