소스 검색

Move divisor and instanced to VB

David Catuhe 7 년 전
부모
커밋
647cbc4d98
6개의 변경된 파일9911개의 추가작업 그리고 9611개의 파일을 삭제
  1. 9382 9355
      dist/preview release/babylon.d.ts
  2. 45 45
      dist/preview release/babylon.js
  3. 211 72
      dist/preview release/babylon.max.js
  4. 45 45
      dist/preview release/babylon.worker.js
  5. 211 72
      dist/preview release/es6.js
  6. 17 22
      src/Mesh/babylon.buffer.ts

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 9382 - 9355
dist/preview release/babylon.d.ts


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 45 - 45
dist/preview release/babylon.js


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 211 - 72
dist/preview release/babylon.max.js


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 45 - 45
dist/preview release/babylon.worker.js


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 211 - 72
dist/preview release/es6.js


+ 17 - 22
src/Mesh/babylon.buffer.ts

@@ -5,8 +5,6 @@
         private _data: Nullable<FloatArray>;
         private _updatable: boolean;
         private _strideSize: number;
-        private _instanced: boolean;
-        private _instanceDivisor: number;
 
         constructor(engine: any, data: FloatArray, updatable: boolean, stride: number, postponeInternalCreation?: boolean, instanced: boolean = false) {
             if (engine instanceof Mesh) { // old versions of BABYLON.VertexBuffer accepted 'mesh' instead of 'engine'
@@ -25,14 +23,11 @@
             if (!postponeInternalCreation) { // by default
                 this.create();
             }
-
-            this._instanced = instanced;
-            this._instanceDivisor = instanced ? 1 : 0;
         }
 
         public createVertexBuffer(kind: string, offset: number, size: number, stride?: number, instanced?: boolean): VertexBuffer {
             // a lot of these parameters are ignored as they are overriden by the buffer
-            return new VertexBuffer(this._engine, this, kind, this._updatable, true, stride ? stride : this._strideSize, instanced !== undefined ? instanced : this._instanced, offset, size);
+            return new VertexBuffer(this._engine, this, kind, this._updatable, true, stride ? stride : this._strideSize, instanced, offset, size);
         }
 
         // Properties
@@ -52,22 +47,22 @@
             return this._strideSize;
         }
 
-        public getIsInstanced(): boolean {
-            return this._instanced;
-        }
-
-        public get instanceDivisor(): number {
-            return this._instanceDivisor;
-        }
-
-        public set instanceDivisor(value: number) {
-            this._instanceDivisor = value;
-            if (value == 0) {
-                this._instanced = false;
-            } else {
-                this._instanced = true;
-            }
-        }
+        // public getIsInstanced(): boolean {
+        //     return this._instanced;
+        // }
+
+        // public get instanceDivisor(): number {
+        //     return this._instanceDivisor;
+        // }
+
+        // public set instanceDivisor(value: number) {
+        //     this._instanceDivisor = value;
+        //     if (value == 0) {
+        //         this._instanced = false;
+        //     } else {
+        //         this._instanced = true;
+        //     }
+        // }
 
         // Methods
         public create(data: Nullable<FloatArray> = null): void {