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!