Loading a picture

Upload your latest creations here, and download the latest creations here! This is where the creative tool shop resides.
Post Reply
Dr. Madskull
Posts: 20
Joined: Tue Jun 04, 2019 11:35 am

Loading a picture

Post by Dr. Madskull » Tue Jul 30, 2019 12:36 am

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. :ugeek:

#version1point3
Attachments
yoss_picture.js
(5.37 KiB) Downloaded 501 times
snail.jpg
snail.jpg (83.22 KiB) Viewed 6890 times

Post Reply