
OxXxigen
-
Posts
18 -
Joined
-
Last visited
Content Type
Profiles
Forums
Store
Blog
Product
Showcase
FAQ
ScrollTrigger Demos
Downloads
Posts posted by OxXxigen
-
-
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}"], });
-
tween can only have one callback ?
-
const tween = TweenMax.to({}, 1, {}); tween.eventCallback("onUpdate", () => { // SOME CODE });
https://greensock.com/docs/TweenMax/eventCallback()
how to remove eventCallback ?
-
i expect:
zero rotation: cube must looks like second one.
with rotation: cube must looks like first one.
-
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.
-
-
-
_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 checksand try to get computed style. in this case
e.nodeName === 'HTML' && e.style && !e.parentNode.style // e.parentNode is frame.contentWindow.document
-
-
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. -
thanks, this help me if use "to", "fromTo" etc...
and another thing is, can i catch usage of TweenMax.set()? -
I find TweenMax.ticker.addEventListener("tick", callbackFn);
but.. how can i get all items, that currently animated?
-
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. -
thanks for answer..
but problem doesn't in that.....code for example
part of TweenMax.min.jsz = 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.
-
sorry for bad english.
If use mootools and try to change "position" attribute, autoCss function GSAP detect "position" in target and don't add it to vars.css, becouse mootool add "position" method to Node prototype.i fix it in my local machine, but...
where can i write, to fix it in future?
get current tween value
in GSAP
Posted
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 ?