-
Notifications
You must be signed in to change notification settings - Fork 4
isTypedArray in fromPoints fails with Array of floats #24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
The question is broader, related to pex ecosystem: should we prohibit array of float and force typed arrays (with some utils to expand typed array easily). |
There are solutions like this https://github.com/vorg/geom-builder but then you depend on using geom.count instead of geom.positions.length that might be greately padded with zeros due to last array expansion. I wonder if you could expand the underlaying ArrayBuffer but keep typed arrays tight as they are only views on underlying storage. |
why? how do you build geometries with unknown amount of points? |
Also there check should happen once not in a for loop for (let i = 0; i < points.length / (isTypedArray ? 3 : 1); i++) {
if (isTypedArray) {
includePoint(a, points, i * 3);
} else { |
And num points should be calculated once |
Can we do tests in Safari and FF too? |
Another argument is that |
No description provided.
The text was updated successfully, but these errors were encountered: