Menu
  • HOME
  • TAGS

MouseOver CSS3D effect with javascript

javascript,jquery,css3,tweenmax,gsap

I Solved the problem. Problem was with not updating vertices value to the original on mouseout event. to revert vertices value to original question i have to keep extra value of vertices like this. var l = { x: Math.floor(i % c) * 284, y: Math.floor(i / c) * 284,...

Scale in PixiJS with TweenMax

javascript,tweenmax,pixi,gsap

The scale property of a PIXI Sprite is a Point with x and y properties, so instead of: ball.scaleX = ball.scaleY = 1; You need to do: ball.scale.x = ball.scale.y = 1; When you tween the scale you need to pass TweenLite the scale object, instead of the sprite itself,...

How to rotate cropped images in single canvas

javascript,canvas,greensock,tweenmax,gsap

If I have been able to understand this correctly, here is what I think you can do: In your line with _self.elements.context.drawImage(... call inside draw function within the _self.CanvasImage object, instead of passing this.dx and this.dy, try passing 0 and 0. And then in your _self.elements.context.translate(... call inside the same...

What is the lightest JavaScript plugin for parallax scrolling layers animations? [closed]

javascript,jquery,parallax,tweenmax,scrollmagic

I would personally use skrollr.js for parallax, there are few tutorials on this page. Or maybe you might prefer to use ScrollMagic. There is also a pure CSS parallax tutorial here....

ScrollMagic and TweenMax Automatically executes

javascript,greensock,tweenmax,gsap,scrollmagic

Your basic problem is that the setTween method of your scene is not available & this is because you are missing an include of animation.gsap.min.js important plugin in your codepen when it comes to using TweenMax alongside ScrollMagic. So add this external javascript after your ScrollMagic include in your pen...

Draw a line with PIXI and move it with TweenMax

javascript,canvas,tweenmax,pixi,gsap

If you wish to be able to animate / tween the moveTo and lineTo values then the graphics object of each line will need updating i.e. clear(); and then redraw with the usual moveTo and lineTo calls with new values. All happening inside a render function which updates your canvas...

How to hide items in the correct sequence? , Using waypoint, TweenMax, jquery

javascript,jquery,tweenmax

There is no need to use jQuery's fadeIn and fadeOut when you are already using GSAP. Take a look at this jsFiddle that I have created, code of which is as follows: /*global TweenMax,TimelineMax*/ $(document).ready(init); function init() { var header, pageContainer, pageContent, brandImage, brandHolder, headerContent, hideElement; var duration = .8,...

how to apply apple iphone like effect to menu list?

jquery,html,css,greensock,tweenmax

Thanks all i solve my question myself........ Here is fiddle : MyFiddle <script type="text/javascript"> $(document).ready(function(e){ TweenMax.set($("#container"),{perspective:3000,transformStyle:"preserve-3d", backfaceVisibility:"hidden"}); $("#container div").mouseover(function(e){ var current = $(this); var nextFirst = $(this).next(); var prevFirst = $(this).prev(); var nextFirst_1 = $(this).nextAll().eq(1); var prevFirst_1 = $(this).prevAll().eq(1); var nextFirst_2 = $(this).nextAll().eq(2); var prevFirst_2 =...

JavaScript get Elements By Class Name [duplicate]

javascript,html,css,tweenlite,tweenmax

getElementsByClassName() generates a node list, so even if your list contained only one item, you would still need to access it like so: var play = document.getElementsByClassName('lay')[0]; ...

How should I handle a leave animation in componentWillUnmount in React?

javascript,animation,reactjs,tweenmax

ReactTransitionGroup (upon which ReactCSSTransitionGroup is built) is the base component that allows asynchronous entering and leaving. It provides lifecycle hooks that you can use to hook into JS-based animations. The docs list the allowed hooks: ReactTransitionGroup is the basis for animations. It is accessible as React.addons.TransitionGroup. When children are declaratively...

Same selectors click add and remove

javascript,jquery,html,css,tweenmax

Why not just hide all .box elements prior to the animation: Updated Example $('#contentSelection .contentSelect').on('click', function () { $('#contentContainer .box').hide(); TweenMax.to(("#" + $(this).attr('id') + "box"), 0.5, { display: "block", delay: 0.5 }); }); ...

TweenMax trying to animate one character at time on text field

javascript,css,animation,tweenlite,tweenmax

My modified version works, and I've included a jsfiddle for you to check, I also added the following css which seems to be needed for Chrome, at least in jsfiddle. span { display: inline-block; } TweenMax.staggerFromTo($('#designs').children(), 5, { rotationY: 180 }, { rotationY: 0 }, 0.1); See this fiddle to...

TweenMax: multiple elements with sequential variables

greensock,tweenmax,gsap

.staggerFrom is what I was searching for! It is pretty much a separate Tween for every element in the array/collection. The fifth parameter is stagger and specifies the time between the tweens for each element. Amount of time in seconds (or frames for frames-based tweens) to stagger the start time...

How to call multiple buttons to do the same function in tweenmax?

javascript,html,arrays,greensock,tweenmax

Fusion's answer is correct and useful if you are using jQuery. If you'd like to avoid dependency on jQuery, then assume you have an array of buttons such as var buttons = [btn, btn2, btn3] and a function: function tweenClickHandler() { TweenMax.staggerTo([box4, box3, box2, box, box8, box7, box6, box5, box9,...

code works when using window.onload but not document.ready? why?

javascript,jquery,tweenmax

$(document).ready(function() {}); is a jQuery function, so you would have to add a jQuery reference before you try to run it. <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script> <script> var footer = document.getElementById("footer"); var topper = document.getElementById("topper"); var box = document.getElementById("photo"); $(document).ready(function() { TweenMax.from(box, 4, {height:"200px", width:"200px", top:"50%", left:"50%", marginTop:"-100px", marginLeft:"-100px",...

Add and remove class different elements

javascript,jquery,html,tweenlite,tweenmax

As I mentioned in comments, I think it is possible by finding the common ground between box and bigbox and if we are to not modify HTML. That common ground should be the index value from their respective classes. So store a clickedIndex variable first, inside the click handler like...

Animation (bound to scrollTop) only finshes when I stop scrolling

javascript,jquery,greensock,tweenmax,gsap

Here a Demo of the solution with explaining comments: // This gets called _every time_, you scroll a little bit ("every time" as in "every frame"). // So we introduce a new variable that acts as a filter and only lets the function trigger, once the status changes. // 0...

Reuse tweens in different ScrollMagic scenes

javascript,animation,tweenmax,gsap,scrollmagic

Short answer: No - A tween object can only be assigned to one scene and vice versa. To avoid code repetition, create the scenes in a loop, like this: var var controller, firstTween, secondTween, triggers = ["triggerOne", "triggerTwo", "triggerThree", "triggerFour"]; controller = new ScrollMagic(); triggers.forEach(function (trigger, index) { // make...

Fire multiple tweens simultaneously with GSAP and TweenMax

javascript,jquery,greensock,tweenmax,gsap

Two problems in your code: The method to of TweenMax is a static method but what it returns is an instance of TweenMax. Read more about the difference between static and instance methods here and this is basically a language agnostic concept. Since, in this case, the instance does not...

Custom horizontal scrollbar logic

jquery,scrollbar,tweenlite,tweenmax

jsBin demo (P.S: Use the Tween onUpdate callback function to move the handler on gallery scroll) Logic: // How much available scroll-space** have our elements: // // |--$element--|<---------------avail scroll space--------------->| // |<------------------------total width-------------------------->| // // Same logic goes for both elements: galleryAvailScroll = $gallery[0].scrollWidth - $gallery.outerWidth(true); handlerAvailScroll = $scrollbar.width() -...