Giter Site home page Giter Site logo

Animated Tiles about tileson HOT 2 CLOSED

ssbmtonberry avatar ssbmtonberry commented on August 16, 2024
Animated Tiles

from tileson.

Comments (2)

SSBMTonberry avatar SSBMTonberry commented on August 16, 2024

Hello, @hsdk123 , and my apologies for answering your post so late.
If you haven't figured it out already, the animation data is located inside the tson::Tile class.
It's not really showcased in the demo, even though there are animation data on one of the tiles. A quick example how I retrieve animation data from a known Tile in one of my unit tests is:

map->getTileset("demo-tileset")->getTile(36)->getAnimation()

getAnimation() will give you a vector of frames. This is what the code itself looks like:
image

And the tson::Frame class looks like this:
image

Again: Sorry for the late reply, and I hope this helped :)

I'll add this issue to the v1.3.0 release, to remind myself to include an example of animations in the demo.

from tileson.

SSBMTonberry avatar SSBMTonberry commented on August 16, 2024

Example is now updated to showcase the new tson::Animation class and how to use it. Right now this must be compiled in the master branch (which requires the BUILD_EXAMPLES flag in CMake to be activated)

from tileson.

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.