How to make the carousel map play automatically?
See original GitHub issueI created a carousel component through the scenery package of scenejs. It works fine when I click on the next or previous one, but I don’t know how to make it play automatically, because I didn’t set jsx during initialization. The keyframes property is used instead of code: ` React.useEffect(() => { const scene = (SceneRef as any).current;
const sceneItem = scene.getItem(".carousel");
scene.getItem(".carousel").set({
".carousel": {
"0": {
transform: {
translateX: prevPos + "px"
}
},
"1": {
transform: {
translateX: `${current * -parseFloat(width)}` + "px"
}
}
}
});
scene.play();
}, [current, prevPos]);`
so what do I need to do? Thank you
Issue Analytics
- State:
- Created 4 years ago
- Comments:13 (6 by maintainers)
Top Results From Across the Web
Bootstrap Carousel autoplay - free examples & tutorial
Responsive Carousel autoplay built with Bootstrap 5. Examples of how to turn on and turn off the carousel autoplay.
Read more >auto play of carousel slider - dart - Stack Overflow
CarouselSlider is already automatic here is my code that works so fine for me, you add a child of ( items ) static...
Read more >Using Story Map Autoplay Mode - Esri
When autoplay is enabled, the autoplay control appears on the Story Map. Click to pause or play, or grab the slider to adjust...
Read more >How to Build an Auto-Playing Slideshow with React - Tinloof
Our Slideshow component is divided in three containers: ... What is visible to the user is what is shown within the red box...
Read more >Carousel: Autoplay - VCU Compass Web Framework
Take note. Online Services Outage. From 5 p.m. Dec. 2 to 10 a.m. Dec. 9, several important online systems will be unavailable. You...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@daybrush
Thank you very much, this feature has helped me a lot.
@jiameng123 Hi.
react-scenejs@1.1.0
has been published.ready
props have been added. When you are ready to initialize, setready
to true.