Repository navigation
LivLiv Player 0.6.0
Long hair that swings and rests on the shoulders, feel settings an editor can change while the character plays, an
advanced entry for code that runs the renderer itself, and VRM files from Blender that play. A page written for 0.5
needs no change. What it will see change, all on purpose (below): long hair swings, and long hair lying on the body
moves less with the head; a model whose file sets tuning.blink, expr or mouth plays them; the idle motion
turned back on eases in instead of jumping; and blinks no longer show a see-through iris halfway.
New
- Feel settings, live.
player.tuningis the character's feel settings as it plays (its model'stuning; a frozen
copy), andplayer.setTuning(changes)changes some of them without loading the character again:undefinedputs
one back to the model's own, each load starts from the new character's own. OnPlayerandBodyPlayer. Changing
turn,nod,fringeorhairReston a model with keyforms measures its key poses again, so it draws exactly as
it would loaded with those settings. See API.md. blink,exprandmouthfrom the model'stuningcount, as on livliv.ai: how often the idle motion blinks,
how readily face tracking reads a smile, how far face tracking and live lip sync open the mouth (lip sync's own
gainmultiplies with it). AHostmay carrytuning(optional): drivers read it there. A model whose file sets
them to other than 1 plays differently from 0.5 ({ "blink": 2, "mouth": 0.5 }blinks twice as often and opens its
mouth half as far); the featured characters set them to 1 or not at all.load(source, { continueMotion: true }): the same character loaded again (an editor's change) goes on moving
from its last frame (its springs, the body's lag, the long hair's swing, the expression showing) instead of starting
again at rest.@livliv-dev/player/runtime, an advanced entry: the renderer (Puppet) and the motion modules, for code that
runs its own frame loop, withmeshes(),rgbaAt()andlayersAt()to ask what is drawn where. Outside the
compatibility promise of the other entries: pin the exact version. See API.md.packageModelJson(paths): whichmodel.jsonamong a package's files is its own, asload()picks it.- Format 4.2 (FORMAT.md):
tuning.gaze,tuning.fringe,
tuning.hair_swayandtuning.hair_restin the schema, all optional. The player readgazeandfringebefore, but
the schema refused a file that had them. TheTuningtype is exported.
Changed
- Blinks without a see-through iris. Halfway through a blink the open eye used to fade out from eye-open 0.2 down
while the closed eye faded in under it: for a few frames of every blink the iris showed as a grey, see-through smear
(most on pale irises, and for as long as a face-tracked eye stays half shut). The open eye now stays whole until it is
squashed to a thin slit and goes in a short step (eye-open 0.06 to 0.03), and the idle motion holds each blink shut
for 35 ms: the close takes 75 ms and a frame often missed its bottom (a third of the blinks at 60 fps, two in three in
a 30 fps recording never showed the closed eye); now every one does. Every character blinks this way at default
settings. A frame with the eyes open 0.2 or more, or shut, draws exactly as in 0.5; between 0.08 and 0.05 the open
eye shows as a thin slit where it used to be a fading smear. Each of the idle motion's blinks ends 35 ms later, so
its later blinks and small glances fall a little differently. A new switch,player.blinkHandover = false, blinks as
before (API.md).BodyPlayer(VRM, PNGTuber) is unchanged. In the runtime entry:
Puppet.blinkHandover,blinkHoldonLivelyIdleandIdleDriver(0 unless set),BLINK_HOLD,eyeFade,
blinkOpen,blinkOver. - Long hair swings below the shoulders (#15). Below the jaw, long
hair used to follow the torso, so its tips moved less than the hair at the shoulders. A gentle pendulum, thrown by the
head's and the torso's moves and settling by itself, now swings it sideways, more toward the tips (twin tails and
ponytails included); hair over the body swings less. Characters you already have move this way too: at their
default settings their hair tips sway when the head turns or the body leans. The rest pose is unchanged, and a
character whosetuning.hairBack(format 4:hair_back) or newhairSway(hair_sway) is 0 draws every frame as
in 0.5. - Long hair lying on the body goes with the body. From the neck down, long hair over the shoulders and chest used to go
almost wholly with the head, so a large move of the head and the torso together slid it over the clothes and showed
what it covered between the strands (light clothes in fragments through dark hair, a hard edge along a collar). Where
hair lies over the body it now takes less of the head's motion and more of the body's; hair beside the body, the bangs
and the long hair's swing are as before. Characters you already have move this way too: their chest hair moves less
when the head turns. The rest pose is unchanged, and a character whose newtuning.hairRest(format 4:
hair_rest) is 0 draws every frame as before. - VRM files from Blender (#1): a VRM 1.0 whose licence URL is not
VRM's own (the author's terms page) plays, with that URL in its terms; node constraints that depend on each other in a
circle are left out with a warning instead of refusing the file; a file that cannot play says why in the exporter's
terms (bones the humanoid lacks, no meta, a VRM version this player does not read). A.vrmURL given to aPlayer
says to use aBodyPlayer. modelFiles()takes names with#and?, which it refused before, asload()takes them. Its paths stay safe
to write out: it refuses a name that would leave the package (as opening a.livlivdoes), and one with a control
character or:, now from a package too. Its errors name the file.- A model's first frame draws everything once, out of sight (Player only): every layer's pictures, the eyes'
masks, the stencil. Some browsers put off a texture's upload until it is first drawn, so the first blink, glance or
expression after a load could stall a frame. The renderer underneath has it as a switch (Puppet.prewarm), off. - The idle motion going on again doesn't jump. After frames drawn with
idleoff, it used to go on from where it
had stopped, in one frame; now it eases in from the pose those frames showed, over 0.4 s. A player whose idle motion
is never turned off plays exactly as before. - The model schema compiles without warnings in ajv's default settings (it logged two); it accepts and refuses the same
files. - The repository's featured characters are livliv.ai's current builds: 13 refreshed, Mochi and Kotaro gone (23). A page
that loads Mochi or Kotaro from GitHub Pages keeps working: their folders and packages stay there, unlisted.