Jump to content
Search Community

Combat Kevin

Members
  • Posts

    3
  • Joined

  • Last visited

Combat Kevin's Achievements

  1. Just tossing it out. Thanks for your time.
  2. I now understand how the Pixi plugin works. I am wondering if it would make sense or help others to add a type-check warning if the "start value" type and "end value" type don't match in the _addComplexStringPropTween function. var _addComplexStringPropTween = function _addComplexStringPropTween(target, prop, start, end, setter, stringFilter, funcParam) { //... //something like: typeof start !== typeof end && return console.warn(`start type mismatches end type: ${typeof start === 'object' ? start.toString() : typeof start} vs. ${typeof end === 'object' ? end.toString() : typeof end}. Are you trying to set Pixi.js properties? See ___ for more information. Property will not be added to Tweens.`); //... var pt = new PropTween(this._pt, target, prop, 0, 1, _renderComplexString, null, setter), index = 0, matchIndex = 0, result, startNums, color, endNum, chunk, startNum, hasRandom, a; pt.b = start; pt.e = end; // The value of `start` becomes: '[@pixi/math:ObservablePoint x=0 y=0 scope=[@pixi/math:Transform position=(0, 0) rotation=0 scale=(1, 1) skew=(0, 0) ]]' start += ""; //ensure values are strings // The value of `end` becomes: '0.25' end += ""; //... }, //... _renderComplexString = function _renderComplexString(ratio, data) { var pt = data._pt, s = ""; //... data.set(data.t, data.p, s, data); } // V V V V V V var _setterPlain = function _setterPlain(target, property, value) { return target[property] = value; //DisplayObject setter for scale: expecting Observable Point; value = "0.25" }, Just a thought, although, I recognize it's possible I'm the only one that was confused by this Thank you for your help!
  3. I am rewriting some software to use Pixi.js and GSAP. I have, at times, been both amazed and extremely frustrated during this journey but I know it'll be worthwhile once the transition is complete. Animating with GSAP is so much easier than trying to do those same animations (or, let's be real, really shoddy versions of the buttery smooth animations provided via GSAP) in Pixi with an update-loop. My original frustrations were trying to incorporate GSAP into my update-loop efforts within Pixi. I believe I'm beyond most of those, now, but... In the attached Codepen, I have an example of a simple keyframe animation. I want the scale to also animate. If you uncomment the 2 scale lines (one in text2's timeline set and the other in the to) the rendering (text2) disappears. I apologize if this has been asked and answered; however, the key words "scale" and "animate" don't yield productive results and I am at wit's end.. I've been through countless examples (converting most to GSAP v3 from GSAP v2) about keyframes, to and fromTo, and this old GSAP v2 example (which seems like it should work after taking out the css property--since that was deprecated and, I believe, fully removed from the source code). This is definitely a great community! Looking forward to working with ya! Thanks for your time! Warm regards, Kevin
×
×
  • Create New...