Comments (2)
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:
And the tson::Frame
class looks like this:
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.
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)
- Remove warnings HOT 1
- u8_string problems HOT 2
- Make sure Tileson has full C++20 support! HOT 3
- Tile properties are only loaded for first tileset HOT 2
- How to parse infinite maps? HOT 2
- Fix Catch2 error with GCC 11.2
- Add support for Tiled 1.8 HOT 1
- CMake Issue when building tests on Windows with MinGW/G++
- Tile layer data compression HOT 2
- Tileset::GetImage() returns a space before extension
- Multiple definition of `std::type_info::operator==(std::type_info const&) const` HOT 6
- Add support for Tiled 1.9
- [SUGGESTION] Add a conan package for library HOT 2
- Update README and documentation for v1.4.0
- Access violation when getting the drawing rect of a tile by id HOT 4
- 'tson::World': no appropriate default constructor available HOT 6
- Text object is missing several important fields. HOT 3
- Add an option to be able to read Tiled Projects and its maps through memory.
- Add an option to be able to read Tiled Worlds and its maps through memory.
- Make sure tson::Class objects with modified values are updated.
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 tileson.