Makes the display properties of a wrapper display object class write
through to its Pixi node at once: every write on the createjs side
(timeline, frame scripts, application code) reaches the Pixi node when it
is made, so Pixi draws the createjs state whenever it draws, with no walk
to copy it over.
The createjs-side value is kept in the wrapper data and read back from
there. A value written to the Pixi node (instance.pixi.x = 100) stays
until the createjs side writes that property again, and the createjs
side still reads its own value (AC2's behavior)
Every write is passed to the Pixi node, even with the value it had, so
that a tween writing the property puts a Pixi-side write back (Pixi's
setters compare the value themselves)
The data is looked up (and made the first time) by getData: the
createjs constructor writes these properties inside super(), before
the wrapper's constructor body runs, and the first write creates the data
_off is not mapped: createjs draws whatever is on its display list
(_off only keeps the timeline from placing an object, and the display
list is mirrored to Pixi). renderable is left to Pixi, which turns it
off for nodes used as masks.
Pixi declares these as plain fields of the createjs-side classes' types,
which an accessor in a subclass body cannot override (TS2611), so they are
defined on the prototype; they are enumerable, so that for-in on an
instance still lists them.
Makes the display properties of a wrapper display object class write through to its Pixi node at once: every write on the createjs side (timeline, frame scripts, application code) reaches the Pixi node when it is made, so Pixi draws the createjs state whenever it draws, with no walk to copy it over.
instance.pixi.x = 100) stays until the createjs side writes that property again, and the createjs side still reads its own value (AC2's behavior)getData: the createjs constructor writes these properties insidesuper(), before the wrapper's constructor body runs, and the first write creates the data_offis not mapped: createjs draws whatever is on its display list (_offonly keeps the timeline from placing an object, and the display list is mirrored to Pixi).renderableis left to Pixi, which turns it off for nodes used as masks.Pixi declares these as plain fields of the createjs-side classes' types, which an accessor in a subclass body cannot override (TS2611), so they are defined on the prototype; they are enumerable, so that for-in on an instance still lists them.