@norbert_bodziony/bloub 0.4.1 → 0.6.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.
Files changed (66) hide show
  1. package/README.md +27 -4
  2. package/dist/package/assets/boule.webp +0 -0
  3. package/dist/package/assets/cloe-corps.webp +0 -0
  4. package/dist/package/assets/cloe-oeil0-x.webp +0 -0
  5. package/dist/package/assets/cloe-oeil0-y.webp +0 -0
  6. package/dist/package/assets/cloe-oeil1-x.webp +0 -0
  7. package/dist/package/assets/cloe-oeil1-y.webp +0 -0
  8. package/dist/package/assets/forme-capsule.webp +0 -0
  9. package/dist/package/assets/forme-carre.webp +0 -0
  10. package/dist/package/assets/forme-cercle.webp +0 -0
  11. package/dist/package/assets/forme-galet.webp +0 -0
  12. package/dist/package/assets/forme-goutte.webp +0 -0
  13. package/dist/package/assets/forme-hexagone.webp +0 -0
  14. package/dist/package/assets/forme-losange.webp +0 -0
  15. package/dist/package/assets/forme-nuage.webp +0 -0
  16. package/dist/package/assets/forme-pentagone.webp +0 -0
  17. package/dist/package/assets/forme-squircle.webp +0 -0
  18. package/dist/package/assets/forme-triangle.webp +0 -0
  19. package/dist/package/assets/fred-corps.webp +0 -0
  20. package/dist/package/assets/fred-oeil0-x.webp +0 -0
  21. package/dist/package/assets/fred-oeil0-y.webp +0 -0
  22. package/dist/package/assets/fred-oeil1-x.webp +0 -0
  23. package/dist/package/assets/fred-oeil1-y.webp +0 -0
  24. package/dist/package/assets/malu-corps.webp +0 -0
  25. package/dist/package/assets/malu-oeil0-x.webp +0 -0
  26. package/dist/package/assets/malu-oeil0-y.webp +0 -0
  27. package/dist/package/assets/malu-oeil1-x.webp +0 -0
  28. package/dist/package/assets/malu-oeil1-y.webp +0 -0
  29. package/dist/package/assets/nexo-corps.webp +0 -0
  30. package/dist/package/assets/nexo-oeil0-x.webp +0 -0
  31. package/dist/package/assets/nexo-oeil0-y.webp +0 -0
  32. package/dist/package/assets/nexo-oeil1-x.webp +0 -0
  33. package/dist/package/assets/nexo-oeil1-y.webp +0 -0
  34. package/dist/package/assets/vita-corps.webp +0 -0
  35. package/dist/package/assets/vita-oeil0-x.webp +0 -0
  36. package/dist/package/assets/vita-oeil0-y.webp +0 -0
  37. package/dist/package/assets/vita-oeil1-x.webp +0 -0
  38. package/dist/package/assets/vita-oeil1-y.webp +0 -0
  39. package/dist/package/assets/yoshi-corps.webp +0 -0
  40. package/dist/package/assets/yoshi-oeil0-x.webp +0 -0
  41. package/dist/package/assets/yoshi-oeil0-y.webp +0 -0
  42. package/dist/package/assets/yoshi-oeil1-x.webp +0 -0
  43. package/dist/package/assets/yoshi-oeil1-y.webp +0 -0
  44. package/dist/package/chunks/BloubBot-_XolrDe1.js +2226 -0
  45. package/dist/package/chunks/BloubBot-server-V9r0a_k-.js +1 -0
  46. package/dist/package/index.js +2 -2135
  47. package/dist/package/plush-server.js +1 -0
  48. package/dist/package/plush.js +1208 -0
  49. package/dist/package/server.js +1 -1
  50. package/dist/package/types/bot/engine.d.ts +45 -0
  51. package/dist/package/types/bot/skins.d.ts +1 -1
  52. package/dist/package/types/bot/states.d.ts +2 -0
  53. package/dist/package/types/components/BloubBot.d.ts +42 -1
  54. package/dist/package/types/index.d.ts +1 -1
  55. package/dist/package/types/plush/PlushBot.d.ts +64 -0
  56. package/dist/package/types/plush/assets.d.ts +1 -0
  57. package/dist/package/types/plush/body.d.ts +28 -0
  58. package/dist/package/types/plush/catalogue.d.ts +56 -0
  59. package/dist/package/types/plush/index.d.ts +5 -0
  60. package/dist/package/types/plush/layer.d.ts +36 -0
  61. package/dist/package/types/plush/motion.d.ts +236 -0
  62. package/dist/package/types/plush/slices.d.ts +49 -0
  63. package/dist/package/types/plush/tint.d.ts +27 -0
  64. package/dist/package/types/plush/transition.d.ts +33 -0
  65. package/dist/package/types/plush/warp.d.ts +10 -0
  66. package/package.json +13 -2
