Comments (2)
Anim8 makes animations by using images divided in a grid. The first two parameters of anim8.newGrid
are the dimensions of each frame in the grid. In your case, they are 48 and 62. This means that the image that must be used for the animation will be in a grid where the top-left frame (x=1, y=1) will be on the image coordinates 0,0. The one to the right (x=2, y=1) will be on the image coordinates 49,0. The next one to the right (x=3, y=1) would be on the image coordinates 97,0. And so on.
The error you pasted indicates that you tried to access the frame on x=6, y=1. That would be at 289,0. If your image is less wide than 289+48 pixels, anim8 will raise an error, because you would be trying to access a frame outside of the image.
I must also say that the error that you pastd is unlikely to be provoked by the code that you pasted, since it goes from x=1 to x=3, not x=6. Maybe there's a typo somewhere.
from anim8.
Yeah, I entered wrong numbers in there.
Sorry to bother you.
from anim8.
Related Issues (20)
- Accessors to current frame width and height HOT 2
- Is this project upgrading to 0.10.0? HOT 1
- Add support for SpriteBatches HOT 7
- Flickering with onLoop gotoFrame HOT 7
- Improving documentation HOT 4
- Possible to crop frame of animation? HOT 1
- Wrong frame duration for first and last frames HOT 3
- How I Can Get number of current frame what is playing ? HOT 2
- Portuguese version of Readme
- Multiple instances of anim8 causes distorted sprite HOT 7
- (suggestion)fps2ms
- "flip" method(s) HOT 1
- animation:update(dt) not working
- Wrong typo
- not compatible with love 11.x HOT 1
- I get an Error when starting my Program. No Idea how to fix it.
- Ability to play animations backwards in time HOT 1
- Callbacks HOT 3
- Add spritesheet and sprite abstractors HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from anim8.