Component aliases
Aliases for canvas components in Pixi’VN, covering inheritance, editing, and special game layer usage.
Each component added into the canvas must be assigned an alias. An alias is a way to refer to a component by a unique string.
If a component is added by assigning an existing alias, the new component will replace the old one.
Heredity factor
If a component is added using an existing alias, the new component, in addition to replacing the old one, will inherit the properties, the zIndex, and the tickers of the old component.
Edit
To edit the alias of a canvas component, you can use canvas.editAlias. If the alias has one or more tickers associated, it will be automatically updated in the ticker.
import { canvas } from "@drincs/pixi-vn";
canvas.editAlias("sprite1", "sprite2");