Comments (5)
@alonprince
I'm sorry. Scene is based on css, so only one easing can be used simultaneously per element.
There are ways to use the different selector as shown below.
const animate = new Scene({
'.hand-img': {
0: {
top: 830 * 0.005 + 'rem'
},
0.8: {
top: 950 * 0.005 + 'rem'
},
2: {
top: 950 * 0.005 + 'rem'
},
options: {
easing: 'ease-in',
},
},
'img.hand-img': {
0: {
left: 500 * 0.005 + 'rem'
},
0.8: {
left: 620 * 0.005 + 'rem'
},
2: {
left: 620 * 0.005 + 'rem'
},
options: {
easing: 'ease-out',
},
},
}, {
selector: true,
iterationCount: 'infinite',
});
animate.play();
from scenejs.
Thanks for your helping! It works!
from scenejs.
Hi, i am trying to achieve the same but can't make it work.
I've got like a curtain which should close with easing A and after a delay open with easing B.
the strange thing is i only see the "second" animation.
please note the different selectors
#vorhangHeader.zu .elementor-container
and
#vorhangHeader.auf .elementor-container
here is my code:
const Vorhang = new Scene({
'#vorhangHeader.zu .elementor-container': {
0: {
"min-height": headerHeight + 'px'
},
0.3: {
"min-height": '100vh'
},
options: {
easying: 'cubic-bezier(.83,.03,.24,.65)'
},
},
'#vorhangHeader.auf .elementor-container': {
0: {
"min-height": '100vh'
},
2: {
"min-height": headerHeight + 'px'
},
options: {
delay: 2,
easying: 'cubic-bezier(.33,.01,0,.99)'
},
}
}, {
selector: true,
});
Vorhang.playCSS();
can someone please tell me what i am doing wrong?
edit: here is a (not) working example: http://wordpress.p564942.webspaceconfig.de/
from scenejs.
I'm sorry. If you use playCSS()
, it's impossible to apply different easing to the same element.
Would you like to just play()
?
from scenejs.
i just did that, but it doesn't work either.
it just seems to play the first animation...
from scenejs.
Related Issues (20)
- How can I add nodes outside of this time HOT 1
- In timeLine , i want to delete designated node what can i do? HOT 6
- Scene.transition usage HOT 1
- Disable animations when Scene is in paused state. HOT 3
- splitStyle function will skip the last available item like βtext-shadow:5px 5px 5px;-webkit-mask-image:;filter:blur(6px);β HOT 3
- If I submitted a issue, can I delete it? HOT 1
- Running as root without --no-sandbox is not supported HOT 1
- Does SceneJS support Typescripts? Node?
- Rotating a group of elements from the center of the group doesn't work
- Is svelte-scenejs on the roadmap? HOT 3
- 2.0 Roadmap
- Code crashes when creating a Frame using the linear-gradient CSS function HOT 2
- What is the proper way to add items dynamically? HOT 3
- Redirect the old URL to the new one? HOT 1
- Update the keyframes on state update HOT 2
- How can i set the useNowFrame object dynamically on react-scenejs ? HOT 2
- How to work with SVG? HOT 2
- Typewriter effect in reverse HOT 1
- Easing option per keyframe HOT 2
- The play() request was interrupted by a call to pause() HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from scenejs.