anvaka / anvaka/unrender

getOrSetColor() is always called when moving mouse.

Open
#2 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
13
Forks
10
PR merge metrics
No merged PRs in 30d

Description

Hi.
I was doing some research and noticed that method `getOrSetColors(newValue) `from `particle-view.js ` is always called when moving the mouse.
Especially this part:
`if (isFloat32Array(newValue) && newValue.length === colors.length) {
colors = newValue;
geometry.getAttribute('customColor').needsUpdate = true;
}`
Looks like this if condition is always true.
I don't know if this is an intentional behavior so I thought I'll open an issue.

Contributor guide

No contributing guide indexed for this repository

Research direction

Read particle-view.js and trace the mouse-movement path that calls getOrSetColors(newValue). Check whether the Float32Array and length condition are expected on every call, then determine the intended update behavior. Done means the issue's unnecessary or unintended repeated update is confirmed and covered by the project's available verification steps.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, three.js
Domain
computer-graphics
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.