-
Notifications
You must be signed in to change notification settings - Fork 57
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
Dynamic dolly speed/rotation sensitivity #249
Conversation
untrack(() => (cam.position.z = this.scrollFling!.y)) | ||
const setScrollFactor = this.dynamicDolly | ||
untrack(() => { | ||
cam.position.z = this.scrollFling!.y |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The untrack
could also be untrack(() => cam.position).z =
. There is an infinite loop here (not sure if you noticed that, without untrack).
This is one thing that needs to be fixed. It was based on an older pattern when things were all event based, and sub props (x/y/z) made the parent object emit an event (I basically ported it verbatim to Solid reactivity). In this case setting .z
triggers reactivity for .position
, which triggers the same effect we're setting the value in.
I think either we can remove reactivity for .position
(and .rotation
, etc) and have only the x/y/z properties be reactive, or have .position
(etc) be Solid mutables (return createMutable(this)
in XYZValues
). The thing is, this is currently possible: el1.position = el2.position
, and would no longer work. Hmmm
-Removed excess rotation after mouse is idle for >100ms
-Removed excess rotation after mouse is idle for >100ms
…erations, and rename variables to reduce ambiguity and have matching pattern in naming
naming updates, math re-ordering
81901e2
to
c177d4b
Compare
Closing in favor of the other PR with the branch inside our repo: #251 |
-Removed excess rotation after mouse is idle for >100ms