-
Notifications
You must be signed in to change notification settings - Fork 3
Canvas System
realmarble edited this page Jul 5, 2026
·
1 revision
Some of the effects introduced in the newest update use the Canvas system instead of working the same way the other effects do. this gives a set of new considerations when trying to use them - While most of the effects have the standard SFX Bindings and interfaces, they also use the MOSS.Canvas system under the hood:
MOSS.Canvas.add("PLACEHOLDER", { // this is the name of the effect, make note of it as you'll need it to close the effect
layer: "background",
duration: 0, // time in milliseconds
setup: (app, container) => {
// the app is a Pixi App instance, while the container is a Pixi Container instance
},
update: (container, delta, elapsedMS, progress) => {
// the container is a Pixi Container instance,
// delta is the time since the last frame in seconds,
// elapsedMS is the total time since the start of the scene in milliseconds,
// progress is a value between 0 and 1 representing how far through the ending scene we are. this is used only in closing animations,
// and will only be passed when once you call MOSS.Canvas.close("PLACEHOLDER",Time) to close the effect. You can use this value to create a closing animation.
}
});