Skip to content
This repository has been archived by the owner on Nov 12, 2024. It is now read-only.

Help: Loading sprites from Sprite Atlas #593

Closed Answered by vercte
vercte asked this question in Q&A
Discussion options

You must be logged in to vote

I had to load the sprite using sprite():

import kaboom from "kaboom"

// initialize context
kaboom()

loadSpriteAtlas("sprites/arrows.png", "sprites/arrows.json")
let arrows = {
  "left": add([
    sprite("arrowLeft")
  ])
}

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by vercte
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant