Coder Social home page Coder Social logo

Comments (2)

kikito avatar kikito commented on August 22, 2024

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.

gmestanley avatar gmestanley commented on August 22, 2024

Yeah, I entered wrong numbers in there.
Sorry to bother you.

from anim8.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.