Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...

ninmorfeo

ShockinglyGreen
  • Content Count

    64
  • Joined

  • Last visited

Community Reputation

10 Newbie

About ninmorfeo

  • Rank
    Advanced Member

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. no jack, the first example was correct...anyway i found solution by reorder object array. thanks anyway
  2. thanks a lot! but it can be a idea for next releases 😜
  3. ninmorfeo

    Stagger with step

    hi every one! is there a way to run the stagger not with step of 1 but step of N? I'll explain: currently if I have 10 elements to which I have modified the final value of the X position of 20 pixels through a function that returns me +20 and -20, the stagger method animates the elements according to this scheme: ele [0] = +20 ele [1] = -20 ele [2] = +20 ele [3] = -20 ele [4] = +20 ele [5] = -20 ele [6] = +20 ele [7] = -20 ele [8] = +20 ele [9] = -20 how can I do this type of animation instead? ele [0] = +20 ele [5] = -20 ele [1] = +20 ele [6] = -20 ele [2] = +20 ele [7] = -20 ele [3] = +20 ele [8] = -20 ele [4] = +20 ele [9] = -20 in practice there is a way to define a step on the animation objects? not more every 1 but every 5... gsap.to(chi, { duration: .3, stagger: { amount: 2, }, x: gsap.utils.wrap(["+=20", "-=20"]), })
  4. yes what you say is used to align the object with respect to the cards that have the translate set to 50%. I was referring instead to the animation that from scale 0.8 had to become 1. I saw that if I use scale: 1, the animation does not start, if instead I separate them with scaleX and scaleY it works correctly.
  5. ok working with scaleX and ScaleY ...thanks a lot boss!
  6. ok I understand my issue about transformations. How should I behave with the scale instead? use scaleX and scaleY instead of generic scale? because if you have noticed, in the code if I set the scale to 1 instead of 0.8 which is the one set by the transformation, the animation does not start
  7. https://codepen.io/Ninmorfeo/pen/eYmxYey another issue...i think so: in this codepen if you try to use scale in gsap.to after performing transform clone, animation won't start... you can see in last function at line 144
  8. I dont know if i found another bug, but if i try to concatenate an animation after cloning object, you can see that this object created dont go at center of drop zone, like if transform-origin was ignored....can you do check please? i added function at the end of previous script pen To replicate: drag card in space then click on clone element button.
  9. oh i was going crazy, it was a day that i was banging my head. So do I have to wait a week to continue my project or can I already use this file you sent me?
  10. Well I had another question to ask but before I got there I got stuck first. In this post I have 2 questions to ask. The first one: why do gsap.set and gsap.to have different behaviors regarding the same function? I read in the docs that gsap.set is nothing more than a gsap.to with duration 0, but if you try to drag a card from the curve to the drop area you will see that the final positioning is different (you can swipe gsap.to and gsap.set with the button on the left). The second question is: why do it give me a error when I try to copy the transformations of one of the cards on a dynamically created object? You can test and watch the console by clicking on a draggable card and then on the button on the left 'clone object' (the function that manages cloning is at the end of the code).
  11. ok nevermind i found it thanks
  12. can you make a example please? how can i get $('.carta_estratta') transform property?
  13. Hi how can i copy transform on object from another one? ( i have to place a dinamic object at same position of exsisting object) Console give me this error: gsap.min.js:10 Uncaught TypeError: Cannot read property 'style' of undefined at GSCache.getSetter [as set] (gsap.min.js:10) at PropTween._renderPlain [as r] (gsap.min.js:10) at PropTween._renderPropTweens [as r] (gsap.min.js:10) at _renderZeroDurationTween (gsap.min.js:10) at Tween.render (gsap.min.js:10) at new Tween (gsap.min.js:10) at Object.set (gsap.min.js:10) at HTMLDivElement.<anonymous> (tarocchi-zingara-build.js:1152) at HTMLDivElement.dispatch (jquery.js?ver=1.12.4-wp:3) at HTMLDivElement.r.handle (jquery.js?ver=1.12.4-wp:3) the code that i try to use is this one: $('.carta_estratta').on('click', function () { let z_ogg='#'+$(this).attr('id'); matrice= $(z_ogg).css("transform"); console.log(matrice) gsap.set('#'+$(this).attr("id") + '_card', { transform: matrice }); }); in console log i can see result of Matrice....matrix3d(0.6, 0, 0, 0, 0, 0.563816, 0.205212, 0, 0, -0.34202, 0.939693, 0, 685, -96, 0, 1)
  14. Is there any way to stop the elements that move on the path in a certain position? In the example in question, I would like the squares at the end of the animation to be positioned equidistantly on the bezier curve. I could divide the length of the curve by the number of elements but I don't know how to stop them.
×