Jump to content


  • Posts

  • Joined

  • Last visited

Recent Profile Visitors

2,327 profile views

OxXxigen's Achievements



  1. i need to get different values from different tweens and getBoundingClientRect cause browser reflow, don't think it's good idea do this. maybe tm store somewhere values that set ?
  2. how can i get current tween values TweenMax.to(div, 2, { css: { top: 200, }, onUpdate(self) { // get current top value console.log(self.vars.css.top); }, onUpdateParams: ["{self}"], });
  3. tween can only have one callback ?
  4. const tween = TweenMax.to({}, 1, {}); tween.eventCallback("onUpdate", () => { // SOME CODE }); https://greensock.com/docs/TweenMax/eventCallback() how to remove eventCallback ?
  5. i expect: zero rotation: cube must looks like second one. with rotation: cube must looks like first one.
  6. i can be wrong, but i think that when using transformPerspective with zero rotation, transform matrix has no information about perspective, childs can't apply parent perspective and looks flat.
  7. yes i know the difference. i added another demo. look at the second one, when i add to each side transformPerspective, looks not bad. but... when i start rotation both looks different, and first looks better.
  8. transformPerspective is a perfect solution for rotation, but when node has zero rotation it looks like flat
  9. _getOffset2DMatrix = function(e, offsetOrigin, parentOffsetOrigin, zeroOrigin, isBase) { if (e === window || !e || !e.style || !e.parentNode) { return [1,0,0,1,0,0]; } var cache = e._dCache || _cache(e), parent = e.parentNode, parentCache = parent._dCache || _cache(parent), _cache = function(e) { if (Draggable.cacheSVGData !== false && e._dCache && e._dCache.lastUpdate === TweenLite.ticker.frame) { return e._dCache; } var cache = e._dCache = e._dCache || {}, cs = _getComputedStyle(e), as we can see, function "_getOffset2DMatrix" has check for "!e.style" but into function "_cache" we send "e.parentNode". "_cache" function has no checks and try to get computed style. in this case e.nodeName === 'HTML' && e.style && !e.parentNode.style // e.parentNode is frame.contentWindow.document
  10. i have friendly iframes on the page, and don't want load draggable in every iframe, it loads only on top, and when i try to create draggable element in iframe it cause error.
  11. i use it to know, when element change size/position. for example, i have element A, and element B which behaves like a reflection in a mirror. element A can change it size/position from a different places, and when i create element B, i just whant to cacth all tweens, and check target , if it's element A, then do what i do.
  12. thanks, this help me if use "to", "fromTo" etc... and another thing is, can i catch usage of TweenMax.set()?
  13. I find TweenMax.ticker.addEventListener("tick", callbackFn); but.. how can i get all items, that currently animated?
  14. Hi, i have a problem, i need to know if any element on the page start/end tweening with TweenMax. Can i add something like global callback, that will fire on every tween start/end. P.S. sorry for my bad english.
  15. thanks for answer.. but problem doesn't in that.....code for example part of TweenMax.min.js z = function(t, e) { var i, s = {}; for (i in t) B[i] || i in e && "transform" !== i && "x" !== i && "y" !== i && "width" !== i && "height" !== i && "className" !== i && "border" !== i && "position" !== i || !(!E[i] || E[i] && E[i]._autoCSS) || (s[i] = t[i], delete t[i]); t.css = s } as i understood this is function that convert params obj assigned to function, into Obj.css and when this function check "position" key, look at the "|| i in e &&" part of code.. in this part original lib diside that "position" need to be called becouse of mootools add method position to DOM elements. i fix it added "&& "position" !== i" part of code to originl lib. sorry for bad english.