package/README.md CHANGED
@@ -29,7 +29,7 @@ something done.
29
29
 
30
30
  ## What's in it
31
31
 
32
- The rail on the left switches between three views. **Customise** offers 8 body
32
+ The rail on the left switches between three views. **Customise** offers 11 body
33
33
  shapes, 12 colours and 16 rest expressions, kept between visits. **Animations** is
34
34
  a small editor: arrange states into a timeline, set how long each is held, save the
35
35
  result. **Settings** holds the language (French, English or Chinese) and the
@@ -118,8 +118,8 @@ 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`, `elapsed`, `fps`,
122
- `autoPause`, and `initialPhase`. Each playback value has a matching `on...Change`
121
+ `follow`, `gaze`, `layer`, `ariaLabel`, `block`, `state`, `playing`, `elapsed`, `fps`,
122
+ `autoPause`, `paused`, and `initialPhase`. Each playback value has a matching `on...Change`
123
123
  callback. See [BloubBot.tsx](src/components/BloubBot.tsx) for the details.
124
124
 
125
125
  `initialPhase` starts the bot at that time of its cycle, in seconds. The component
@@ -131,7 +131,30 @@ frame, so its price is set by how often it draws and by how many of them are on
131
131
  screen. `fps` caps the rate — a 40 px avatar in a list is indistinguishable at 30
132
132
  from the screen's 120 — and `autoPause`, on by default, stops the loop when the
133
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.
134
+ looks like while someone is watching it. `paused` stops the loop on the pose on
135
+ screen once it is at rest, and resumes from it: an avatar that animates only on
136
+ hover keeps one instance, rather than swapping a `frozenAt` bot for a live one,
137
+ which jumps between two poses.
138
+
139
+ ### The plush bot
140
+
141
+ ```tsx
142
+ import { PlushBot } from '@norbert_bodziony/bloub/plush'
143
+
144
+ <PlushBot character="nexo" />
145
+ <PlushBot shape="losange" color="#3b93f0" expression="heureux" state="wink" />
146
+ <PlushBot shape={shape()} transition="pop" />
147
+ ```
148
+
149
+ A felt plush version of the bot, in its own entry so its code and images stay out of
150
+ the main bundle. Six baked characters, or any of the 11 shapes in any colour. Only the
151
+ eyes move: `state` is one of `idle`, `wink`, `wide`, `thinking`, `notify`, `asleep`
152
+ and `failed`, and `expression` takes any of the 16 rest faces. Every change, even inside a fade, blends
153
+ with the engine's own timings. When the body changes (shape, character or colour), it
154
+ turns like a coin and swaps edge-on; `transition` picks another way: `pop`, `warp`,
155
+ `dissolve` or `cut`. `eyeScale` grows the face for small avatars (about 1.3 at
156
+ 24–40 px), and `paused` works as on `BloubBot`. The images are separate files that
157
+ your bundler emits; only the ones a bot shows are fetched. [docs/plush.md](docs/plush.md) has the details.
135
158
 
136
159
  ## Changes
137
160
 
Binary file