Negative delay when child relative x is negative #45

Open
opened 2021-11-15 08:28:21 +00:00 by alicericci · 3 comments
alicericci commented 2021-11-15 08:28:21 +00:00 (Migrated from gitlab.com)

element.computedProperties.delay = Math.round(element.computedProperties.relativePos.x * interval / 100)

When a child is to the left of its parent, the delay is negative. When given a negative timeout, the function setTimout will fire either immediately or according to the minimum of 4ms if the setTimeout is nested 5x.
Since the parent is muted, this bug cannot be heard, but this value should be capped at 0.

If the intention is for the child to play early, the structure should be changed because nested timeout can't produce that output.

`element.computedProperties.delay = Math.round(element.computedProperties.relativePos.x * interval / 100)` When a child is to the left of its parent, the delay is negative. When given a negative timeout, the function setTimout will fire either immediately or according to the minimum of 4ms if the setTimeout is nested 5x. Since the parent is muted, this bug cannot be heard, but this value should be capped at 0. If the intention is for the child to play early, the structure should be changed because nested timeout can't produce that output.
alicericci commented 2021-11-15 08:31:24 +00:00 (Migrated from gitlab.com)

changed the description

changed the description
alicericci commented 2021-11-15 09:20:29 +00:00 (Migrated from gitlab.com)

mentioned in commit 8d2c68d41d

mentioned in commit 8d2c68d41d620c8d3012bcfaa25737d0208aca4a
raphaelbastide commented 2021-11-15 16:19:38 +00:00 (Migrated from gitlab.com)

Yes, that’s a non-expected but normal behavior. I want to experiment more with nesting to have a real opinion on it. Thanks for pointing this out. To be updated.

Yes, that’s a non-expected but normal behavior. I want to experiment more with nesting to have a real opinion on it. Thanks for pointing this out. To be updated.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
tarball/cascade#45
No description provided.