Repository navigation
LivLiv Player 0.4.0
Ways to record a character and show it in more than one place, and two changes to what a character does: the chest
spring is off, and full-body characters wait for a later version. A page written for 0.3 needs no change.
New
- Recorded poses:
getPose(),onFrameandrenderPose(pose, dt, size)onPlayerandBodyPlayer, to keep each
frame's pose and draw it again, in another window or at a video's exact size. See API.md. renderWhenHidden: keep drawing while the canvas is out of view, for a live output or a recording.- Response profiles, which reshape params one by one (range, curve, smoothing):
parameterProfileand
parameterSampleon both players,profileandsampleon face tracking, andTrackingFilter,
readTrackingProfile(),parameterRule()andTRACKING_PARAMETERSfrom@livliv-dev/player/tracking. See
API.md. getAnchor('head' | 'body'): where the head and the torso were drawn, to attach things that follow the character. A
Bodyof your own can give its own withanchor().- Face tracking:
deviceIdpicks the camera, andtracking.videois its preview. - Speech:
say()takes a fetchResponse, played as it streams in, and hooks (onStart, thenonEndoronFail);
volume,level,vowel, andstream, the voice as aMediaStreamfor a call or a recording. modelFiles(): a model's own files, to save or package a character with a project.new PngBody({ pixelated: true }), for pixel art.
Changed
- The chest spring is off, as on livliv.ai: the player ignores a saved
rig.body.bust, so packages exported before
keep still there too, and the featured characters now say 0. Breathing stays. At rest a character draws as in 0.3, to
the pixel; the difference shows only on characters that had it, around the chest, while they breathe and move. - Full-body characters, livliv.ai's newer kind (
anchors.bodyinmodel.json), are refused with
missing-feature: this version would show the whole tall canvas with the feet sliding. A later version plays them,
and aPlaybackPosealready has room for their moves (crouch,dip,talk, unused here).
Fixed
- The expressions'
labelandlabelskeep their types on both players (#8). - A streamed WAV plays at its own sample rate (#6).
- Face tracking tilts the head the same way as the face (#5).
Featured characters
They are not in the npm package.
- 17 of the 21 rebuilt, as livliv.ai now shows them, and their covers redrawn.
rig.body.bustis 0 in all of them.
npm install @livliv-dev/player@0.4.0