Repository navigation
feat: start a bot at a given time of its cycle (0.4.0) - #3
Merged
Merged
Conversation
Add `initialPhase` to `BloubBot`. The component reads it once, on mount, and starts the clock, the block and the pose at that time. Bots mounted together with different values do not animate in step. Add an optional `posePhase` to `BotEngine.setState`. It moves the pose of the new state forward and keeps the transition timing. With 0, the output does not change. OpenBot had this feature as a patch on the built package. The patch read props directly in the component body, and Solid 2 logged a STRICT_READ_UNTRACKED warning for each avatar. This version reads all start values in one `untrack`.
|
Apercu Cloudflare Pages : https://pr-3.bloub-app.pages.dev |
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
BloubBotgetsinitialPhase. The component reads it once, on mount, and starts the clock, the block and the pose at that time. Bots mounted together with different values do not animate in step. A frozen bot (frozenAt) ignores it.BotEngine.setState(id, now, posePhase = 0):posePhasemoves the pose of the new state forward and keeps the transition timing. With 0, the output does not change.Why
OpenBot had this feature as a patch on the built package (
patches/@norbert_bodziony%2Fbloub@0.3.0.patch). The patch readprops.cycledirectly in the component body, so Solid 2 logged aSTRICT_READ_UNTRACKEDwarning for each avatar. This version reads all start values in oneuntrack. After release, OpenBot removes its patch.Checks
bun run test: 216/216 pass (new test:initialPhasestarts the bot at that time of the cycle).bun run typecheckandbun run test:packagepass.STRICT_READ_UNTRACKEDwarnings (8 with the patched 0.3.0).AccountUpdateIsland.test.tsx6/6,bloub-avatar-motion.test.ts14/14,typecheck:rendererpass.Release
After merge:
git tag v0.4.0 && git push origin v0.4.0runspublication.yml.