Skip to content

feat: drawSprite on another layer #994

@Minamotion

Description

@Minamotion

Is your feature request related to a problem? Please describe.

Let's say I want to draw a background, which is a static image that will never move.
Let's also say that I have this in my code:

setLayers(["bg", "obj", "ui"], "obj")

I want to be able to do this:

onDraw(() => {
    drawSprite({
        sprite: "funnyBg",
        fixed: true,
        layer: "bg"
    })
})

Any more information?

There are some alternatives like:

  1. This one
    add([layer("bg")]).onDraw(()=>{
        drawSprite({
            sprite: "funnyBg",
            fixed: true
        })
    })
  2. or this one
    add([layer("bg"),fixed(),sprite("funnyBg")])

but I don't think either of those are the best way to do it...

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions