pforhan / callsprite Goto Github PK
View Code? Open in Web Editor NEWSprite loader and animator
License: MIT License
Sprite loader and animator
License: MIT License
Probably we want to join at the sprite level, vs within the sprite (ie, have multiple displayed animations or something), but need to consider it a bit more
May need to consider if we will want multiple sprite loaders or have a way to drop / unload frames
The type param basically pollutes the whole tree of objects. It should have an ID (its name?) that platform libs can use to look up the value in a cache.
It'd be nice to directly support what editors produce. http://www.brashmonkey.com/ScmlDocs/ScmlReference.html
Need the ability to load frames from a sprite sheet. maybe named filename-row-col?
need to figure out if per frame (doubtful) or per-animation
Probably per-animation... like if you had a flaming sword, all its frames would be aligned so you could hold it at a single point...
Possibly solved by #6 but we need a way to track and place multiple sprites
Should be easy to save or load a sprite and its animations.
Related: editor should remember last loaded
it'd be nice for us to send for example an "onHit" event to a sprite and it can switch to that animation. Maybe as an extension of the as-yet unused animations map inside Sprite already?
Requirements:
example:
2dgameart bundle is typically: character/filetype/size/frameset/files_001.png
so Hedgehog/PNG Sequences/Hurt/Hurt_00*.png
would hopefully translate to frames named Hedgehog-hurt-001 or something.
simplest impl would be to have a load(prefix, list) so maybe a file gatherer/visitor would be a different thing
... that said may need an abstraction layer since the files could be streaming out of an archive.
techincally could be done with existing stuff but is probably not flexible enough. Need a way to let an animation loop a couple times, then switch to another animation, and back again, etc.
like idle - idle - blinking - idle - idle - blinking or such
probably on a per-sprite basis?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.