Meaning of index parameter in hook function signature #121
Answered
by
stockhuman
mattrossman
asked this question in
Q&A
-
Most of the hooks accept some function (e.g. What is the meaning of |
Beta Was this translation helpful? Give feedback.
Answered by
stockhuman
Jan 13, 2021
Replies: 1 comment
-
Better late than never? You'll find your answer on L183 of hooks.ts: props = uuid.map((id, i) => {
const props = prepare(temp, fn(i), argFn) // here, fn is the x-Fn you mentioned
temp.updateMatrix()
object.setMatrixAt(i, temp.matrix)
object.instanceMatrix.needsUpdate = true
return props
}) It's a UUID index, used to iterate over every body in the scene. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
stockhuman
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Better late than never?
You'll find your answer on L183 of hooks.ts:
It's a UUID index, used to iterate over every body in the scene.