Function
pushScene
(id: SceneName, args: unknown[]): voidPush the current active scene to a stack and enters in the new scene
param
id- The scene name.
param
args- The args passed to the scene defition.
add([
text("this is the first scene", {size: 32 }),
pos(center()),
]);
scene("main", () => {
add([
sprite("bean"),
pos(center()),
]);
});
pushScene("main")
since
v3001.1
group
Scenes