src/tweenjs/plugins/CSSPlugin.js
function parseMulti(str, compare, arr) {
		// TODO: add logic to deal with "0" values? Troublesome because the browser automatically appends a unit for some 0 values.
		do {
			// pull out the next value (ex. "20px", "12.4rad"):
			var result = s.TRANSFORM_VALUE_RE.exec(str);
			if (!result) { return arr; }
			if (!arr) { arr = []; }
			arr.push(+result[1], result[2]);

			// check that the units match (ex. "px" vs "em"):
			if (compare && (compare[arr.length-1] !== result[2])) { console.log("transform units don't match: ",arr[0], compare[arr.length-1], result[2]); compare=null;  } // unit doesn't match
		} while(true);
	}
function parseMulti(str, compare, arr) {
		// TODO: add logic to deal with "0" values? Troublesome because the browser automatically appends a unit for some 0 values.
		do {
			// pull out the next value (ex. "20px", "12.4rad"):
			var result = s.TRANSFORM_VALUE_RE.exec(str);
			if (!result) { return arr; }
			if (!arr) { arr = []; }
			arr.push(+result[1], result[2]);

			// check that the units match (ex. "px" vs "em"):
			if (compare && (compare[arr.length-1] !== result[2])) { console.log("transform units don't match: ",arr[0], compare[arr.length-1], result[2]); compare=null;  } // unit doesn't match
		} while(true);
	}
function parseMulti ( str , compare , arr ) { // TODO: add logic to deal with "0" values? Troublesome because the browser automatically appends a unit for some 0 values. do { // pull out the next value (ex. "20px", "12.4rad"): var result = s . TRANSFORM_VALUE_RE . exec ( str ) ; if ( ! result ) { return arr ; } if ( ! arr ) { arr = [ ] ; } arr . push ( + result [ 1 ] , result [ 2 ] ) ; // check that the units match (ex. "px" vs "em"): if ( compare && ( compare [ arr . length - 1 ] !== result [ 2 ] ) ) { console . log ( "transform units don't match: " , arr [ 0 ] , compare [ arr . length - 1 ] , result [ 2 ] ) ; compare = null ; } // unit doesn't match } while ( true ) ; }
this was separated so that it can be used for other multi element styles in the future ex. transform-origin, border, etc.
this was separated so that it can be used for other multi element styles in the future ex . transform - origin border etc .