@norbert_bodziony/bloub 0.2.1 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +14 -3
- package/dist/package/index.js +305 -253
- package/dist/package/server.js +1 -1
- package/dist/package/types/bot/engine.d.ts +12 -1
- package/dist/package/types/components/BloubBot.d.ts +22 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -118,9 +118,20 @@ editor, Tailwind, export dialogs, video encoder, or application translations.
|
|
|
118
118
|
Solid runtime. The package supports SolidJS 2, starting with `2.0.0-rc.0`.
|
|
119
119
|
|
|
120
120
|
Props: `size`, `shape`, `color`, `expression`, `paper`, `frozenAt`, `cycle`,
|
|
121
|
-
`follow`, `gaze`, `ariaLabel`, `block`, `state`, `playing`,
|
|
122
|
-
playback value has a matching `on...Change`
|
|
123
|
-
[BloubBot.tsx](src/components/BloubBot.tsx) for the details.
|
|
121
|
+
`follow`, `gaze`, `ariaLabel`, `block`, `state`, `playing`, `elapsed`, `fps`,
|
|
122
|
+
`autoPause`, and `initialPhase`. Each playback value has a matching `on...Change`
|
|
123
|
+
callback. See [BloubBot.tsx](src/components/BloubBot.tsx) for the details.
|
|
124
|
+
|
|
125
|
+
`initialPhase` starts the bot at that time of its cycle, in seconds. The component
|
|
126
|
+
reads it once, on mount. Give each bot in a list a different value, and the bots
|
|
127
|
+
do not breathe in step.
|
|
128
|
+
|
|
129
|
+
An animated bot costs a style recalculation, a layout and a paint per drawn
|
|
130
|
+
frame, so its price is set by how often it draws and by how many of them are on
|
|
131
|
+
screen. `fps` caps the rate — a 40 px avatar in a list is indistinguishable at 30
|
|
132
|
+
from the screen's 120 — and `autoPause`, on by default, stops the loop when the
|
|
133
|
+
bot is off screen or its tab is in the background. Neither changes what the bot
|
|
134
|
+
looks like while someone is watching it.
|
|
124
135
|
|
|
125
136
|
## Changes
|
|
126
137
|
|