//>>built
define("demos/doGeo/src/wink/fx/_xyz/js/3dfx",["dojo","dijit","dojox"],function(_1,_2,_3){wink.json.concat(wink.fx,{_nodeTransforms:[],set3dTransform:function(_4,_5,_6){if(!this._is3dfxTransformation(_5)){wink.log("[3dfx] Invalid transformation : check type, x, y, z, angle parameters");return false;}var _7;if(_6===true){_7=wink.fx.getTransform(_4);}var _8=wink.math.createTransformMatrix(_7);var _9=this._getTransformMatrix(_5);_8.multiply(_9);wink.fx.setTransform(_4,_8.getCssMatrix());},initComposedTransform:function(_a,_b){var _c;if(_b===true){_c=wink.fx.getTransform(_a);}var _d=wink.math.createTransformMatrix(_c);this.removeComposedTransform(_a);this._nodeTransforms.push({node:_a,transforms:[_d]});},setTransformPart:function(_e,_f,_10){if(!this._is3dfxTransformation(_10)){wink.log("[3dfx] Invalid transformation : check type, x, y, z, angle parameters");return false;}if(_f<1||_f>10){wink.log("[3dfx] Invalid transformation index : 0 is reserved, 10 is the max");return false;}for(var i=0;i<this._nodeTransforms.length;i++){if(this._nodeTransforms[i].node==_e){var _11=null;if(wink.isset(_10)){_11=this._getTransformMatrix(_10);}this._nodeTransforms[i].transforms[_f]=_11;break;}}},applyComposedTransform:function(_12,_13){for(var i=0;i<this._nodeTransforms.length;i++){if(this._nodeTransforms[i].node==_12){var _14=this._nodeTransforms[i].transforms;var _15=_14[0].clone();for(var j=1;j<_14.length;j++){if(wink.isset(_14[j])){_15.multiply(_14[j]);}}if(_13===true){this._nodeTransforms[i].transforms=[_15];}wink.fx.setTransform(_12,_15.getCssMatrix());break;}}},storeComposedTransform:function(_16){this.applyComposedTransform(_16,true);},removeComposedTransform:function(_17){for(var i=0;i<this._nodeTransforms.length;i++){if(this._nodeTransforms[i].node==_17){this._nodeTransforms.splice(i,1);break;}}},_is3dfxTransformation:function(_18){var _19=true;if(wink.isset(_18)){var _1a=["translate","scale","rotate"];_19=_19&&wink.isset(_18.type);_19=_19&&(_1a.indexOf(_18.type)!=-1);_19=_19&&wink.isset(_18.x);_19=_19&&wink.isset(_18.y);_19=_19&&wink.isset(_18.z);if(_19&&_18.type=="rotate"){_19=_19&&wink.isset(_18.angle);}}return _19;},_getTransformMatrix:function(_1b){var _1c=wink.math.createTransformMatrix();switch(_1b.type){case "translate":_1c.translate(_1b.x,_1b.y,_1b.z);break;case "scale":_1c.scale(_1b.x,_1b.y,_1b.z);break;case "rotate":_1c.rotateAxisAngle(_1b.x,_1b.y,_1b.z,_1b.angle);break;}return _1c;}});});