children doesn't respect parents position #243
-
Beta Was this translation helpful? Give feedback.
Answered by
michalochman
Dec 8, 2021
Replies: 1 comment
-
Hi @kresli, in the way See a note in README: https://github.com/michalochman/react-pixi-fiber#customapplypropsdisplayobject-oldprops-newprops-optional You probably want to additionally call at the end of this.applyDisplayObjectProps(oldProps, newProps) or maybe: this.applyDisplayObjectProps({ x: oldProps.x, y: oldProps.y }, { x: newProps.x, y: newProps.y }) This will most likely require you to call |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
michalochman
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi @kresli, in the way
customApplyProps
is implemented here, the props (e. g.x
andy
) are no longer passed to to PIXI, it is just using them to draw the graphics object.See a note in README: https://github.com/michalochman/react-pixi-fiber#customapplypropsdisplayobject-oldprops-newprops-optional
You probably want to additionally call at the end of
customApplyProps
:or maybe:
This will most likely require you to call
drawRect
at0, 0
position instead, to only usex
andy
asDisplayObject
position
property.