瀏覽代碼

Add back Buffer.getStrideSize

Gary Hsu 7 年之前
父節點
當前提交
a02d692c88
共有 1 個文件被更改,包括 9 次插入0 次删除
  1. 9 0
      src/Mesh/babylon.buffer.ts

+ 9 - 0
src/Mesh/babylon.buffer.ts

@@ -72,6 +72,15 @@
             return this._buffer;
             return this._buffer;
         }
         }
 
 
+        /**
+         * Gets the stride in float32 units (i.e. byte stride / 4).
+         * May not be an integer if the byte stride is not divisible by 4.
+         * DEPRECATED. Use byteStride instead.
+         */
+        public getStrideSize(): number {
+            return this.byteStride / 4;
+        }
+
         // Methods
         // Methods
         public create(data: Nullable<DataArray> = null): void {
         public create(data: Nullable<DataArray> = null): void {
             if (!data && this._buffer) {
             if (!data && this._buffer) {