Skip to content
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

setPoints with a typed array not working in birds demo, only regular array works #1

Open
trusktr opened this issue Jan 13, 2023 · 0 comments

Comments

@trusktr
Copy link
Member

trusktr commented Jan 13, 2023

See these lines:

// FIXME initial positions not working with typed array
// const positions = new Float32Array(100 * 3)
// for (let i = 0; i < 100; i += 3) {
// positions[i + 0] = this.position.x
// positions[i + 1] = this.position.y
// positions[i + 2] = this.position.z
// }
// FIXME initial positions works only with Vector3 array
const positions = []
for (let i = 0; i < 100; i += 1) {
positions.push(this.position.clone())
}

The loop with the Float32Array leads to the lines initially glitched, but the loop with the normal Array works fine.

@trusktr trusktr changed the title setPoints with a typed array working, only regular array works setPoints with a typed array working, only regular array works Jan 13, 2023
@trusktr trusktr changed the title setPoints with a typed array working, only regular array works setPoints with a typed array not working in birds demo, only regular array works Jan 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant