Remove workaround for missing TypedArray.from function

This commit is contained in:
Maximilian Krög
2022-08-04 23:32:26 +02:00
parent c6d0d803f9
commit e1e19cbd03

View File

@@ -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
*/
fromArray(array) {
const arrayClass = getArrayClassForType(this.type);
this.array = arrayClass.from
? arrayClass.from(array)
: new arrayClass(array);
this.array = getArrayClassForType(this.type).from(array);
}
/**