@tawaship/pixi-animate-container - v3.1.0
    Preparing search index...

    Class CreatejsController

    Index
    • Brings the Pixi mirror up to the current createjs state right before Pixi draws (called from the container's updateTransform, which a Pixi render calls on the tree before drawing). Pixi draws on every display frame, a content frame played or not, and what it draws has to be what createjs would draw at that moment:

      • a tree whose timelines moved outside handleTick (a goto made by the application, a clip added between frames) is settled, as a createjs draw settles each clip (CreatejsMovieClip.settleForPixi)

      Display properties written after handleTick need nothing here: they reached the Pixi nodes when they were written. Color filters are brought up to date by the nodes that carry them (PixiMovieClip.updateTransform).

      Returns void

    • Advances every registered root by the accumulated integer number of frames, then pull-syncs the whole tree to Pixi.

      Driving is delegated to the original createjs walk: one _tick(evt) call on the root advances the tree by exactly one frame (no delta is passed, and framerate is fixed at -1, so advance() can never consume time itself). A fresh event object is created per _tick call and shared by the whole traversal, matching the granularity of the original Stage-driven dispatch.

      The original pipeline is TWO-phase: the tick phase only advances INDEPENDENT clips, and the draw phase (MovieClip.draw -> _updateState) resolves SYNCHED / SINGLE_FRAME / first-render state. There is no draw phase here, so updateStateForPixi() (the recursive _updateState walk) must run per frame as its substitute — without it, SYNCHED clips never move at all.

      The display properties write through to the Pixi nodes as createjs writes them (see defineDisplayAccessors), so the Pixi mirror follows every frame with no copying walk. The color filter scalars (plain data properties of createjs ColorFilters) are copied by the Pixi nodes that carry the filters, right before they are drawn.

      How many frames a call plays: every root is owed delta x speed x fps / 60 frames a call (t). Without smooth, the whole frames of t are played. With smooth, the whole frames of a steady clock are played instead: the clock advances by the usual delta (the median of the latest deltas) on every call, half a step ahead of t (so that it sits midway between whole frames, where small changes of the delta do not move it across one), is pulled toward that point by PULL of the distance on every call, and is set to it when they are a frame apart (a display frame was missed). Without that, t sits on a frame boundary whenever the content's frame rate divides the display's (60 fps content on a 60 Hz display starts at 0, a boundary), and the jitter of the delta plays 0 frames on one call and 2 on the next. The frames and their order are the same either way. t never goes below 0 (the speed is at least 0), so the whole frames of t are its floor.

      Parameters

      • delta: number

      Returns void