Get array of an function | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Get array of an function

I have a sprite sheet , i want to make an array of individual images of it . And to do animation . Plz help me to do this w/o using any Iibrary like p5.js

24th Jun 2020, 10:22 AM
Priyanshu Gupta(рдкреНрд░рд┐рдпрд╛рдВрд╢реБ рдЧреБрдкреНрддрд╛)
Priyanshu Gupta(рдкреНрд░рд┐рдпрд╛рдВрд╢реБ рдЧреБрдкреНрддрд╛) - avatar
1 Answer
0
You can get a rough animation loop by doing something like this https://code.sololearn.com/WuBe4Qd5AjvX/#js but unless every sprite is the same size you will have to take the time and map out the exact coordinates and dimensions which if you're going to do you should just cut the sheet up and make separate files.
25th Jun 2020, 12:55 AM
JME