Code Monkey home page Code Monkey logo

godot-atlas-player's Introduction

AtlasContainer icon

An animation player using a TextureRect to display an AtlasTexture. An addon for the Godot engine.

Similar to the AnimatedSprite node, AtlasPlayer is a way to animate an atlas or a sprite sheet. The difference in benefit comes from the adjustable size of AtlasPlayer. In other words, it can be used for UI purposes such as loading screen or even animated reactions! In truth, it all comes down to what your project is. If this addon fits your need, might as well try it out.

  1. Download the latest version in releases or clone the repository.
  2. Copy the contents of addons/AtlasPlayer into your res://addons/AtlasPlayer directory.
  3. Enable Dialogue Manager in your project plugins.
  1. Create an AtlasPlayer in the current scene and modify the properties in the inspector.
  2. Set an image for the Atlas Texture. Recommended to drag and drop the image directly in the inspector.
  3. Based on the number of tiles, set the Hframe for width and Vframe for height.
    Example: a character sprite with six tiles of movement, with a width of three (3) tiles and height of two (2).
    The Hframe in the scenario would be three (3) and the Vframe would be two (2).
  4. Set the Start Frame and the End Frame. The starting and ending point of the animation.
  5. Adjust the Speed of the player to best fit the animation.
  6. Before moving to the next step, it is recommended to turn on the Auto Start. Otherwise, use the start() function of the node to play the animation.
  7. Play the scene and see if the sprite plays properly.

Note: the instructions can also be applied in code. See the script for more details such as the start() and stop() function.

Name Definition
Started emitted once the animation starts.
Stopped emitted once the animation ends.
Name Definition
start(check:bool=true) starts the animation. Takes a non-required argument that can be used to stop the animation from reseting frame position.
stop(check:bool=true) stops the animation. Takes a non-required argument that can be used to stop the animation from reseting frame position.
Property Type Definition
Atlas Texture Texture the image texture to be used for the animation.
HFrame int the number of tiles in width.
VFrame int the number of tiles in height.
Start Frame int the starting tile/frame of the animation.
End Frame int the ending tile/frame of the animation.
Loop boolean a condition if the animation will loop or not.
Auto Start boolean a condition if the animation will start upon entering the SceneTree.

Note: each property has its own setget, check the script for more detailed information.

  • None as of current...

Said issues may be fixed in the future updates. However, if you know a way to fix it, do open up an issue or a pull request. Your contribution would be greatly apprciated

godot-atlas-player's People

Contributors

nif-kun avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

boyquotes

godot-atlas-player's Issues

Playing gifs ?

Sorry to ask here, but it doesn't seem you have a community forum or server.
It says in the description "it can be used for UI purposes such as loading screen or even gifs", does that mean it supports .gif files ? Because I can't get it to load a gif file, I know Godot doesn't normally uses these files.
Godot version : 3.5 | Addon version : last I assume, the one on the asset library

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.