This is an example of how to preload an image and draw the image when it has finished loading. It scales down big images and scales up small images to cover as much of the screen as possible. Finally, it centres the image.
You need at least version 1.3 of yoss, otherwise, the image will not load properly.
#version1point3
Loading a picture
-
- Posts: 20
- Joined: Tue Jun 04, 2019 11:35 am
Loading a picture
- Attachments
-
- yoss_picture.js
- (5.37 KiB) Downloaded 514 times
-
- snail.jpg (83.22 KiB) Viewed 7050 times