text: "use strict";var _createClass=function(){function e(i,t){for(var s=0;s<t.length;s++){var e=t[s];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),Object.defineProperty(i,e.key,e)}}return function(i,t,s){return t&&e(i.prototype,t),s&&e(i,s),i}}();function _classCallCheck(i,t){if(!(i instanceof t))throw new TypeError("Cannot call a class as a function")}var AnimaticonObj3=function(){function E(i){var e=this,t=i.animaticonObjName,s=i.name,o=i.tags,n=i.uuid,r=i.objJson,a=i.img,u=i.bones,h=i.paths,p=i.groupId,l=i.scene,c=i.position,g=void 0===c?{x:0,y:0,z:0}:c,f=i.scale,b=void 0===f?{x:1,y:1,z:1}:f,d=i.rotation,m=void 0===d?{x:0,y:0,z:0}:d,v=i.visible,y=void 0===v||v;_classCallCheck(this,E);var k=u,w=h;if(this.scene=l,!k&&!w){var x=JSON.parse(r);k=x.bones,w=x.paths,g=x.position||g,b=x.scale||b}this.props={position:g,scale:b,rotation:m,visible:y},this.groupId=p,this.animaticonObjName=t,this.name=s,this.tags=o,this.uuid=n,this.img=a,this.id=-1,this.sbones=[],this.group=new THREE.Group,this.bones=k?k.map(function(i,t){i.group=e.group;var s=new window.animaticonObjects.Bone3(i);return e.sbones.push(s.bone),s}):[],this.paths=w?w.map(function(i,t){return i.group=e.group,i.scene=l,new window.animaticonObjects.PathObj3(i)}):[],this.bones.forEach(function(s){s.props.bones.forEach(function(t){var i=e.bones.find(function(i){return i.props.id===t});s.addBone(i)}),s.props.paths.forEach(function(t){var i=e.paths.find(function(i){return i.props.id===t});s.addPath(i)})});var z=new THREE.Skeleton(this.sbones);this.skeletonHelper=new THREE.SkeletonHelper(z.bones[0]),this.skeletonHelper.skeleton=z,this.group.add(z.bones[0]),l.add(this.skeletonHelper),l.add(this.group),this.skeletonHelper.visible=!1,this.init()}return _createClass(E,[{key:"setId",value:function(i){this.id=i}},{key:"setGroupId",value:function(i){this.groupId=i}},{key:"init",value:function(){var i=this.props,t=i.position,s=i.scale,e=i.visible,o=i.rotation;this.bones.forEach(function(i){i.init()}),this.paths.forEach(function(i){i.init()}),this.group.position.x=t.x,this.group.position.y=t.y,this.group.position.z=t.z,this.group.scale.x=s.x,this.group.scale.y=s.y,this.group.scale.z=s.z,this.group.rotation.x=o.x,this.group.rotation.y=o.y,this.group.rotation.z=o.z,this.group.visible=e}},{key:"updateProps",value:function(){this.props.scale={x:this.group.scale.x,y:this.group.scale.y,z:this.group.scale.z},this.props.position={x:this.group.position.x,y:this.group.position.y,z:this.group.position.z}}},{key:"setColors",value:function(i){var t=i.fillColor,s=i.strokeColor;this.group.fillColor=t,this.group.children.forEach(function(i){1<i.strokeWidth&&(i.strokeColor=s)})}},{key:"remove",value:function(){this.group.parent&&(this.group.parent.remove(this.skeletonHelper),this.group.parent.remove(this.group))}},{key:"addBone",value:function(){var i=new window.animaticonObjects.Bone3({id:"new One",name:"new One"});this.bones.push(i),this.sbones.push(i.bone),this.scene.remove(this.skeletonHelper),this.scene.remove(this.group),this.group=new THREE.Group;var t=new THREE.Skeleton(this.sbones);return this.skeletonHelper=new THREE.SkeletonHelper(t.bones[0]),this.skeletonHelper.skeleton=t,this.group.add(t.bones[0]),this.scene.add(this.skeletonHelper),this.scene.add(this.group),this.bones.forEach(function(i){return i.init()}),this.formAllMusles(),i}},{key:"getAllMusles",value:function(){return this.allMusles||this.formAllMusles(),this.allMusles}},{key:"formAllMusles",value:function(){this.allMusles=this.bones.map(function(i){return i.muslePath}).filter(function(i){return i})}},{key:"getProperties",value:function(){return{bones:this.bones.map(function(i){return i.getProperties()}),paths:this.paths.map(function(i){return i.getProperties()}),animaticonObjName:this.animaticonObjName,name:this.name,tags:this.tags,uuid:this.uuid,groupId:this.groupId,img:this.img,position:{x:this.group.position.x,y:this.group.position.y,z:this.group.position.z},scale:{x:this.group.scale.x,y:this.group.scale.y,z:this.group.scale.z}}}},{key:"getControls",value:function(){return{bones:this.bones,animaticonObjName:this.animaticonObjName,name:this.name,tags:this.tags,uuid:this.uuid,img:this.img,groupId:this.groupId,position:{x:this.group.position.x,y:this.group.position.y,z:this.group.position.z},scale:{x:this.group.scale.x,y:this.group.scale.y,z:this.group.scale.z},visible:this.group.visible}}}]),E}();window.animaticonObjects.AnimaticonObj3=AnimaticonObj3;
  "use strict";var AnimaticonUtils={animateVector3:function(n,a,t){t=t||{};var e=a||THREE.Vector3(),i=t.easing||TWEEN.Easing.Quadratic.In,o=t.duration||2e3;return new TWEEN.Tween(n).to({x:e.x,y:e.y,z:e.z},o).easing(i).onUpdate(function(n){t.update&&t.update(n)}).onComplete(function(){t.callback&&t.callback()})},tweenCustomVar:function(n,a,t){console.log(n,a,t);var e=(t=t||{}).easing||TWEEN.Easing.Linear.None,i=t.duration||2e3,o={};return o[t.variable||"opacity"]=a,new TWEEN.Tween(n).to(o,i).easing(e).onUpdate(function(n){t.update&&t.update(n)}).onComplete(function(){t.callback&&t.callback()})}};window.animaticonObjects.AnimaticonUtils=AnimaticonUtils;
  "use strict";var _createClass=function(){function s(t,e){for(var o=0;o<e.length;o++){var s=e[o];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(t,s.key,s)}}return function(t,e,o){return e&&s(t.prototype,e),o&&s(t,o),t}}();function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var Bone3=function(){function M(t){var e=t.id,o=t.name,s=t.position,n=void 0===s?{x:0,y:100,z:0}:s,i=t.length,r=void 0===i?100:i,a=t.initAngle,h=void 0===a?0:a,l=t.muscleWidth,u=void 0===l?{start:50,end:50}:l,p=t.joints,d=void 0===p?{start:{radius:-2,strokeColor:"black",strokeWidth:1},end:{radius:-2,strokeColor:"black",strokeWidth:1}}:p,c=t.arc,f=void 0===c?{start:!0,end:!0}:c,v=t.bones,b=void 0===v?[]:v,m=t.border,k=void 0===m?{strokeColor:"0xffffff",strokeWidth:1}:m,y=t.zIndex,P=void 0===y?10:y,g=t.fillColor,E=void 0===g?"0x000000":g,z=t.paths,T=void 0===z?[]:z;_classCallCheck(this,M),this.props={id:e,position:n,name:o,muscleWidth:u,joints:d,border:k,zIndex:P,fillColor:E,bones:b,arc:f,initAngle:h,length:r,paths:T},this.bones=[],this.paths=[],this.bone=new THREE.Bone,this.setup()}return _createClass(M,[{key:"init",value:function(){this.bone.rotation.z=this.props.initAngle,this.bone.position.y=this.props.position.y}},{key:"setPosition",value:function(t){this.props.position=t,this.bone.position.x=t.x,this.bone.position.y=t.y,this.bone.position.z=t.z}},{key:"addBone",value:function(t){t&&(this.bones.push(t),t.setPosition({x:0,y:this.props.length,z:0}),this.bone.add(t.bone))}},{key:"addPath",value:function(e){e&&!this.paths.find(function(t){return t.props.id===e.props.id})&&(this.paths.push(e),this.bone.add(e.path))}},{key:"removeBone",value:function(t){this.bone.remove(t.bone)}},{key:"setAngle",value:function(t){this.bone.rotation.z=t}},{key:"setup",value:function(){this.formMusles()}},{key:"formMusles",value:function(){this.makeMuslePoints()}},{key:"getProperties",value:function(){return this.props=Object.assign({},this.props,{bones:this.bones.map(function(t){return t.props.id}),paths:this.paths.map(function(t){return t.props.id})}),this.props}},{key:"setProps",value:function(t){var e=this;this.props=Object.assign({},this.props,t),this.bones.forEach(function(t){t.setPosition({x:0,y:e.props.length,z:0})}),this.paths.forEach(function(t){t.setPosition({x:0,y:e.props.length,z:0})}),this.makeMuslePoints(),this.formzIndexes(),this.init()}},{key:"setGroup",value:function(t){this.group=t,this.group.add(this.bone),this.bone.rotation.z=this.initAngle}},{key:"makeMuslePoints",value:function(){var t=this.props,e=t.muscleWidth,o=t.length,s=t.fillColor,n=t.arc,i=(t.zIndex,t.border);if(this.muslePath&&(this.bone.remove(this.muslePath),this.bone.remove(this.musleBorderPath)),0===e.start||0===e.end)return this.muslePath=null,void(this.musleBorderPath=null);var r=new THREE.Shape;r.moveTo(-e.start/2,0),r.lineTo(-e.end/2,o),n.start?r.absarc(0,o,e.end/2,Math.PI,0,!0):r.lineTo(e.end/2,o),r.lineTo(e.start/2,0),n.end?r.absarc(0,0,e.start/2,2*Math.PI,Math.PI,!0):r.lineTo(e.start/2,0),r.autoClose=!0;var a=new THREE.ShapeGeometry(r),h=new THREE.MeshBasicMaterial({color:parseInt(s)}),l=new THREE.Shape;l.moveTo(-(e.start+1)/2,0),l.lineTo(-(e.end+1)/2,o),n.start?l.absarc(0,o,(e.end+1)/2,Math.PI,0,!0):l.lineTo((e.end+1)/2,o),l.lineTo((e.start+1)/2,0),n.end?l.absarc(0,0,(e.start+1)/2,2*Math.PI,Math.PI,!0):l.lineTo((e.start+1)/2,0),l.autoClose=!0;var u=new THREE.ShapeGeometry(l),p=new THREE.MeshBasicMaterial({color:parseInt(i.strokeColor)});this.muslePath=new THREE.Mesh(a,h),this.musleBorderPath=new THREE.Mesh(u,p),this.bone.add(this.muslePath),this.bone.add(this.musleBorderPath),this.formzIndexes()}},{key:"formzIndexes",value:function(){var t=this.props.zIndex;this.muslePath&&(this.musleBorderPath.position.z=t-.5,this.muslePath.position.z=t-.1)}},{key:"getAngle",value:function(){return this.bone.rotation.z}},{key:"getLength",value:function(){return this.props.length}},{key:"rotate",value:function(t){this.bone.rotation.z=t}}]),M}();window.animaticonObjects.Bone3=Bone3;
  "use strict";var _createClass=function(){function r(t,n){for(var i=0;i<n.length;i++){var r=n[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(t,n,i){return n&&r(t.prototype,n),i&&r(t,i),t}}();function _classCallCheck(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}var GroupAnimationControls3=function(){function e(t){var n=t.duration,i=void 0===n?1:n,r=t.startAt,o=void 0===r?0:r,s=t.id,a=t.group;_classCallCheck(this,e),this.animationControlClass="GroupAnimationControls3",this.id=s,this.controls=[],this.startAt=o,this.group=a,this.setProps({duration:i,startAt:o})}return _createClass(e,[{key:"setControls",value:function(t){this.controls=t;var n=Number.MAX_VALUE,i=0;this.controls.forEach(function(t){n=n>t.startAt?t.startAt:n,i=i<t.startAt+t.duration?t.startAt+t.duration:i}),this.startAt=n,this.end=i,this.duration=this.end-this.startAt}},{key:"setId",value:function(t){this.id=t}},{key:"init",value:function(){this.done=!1,this.started=!1,this.controls.forEach(function(t){return t.init()})}},{key:"setProps",value:function(t){var n=t.duration,i=t.startAt;this.duration=parseFloat(n),this.setStartAt(i)}},{key:"animate",value:function(n){if(this.started||(this.init(),this.started=!0),!this.done){var i=!0;this.controls.forEach(function(t){n>t.startAt&&t.animate(n),i=i&&t.done}),this.done=i}}},{key:"setStartAt",value:function(t){var n=t-this.startAt;this.startAt=t,this.controls.forEach(function(t){t.setStartAt(parseFloat(t.startAt)+n)}),this.end=this.startAt+this.duration}},{key:"getEndAt",value:function(){return this.startAt+this.duration}},{key:"getStartAt",value:function(){return this.startAt+this.duration}},{key:"toJson",value:function(){return{duration:this.duration,startAt:this.startAt,animationControlClass:"GroupAnimationControls3",controls:this.controls.map(function(t){return t.toJson()})}}}]),e}();window.animaticonObjects.GroupAnimationControls3=GroupAnimationControls3;
  "use strict";var _createClass=function(){function a(t,e){for(var o=0;o<e.length;o++){var a=e[o];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,a.key,a)}}return function(t,e,o){return e&&a(t.prototype,e),o&&a(t,o),t}}();function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var PathAnimationControl3=function(){function h(t){var e=t.duration,o=t.toPath,a=t.startAt,i=t.id,r=t.pathId,s=t.group,n=t.groupId;_classCallCheck(this,h),this.animationControlClass="PathAnimationControl3",this.done=!1,this.id=i,(this.group=s)&&s.paths&&(this.scene=s.scene,this.bodySeg=s.paths.find(function(t){return t.props.id===r})),this.setProps({duration:e,toPath:o,startAt:a,pathId:r}),this.groupId=n}return _createClass(h,[{key:"setId",value:function(t){this.id=t}},{key:"setGroupId",value:function(t){this.groupId=t}},{key:"init",value:function(t){var a=this;this.bodySeg&&"custom-geometry"===this.bodySeg.props.type&&(this.bodySeg.path.geometry.vertices.forEach(function(t,e){var o=a.bodySeg.props.pathData.vertices[e];t.set(o.x,o.y,o.z)}),this.done=!!t,this.started=!1,this.count=0)}},{key:"setProps",value:function(t){var e=t.duration,o=t.toPath,a=t.startAt,i=t.pathId;if(this.bodySeg&&"custom-geometry"===this.bodySeg.props.type){this.duration=parseFloat(e),this.toPath=o,this.startAt=parseFloat(a),this.pathId=i;var r=JSON.parse(o),s=new THREE.ParametricGeometry(function(t,e,o){var a=t*r.height,i=e*r.width;o.set(a,i,0)},1,r.segments);s.vertices.forEach(function(t,e){var o=r.vertices[e];t.set(o.x,o.y,o.z)}),this.bodySeg,this.bodySeg.path.geometry.morphTargets[0]={name:"t1",vertices:s.vertices},this.bodySeg.path.geometry.computeMorphNormals(),this.bodySeg.path.updateMorphTargets()}}},{key:"animate",value:function(){var o=this;this.bodySeg&&!this.started?(this.init(),this.started=!0,this.bodySeg.path.geometry.vertices.forEach(function(t,e){window.animaticonObjects.AnimaticonUtils.animateVector3(o.bodySeg.path.geometry.vertices[e],o.bodySeg.path.geometry.morphTargets[0].vertices[e],{duration:1e3*o.duration,callback:o.onComplete}).start()})):this.bodySeg.path.geometry.verticesNeedUpdate=!0}},{key:"onComplete",value:function(){this.done=!0}},{key:"setStartAt",value:function(t){this.startAt=t}},{key:"getEndAt",value:function(){return this.startAt+this.duration}},{key:"getStartAt",value:function(){return this.startAt}},{key:"toJson",value:function(){return{duration:this.duration,startAt:this.startAt,animationControlClass:"PathAnimationControl3",toPath:this.toPath,pathId:this.pathId,groupId:this.group?this.group.groupId:null}}}]),h}();window.animaticonObjects.PathAnimationControl3=PathAnimationControl3;
  "use strict";var _createClass=function(){function s(t,e){for(var i=0;i<e.length;i++){var s=e[i];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(t,s.key,s)}}return function(t,e,i){return e&&s(t.prototype,e),i&&s(t,i),t}}();function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var PathObj3=function(){function R(t){var e=this,i=t.path,s=t.pathData,a=void 0===s?{}:s,o=t.id,h=t.name,r=t.scene,n=t.type,p=void 0===n?"none":n,c=t.showDots,l=void 0!==c&&c,y=t.zIndex,u=void 0===y?10:y,v=t.group,f=t.visible,m=void 0===f||f,x=t.fillColor,g=void 0===x?0:x,d=t.position,z=void 0===d?{x:0,y:0,z:0}:d,E=t.rotation,w=void 0===E?{x:0,y:0,z:0}:E,b=t.scale,T=void 0===b?{x:1,y:1,z:1}:b;if(_classCallCheck(this,R),this.id=-1,this.scene=r,this.group=v,this.props={id:o,name:h,zIndex:u,fillColor:g,position:z,type:p,showDots:l,pathData:a,rotation:w,scale:T,visible:m},a&&!i)if("custom-geometry"===p){var P=new THREE.MeshBasicMaterial({morphTargets:!0,color:new THREE.Color(parseInt(this.props.fillColor)),side:THREE.DoubleSide}),k=new THREE.ParametricGeometry(function(t,e,i){var s=t*a.height,o=e*a.width;i.set(s,o,0)},1,a.segments);this.path=new THREE.Mesh(k,P)}else if("Line"===p){var D=new THREE.Path;D.moveTo(a.vertices[0].x,a.vertices[0].y),D.lineTo(a.vertices[1].x,a.vertices[1].y);var H=(new THREE.Geometry).setFromPoints(D.getPoints()),O=new THREE.LineBasicMaterial({color:0});this.path=new THREE.Line(H,O)}else{(new THREE.ObjectLoader).parse(JSON.parse(a),function(t){e.path=t})}else this.path=i;this.init(),this.scene.add(this.path),this.formZindexes(),this.formDots()}return _createClass(R,[{key:"init",value:function(){var t=this.props,e=t.position,i=t.rotation,s=(t.path,t.type),o=t.pathData,a=t.visible,h=t.scale;"custom-geometry"!==s&&"Line"!==s||!o.vertices||(this.path.geometry.vertices.forEach(function(t,e){var i=o.vertices[e];t.set(i.x,i.y,i.z)}),this.path.geometry.verticesNeedUpdate=!0),"Line"!==s&&this.path.geometry.center(),this.path.position.x=e.x,this.path.position.y=e.y,this.path.position.z=e.z,this.path.rotation.x=i.x,this.path.rotation.y=i.y,this.path.rotation.z=i.z,this.path.scale.x=h.x,this.path.scale.y=h.y,this.path.scale.z=h.z,this.path.visible=a}},{key:"updateProps",value:function(){this.props.scale={x:this.path.scale.x,y:this.path.scale.y,z:this.path.scale.z},this.props.position={x:this.path.position.x,y:this.path.position.y,z:this.path.position.z},this.props.rotation={x:this.path.rotation.x,y:this.path.rotation.y,z:this.path.rotation.z}}},{key:"formDots",value:function(){var a=this;"custom-geometry"!==this.props.type&&"Line"!==this.props.type||(this.path.geometry.vertices.length>this.path.children.length&&this.props.showDots?this.path.geometry.vertices.forEach(function(t,e){var i=new THREE.MeshBasicMaterial({color:16711680,transparent:!1}),s=new THREE.SphereGeometry(3),o=new THREE.Mesh(s,i);o.name=e,o.position.copy(t),a.path.add(o)}):this.path.children.forEach(function(t){return t.visible=a.props.showDots}))}},{key:"getPointAt",value:function(t){if(this.curve)return this.curve.getPointAt(t);if("Line"===this.props.type){var e=new THREE.Path;return e.moveTo(this.path.geometry.vertices[0].x,this.path.geometry.vertices[0].y),e.lineTo(this.path.geometry.vertices[1].x,this.path.geometry.vertices[1].y),this.curve=e,this.curve.getPointAt(t)}return null}},{key:"remove",value:function(){this.path.parent&&this.path.parent.remove(this.path)}},{key:"formZindexes",value:function(){this.path.position.z=this.props.zIndex}},{key:"setGroup",value:function(t){this.group=t,this.group.add(this.path)}},{key:"setProps",value:function(t){this.props=Object.assign({},this.props,t),this.path.material.color=new THREE.Color(parseInt(this.props.fillColor)),this.path.visible=this.props.visible,this.formZindexes(),this.formDots()}},{key:"setPosition",value:function(t){this.path.position.x=t.x,this.path.position.y=t.y}},{key:"getProperties",value:function(){return"custom-geometry"===this.props.type||"Line"===this.props.type?this.props.pathData.vertices||(this.props.pathData.vertices=this.path.geometry.vertices.map(function(t){return{x:t.x,y:t.y,z:t.z}})):this.props.pathData=JSON.stringify(this.path.toJSON()),this.props=Object.assign({},this.props,{position:{x:this.path.position.x,y:this.path.position.y,z:this.path.position.z},rotation:{x:this.path.rotation.x,y:this.path.rotation.y,z:this.path.rotation.z},scale:{x:this.path.scale.x,y:this.path.scale.y,z:this.path.scale.z},zIndex:this.path.position.z,fillColor:"0x"+this.path.material.color.getHexString(),visible:this.path.visible}),this.props}},{key:"getPathData",value:function(){return"custom-geometry"===this.props.type||"Line"===type?this.props.pathData.vertices=this.path.geometry.vertices.map(function(t){return{x:t.x,y:t.y,z:t.z}}):this.props.pathData=JSON.stringify(this.path.toJSON()),this.props.pathData}},{key:"setVertex",value:function(t,e,i){t.position.x+=e.x,t.position.y+=e.y,this.path.geometry.vertices[t.name].x+=e.x,this.path.geometry.vertices[t.name].y+=e.y,this.path.geometry.verticesNeedUpdate=!0,this.curve=null}},{key:"clone",value:function(){var t=this.getProperties();return t.position.x+=30,t.position.y+=30,t.id+="1",t.name+="1",t.scene=this.scene,new window.animaticonObjects.PathObj3(t)}},{key:"getAngle",value:function(){return this.path.rotation.z}},{key:"rotatePath",value:function(t){this.path.rotation.z=t}}]),R}();window.animaticonObjects.PathObj3=PathObj3;
  "use strict";var _createClass=function(){function i(t,n){for(var o=0;o<n.length;o++){var i=n[o];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(t,n,o){return n&&i(t.prototype,n),o&&i(t,o),t}}();function _classCallCheck(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}var RotateAnimationControl3=function(){function l(t){var n=this,o=t.duration,i=t.from,e=t.angle,a=t.startAt,r=t.group,s=t.groupItem,u=t.id,h=t.groupId;_classCallCheck(this,l),this.animationControlClass="RotateAnimationControl3",this.done=!1,this.rotatedAngle=0,this.id=u,this.group=r,this.groupItem=s,this.group&&(this.bodySeg=this.group.bones.find(function(t){return t.props.id===n.groupItem}).bone),this.setProps({duration:o,from:i,angle:e,startAt:a}),this.groupId=h,this.onComplete=this.onComplete.bind(this)}return _createClass(l,[{key:"setId",value:function(t){this.id=t}},{key:"setGroupId",value:function(t){this.groupId=t}},{key:"init",value:function(){this.bodySeg&&(this.bodySeg.rotation.z=this.from),this.done=!1,this.rotatedAngle=0,this.started=!1}},{key:"setProps",value:function(t){var n=t.duration,o=t.from,i=t.angle,e=t.startAt;this.duration=parseFloat(n),this.from=parseFloat(o),this.angle=parseFloat(i),this.to=this.angle/(60*this.duration),this.startAt=parseFloat(e)}},{key:"animate",value:function(){!this.started&&this.bodySeg&&(this.init(),this.started=!0,this.tween||(this.tween=window.animaticonObjects.AnimaticonUtils.animateVector3(this.bodySeg.rotation,{z:this.from+this.angle},{duration:1e3*this.duration,callback:this.onComplete})),this.tween.start())}},{key:"onComplete",value:function(){this.done=!0}},{key:"setStartAt",value:function(t){this.startAt=t}},{key:"getEndAt",value:function(){return this.startAt+this.duration}},{key:"getStartAt",value:function(){return this.startAt}},{key:"toJson",value:function(){return{duration:this.duration,from:this.from,angle:this.angle,startAt:this.startAt,animationControlClass:"RotateAnimationControl3",groupItem:this.groupItem,groupId:this.group.groupId}}},{key:"toRadians",value:function(t){return t*(Math.PI/180)}}]),l}();window.animaticonObjects.RotateAnimationControl3=RotateAnimationControl3;
  "use strict";var _createClass=function(){function n(t,i){for(var e=0;e<i.length;e++){var n=i[e];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(t,i,e){return i&&n(t.prototype,i),e&&n(t,e),t}}();function _classCallCheck(t,i){if(!(t instanceof i))throw new TypeError("Cannot call a class as a function")}var ScaleAnimationControl3=function(){function u(t){var i=this,e=t.duration,n=t.to,a=t.startAt,o=t.group,s=t.groupItem,r=t.id,l=t.groupId;_classCallCheck(this,u),this.animationControlClass="ScaleAnimationControl3",this.done=!1,this.scaledLength=0,this.id=r,this.group=o,this.groupItem=s,this.setProps({duration:e,to:n,startAt:a}),this.bodySeg=this.group.bones.find(function(t){return t.props.id===i.groupItem}).bone,this.groupId=l}return _createClass(u,[{key:"setId",value:function(t){this.id=t}},{key:"setGroupId",value:function(t){this.groupId=t}},{key:"init",value:function(){this.done=!1,this.scaledLength=0,this.started=!1,this.initScale&&(this.bodySeg.scale.x=this.initScale.x,this.bodySeg.scale.y=this.initScale.y,this.bodySeg.scale.z=this.initScale.z)}},{key:"setProps",value:function(t){var i=t.duration,e=t.to,n=t.startAt;this.duration=parseFloat(i);var a=(this.to=e).split(",");this.scaleTo={x:parseFloat(a[0]),y:parseFloat(a[1]),z:parseFloat(a[2])},this.startAt=parseFloat(n)}},{key:"animate",value:function(){this.started||(this.init(),this.started=!0,this.tween||(this.initScale=this.bodySeg.scale.clone(),this.tween=window.animaticonObjects.AnimaticonUtils.animateVector3(this.bodySeg.scale,this.scaleTo,{duration:1e3*this.duration,callback:this.onComplete})),this.tween.start())}},{key:"setStartAt",value:function(t){this.startAt=t}},{key:"getEndAt",value:function(){return this.startAt+this.duration}},{key:"getStartAt",value:function(){return this.startAt}},{key:"toJson",value:function(){return{duration:this.duration,to:this.to,startAt:this.startAt,animationControlClass:"ScaleAnimationControl3",groupItem:this.groupItem,groupId:this.group.groupId}}}]),u}();window.animaticonObjects.ScaleAnimationControl3=ScaleAnimationControl3;
  "use strict";var _createClass=function(){function i(t,n){for(var a=0;a<n.length;a++){var i=n[a];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(t,n,a){return n&&i(t.prototype,n),a&&i(t,a),t}}();function _classCallCheck(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}var TranslateAnimationControl3=function(){function u(t){var n=t.duration,a=t.pathItem,i=t.startAt,e=t.group,o=t.id,r=t.translatePath,s=t.groupId;_classCallCheck(this,u),this.animationControlClass="TranslateAnimationControl3",this.done=!1,this.translatePath=r,this.id=o,this.group=e,r||(this.translatePath=this.group.paths.find(function(t){return t.props.id===a})),this.setProps({duration:n,pathItem:a,startAt:i}),this.groupId=s}return _createClass(u,[{key:"setId",value:function(t){this.id=t}},{key:"setGroupId",value:function(t){this.groupId=t}},{key:"init",value:function(){this.done=!1,this.started=!1;var t=this.translatePath.getPointAt(0);this.group.group.position.x=t.x,this.group.group.position.y=t.y}},{key:"setProps",value:function(t){var n=t.duration,a=t.pathItem,i=t.startAt;this.duration=parseFloat(n),this.pathItem=a,this.startAt=parseFloat(i)}},{key:"animate",value:function(){if(this.done||this.started)this.group.group.position.needUpdate=!0;else{this.init(),this.started=!0;var t=this.translatePath.getPointAt(1);this.tween=window.animaticonObjects.AnimaticonUtils.animateVector3(this.group.group.position,{x:t.x,y:t.y},{duration:1e3*this.duration,callback:this.onComplete}),this.tween.start()}}},{key:"onComplete",value:function(){this.done=!0}},{key:"setStartAt",value:function(t){this.startAt=t}},{key:"getEndAt",value:function(){return this.startAt+this.duration}},{key:"getStartAt",value:function(){return this.startAt}},{key:"toJson",value:function(){return{duration:this.duration,startAt:this.startAt,animationControlClass:"TranslateAnimationControl3",pathItem:this.pathItem,groupId:this.group.groupId}}}]),u}();window.animaticonObjects.TranslateAnimationControl3=TranslateAnimationControl3;
  "use strict";var _createClass=function(){function o(t,i){for(var n=0;n<i.length;n++){var o=i[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(t,i,n){return i&&o(t.prototype,i),n&&o(t,n),t}}();function _classCallCheck(t,i){if(!(t instanceof i))throw new TypeError("Cannot call a class as a function")}var VisibilityAnimationControl3=function(){function a(t){var i=t.duration,n=t.visible,o=t.startAt,s=t.group,r=t.id,e=t.groupId;_classCallCheck(this,a),this.animationControlClass="VisibilityAnimationControl3",this.done=!1,this.id=r,this.group=s,this.setProps({duration:i,visible:n,startAt:o}),this.groupId=e}return _createClass(a,[{key:"setGroupId",value:function(t){this.groupId=t}},{key:"setId",value:function(t){this.id=t}},{key:"init",value:function(){this.group.group.visible=!0}},{key:"setProps",value:function(t){var i=t.duration,n=t.visible,o=t.startAt;this.duration=parseFloat(i),this.visible=n,this.startAt=o}},{key:"animate",value:function(){this.group.group.visible=this.visible,this.done=!0}},{key:"setStartAt",value:function(t){this.startAt=t}},{key:"getEndAt",value:function(){return this.startAt+this.duration}},{key:"getStartAt",value:function(){return this.startAt}},{key:"toJson",value:function(){return{duration:this.duration,visible:this.visible,startAt:this.startAt,animationControlClass:"VisibilityAnimationControl3",groupId:this.group.groupId}}}]),a}();window.animaticonObjects.VisibilityAnimationControl3=VisibilityAnimationControl3;