frostney / react-spritesheet Goto Github PK
View Code? Open in Web Editor NEWSpritesheets for React
License: MIT License
Spritesheets for React
License: MIT License
When increasing the size of a Sprite through the props, it only increases the height and width of a container, but doesn't scale up the size of the background image, meaning a 20px icon on a spritesheet when set to height or width 30, will just showing additional parts of surrounding sprites.
Similarly, changing the sprite image size down to 10px will just show a portion of the sprite, not a small version of the sprite
In AnimatedSpriteSheet,
Add calculation for y coordinate.
render(){
const spriteData = {
...
y: [calculation for y offset],
};
}
I would like to add a spritesheet and be able to scale it as an HTML <img>
. The current version creates a <div>
with the image data as a CSS background-image
property. The 'height' and 'width' parameters for sprites will change what part of the spritesheet it will display. Scaling using CSS transform: scale(0.5)
introduces strange behavior where the images will have thick padding. This is also what #6 seems to want too.
I would to move this sprite image from left to right ? please provide for any options that I can use or any other possibilites ?
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.