Skip to content

Instantly share code, notes, and snippets.

@vojto
Created March 5, 2020 14:06
Show Gist options
  • Save vojto/bf6b34a6bbc92a17d2dd7903e1464e73 to your computer and use it in GitHub Desktop.
Save vojto/bf6b34a6bbc92a17d2dd7903e1464e73 to your computer and use it in GitHub Desktop.
applyProps: (instance, oldProps, props) => {
const { x, y, width, height, fill, alpha } = props;
instance.clear();
instance.beginFill(fill);
instance.drawRect(x, y, width, height);
instance.endFill();
instance.alpha = alpha;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment