danilosetra / react-responsive-spritesheet Goto Github PK
View Code? Open in Web Editor NEWReact component which helps you to easily apply responsive spritesheet animations on your project.
License: MIT License
React component which helps you to easily apply responsive spritesheet animations on your project.
License: MIT License
The parameter 'isPlaying' supplied by getInfo is returning "true" even while spritesheet paused on start, according the timeout was configured. The correct is start with "false", and after timeout completes, return "true", cause till this, its paused, obviously.
The build is'nt and must be minified
The window.addEventListener
is called, but removeEventListener
is never called, thus leaking event handlers.
I want that every time the scroll is activated, it will play.
but has not implemented those methods, how can I do it?
implement setSpeed function. At this point, the spritesheet can change fps even after starts
The component can return the following parameters
On README.md, change the folder of images from 'develop' to 'master'
component render exceeding determined height when resize window width
I need to change dynamically sprites on an element, including FPS.
SetFPS function does not work
I understand that the values are initialized when the component is mounted and I can’t change them dynamically, how best to implement this? I can change the start and end frames, but I can’t change the FPS
Hi,
The React img component has an onError callback in case there's something wrong with image src.
Would it be possible to provide the same callback in the Spritesheet component?
Currently, Spritesheet throw an error:
imgLoadSprite.onerror = () => {
throw new Error(`Failed to load image ${imgLoadSprite.src}`);
};
could be replaced by:
imgLoadSprite.onerror = () => {
onError(`Failed to load image ${imgLoadSprite.src}`);
};
Regards
Register following the documentation - https://help.github.com/en/articles/configuring-npm-for-use-with-github-package-registry
Use createRef() instead of random id
Return 'instance' for events (like onMouseEnter, onClick, etc) equals getInstance returns. This will allow to manipulate instance without set getInstance component parameter
The component isn't providing instance parameters like "isPlaying"
Implement event handlers
The component doesn't support multi-row spritesheet images
Currently the build version contains class
which is not compatible with ES5. It would be nice if the build version was compatible with ES5 so it can be used in IE10/11.
The component doesn't supports mouse events besides onclick
Allow spritesheet rewind animation :)
implement functions to allow preload (using promises, for example) of sprite and background images
Include Bundlephobia badge size
https://badgen.net/bundlephobia/minzip/react-responsive-spritesheet
Include startAt and endAt parameters to allow initial and final frames for animation
If you unmount the Spritesheet before the loading is done, an error is thrown.
You probably have to check whether the component is still mounted if the onload callback.
EDIT: this line is probably returning null
since it has already been unmounted.
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.