Pixi.js added an onRender callback that is called every frame in v8, however ReactPixi seems to only have support for Pixi.js v7, so I have to use updateTransform
. The documentation below states about updateTransform
– “many people used this function to do custom logic every frame”
https://pixijs.com/8.x/guides/migrations/v8?_highlight=onrender#other-breaking-changes
When I add updateTranform, it gets called at an extremely high rate, is there any argument I can use to slow it down/ control the rate of how fast it gets called? Thanks! Here’s my code
<Sprite
image={"../images/blue.png"}
width={100}
height={100}
x={100}
y={100}
anchor={0.5}
interactive={true}
pointerdown={onDragStart}
pointerup={onDragEnd}
pointerupoutside={onDragEnd}
pointermove={onDragMove}
rightdown={right}
rightdowncapture={right2}
updateTransform={(s) => {
console.log('onRender')
}}
/>
Sprinkle is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.