Remove workaround for missing TypedArray.from function
This commit is contained in:
@@ -74,14 +74,11 @@ class WebGLArrayBuffer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Populates the buffer with an array of the given size (all values will be zeroes).
|
* Populates the buffer with an array of the given size.
|
||||||
* @param {Array<number>} array Numerical array
|
* @param {Array<number>} array Numerical array
|
||||||
*/
|
*/
|
||||||
fromArray(array) {
|
fromArray(array) {
|
||||||
const arrayClass = getArrayClassForType(this.type);
|
this.array = getArrayClassForType(this.type).from(array);
|
||||||
this.array = arrayClass.from
|
|
||||||
? arrayClass.from(array)
|
|
||||||
: new arrayClass(array);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user