rytm-webflow 2.0.8 → 2.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -250,7 +250,7 @@ Animate any element within the *WebflowView* container using the **Webflow synta
250
250
  ```
251
251
  or (more complex example):
252
252
  ```html
253
- <div data-webview-initial="x:-10,y:50" data-webview-show="x:0,y:0,t:.5,d:.15,e:Power2.easeOut" data-webview-hide="x:10,y:-25,t:.4,d:.2,e:Power2.easeIn">
253
+ <div data-webview-initial="x:-10,y:50" data-webview-show="x:0,y:0,t:.5,d:.15,e:power3.out" data-webview-hide="x:10,y:-25,t:.4,d:.2,e:power2.in">
254
254
  ...
255
255
  </div>
256
256
  ```
@@ -300,7 +300,7 @@ To implement ShowUp on your HTML add a `data-webflow` or `data-webpara` attribut
300
300
  Add easing for your animations
301
301
  ```html
302
302
  <!-- gsap easing -->
303
- <div data-webflow="x:-10vw,t:.5,e:Expo.easeOut">...</div>
303
+ <div data-webflow="x:-10vw,t:.5,e:expo.out">...</div>
304
304
  ```
305
305
  Delay animations
306
306
  ```html
@@ -387,7 +387,7 @@ Examples:
387
387
  <h1>Webflow show up</h1>
388
388
  <div data-webflow="t:.4,o:0,y:10;t:.4,o:0,y:-30">Webflow Simple ALPHA no delay</div>
389
389
  <div data-webflow="t:.4,o:0,s:.4;t:.4,o:0,s:1.5">Webflow Scale</div>
390
- <div data-webflow="t:1.4,x:-300,e:Expo.easeOut;t:.4,d:0,x:-100,e:Expo.easeIn" data-webset="offset:100">Webflow Offset: 100, Ease EXPO</div>
390
+ <div data-webflow="t:1.4,x:-300,e:expo.out;t:.4,d:0,x:-100,e:expo.in" data-webset="offset:100">Webflow Offset: 100, Ease EXPO</div>
391
391
  <div data-webflow="t:1.4,x:-100vw;t:.4,d:0,x:-250" data-webset="offset:center">Webflow Offset: center</div>
392
392
  <div data-webflow="t:1.4,x:-250;t:.4,d:0,x:-250" data-webset="offset:top">Webflow offset: TOP</div>
393
393
  <div data-webflow="t:1.4,x:-250,w:10;t:.4,d:0,x:-250" data-webset="trigger:#boom">Webflow Triggered by next BLOCK</div>
@@ -395,7 +395,7 @@ Examples:
395
395
  <!-- ### Webflow Parallax ### -->
396
396
  <h1>Webflow parallax</h1>
397
397
  <div data-webpara="x:400" data-webset="duration:100%">Parallax duration 100%</div>
398
- <div data-webpara="x:400,e:Back.easeOut" data-webset="duration:40vh">Parallax duration 40vh, ease: Back</div>
398
+ <div data-webpara="x:400,e:back.out" data-webset="duration:40vh">Parallax duration 40vh, ease: Back</div>
399
399
  <div >parent TRIGGER
400
400
  <div data-webpara="y:-500,r:180" data-webset="duration:100%,trigger:parent">Parallax Y</div>
401
401
  </div>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rytm-webflow",
3
- "version": "2.0.8",
3
+ "version": "2.0.9",
4
4
  "description": "rytm webflow pack - ASwap, ShowUp",
5
5
  "main": "scripts/index.js",
6
6
  "scripts": {
@@ -145,7 +145,10 @@ const translateNonNumericValue = (key, valStr) => {
145
145
  let val
146
146
  switch (key) {
147
147
  case 'ease':
148
- val = getWebflowEasing(valStr)
148
+ // old syntax: 'Back.easeOut'
149
+ val = getWebflowEasing(valStr);
150
+ // new syntax, eg.: 'back.out'
151
+ val = val ? val : valStr;
149
152
  break;
150
153
  default:
151
154
  // by default don't change anything (eg. '100%', '50vw')
@@ -155,6 +158,7 @@ const translateNonNumericValue = (key, valStr) => {
155
158
  return val
156
159
  }
157
160
  /**
161
+ * ### Depreciated (use string values insted, eg "e:back.out")
158
162
  * Get the TweenMax Easing function
159
163
  * @param {string} str
160
164
  * @return {Ease}