Skip to content

Any guide to achieve responsiveness? #463

Answered by lajbel
ArnavK-09 asked this question in Q&A
Discussion options

You must be logged in to vote
  • width() and height() returns the current size of canvas
  • kaplay({ stretch: true, letterbox: true }) will create black bars to mantain aspect ratio between width and height
  • scale() component provides a way to scale game objects as you want
  • onResize() triggers when the window or canvas is resized

I think there can be a guide in the near future anyway, but this info will help you now!

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@ArnavK-09
Comment options

@mflerackers
Comment options

@ArnavK-09
Comment options

@lajbel
Comment options

Answer selected by ArnavK-09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants