gsap

Safari bug ? Translating table-row-group using GSAP make caption jump to bottom

泄露秘密 提交于 2019-12-11 00:56:55
问题 We are animating a calendar using GSAP. The calendar is draw using css table, row and caption... We wanted to animated some part of this table. But better than words here is a codepen to open on safari: https://codepen.io/anon/pen/rmrJRy var body = document.getElementById('body') TweenMax.to(body, 1, {x: 400}); .table { display: table; width: 500px; } .header-group { display: table-header-group; } .body { display: table-row-group; } .caption { display: table-caption; } .cell { display: table

How to animate correctly a GSAP menu?

天涯浪子 提交于 2019-12-08 13:23:33
问题 Holla, I need to reset the animation when I close menu and open it again. How can I do that? Animation works only the first time when I open menu. CSSPlugin.defaultTransformPerspective = 600; TweenMax.staggerFrom('ul#menu li', 1.5, {rotationX:-90, transformOrigin:"50% 0%", ease:Elastic.easeOut}, 0.4); Here is the code: http://codepen.io/hafsadanguir/pen/qOdaab. Thanks for help! 回答1: Is this the kind of result you were after? JavaScript: CSSPlugin.defaultTransformPerspective = 600; var

Fading in different items and different times using Greensock Tween

僤鯓⒐⒋嵵緔 提交于 2019-12-06 16:50:06
I am really new with GSAP and I think it is amazing. However I cannot work out how to fade in these items separately. 1st one (this is fine) for the 2nd wish to fade in at a certain time and 3rd at a certain time. JavaScript: function startFinalAnimation(){ var fa = new TimelineLite(); fa.to(finalAvatar, 2, {scale: 0.45, delay: 0, opacity: 1, transformOrigin:"-3% 8.8%"}); fa.to(finalContent, 4, {delay: 0, opacity: 1}); fa.to(logo, 5, {delay: 0, opacity: 1}); } TimelineLite 's .to() method syntax is as follows: timeline.to(target, duration, vars, position); This fourth position parameter is

Wobble Elastic Animation in Html

老子叫甜甜 提交于 2019-12-06 13:06:39
问题 Take a look at this Dribble https://dribbble.com/shots/2149937-Day-6-Currency-Status-Rebound There is a green bar that comes in at the end of the animation with a cool effect. I want to do that in html. Any advice on how to achieve this? 回答1: Yes possible. Here is one example Elastic SVG and there are plenty of other examples and libraries available to create these types of FXs using SVG or Canvas elements and javascript. 回答2: @Blindman67 has given a good link. but it is very restrictive and

How to animate and change a slider counter position in a clean way?

喜欢而已 提交于 2019-12-05 06:31:24
I have a Swiper slider and a counter position like "1/10". I would like to change that current slide number (the 1) with an animation. I know how to replace the number but with this animation, it's like another story: As you can see on the gif, it's working nicely if I click moderately on my slider, but when I double-triple-or-crazy click on the next link, that totally breaks the counter, due to the clone made in this gif example. Do you know how can I do that in a better way? I made a jsfiddle, working for the first count change only: — http://jsfiddle.net/asb39sff/1/ // Init var $c_cur = $("

Full screen slider with zoom in/out transition effect

自古美人都是妖i 提交于 2019-12-04 21:13:35
I mean something like this. How can I obtain that result with a library like GSAP, Transit or VelocityJS? http://www.echocapital.com/ Thanks in advance :) Dunno about GSAP and Velocity Cause all you need is a bit of CSS and some JS or jQuery, I mean you can rewrite easily the below in vanilla JS: var $gal = $("#gallery"), $img = $gal.find("> div"), n = $img.length, i = 0, t; $img.eq(i).addClass('on'); (function loop() { t = setTimeout(function(){ $img.removeClass("on").eq(i++%n).addClass("on"); loop(); }, 3000); }()); *{margin:0;} html, body{height:100%;background:#444;} #gallery{ overflow

MouseOver CSS3D effect with javascript

懵懂的女人 提交于 2019-12-04 19:55:55
问题 I am trying to achieve mouseOver effect like this. I am able to generate css3d matrix required for each and every tile according to their position. I have achieved this effect with slow mouse movement, but if I am moving fast from one tile to another tile its notupdating properly. its showing gap in between tiles. What is the best way to update all the tile/tile co-ordinates on mouseover so that i get consistent effect? here is my js code: $('.box').each(function() { $(this).css('height',

How To Use ScrollMagic with GSAP and Webpack

南楼画角 提交于 2019-12-04 17:48:30
问题 In order to use ScrollMagic with GSAP, you need to load the animation.gsap.js plugin. With Webpack you would do something like this to accomplish that (assuming you use the CommonJS syntax and installed everything with npm): var TweenMax = require('gsap'); var ScrollMagic = require('scrollmagic'); require('ScrollMagicGSAP'); To make sure that this actually works, you have to add an alias to your Webpack configuration, so that Webpack knows where the plugin lives. resolve: { alias: {

Draw SVG Bezier curve

China☆狼群 提交于 2019-12-04 03:01:50
问题 I have an array of control points that represent a high-order Bezier curve. How can I draw this curve using a single SVG-path? UPD: For example, I have a set of points: (x1, y1) (x2, y2) (x3, y3) (x4, y4) (x5, y5). How SVG-path will look like in the terms of C , S , Q or T ? UPD 2: SOLUTION I asked this question to depict a object path animated with TweenMax. Later I received reply on GreenSock forum. Here's CodePen example. 回答1: Short answer: you can't. SVG only has built in Quadratic (2nd

MouseOver CSS3D effect with javascript

瘦欲@ 提交于 2019-12-03 12:13:39
I am trying to achieve mouseOver effect like this. I am able to generate css3d matrix required for each and every tile according to their position. I have achieved this effect with slow mouse movement, but if I am moving fast from one tile to another tile its notupdating properly. its showing gap in between tiles. What is the best way to update all the tile/tile co-ordinates on mouseover so that i get consistent effect? here is my js code: $('.box').each(function() { $(this).css('height', '284px'); $(this).css('width', '284px'); }); generateGrid = function(w, h) { var t = this; this.p = [];