Files

23 lines
706 KiB
JavaScript
Raw Permalink Normal View History

2026-03-22 03:21:45 +02:00
"use strict";var ___resolve=require.resolve;!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.animationUtilities=e()}}(function(){var e;return function t(e,r,n){function o(a,s){if(!r[a]){if(!e[a]){var l="function"==typeof require&&require;if(!s&&l)return l(a,!0);if(i)return i(a,!0);var h=new Error("Cannot find module '"+a+"'");throw h.code="MODULE_NOT_FOUND",h}var u=r[a]={exports:{}};e[a][0].call(u.exports,function(t){var r=e[a][1][t];return o(r?r:t)},u,u.exports,t,e,r,n)}return r[a].exports}for(var i="function"==typeof require&&require,a=0;a<n.length;a++)o(n[a]);return o}({1:[function(require,e,exports){(function(e,t,r,n,o,i,a,s,l){function h(){function e(){}try{var t=new Uint8Array(1);return t.foo=function(){return 42},t.constructor=e,42===t.foo()&&t.constructor===e&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(r){return!1}}function u(){return r.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function r(e){return this instanceof r?(r.TYPED_ARRAY_SUPPORT||(this.length=0,this.parent=void 0),"number"==typeof e?c(this,e):"string"==typeof e?f(this,e,arguments.length>1?arguments[1]:"utf8"):d(this,e)):arguments.length>1?new r(e,arguments[1]):new r(e)}function c(e,t){if(e=b(e,0>t?0:0|w(t)),!r.TYPED_ARRAY_SUPPORT)for(var n=0;t>n;n++)e[n]=0;return e}function f(e,t,r){("string"!=typeof r||""===r)&&(r="utf8");var n=0|T(t,r);return e=b(e,n),e.write(t,r),e}function d(e,t){if(r.isBuffer(t))return p(e,t);if(re(t))return m(e,t);if(null==t)throw new TypeError("must start with number, buffer, array or string");if("undefined"!=typeof ArrayBuffer){if(t.buffer instanceof ArrayBuffer)return g(e,t);if(t instanceof ArrayBuffer)return y(e,t)}return t.length?v(e,t):_(e,t)}function p(e,t){var r=0|w(t.length);return e=b(e,r),t.copy(e,0,0,r),e}function m(e,t){var r=0|w(t.length);e=b(e,r);for(var n=0;r>n;n+=1)e[n]=255&t[n];return e}function g(e,t){var r=0|w(t.length);e=b(e,r);for(var n=0;r>n;n+=1)e[n]=255&t[n];return e}function y(e,t){return r.TYPED_ARRAY_SUPPORT?(t.byteLength,e=r._augment(new Uint8Array(t))):e=g(e,new Uint8Array(t)),e}function v(e,t){var r=0|w(t.length);e=b(e,r);for(var n=0;r>n;n+=1)e[n]=255&t[n];return e}function _(e,t){var r,n=0;"Buffer"===t.type&&re(t.data)&&(r=t.data,n=0|w(r.length)),e=b(e,n);for(var o=0;n>o;o+=1)e[o]=255&r[o];return e}function b(e,t){r.TYPED_ARRAY_SUPPORT?(e=r._augment(new Uint8Array(t)),e.__proto__=r.prototype):(e.length=t,e._isBuffer=!0);var n=0!==t&&t<=r.poolSize>>>1;return n&&(e.parent=ne),e}function w(e){if(e>=u())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+u().toString(16)+" bytes");return 0|e}function x(e,t){if(!(this instanceof x))return new x(e,t);var n=new r(e,t);return delete n.parent,n}function T(e,t){"string"!=typeof e&&(e=""+e);var r=e.length;if(0===r)return 0;for(var n=!1;;)switch(t){case"ascii":case"binary":case"raw":case"raws":return r;case"utf8":case"utf-8":return Y(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return J(e).length;default:if(n)return Y(e).length;t=(""+t).toLowerCase(),n=!0}}function M(e,t,r){var n=!1;if(t=0|t,r=void 0===r||r===1/0?this.length:0|r,e||(e="utf8"),0>t&&(t=0),r>this.length&&(r=this.length),t>=r)return"";for(;;)switch(e){case"hex":return N(this,t,r);case"utf8":case"utf-8":return D(this,t,r);case"ascii":return O(this,t,r);case"binary":return k(this,t,r);case"base64":return F(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return B(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function S(e,t,r,n){r=Number(r)||0;var o=e.length-r;n?(n=Number(n),n>o&&(n=o)):n=o;var i=t.length;if(i%2!==0)throw new Error("Invalid hex string");n>i/2&&(n=i/2);for(var a=0;n>a;a++){var s=parseInt(t.substr(2*a,2),16);if(isNaN(s))throw new Error("Invalid hex string");e[r+a]=s}return a}function C(e,t,r,n){ret
E.prototype.setEyeScale=function(e){for(var t=this.robotInfo.getDOFSet("EYE_DEFORM").plus("OVERLAY_DEFORM").getDOFs(),r=this.robotInfo.getKinematicInfo().getDefaultPose(),n=new p("eye pose",t),o=0;o<t.length;o++)n.set(t[o],r.get(t[o],0)*e,0);var i=f.createFromPose("eye scale motion",n,.5),a=this.timeline.getClock().currentTime();this.timeline.add(new v(i,a,this.robotInfo),"default")},E.prototype.setEyeScaleXY=function(e,t){for(var r=this.robotInfo.getDOFSet("EYE_DEFORM").plus("OVERLAY_DEFORM").getDOFs(),n=this.robotInfo.getKinematicInfo().getDefaultPose(),o=new p("eye pose",r),i=0;i<r.length;i++)r[i].indexOf("_t_2")>-1?o.set(r[i],n.get(r[i],0)*t,0):o.set(r[i],n.get(r[i],0)*e,0);var a=f.createFromPose("eye scale motion",o,.5),s=this.timeline.getClock().currentTime();this.timeline.add(new v(a,s,this.robotInfo),"default")},E.prototype.setEyePosition=function(e,t){var r=this.robotInfo.getDOFSet("EYE_TRANSLATE").getDOFs(),n=this.robotInfo.getDOFSet("OVERLAY_TRANSLATE").getDOFs(),o=new p("eye pose",r.concat(n));o.set(r[0],e,0),o.set(r[1],t,0),o.set(n[0],e,0),o.set(n[1],t,0);var i=f.createFromPose("eye position motion",o,.5),a=this.timeline.getClock().currentTime();this.timeline.add(new v(i,a,this.robotInfo),"default")},E.prototype.setLEDColor=function(e){var t=null;t=Array.isArray(e)?e:e.toArray();for(var r=this.robotInfo.getDOFSet("LED").getDOFs(),n=new p("LED pose",r),o=0;3>o;o++)n.set(r[o],t[o],0);var i=f.createFromPose("LED motion",n,.5),a=0,s=this.timeline.getClock().currentTime().add(a);this.timeline.add(new v(i,s,this.robotInfo),"default")},E.prototype.centerRobot=function(e,t,r){(void 0===e||null===e)&&(e=this.dofs.ALL),(void 0===t||null===t)&&(t=!1);var n=f.createFromPose("center motion",this.robotInfo.getKinematicInfo().getDefaultPose(),1/30,e.getDOFs()),o=new L(this.timeline,new d(n),this.defaultTransition.clone(),this.robotInfo),i=1,a=t&&e.hasDOF(this.dofs.BASE.getDOFs()[0]),s=null;if(a&&(s=this.createLookatBuilder(),s.setDOFs(this.dofs.BASE),i++),r){var l=function(){i--,0===i&&r()};o.on(D.AnimationEventType.CANCELLED,l),o.on(D.AnimationEventType.STOPPED,l),s&&(s.on(D.LookatEventType.CANCELLED,l),s.on(D.LookatEventType.STOPPED,l))}o.play(),s&&s.startLookat(new T.Vector3(1,0,0))},E.prototype.setDefaultTransition=function(e){this.defaultTransition=e},E.prototype.getDefaultTransition=function(){return this.defaultTransition},E.prototype.createLinearTransitionBuilder=function(){return D.trajectory.createLinearTransitionBuilder(this.robotInfo)},E.prototype.createAccelerationTransitionBuilder=function(e,t){return D.trajectory.createAccelerationTransitionBuilder(this.robotInfo,e,t)},E.prototype.installRenderPlugin=function(e){for(var t=u(this.timeline),r=0;r<t.length;r++)t[r].installRenderPlugin(e)},E.prototype.removeRenderPlugin=function(e){for(var t=u(this.timeline),r=0;r<t.length;r++)t[r].removeRenderPlugin(e)},E.prototype.getInstalledRenderPluginNames=function(){for(var e=[],t=u(this.timeline),r=0;r<t.length;r++)for(var n=t[r].getInstalledRenderPluginNames(),o=0;o<n.length;o++)e.indexOf(n[o])<0&&e.push(n[o]);return e};var A=function(e,t,r,n){this.builder=e,this.transitionClip=t,this.animationClip=r,this.layer=n};A.prototype.stop=function(){var e=this.builder.timeline,t=0,r=e.getClock().currentTime().add(t);if(r.isGreater(this.animationClip.getEndTime()))return void(this.animationClip.hasExited()?b.warn("Ignoring stop on "+this.animationClip.getName()+" as it is already over"):b.warn("Ignoring stop on "+this.animationClip.getName()+" as it is already committed"));null===this.transitionClip?this.animationClip.getStartTime().isGreater(r)&&(r=this.animationClip.getStartTime(),b.info("Stopping called on transitionless animation "+this.animationClip.getName()+" before anim started, moving stopTime forward")):this.transitionClip.getStartTime().isGreater(r)&&(r=this.transitionClip.getStartTime(),b.info("Stopping called on animation "+this.animationClip.getName()+" before its transition started, moving stopTime forward"));var n=null;n=null!==this.transitionClip&&this.transitionClip.getEndTime().isGreater(r)?this.transitionCli
var t=!0,r=!1,n=void 0;try{for(var o,i=this._layerStatuses.keys()[Symbol.iterator]();!(t=(o=i.next()).done);t=!0){var a=o.value;a.setTarget(e)}}catch(s){r=!0,n=s}finally{try{!t&&i["return"]&&i["return"]()}finally{if(r)throw n}}null!=this._waitingToNotifyOnTarget&&null!=this._targetSupersededHandler&&this._targetSupersededHandler(this._waitingToNotifyOnTarget),this._waitingToNotifyOnTarget=e.clone(),this._target=this._waitingToNotifyOnTarget},p.prototype.handleUpdateFinishedForGenerator=function(e,t){var r=this.getActiveDOFs(t),n=r.length>0&&this._lookat.getDistanceRemaining(r)<.001;return n&&null!=this._waitingToNotifyOnTarget&&(null!=this._targetReachedHandler&&this._targetReachedHandler(this._waitingToNotifyOnTarget),this._waitingToNotifyOnTarget=null),n&&!this._continuous?!0:!1},p.prototype.getActiveDOFs=function(e){var t=new Set,r=!0,n=!1,o=void 0;try{for(var i,a=this._layerStatuses.keys()[Symbol.iterator]();!(r=(i=a.next()).done);r=!0){var s=i.value,l=s.getActiveDOFs(e),h=!0,u=!1,c=void 0;try{for(var f,d=l[Symbol.iterator]();!(h=(f=d.next()).done);h=!0){var p=f.value;t.add(p)}}catch(m){u=!0,c=m}finally{try{!h&&d["return"]&&d["return"]()}finally{if(u)throw c}}}}catch(m){n=!0,o=m}finally{try{!r&&a["return"]&&a["return"]()}finally{if(n)throw o}}return Array.from(t)},p.prototype.handleStarted=function(e){var t=this._layerStatuses.get(e);if(t.layerHasStarted=!0,this._clipStartedHandler){var r=!0,n=!0,o=!1,i=void 0;try{for(var a,s=this._layerStatuses.values()[Symbol.iterator]();!(n=(a=s.next()).done);n=!0){var l=a.value;l.layerHasStarted||l.layerHasRemoved||(r=!1)}}catch(h){o=!0,i=h}finally{try{!n&&s["return"]&&s["return"]()}finally{if(o)throw i}}r&&(this._clipStartedHandler(),this._haveSentStart=!0)}},p.prototype.handleStopped=function(e,t){var r=this._layerStatuses.get(e);if(r.layerHasStopped&&u(f,"LookatMultiLayerStatManager: getting stop event for stopped layer "+e),r.layerHasStopped=!0,this._clipStoppedHandler){var n=!0,o=!0,i=!1,a=void 0;try{for(var s,l=this._layerStatuses.values()[Symbol.iterator]();!(o=(s=l.next()).done);o=!0){var h=s.value;h.layerHasStopped||h.layerHasRemoved||(n=!1)}}catch(c){i=!0,a=c}finally{try{!o&&l["return"]&&l["return"]()}finally{if(i)throw a}}n&&this._clipStoppedHandler(t)}},p.prototype.handleRemoved=function(e,t,r){var n=this._layerStatuses.get(e);n.layerHasRemoved=!0;var o=null;if(!this._haveSentStart&&this._clipStartedHandler){var i=!0,a=!0,s=!1,l=void 0;try{for(var h,u=this._layerStatuses.values()[Symbol.iterator]();!(a=(h=u.next()).done);a=!0)o=h.value,o.layerHasRemoved||o.layerHasStarted||(i=!1)}catch(c){s=!0,l=c}finally{try{!a&&u["return"]&&u["return"]()}finally{if(s)throw l}}i&&(this._clipRemovedHandler(),this._haveSentStart=!0)}if(this._clipRemovedHandler){var f=!0,d=!0,p=!1,m=void 0;try{for(var g,y=this._layerStatuses.values()[Symbol.iterator]();!(d=(g=y.next()).done);d=!0)o=g.value,o.layerHasRemoved||(f=!1)}catch(c){p=!0,m=c}finally{try{!d&&y["return"]&&y["return"]()}finally{if(p)throw m}}f&&this._clipRemovedHandler(t,r)}},e.exports=p}).call(this,require("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},require("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/release_modules/animation-animate/src/timeline/LookatMultiLayerStatusManager.js","/release_modules/animation-animate/src/timeline")},{"./LookatMotionGenerator":16,_process:5,buffer:1,"ifr-core/src/SLog":62}],18:[function(require,e,exports){(function(t,r,n,o,i,a,s,l,h){var u=require("ifr-motion/src/base/MotionValidator"),c=require("./DOFState"),f=require("./BaseMotionGenerator"),d=require("./TimelineEventDispatcher"),p=function(e,t,r,n,o){if(!e)throw new Error("tried to construct LoopedMotionGenerator with empty motion list");if(0>t)throw new Error("numLoops value is negative: "+t);o||(o=Object.keys(e[0].getTracks()));var i,a,s;for(i=0;i<e.length;i++)for(s=e[i].getTracks(),a=0;a<o.length;a++)if(!s.hasOwnProperty(o[a]))throw new Error("LoopedMotionGenerator: motion "+i+" doesn't have a track for required DOF: "+o[a]);for(this._durationList=[
},h=0;h<this.infoListeners.length;h++)this.infoListeners[h](l)}this.motionInterface.sendCommand()}},e.exports=f}).call(this,require("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},require("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/release_modules/animation-utilities/node_modules/animation-body/src/BodyTrajectoryOutput.js","/release_modules/animation-utilities/node_modules/animation-body/src")},{"./BodyData":27,"./BodyOutput":28,_process:5,buffer:1}],33:[function(require,e,exports){(function(t,r,n,o,i,a,s,l,h){var u=require("./BodyData"),c=require("./BodyOutput"),f=require("ifr-motion/src/feedback/PVController"),d=function(e,t,r,n,o,i){c.call(this,e,t,r,n,o,i),this.feedbackControllers=[];for(var a=0;a<this.dofNames.length;a++)this.feedbackControllers.push(new f)};d.prototype=Object.create(c.prototype),d.prototype.constructor=c,d.prototype.update=function(){var e=this.clock.currentTime(),t=this.computeTargetsForTime(e.add(this.reactionTime));if(null!==t&&this.motionInterface.isConnected()){for(var r=0;r<this.dofNames.length;r++){this.feedbackControllers[r].setTarget(e,t[r].position,t[r].velocity),this.feedbackControllers[r].calculateForTime(e);var n=this.feedbackControllers[r].getCommandVelocity(),o=this.feedbackControllers[r].getCommandAcceleration(),i=this.enabledArray[r]?u.AxisCommandMode.VELOCITY:u.AxisCommandMode.LIMP;this.motionInterface.setCommand(this.dofNames[r],i,n,null,o,null);var a=this.motionInterface.getState(this.dofNames[r]);if(this.feedbackControllers[r].acceptFeedback(e,a.pos,a.vel,a.ref),this.infoListeners.length>0)for(var s={dofName:this.dofNames[r],timestamp:e,observedPosition:a.pos,targetPosition:t[r].position,observedVelocity:a.vel,commandVelocity:n},l=0;l<this.infoListeners.length;l++)this.infoListeners[l](s)}this.motionInterface.sendCommand()}},e.exports=d}).call(this,require("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},require("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/release_modules/animation-utilities/node_modules/animation-body/src/BodyVelocityOutput.js","/release_modules/animation-utilities/node_modules/animation-body/src")},{"./BodyData":27,"./BodyOutput":28,_process:5,buffer:1,"ifr-motion/src/feedback/PVController":96}],34:[function(require,e,exports){(function(t,r,n,o,i,a,s,l,h){var u=require("./BodyData"),c=require("ifr-core/src/Clock"),f=function(e,t){this.command=new u.LEDCommand,this.command.color=[0,0,0],this.command.setRateLimit(50),t?this.commandSocket=new WebSocket(e+"/led_command",t):this.commandSocket=new WebSocket(e+"/led_command")};f.prototype.setCommand=function(e,t){for(var r=0;3>r;r++)this.command.color[r]=e[r];return this.command.setRateLimit(t),!0},f.prototype.sendCommand=function(){if(this.commandSocket.readyState===WebSocket.OPEN){this.command.setTimestamp(c.currentTime());var e=JSON.stringify(this.command);return this.commandSocket.send(e),!0}return!1},f.prototype.isConnected=function(){return this.commandSocket.readyState===WebSocket.OPEN},f.prototype.close=function(){this.commandSocket.close()},e.exports=f}).call(this,require("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},require("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/release_modules/animation-body/src/LEDInterface.js","/release_modules/animation-body/src")},{"./BodyData":27,_process:5,buffer:1,"ifr-core/src/Clock":60}],35:[function(require,e,exports){(function(t,r,n,o,i,a,s,l,h){var u=require("./LEDInterface"),c=require("ifr-motion/src/base/Pose"),f=require("ifr-core/src/TimerTools"),d=function(e,t,r,n,o,i){if(this.clock=e,this.robotInfo=t,this.outputStartTime=null,this.outputMotion=null,this.reactionTime=.02,this.velocityCalcDelta=.02,this.rateLimit=50,this.ledInterface=new u(r,i),this.dofNames=this.robotInfo.getDOFSet("LED").getDOFs(),this.enabled=void 0!==n?n:!0,this.updateHandle=null,o){var a=this;this.updateHandle=f.setInterval(f
this.subVectors(e,t)):(this.x-=e.x,this.y-=e.y,this.z-=e.z,this)},subVectors:function(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this},multiply:function(e,t){return void 0!==t?(console.warn("THREE.Vector3: .multiply() now only accepts one argument. Use .multiplyVectors( a, b ) instead."),this.multiplyVectors(e,t)):(this.x*=e.x,this.y*=e.y,this.z*=e.z,this)},multiplyScalar:function(e){return this.x*=e,this.y*=e,this.z*=e,this},multiplyVectors:function(e,t){return this.x=e.x*t.x,this.y=e.y*t.y,this.z=e.z*t.z,this},applyEuler:function(){var e;return function(t){return t instanceof c.Euler==!1&&console.error("THREE.Vector3: .applyEuler() now expects a Euler rotation rather than a Vector3 and order."),void 0===e&&(e=new c.Quaternion),this.applyQuaternion(e.setFromEuler(t)),this}}(),applyAxisAngle:function(){var e;return function(t,r){return void 0===e&&(e=new c.Quaternion),this.applyQuaternion(e.setFromAxisAngle(t,r)),this}}(),applyMatrix3:function(e){var t=this.x,r=this.y,n=this.z,o=e.elements;return this.x=o[0]*t+o[3]*r+o[6]*n,this.y=o[1]*t+o[4]*r+o[7]*n,this.z=o[2]*t+o[5]*r+o[8]*n,this},applyMatrix4:function(e){var t=this.x,r=this.y,n=this.z,o=e.elements;return this.x=o[0]*t+o[4]*r+o[8]*n+o[12],this.y=o[1]*t+o[5]*r+o[9]*n+o[13],this.z=o[2]*t+o[6]*r+o[10]*n+o[14],this},applyProjection:function(e){var t=this.x,r=this.y,n=this.z,o=e.elements,i=1/(o[3]*t+o[7]*r+o[11]*n+o[15]);return this.x=(o[0]*t+o[4]*r+o[8]*n+o[12])*i,this.y=(o[1]*t+o[5]*r+o[9]*n+o[13])*i,this.z=(o[2]*t+o[6]*r+o[10]*n+o[14])*i,this},applyQuaternion:function(e){var t=this.x,r=this.y,n=this.z,o=e.x,i=e.y,a=e.z,s=e.w,l=s*t+i*n-a*r,h=s*r+a*t-o*n,u=s*n+o*r-i*t,c=-o*t-i*r-a*n;return this.x=l*s+c*-o+h*-a-u*-i,this.y=h*s+c*-i+u*-o-l*-a,this.z=u*s+c*-a+l*-i-h*-o,this},project:function(){var e;return function(t){return void 0===e&&(e=new c.Matrix4),e.multiplyMatrices(t.projectionMatrix,e.getInverse(t.matrixWorld)),this.applyProjection(e)}}(),unproject:function(){var e;return function(t){return void 0===e&&(e=new c.Matrix4),e.multiplyMatrices(t.matrixWorld,e.getInverse(t.projectionMatrix)),this.applyProjection(e)}}(),transformDirection:function(e){var t=this.x,r=this.y,n=this.z,o=e.elements;return this.x=o[0]*t+o[4]*r+o[8]*n,this.y=o[1]*t+o[5]*r+o[9]*n,this.z=o[2]*t+o[6]*r+o[10]*n,this.normalize(),this},divide:function(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this},divideScalar:function(e){if(0!==e){var t=1/e;this.x*=t,this.y*=t,this.z*=t}else this.x=0,this.y=0,this.z=0;return this},min:function(e){return this.x>e.x&&(this.x=e.x),this.y>e.y&&(this.y=e.y),this.z>e.z&&(this.z=e.z),this},max:function(e){return this.x<e.x&&(this.x=e.x),this.y<e.y&&(this.y=e.y),this.z<e.z&&(this.z=e.z),this},clamp:function(e,t){return this.x<e.x?this.x=e.x:this.x>t.x&&(this.x=t.x),this.y<e.y?this.y=e.y:this.y>t.y&&(this.y=t.y),this.z<e.z?this.z=e.z:this.z>t.z&&(this.z=t.z),this},clampScalar:function(){var e,t;return function(r,n){return void 0===e&&(e=new c.Vector3,t=new c.Vector3),e.set(r,r,r),t.set(n,n,n),this.clamp(e,t)}}(),floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this},ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this},round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this},roundToZero:function(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this},dot:function(e){return this.x*e.x+this.y*e.y+this.z*e.z},lengthSq:function(){return this.x*this.x+this.y*this.y+this.z*this.z},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)},lengthManhattan:function(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)},normalize:function(){return this.divideScalar(this.length())},setLength:function(e){var t=this.length();return 0!==t&&e!==t&&this.multiplyScalar(e/t),this},lerp:function(e,t){return
t[13]=e,e=t[11],t[11]=t[14],t[14]=e,this},flattenToArrayOffset:function(e,t){var r=this.elements;return e[t]=r[0],e[t+1]=r[1],e[t+2]=r[2],e[t+3]=r[3],e[t+4]=r[4],e[t+5]=r[5],e[t+6]=r[6],e[t+7]=r[7],e[t+8]=r[8],e[t+9]=r[9],e[t+10]=r[10],e[t+11]=r[11],e[t+12]=r[12],e[t+13]=r[13],e[t+14]=r[14],e[t+15]=r[15],e},getPosition:function(){var e=new c.Vector3;return function(){console.warn("THREE.Matrix4: .getPosition() has been removed. Use Vector3.setFromMatrixPosition( matrix ) instead.");var t=this.elements;return e.set(t[12],t[13],t[14])}}(),setPosition:function(e){var t=this.elements;return t[12]=e.x,t[13]=e.y,t[14]=e.z,this},getInverse:function(e,t){var r=this.elements,n=e.elements,o=n[0],i=n[4],a=n[8],s=n[12],l=n[1],h=n[5],u=n[9],c=n[13],f=n[2],d=n[6],p=n[10],m=n[14],g=n[3],y=n[7],v=n[11],_=n[15];r[0]=u*m*y-c*p*y+c*d*v-h*m*v-u*d*_+h*p*_,r[4]=s*p*y-a*m*y-s*d*v+i*m*v+a*d*_-i*p*_,r[8]=a*c*y-s*u*y+s*h*v-i*c*v-a*h*_+i*u*_,r[12]=s*u*d-a*c*d-s*h*p+i*c*p+a*h*m-i*u*m,r[1]=c*p*g-u*m*g-c*f*v+l*m*v+u*f*_-l*p*_,r[5]=a*m*g-s*p*g+s*f*v-o*m*v-a*f*_+o*p*_,r[9]=s*u*g-a*c*g-s*l*v+o*c*v+a*l*_-o*u*_,r[13]=a*c*f-s*u*f+s*l*p-o*c*p-a*l*m+o*u*m,r[2]=h*m*g-c*d*g+c*f*y-l*m*y-h*f*_+l*d*_,r[6]=s*d*g-i*m*g-s*f*y+o*m*y+i*f*_-o*d*_,r[10]=i*c*g-s*h*g+s*l*y-o*c*y-i*l*_+o*h*_,r[14]=s*h*f-i*c*f-s*l*d+o*c*d+i*l*m-o*h*m,r[3]=u*d*g-h*p*g-u*f*y+l*p*y+h*f*v-l*d*v,r[7]=i*p*g-a*d*g+a*f*y-o*p*y-i*f*v+o*d*v,r[11]=a*h*g-i*u*g-a*l*y+o*u*y+i*l*v-o*h*v,r[15]=i*u*f-a*h*f+a*l*d-o*u*d-i*l*p+o*h*p;var b=o*r[0]+l*r[4]+f*r[8]+g*r[12];if(0==b){var w="Matrix4.getInverse(): can't invert matrix, determinant is 0";if(t)throw new Error(w);return console.warn(w),this.identity(),this}return this.multiplyScalar(1/b),this},translate:function(e){console.warn("THREE.Matrix4: .translate() has been removed.")},rotateX:function(e){console.warn("THREE.Matrix4: .rotateX() has been removed.")},rotateY:function(e){console.warn("THREE.Matrix4: .rotateY() has been removed.")},rotateZ:function(e){console.warn("THREE.Matrix4: .rotateZ() has been removed.")},rotateByAxis:function(e,t){console.warn("THREE.Matrix4: .rotateByAxis() has been removed.")},scale:function(e){var t=this.elements,r=e.x,n=e.y,o=e.z;return t[0]*=r,t[4]*=n,t[8]*=o,t[1]*=r,t[5]*=n,t[9]*=o,t[2]*=r,t[6]*=n,t[10]*=o,t[3]*=r,t[7]*=n,t[11]*=o,this},getMaxScaleOnAxis:function(){var e=this.elements,t=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],r=e[4]*e[4]+e[5]*e[5]+e[6]*e[6],n=e[8]*e[8]+e[9]*e[9]+e[10]*e[10];return Math.sqrt(Math.max(t,Math.max(r,n)))},makeTranslation:function(e,t,r){return this.set(1,0,0,e,0,1,0,t,0,0,1,r,0,0,0,1),this},makeRotationX:function(e){var t=Math.cos(e),r=Math.sin(e);return this.set(1,0,0,0,0,t,-r,0,0,r,t,0,0,0,0,1),this},makeRotationY:function(e){var t=Math.cos(e),r=Math.sin(e);return this.set(t,0,r,0,0,1,0,0,-r,0,t,0,0,0,0,1),this},makeRotationZ:function(e){var t=Math.cos(e),r=Math.sin(e);return this.set(t,-r,0,0,r,t,0,0,0,0,1,0,0,0,0,1),this},makeRotationAxis:function(e,t){var r=Math.cos(t),n=Math.sin(t),o=1-r,i=e.x,a=e.y,s=e.z,l=o*i,h=o*a;return this.set(l*i+r,l*a-n*s,l*s+n*a,0,l*a+n*s,h*a+r,h*s-n*i,0,l*s-n*a,h*s+n*i,o*s*s+r,0,0,0,0,1),this},makeScale:function(e,t,r){return this.set(e,0,0,0,0,t,0,0,0,0,r,0,0,0,0,1),this},compose:function(e,t,r){return this.makeRotationFromQuaternion(t),this.scale(r),this.setPosition(e),this},decompose:function(){var e=new c.Vector3,t=new c.Matrix4;return function(r,n,o){var i=this.elements,a=e.set(i[0],i[1],i[2]).length(),s=e.set(i[4],i[5],i[6]).length(),l=e.set(i[8],i[9],i[10]).length(),h=this.determinant();0>h&&(a=-a),r.x=i[12],r.y=i[13],r.z=i[14],t.elements.set(this.elements);var u=1/a,c=1/s,f=1/l;return t.elements[0]*=u,t.elements[1]*=u,t.elements[2]*=u,t.elements[4]*=c,t.elements[5]*=c,t.elements[6]*=c,t.elements[8]*=f,t.elements[9]*=f,t.elements[10]*=f,n.setFromRotationMatrix(t),o.x=a,o.y=s,o.z=l,this}}(),makeFrustum:function(e,t,r,n,o,i){var a=this.elements,s=2*o/(t-e),l=2*o/(n-r),h=(t+e)/(t-e),u=(n+r)/(n-r),c=-(i+o)/(i-o),f=-2*i*o/(i-o);return a[0]=s,a[4]=0,a[8]=h,a[12]=0,a[1]=0,a[5]=l,a[9]=u,a[13]=0,a[2]=0,a[6]=0,a[10]=c,a[14]=f,a[3]=0,a[7]=0,a[11]=-1,a[15]=0,this},makePerspec
this},setY:function(e,t){return this.array[e*this.itemSize+1]=t,this},setZ:function(e,t){return this.array[e*this.itemSize+2]=t,this},setXY:function(e,t,r){return e*=this.itemSize,this.array[e]=t,this.array[e+1]=r,this},setXYZ:function(e,t,r,n){return e*=this.itemSize,this.array[e]=t,this.array[e+1]=r,this.array[e+2]=n,this},setXYZW:function(e,t,r,n,o){return e*=this.itemSize,this.array[e]=t,this.array[e+1]=r,this.array[e+2]=n,this.array[e+3]=o,this},clone:function(){return new c.BufferAttribute(new this.array.constructor(this.array),this.itemSize)}},{length:{get:function(){return this.array.length},configurable:!0,enumerable:!0}}),c.Int8Attribute=function(e,t){return console.warn("THREE.Int8Attribute has been removed. Use THREE.BufferAttribute( array, itemSize ) instead."),new c.BufferAttribute(e,t)},c.Uint8Attribute=function(e,t){return console.warn("THREE.Uint8Attribute has been removed. Use THREE.BufferAttribute( array, itemSize ) instead."),new c.BufferAttribute(e,t)},c.Uint8ClampedAttribute=function(e,t){return console.warn("THREE.Uint8ClampedAttribute has been removed. Use THREE.BufferAttribute( array, itemSize ) instead."),new c.BufferAttribute(e,t)},c.Int16Attribute=function(e,t){return console.warn("THREE.Int16Attribute has been removed. Use THREE.BufferAttribute( array, itemSize ) instead."),new c.BufferAttribute(e,t)},c.Uint16Attribute=function(e,t){return console.warn("THREE.Uint16Attribute has been removed. Use THREE.BufferAttribute( array, itemSize ) instead."),new c.BufferAttribute(e,t)},c.Int32Attribute=function(e,t){return console.warn("THREE.Int32Attribute has been removed. Use THREE.BufferAttribute( array, itemSize ) instead."),new c.BufferAttribute(e,t)},c.Uint32Attribute=function(e,t){return console.warn("THREE.Uint32Attribute has been removed. Use THREE.BufferAttribute( array, itemSize ) instead."),new c.BufferAttribute(e,t)},c.Float32Attribute=function(e,t){return console.warn("THREE.Float32Attribute has been removed. Use THREE.BufferAttribute( array, itemSize ) instead."),new c.BufferAttribute(e,t)},c.Float64Attribute=function(e,t){return console.warn("THREE.Float64Attribute has been removed. Use THREE.BufferAttribute( array, itemSize ) instead."),new c.BufferAttribute(e,t)},c.BufferGeometry=function(){Object.defineProperty(this,"id",{value:c.GeometryIdCount++}),this.uuid=c.Math.generateUUID(),this.name="",this.type="BufferGeometry",this.attributes={},this.attributesKeys=[],this.drawcalls=[],this.offsets=this.drawcalls,this.boundingBox=null,this.boundingSphere=null},c.BufferGeometry.prototype={constructor:c.BufferGeometry,addAttribute:function(e,t){return t instanceof c.BufferAttribute==!1?(console.warn("THREE.BufferGeometry: .addAttribute() now expects ( name, attribute )."),void(this.attributes[e]={array:arguments[1],itemSize:arguments[2]})):(this.attributes[e]=t,void(this.attributesKeys=Object.keys(this.attributes)))},getAttribute:function(e){return this.attributes[e]},addDrawCall:function(e,t,r){this.drawcalls.push({start:e,count:t,index:void 0!==r?r:0})},applyMatrix:function(e){var t=this.attributes.position;void 0!==t&&(e.applyToVector3Array(t.array),t.needsUpdate=!0);var r=this.attributes.normal;if(void 0!==r){var n=(new c.Matrix3).getNormalMatrix(e);n.applyToVector3Array(r.array),r.needsUpdate=!0}},center:function(){},fromGeometry:function(e,t){t=t||{vertexColors:c.NoColors};var r=e.vertices,n=e.faces,o=e.faceVertexUvs,i=t.vertexColors,a=o[0].length>0,s=3==n[0].vertexNormals.length,l=new Float32Array(3*n.length*3);this.addAttribute("position",new c.BufferAttribute(l,3));var h=new Float32Array(3*n.length*3);if(this.addAttribute("normal",new c.BufferAttribute(h,3)),i!==c.NoColors){var u=new Float32Array(3*n.length*3);this.addAttribute("color",new c.BufferAttribute(u,3))}if(a===!0){var f=new Float32Array(3*n.length*2);this.addAttribute("uv",new c.BufferAttribute(f,2))}for(var d=0,p=0,m=0;d<n.length;d++,p+=6,m+=9){var g=n[d],y=r[g.a],v=r[g.b],_=r[g.c];if(l[m]=y.x,l[m+1]=y.y,l[m+2]=y.z,l[m+3]=v.x,l[m+4]=v.y,l[m+5]=v.z,l[m+6]=_.x,l[m+7]=_.y,l[m+8]=_.z,s===!0){var b=g.vertexNormals[0],w=g.verte
this.statusDomElement=e?c.Loader.prototype.addStatusElement():null,this.imageLoader=new c.ImageLoader,this.onLoadStart=function(){},this.onLoadProgress=function(){},this.onLoadComplete=function(){}},c.Loader.prototype={constructor:c.Loader,crossOrigin:void 0,addStatusElement:function(){var e=document.createElement("div");return e.style.position="absolute",e.style.right="0px",e.style.top="0px",e.style.fontSize="0.8em",e.style.textAlign="left",e.style.background="rgba(0,0,0,0.25)",e.style.color="#fff",e.style.width="120px",e.style.padding="0.5em 0.5em 0.5em 0.5em",e.style.zIndex=1e3,e.innerHTML="Loading ...",e},updateProgress:function(e){var t="Loaded ";t+=e.total?(100*e.loaded/e.total).toFixed(0)+"%":(e.loaded/1024).toFixed(2)+" KB",this.statusDomElement.innerHTML=t},extractUrlBase:function(e){var t=e.split("/");return 1===t.length?"./":(t.pop(),t.join("/")+"/")},initMaterials:function(e,t){for(var r=[],n=0;n<e.length;++n)r[n]=this.createMaterial(e[n],t);return r},needsTangents:function(e){for(var t=0,r=e.length;r>t;t++){var n=e[t];if(n instanceof c.ShaderMaterial)return!0}return!1},createMaterial:function(e,t){function r(e){var t=Math.log(e)/Math.LN2;return Math.pow(2,Math.round(t))}function n(e,n,o,a,s,l,h){var u,f=t+o,d=c.Loader.Handlers.get(f);if(null!==d?u=d.load(f):(u=new c.Texture,d=i.imageLoader,d.crossOrigin=i.crossOrigin,d.load(f,function(e){if(c.Math.isPowerOfTwo(e.width)===!1||c.Math.isPowerOfTwo(e.height)===!1){var t=r(e.width),n=r(e.height),o=document.createElement("canvas");o.width=t,o.height=n;var i=o.getContext("2d");i.drawImage(e,0,0,t,n),u.image=o}else u.image=e;u.needsUpdate=!0})),u.sourceFile=o,a&&(u.repeat.set(a[0],a[1]),1!==a[0]&&(u.wrapS=c.RepeatWrapping),1!==a[1]&&(u.wrapT=c.RepeatWrapping)),s&&u.offset.set(s[0],s[1]),l){var p={repeat:c.RepeatWrapping,mirror:c.MirroredRepeatWrapping};void 0!==p[l[0]]&&(u.wrapS=p[l[0]]),void 0!==p[l[1]]&&(u.wrapT=p[l[1]])}h&&(u.anisotropy=h),e[n]=u}function o(e){return(255*e[0]<<16)+(255*e[1]<<8)+255*e[2]}var i=this,a="MeshLambertMaterial",s={color:15658734,opacity:1,map:null,lightMap:null,normalMap:null,bumpMap:null,wireframe:!1};if(e.shading){var l=e.shading.toLowerCase();"phong"===l?a="MeshPhongMaterial":"basic"===l&&(a="MeshBasicMaterial")}void 0!==e.blending&&void 0!==c[e.blending]&&(s.blending=c[e.blending]),(void 0!==e.transparent||e.opacity<1)&&(s.transparent=e.transparent),void 0!==e.depthTest&&(s.depthTest=e.depthTest),void 0!==e.depthWrite&&(s.depthWrite=e.depthWrite),void 0!==e.visible&&(s.visible=e.visible),void 0!==e.flipSided&&(s.side=c.BackSide),void 0!==e.doubleSided&&(s.side=c.DoubleSide),void 0!==e.wireframe&&(s.wireframe=e.wireframe),void 0!==e.vertexColors&&("face"===e.vertexColors?s.vertexColors=c.FaceColors:e.vertexColors&&(s.vertexColors=c.VertexColors)),e.colorDiffuse?s.color=o(e.colorDiffuse):e.DbgColor&&(s.color=e.DbgColor),e.colorSpecular&&(s.specular=o(e.colorSpecular)),e.colorAmbient&&(s.ambient=o(e.colorAmbient)),e.colorEmissive&&(s.emissive=o(e.colorEmissive)),e.transparency&&(s.opacity=e.transparency),e.specularCoef&&(s.shininess=e.specularCoef),e.mapDiffuse&&t&&n(s,"map",e.mapDiffuse,e.mapDiffuseRepeat,e.mapDiffuseOffset,e.mapDiffuseWrap,e.mapDiffuseAnisotropy),e.mapLight&&t&&n(s,"lightMap",e.mapLight,e.mapLightRepeat,e.mapLightOffset,e.mapLightWrap,e.mapLightAnisotropy),e.mapBump&&t&&n(s,"bumpMap",e.mapBump,e.mapBumpRepeat,e.mapBumpOffset,e.mapBumpWrap,e.mapBumpAnisotropy),e.mapNormal&&t&&n(s,"normalMap",e.mapNormal,e.mapNormalRepeat,e.mapNormalOffset,e.mapNormalWrap,e.mapNormalAnisotropy),e.mapSpecular&&t&&n(s,"specularMap",e.mapSpecular,e.mapSpecularRepeat,e.mapSpecularOffset,e.mapSpecularWrap,e.mapSpecularAnisotropy),e.mapAlpha&&t&&n(s,"alphaMap",e.mapAlpha,e.mapAlphaRepeat,e.mapAlphaOffset,e.mapAlphaWrap,e.mapAlphaAnisotropy),e.mapBumpScale&&(s.bumpScale=e.mapBumpScale),e.mapNormalFactor&&(s.normalScale=new c.Vector2(e.mapNormalFactor,e.mapNormalFactor));var h=new c[a](s);return void 0!==e.DbgName&&(h.name=e.DbgName),h}},c.Loader.Handlers={handlers:[],add:function(e,t){this.handlers.push(e,t)},get:function(e){for(var t=0,r=th
},c.RawShaderMaterial=function(e){c.ShaderMaterial.call(this,e),this.type="RawShaderMaterial"},c.RawShaderMaterial.prototype=Object.create(c.ShaderMaterial.prototype),c.RawShaderMaterial.prototype.constructor=c.RawShaderMaterial,c.RawShaderMaterial.prototype.clone=function(){var e=new c.RawShaderMaterial;return c.ShaderMaterial.prototype.clone.call(this,e),e},c.SpriteMaterial=function(e){c.Material.call(this),this.type="SpriteMaterial",this.color=new c.Color(16777215),this.map=null,this.rotation=0,this.fog=!1,this.setValues(e)},c.SpriteMaterial.prototype=Object.create(c.Material.prototype),c.SpriteMaterial.prototype.constructor=c.SpriteMaterial,c.SpriteMaterial.prototype.clone=function(){var e=new c.SpriteMaterial;return c.Material.prototype.clone.call(this,e),e.color.copy(this.color),e.map=this.map,e.rotation=this.rotation,e.fog=this.fog,e},c.Texture=function(e,t,r,n,o,i,a,s,l){Object.defineProperty(this,"id",{value:c.TextureIdCount++}),this.uuid=c.Math.generateUUID(),this.name="",this.image=void 0!==e?e:c.Texture.DEFAULT_IMAGE,this.mipmaps=[],this.mapping=void 0!==t?t:c.Texture.DEFAULT_MAPPING,this.wrapS=void 0!==r?r:c.ClampToEdgeWrapping,this.wrapT=void 0!==n?n:c.ClampToEdgeWrapping,this.magFilter=void 0!==o?o:c.LinearFilter,this.minFilter=void 0!==i?i:c.LinearMipMapLinearFilter,this.anisotropy=void 0!==l?l:1,this.format=void 0!==a?a:c.RGBAFormat,this.type=void 0!==s?s:c.UnsignedByteType,this.offset=new c.Vector2(0,0),this.repeat=new c.Vector2(1,1),this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this._needsUpdate=!1,this.onUpdate=null},c.Texture.DEFAULT_IMAGE=void 0,c.Texture.DEFAULT_MAPPING=c.UVMapping,c.Texture.prototype=Object.defineProperties({constructor:c.Texture,clone:function(e){return void 0===e&&(e=new c.Texture),e.image=this.image,e.mipmaps=this.mipmaps.slice(0),e.mapping=this.mapping,e.wrapS=this.wrapS,e.wrapT=this.wrapT,e.magFilter=this.magFilter,e.minFilter=this.minFilter,e.anisotropy=this.anisotropy,e.format=this.format,e.type=this.type,e.offset.copy(this.offset),e.repeat.copy(this.repeat),e.generateMipmaps=this.generateMipmaps,e.premultiplyAlpha=this.premultiplyAlpha,e.flipY=this.flipY,e.unpackAlignment=this.unpackAlignment,e},update:function(){this.dispatchEvent({type:"update"})},dispose:function(){this.dispatchEvent({type:"dispose"})}},{needsUpdate:{get:function(){return this._needsUpdate},set:function(e){e===!0&&this.update(),this._needsUpdate=e},configurable:!0,enumerable:!0}}),c.EventDispatcher.prototype.apply(c.Texture.prototype),c.TextureIdCount=0,c.CubeTexture=function(e,t,r,n,o,i,a,s,l){t=void 0!==t?t:c.CubeReflectionMapping,c.Texture.call(this,e,t,r,n,o,i,a,s,l),this.images=e},c.CubeTexture.prototype=Object.create(c.Texture.prototype),c.CubeTexture.prototype.constructor=c.CubeTexture,c.CubeTexture.clone=function(e){return void 0===e&&(e=new c.CubeTexture),c.Texture.prototype.clone.call(this,e),e.images=this.images,e},c.CompressedTexture=function(e,t,r,n,o,i,a,s,l,h,u){c.Texture.call(this,null,i,a,s,l,h,n,o,u),this.image={width:t,height:r},this.mipmaps=e,this.flipY=!1,this.generateMipmaps=!1},c.CompressedTexture.prototype=Object.create(c.Texture.prototype),c.CompressedTexture.prototype.constructor=c.CompressedTexture,c.CompressedTexture.prototype.clone=function(){var e=new c.CompressedTexture;return c.Texture.prototype.clone.call(this,e),e},c.DataTexture=function(e,t,r,n,o,i,a,s,l,h,u){c.Texture.call(this,null,i,a,s,l,h,n,o,u),this.image={data:e,width:t,height:r}},c.DataTexture.prototype=Object.create(c.Texture.prototype),c.DataTexture.prototype.constructor=c.DataTexture,c.DataTexture.prototype.clone=function(){var e=new c.DataTexture;return c.Texture.prototype.clone.call(this,e),e},c.VideoTexture=function(e,t,r,n,o,i,a,s,l){c.Texture.call(this,e,t,r,n,o,i,a,s,l),this.generateMipmaps=!1;var h=this,u=function(e){var t=function(){return e.apply(this,arguments)};return t.toString=function(){return e.toString()},t}(function(){requestAnimationFrame(u),e.readyState===e.HAVE_ENOUGH_DATA&&(h.needsUpdate=!0)});u()},c.VideoTexture.prototype=Object.create(c.Texture.
c.ShaderChunk.fog_pars_fragment="#ifdef USE_FOG\n\n uniform vec3 fogColor;\n\n #ifdef FOG_EXP2\n\n uniform float fogDensity;\n\n #else\n\n uniform float fogNear;\n uniform float fogFar;\n #endif\n\n#endif",c.ShaderChunk.morphnormal_vertex="#ifdef USE_MORPHNORMALS\n\n vec3 morphedNormal = vec3( 0.0 );\n\n morphedNormal += ( morphNormal0 - normal ) * morphTargetInfluences[ 0 ];\n morphedNormal += ( morphNormal1 - normal ) * morphTargetInfluences[ 1 ];\n morphedNormal += ( morphNormal2 - normal ) * morphTargetInfluences[ 2 ];\n morphedNormal += ( morphNormal3 - normal ) * morphTargetInfluences[ 3 ];\n\n morphedNormal += normal;\n\n#endif",c.ShaderChunk.envmap_pars_fragment="#ifdef USE_ENVMAP\n\n uniform float reflectivity;\n #ifdef ENVMAP_TYPE_CUBE\n uniform samplerCube envMap;\n #else\n uniform sampler2D envMap;\n #endif\n uniform float flipEnvMap;\n\n #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\n\n uniform float refractionRatio;\n\n #else\n\n varying vec3 vReflect;\n\n #endif\n\n#endif\n",c.ShaderChunk.logdepthbuf_fragment="#if defined(USE_LOGDEPTHBUF) && defined(USE_LOGDEPTHBUF_EXT)\n\n gl_FragDepthEXT = log2(vFragDepth) * logDepthBufFC * 0.5;\n\n#endif",c.ShaderChunk.normalmap_pars_fragment="#ifdef USE_NORMALMAP\n\n uniform sampler2D normalMap;\n uniform vec2 normalScale;\n\n // Per-Pixel Tangent Space Normal Mapping\n // http://hacksoflife.blogspot.ch/2009/11/per-pixel-tangent-space-normal-mapping.html\n\n vec3 perturbNormal2Arb( vec3 eye_pos, vec3 surf_norm ) {\n\n vec3 q0 = dFdx( eye_pos.xyz );\n vec3 q1 = dFdy( eye_pos.xyz );\n vec2 st0 = dFdx( vUv.st );\n vec2 st1 = dFdy( vUv.st );\n\n vec3 S = normalize( q0 * st1.t - q1 * st0.t );\n vec3 T = normalize( -q0 * st1.s + q1 * st0.s );\n vec3 N = normalize( surf_norm );\n\n vec3 mapN = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;\n mapN.xy = normalScale * mapN.xy;\n mat3 tsn = mat3( S, T, N );\n return normalize( tsn * mapN );\n\n }\n\n#endif\n",c.ShaderChunk.lights_phong_pars_vertex="#if MAX_SPOT_LIGHTS > 0 || defined( USE_BUMPMAP ) || defined( USE_ENVMAP )\n\n varying vec3 vWorldPosition;\n\n#endif\n",c.ShaderChunk.lightmap_pars_fragment="#ifdef USE_LIGHTMAP\n\n varying vec2 vUv2;\n uniform sampler2D lightMap;\n\n#endif",c.ShaderChunk.shadowmap_vertex="#ifdef USE_SHADOWMAP\n\n for( int i = 0; i < MAX_SHADOWS; i ++ ) {\n\n vShadowCoord[ i ] = shadowMatrix[ i ] * worldPosition;\n\n }\n\n#endif",c.ShaderChunk.lights_phong_vertex="#if MAX_SPOT_LIGHTS > 0 || defined( USE_BUMPMAP ) || defined( USE_ENVMAP )\n\n vWorldPosition = worldPosition.xyz;\n\n#endif",c.ShaderChunk.map_fragment="#ifdef USE_MAP\n\n vec4 texelColor = texture2D( map, vUv );\n\n #ifdef GAMMA_INPUT\n\n texelColor.xyz *= texelColor.xyz;\n\n #endif\n\n gl_FragColor = gl_FragColor * texelColor;\n\n#endif",c.ShaderChunk.lightmap_vertex="#ifdef USE_LIGHTMAP\n\n vUv2 = uv2;\n\n#endif",c.ShaderChunk.map_particle_fragment="#ifdef USE_MAP\n\n gl_FragColor = gl_FragColor * texture2D( map, vec2( gl_PointCoord.x, 1.0 - gl_PointCoord.y ) );\n\n#endif",c.ShaderChunk.color_pars_fragment="#ifdef USE_COLOR\n\n varying vec3 vColor;\n\n#endif\n",c.ShaderChunk.color_vertex="#ifdef USE_COLOR\n\n #ifdef GAMMA_INPUT\n\n vColor = color * color;\n\n #else\n\n vColor = color;\n\n #endif\n\n#endif",c.ShaderChunk.skinning_vertex="#ifdef USE_SKINNING\n\n #ifdef USE_MORPHTARGETS\n\n vec4 skinVertex = bindMatrix * vec4( morphed, 1.0 );\n\n #else\n\n vec4 skinVertex = bindMatrix * vec4( position, 1.0 );\n\n #endif\n\n vec4 skinned = vec4( 0.0 );\n skinned += boneMatX * skinVertex * skinWeight.x;\n skinned += boneMatY * skinVertex * skinWeight.y;\n skinned += boneMatZ * skinVertex * skinWeight.z;\n skinned += boneMatW * skinVertex * skinWeight.w;\n skinned = bindMatrixInverse * skinned;\n\n#endif\n",c.ShaderChunk.envmap_pars_vertex="#if defined( USE_ENVMAP ) && ! defined( USE_BUMPMAP ) && ! defined( USE_NORMALMAP ) && ! defined( PHONG )\n\n varying vec3 vReflect;\n\n uniform float refractionRatio;\n\n#endif\n",c.ShaderChunk.linear_to_gamma_fragment="#ifdef GAMMA_OUTPUT\n\n gl_FragC
},particle_basic:{uniforms:c.UniformsUtils.merge([c.UniformsLib.particle,c.UniformsLib.shadowmap]),vertexShader:["uniform float size;","uniform float scale;",c.ShaderChunk.color_pars_vertex,c.ShaderChunk.shadowmap_pars_vertex,c.ShaderChunk.logdepthbuf_pars_vertex,"void main() {",c.ShaderChunk.color_vertex," vec4 mvPosition = modelViewMatrix * vec4( position, 1.0 );"," #ifdef USE_SIZEATTENUATION"," gl_PointSize = size * ( scale / length( mvPosition.xyz ) );"," #else"," gl_PointSize = size;"," #endif"," gl_Position = projectionMatrix * mvPosition;",c.ShaderChunk.logdepthbuf_vertex,c.ShaderChunk.worldpos_vertex,c.ShaderChunk.shadowmap_vertex,"}"].join("\n"),fragmentShader:["uniform vec3 psColor;","uniform float opacity;",c.ShaderChunk.color_pars_fragment,c.ShaderChunk.map_particle_pars_fragment,c.ShaderChunk.fog_pars_fragment,c.ShaderChunk.shadowmap_pars_fragment,c.ShaderChunk.logdepthbuf_pars_fragment,"void main() {"," gl_FragColor = vec4( psColor, opacity );",c.ShaderChunk.logdepthbuf_fragment,c.ShaderChunk.map_particle_fragment,c.ShaderChunk.alphatest_fragment,c.ShaderChunk.color_fragment,c.ShaderChunk.shadowmap_fragment,c.ShaderChunk.fog_fragment,"}"].join("\n")},dashed:{uniforms:c.UniformsUtils.merge([c.UniformsLib.common,c.UniformsLib.fog,{scale:{type:"f",value:1},dashSize:{type:"f",value:1},totalSize:{type:"f",value:2}}]),vertexShader:["uniform float scale;","attribute float lineDistance;","varying float vLineDistance;",c.ShaderChunk.color_pars_vertex,c.ShaderChunk.logdepthbuf_pars_vertex,"void main() {",c.ShaderChunk.color_vertex," vLineDistance = scale * lineDistance;"," vec4 mvPosition = modelViewMatrix * vec4( position, 1.0 );"," gl_Position = projectionMatrix * mvPosition;",c.ShaderChunk.logdepthbuf_vertex,"}"].join("\n"),fragmentShader:["uniform vec3 diffuse;","uniform float opacity;","uniform float dashSize;","uniform float totalSize;","varying float vLineDistance;",c.ShaderChunk.color_pars_fragment,c.ShaderChunk.fog_pars_fragment,c.ShaderChunk.logdepthbuf_pars_fragment,"void main() {"," if ( mod( vLineDistance, totalSize ) > dashSize ) {"," discard;"," }"," gl_FragColor = vec4( diffuse, opacity );",c.ShaderChunk.logdepthbuf_fragment,c.ShaderChunk.color_fragment,c.ShaderChunk.fog_fragment,"}"].join("\n")},depth:{uniforms:{mNear:{type:"f",value:1},mFar:{type:"f",value:2e3},opacity:{type:"f",value:1}},vertexShader:[c.ShaderChunk.morphtarget_pars_vertex,c.ShaderChunk.logdepthbuf_pars_vertex,"void main() {",c.ShaderChunk.morphtarget_vertex,c.ShaderChunk.default_vertex,c.ShaderChunk.logdepthbuf_vertex,"}"].join("\n"),fragmentShader:["uniform float mNear;","uniform float mFar;","uniform float opacity;",c.ShaderChunk.logdepthbuf_pars_fragment,"void main() {",c.ShaderChunk.logdepthbuf_fragment," #ifdef USE_LOGDEPTHBUF_EXT"," float depth = gl_FragDepthEXT / gl_FragCoord.w;"," #else"," float depth = gl_FragCoord.z / gl_FragCoord.w;"," #endif"," float color = 1.0 - smoothstep( mNear, mFar, depth );"," gl_FragColor = vec4( vec3( color ), opacity );","}"].join("\n")},normal:{uniforms:{opacity:{type:"f",value:1}},vertexShader:["varying vec3 vNormal;",c.ShaderChunk.morphtarget_pars_vertex,c.ShaderChunk.logdepthbuf_pars_vertex,"void main() {"," vNormal = normalize( normalMatrix * normal );",c.ShaderChunk.morphtarget_vertex,c.ShaderChunk.default_vertex,c.ShaderChunk.logdepthbuf_vertex,"}"].join("\n"),fragmentShader:["uniform float opacity;","varying vec3 vNormal;",c.ShaderChunk.logdepthbuf_pars_fragment,"void main() {"," gl_FragColor = vec4( 0.5 * normalize( vNormal ) + 0.5, opacity );",c.ShaderChunk.logdepthbuf_fragment,"}"].join("\n")},cube:{uniforms:{tCube:{type:"t",value:null},tFlip:{type:"f",value:-1}},vertexShader:["varying vec3 vWorldPosition;",c.ShaderChunk.logdepthbuf_pars_vertex,"void main() {"," vec4 worldPosition = modelMatrix * vec4( position, 1.0 );"," vWorldPosition = worldPosition.xyz;"," gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );",c.ShaderChunk.logdepthbuf_vertex,"}"].join("\n"),fragmentShader:["uniform samplerCube tCube;","uniform float tFlip;","varying vec3 vWorldPosition
return a&&(r&&n.fog&&H(u,r),(n instanceof c.MeshPhongMaterial||n instanceof c.MeshLambertMaterial||n.lights)&&(gt&&(s=!0,re(t),gt=!1),s?(X(u,yt),q(u,!0)):q(u,!1)),(n instanceof c.MeshBasicMaterial||n instanceof c.MeshLambertMaterial||n instanceof c.MeshPhongMaterial)&&I(u,n),n instanceof c.LineBasicMaterial?V(u,n):n instanceof c.LineDashedMaterial?(V(u,n),z(u,n)):n instanceof c.PointCloudMaterial?G(u,n):n instanceof c.MeshPhongMaterial?j(u,n):n instanceof c.MeshLambertMaterial?W(u,n):n instanceof c.MeshDepthMaterial?(u.mNear.value=e.near,u.mFar.value=e.far,u.opacity.value=n.opacity):n instanceof c.MeshNormalMaterial&&(u.opacity.value=n.opacity),o.receiveShadow&&!n._shadowPass&&Y(u,t),J(n.uniformsList)),Q(h,o),null!==h.modelMatrix&&Be.uniformMatrix4fv(h.modelMatrix,!1,o.matrixWorld.elements),l}function I(e,t){e.opacity.value=t.opacity,Ue.gammaInput?e.diffuse.value.copyGammaToLinear(t.color):e.diffuse.value=t.color,e.map.value=t.map,e.lightMap.value=t.lightMap,e.specularMap.value=t.specularMap,e.alphaMap.value=t.alphaMap,t.bumpMap&&(e.bumpMap.value=t.bumpMap,e.bumpScale.value=t.bumpScale),t.normalMap&&(e.normalMap.value=t.normalMap,e.normalScale.value.copy(t.normalScale));var r;if(t.map?r=t.map:t.specularMap?r=t.specularMap:t.normalMap?r=t.normalMap:t.bumpMap?r=t.bumpMap:t.alphaMap&&(r=t.alphaMap),void 0!==r){var n=r.offset,o=r.repeat;e.offsetRepeat.value.set(n.x,n.y,o.x,o.y)}e.envMap.value=t.envMap,e.flipEnvMap.value=t.envMap instanceof c.WebGLRenderTargetCube?1:-1,Ue.gammaInput?e.reflectivity.value=t.reflectivity:e.reflectivity.value=t.reflectivity,e.refractionRatio.value=t.refractionRatio}function V(e,t){e.diffuse.value=t.color,e.opacity.value=t.opacity}function z(e,t){e.dashSize.value=t.dashSize,e.totalSize.value=t.dashSize+t.gapSize,e.scale.value=t.scale}function G(e,t){e.psColor.value=t.color,e.opacity.value=t.opacity,e.size.value=t.size,e.scale.value=ye.height/2,e.map.value=t.map}function H(e,t){e.fogColor.value=t.color,t instanceof c.Fog?(e.fogNear.value=t.near,e.fogFar.value=t.far):t instanceof c.FogExp2&&(e.fogDensity.value=t.density)}function j(e,t){e.shininess.value=t.shininess,Ue.gammaInput?(e.ambient.value.copyGammaToLinear(t.ambient),e.emissive.value.copyGammaToLinear(t.emissive),e.specular.value.copyGammaToLinear(t.specular)):(e.ambient.value=t.ambient,e.emissive.value=t.emissive,e.specular.value=t.specular),t.wrapAround&&e.wrapRGB.value.copy(t.wrapRGB)}function W(e,t){Ue.gammaInput?(e.ambient.value.copyGammaToLinear(t.ambient),e.emissive.value.copyGammaToLinear(t.emissive)):(e.ambient.value=t.ambient,e.emissive.value=t.emissive),t.wrapAround&&e.wrapRGB.value.copy(t.wrapRGB)}function X(e,t){e.ambientLightColor.value=t.ambient,e.directionalLightColor.value=t.directional.colors,e.directionalLightDirection.value=t.directional.positions,e.pointLightColor.value=t.point.colors,e.pointLightPosition.value=t.point.positions,e.pointLightDistance.value=t.point.distances,e.spotLightColor.value=t.spot.colors,e.spotLightPosition.value=t.spot.positions,e.spotLightDistance.value=t.spot.distances,e.spotLightDirection.value=t.spot.directions,e.spotLightAngleCos.value=t.spot.anglesCos,e.spotLightExponent.value=t.spot.exponents,e.hemisphereLightSkyColor.value=t.hemi.skyColors,e.hemisphereLightGroundColor.value=t.hemi.groundColors,e.hemisphereLightDirection.value=t.hemi.positions}function q(e,t){e.ambientLightColor.needsUpdate=t,e.directionalLightColor.needsUpdate=t,e.directionalLightDirection.needsUpdate=t,e.pointLightColor.needsUpdate=t,e.pointLightPosition.needsUpdate=t,e.pointLightDistance.needsUpdate=t,e.spotLightColor.needsUpdate=t,e.spotLightPosition.needsUpdate=t,e.spotLightDistance.needsUpdate=t,e.spotLightDirection.needsUpdate=t,e.spotLightAngleCos.needsUpdate=t,e.spotLightExponent.needsUpdate=t,e.hemisphereLightSkyColor.needsUpdate=t,e.hemisphereLightGroundColor.needsUpdate=t,e.hemisphereLightDirection.needsUpdate=t}function Y(e,t){if(e.shadowMatrix)for(var r=0,n=0,o=t.length;o>n;n++){var i=t[n];i.castShadow&&(i instanceof c.SpotLight||i instanceof c.DirectionalLight&&!i.shadowCascade)&&(e.shadowMap.value[r]=i.shado
Be.vertexAttribPointer(s[p.buffer.belongsToAttribute],p.size,Be.FLOAT,!1,0,0))}s.color>=0&&(i.geometry.colors.length>0||i.geometry.faces.length>0?(Be.bindBuffer(Be.ARRAY_BUFFER,o.__webglColorBuffer),g(s.color),Be.vertexAttribPointer(s.color,3,Be.FLOAT,!1,0,0)):void 0!==n.defaultAttributeValues&&Be.vertexAttrib3fv(s.color,n.defaultAttributeValues.color)),s.normal>=0&&(Be.bindBuffer(Be.ARRAY_BUFFER,o.__webglNormalBuffer),g(s.normal),Be.vertexAttribPointer(s.normal,3,Be.FLOAT,!1,0,0)),s.tangent>=0&&(Be.bindBuffer(Be.ARRAY_BUFFER,o.__webglTangentBuffer),g(s.tangent),Be.vertexAttribPointer(s.tangent,4,Be.FLOAT,!1,0,0)),s.uv>=0&&(i.geometry.faceVertexUvs[0]?(Be.bindBuffer(Be.ARRAY_BUFFER,o.__webglUVBuffer),g(s.uv),Be.vertexAttribPointer(s.uv,2,Be.FLOAT,!1,0,0)):void 0!==n.defaultAttributeValues&&Be.vertexAttrib2fv(s.uv,n.defaultAttributeValues.uv)),s.uv2>=0&&(i.geometry.faceVertexUvs[1]?(Be.bindBuffer(Be.ARRAY_BUFFER,o.__webglUV2Buffer),g(s.uv2),Be.vertexAttribPointer(s.uv2,2,Be.FLOAT,!1,0,0)):void 0!==n.defaultAttributeValues&&Be.vertexAttrib2fv(s.uv2,n.defaultAttributeValues.uv2)),n.skinning&&s.skinIndex>=0&&s.skinWeight>=0&&(Be.bindBuffer(Be.ARRAY_BUFFER,o.__webglSkinIndicesBuffer),g(s.skinIndex),Be.vertexAttribPointer(s.skinIndex,4,Be.FLOAT,!1,0,0),Be.bindBuffer(Be.ARRAY_BUFFER,o.__webglSkinWeightsBuffer),g(s.skinWeight),Be.vertexAttribPointer(s.skinWeight,4,Be.FLOAT,!1,0,0)),s.lineDistance>=0&&(Be.bindBuffer(Be.ARRAY_BUFFER,o.__webglLineDistanceBuffer),g(s.lineDistance),Be.vertexAttribPointer(s.lineDistance,1,Be.FLOAT,!1,0,0))}if(y(),i instanceof c.Mesh){var _=o.__typeArray===Uint32Array?Be.UNSIGNED_INT:Be.UNSIGNED_SHORT;n.wireframe?(ne(n.wireframeLinewidth),l&&Be.bindBuffer(Be.ELEMENT_ARRAY_BUFFER,o.__webglLineBuffer),Be.drawElements(Be.LINES,o.__webglLineCount,_,0)):(l&&Be.bindBuffer(Be.ELEMENT_ARRAY_BUFFER,o.__webglFaceBuffer),Be.drawElements(Be.TRIANGLES,o.__webglFaceCount,_,0)),Ue.info.render.calls++,Ue.info.render.vertices+=o.__webglFaceCount,Ue.info.render.faces+=o.__webglFaceCount/3}else if(i instanceof c.Line){var b=i.mode===c.LineStrip?Be.LINE_STRIP:Be.LINES;ne(n.linewidth),Be.drawArrays(b,0,o.__webglLineCount),Ue.info.render.calls++}else i instanceof c.PointCloud&&(Be.drawArrays(Be.POINTS,0,o.__webglParticleCount),Ue.info.render.calls++,Ue.info.render.points+=o.__webglParticleCount)}},this.render=function(e,t,r,n){if(t instanceof c.Camera==!1)return void console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");var o=e.fog;He="",Ge=-1,je=null,gt=!0,e.autoUpdate===!0&&e.updateMatrixWorld(),void 0===t.parent&&t.updateMatrixWorld(),e.traverse(function(e){e instanceof c.SkinnedMesh&&e.skeleton.update()}),t.matrixWorldInverse.getInverse(t.matrixWorld),dt.multiplyMatrices(t.projectionMatrix,t.matrixWorldInverse),ft.setFromMatrix(dt),Pe.length=0,Re.length=0,Oe.length=0,ke.length=0,Ne.length=0,x(e),Ue.sortObjects===!0&&(Re.sort(_),Oe.sort(b)),Nt.render(e,t),Ue.info.render.calls=0,Ue.info.render.vertices=0,Ue.info.render.faces=0,Ue.info.render.points=0,this.setRenderTarget(r),(this.autoClear||n)&&this.clear(this.autoClearColor,this.autoClearDepth,this.autoClearStencil);for(var i=0,a=De.length;a>i;i++){var s=De[i],l=s.object;l.visible&&(Z(l,t),S(s))}if(e.overrideMaterial){var h=e.overrideMaterial;this.setBlending(h.blending,h.blendEquation,h.blendSrc,h.blendDst),this.setDepthTest(h.depthTest),this.setDepthWrite(h.depthWrite),oe(h.polygonOffset,h.polygonOffsetFactor,h.polygonOffsetUnits),T(Re,t,Pe,o,!0,h),T(Oe,t,Pe,o,!0,h),M(De,"",t,Pe,o,!1,h)}else{var h=null;this.setBlending(c.NoBlending),T(Re,t,Pe,o,!1,h),M(De,"opaque",t,Pe,o,!1,h),T(Oe,t,Pe,o,!0,h),M(De,"transparent",t,Pe,o,!0,h)}Bt.render(e,t),Ut.render(e,t,lt,ht),r&&r.generateMipmaps&&r.minFilter!==c.NearestFilter&&r.minFilter!==c.LinearFilter&&ce(r),this.setDepthTest(!0),this.setDepthWrite(!0)},this.renderImmediateObject=function(e,t,r,n,o){var i=U(e,t,r,n,o);He="",Ue.setMaterialFaces(n),o.immediateRenderCallback?o.immediateRenderCallback(i,Be,ft):o.render(function(e){Ue.renderBufferImmediate(e,i,n)})};var Qt={},Kt=0,Jt={MeshDepthMater
function r(){var t=u.createProgram(),r=u.createShader(u.VERTEX_SHADER),n=u.createShader(u.FRAGMENT_SHADER);return u.shaderSource(r,["precision "+e.getPrecision()+" float;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform float rotation;","uniform vec2 scale;","uniform vec2 uvOffset;","uniform vec2 uvScale;","attribute vec2 position;","attribute vec2 uv;","varying vec2 vUV;","void main() {","vUV = uvOffset + uv * uvScale;","vec2 alignedPosition = position * scale;","vec2 rotatedPosition;","rotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;","rotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;","vec4 finalPosition;","finalPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 );","finalPosition.xy += rotatedPosition;","finalPosition = projectionMatrix * finalPosition;","gl_Position = finalPosition;","}"].join("\n")),u.shaderSource(n,["precision "+e.getPrecision()+" float;","uniform vec3 color;","uniform sampler2D map;","uniform float opacity;","uniform int fogType;","uniform vec3 fogColor;","uniform float fogDensity;","uniform float fogNear;","uniform float fogFar;","uniform float alphaTest;","varying vec2 vUV;","void main() {","vec4 texture = texture2D( map, vUV );","if ( texture.a < alphaTest ) discard;","gl_FragColor = vec4( color * texture.xyz, texture.a * opacity );","if ( fogType > 0 ) {","float depth = gl_FragCoord.z / gl_FragCoord.w;","float fogFactor = 0.0;","if ( fogType == 1 ) {","fogFactor = smoothstep( fogNear, fogFar, depth );","} else {","const float LOG2 = 1.442695;","float fogFactor = exp2( - fogDensity * fogDensity * depth * depth * LOG2 );","fogFactor = 1.0 - clamp( fogFactor, 0.0, 1.0 );","}","gl_FragColor = mix( gl_FragColor, vec4( fogColor, gl_FragColor.w ), fogFactor );","}","}"].join("\n")),u.compileShader(r),u.compileShader(n),u.attachShader(t,r),u.attachShader(t,n),u.linkProgram(t),t}function n(e,t){return e.z!==t.z?t.z-e.z:t.id-e.id}var o,i,a,s,l,h,u=e.context,f=new c.Vector3,d=new c.Quaternion,p=new c.Vector3,m=function(){var e=new Float32Array([-.5,-.5,0,0,.5,-.5,1,0,.5,.5,1,1,-.5,.5,0,1]),t=new Uint16Array([0,1,2,0,2,3]);o=u.createBuffer(),i=u.createBuffer(),u.bindBuffer(u.ARRAY_BUFFER,o),u.bufferData(u.ARRAY_BUFFER,e,u.STATIC_DRAW),u.bindBuffer(u.ELEMENT_ARRAY_BUFFER,i),u.bufferData(u.ELEMENT_ARRAY_BUFFER,t,u.STATIC_DRAW),a=r(),s={position:u.getAttribLocation(a,"position"),uv:u.getAttribLocation(a,"uv")},l={uvOffset:u.getUniformLocation(a,"uvOffset"),uvScale:u.getUniformLocation(a,"uvScale"),rotation:u.getUniformLocation(a,"rotation"),scale:u.getUniformLocation(a,"scale"),color:u.getUniformLocation(a,"color"),map:u.getUniformLocation(a,"map"),opacity:u.getUniformLocation(a,"opacity"),modelViewMatrix:u.getUniformLocation(a,"modelViewMatrix"),projectionMatrix:u.getUniformLocation(a,"projectionMatrix"),fogType:u.getUniformLocation(a,"fogType"),fogDensity:u.getUniformLocation(a,"fogDensity"),fogNear:u.getUniformLocation(a,"fogNear"),fogFar:u.getUniformLocation(a,"fogFar"),fogColor:u.getUniformLocation(a,"fogColor"),alphaTest:u.getUniformLocation(a,"alphaTest")};var n=document.createElement("canvas");n.width=8,n.height=8;var f=n.getContext("2d");f.fillStyle="white",f.fillRect(0,0,8,8),h=new c.Texture(n),h.needsUpdate=!0};this.render=function(r,g){if(0!==t.length){void 0===a&&m(),u.useProgram(a),u.enableVertexAttribArray(s.position),u.enableVertexAttribArray(s.uv),u.disable(u.CULL_FACE),u.enable(u.BLEND),u.bindBuffer(u.ARRAY_BUFFER,o),u.vertexAttribPointer(s.position,2,u.FLOAT,!1,16,0),u.vertexAttribPointer(s.uv,2,u.FLOAT,!1,16,8),u.bindBuffer(u.ELEMENT_ARRAY_BUFFER,i),u.uniformMatrix4fv(l.projectionMatrix,!1,g.projectionMatrix.elements),u.activeTexture(u.TEXTURE0),u.uniform1i(l.map,0);var y=0,v=0,_=r.fog;_?(u.uniform3f(l.fogColor,_.color.r,_.color.g,_.color.b),_ instanceof c.Fog?(u.uniform1f(l.fogNear,_.near),u.uniform1f(l.fogFar,_.far),u.uniform1i(l.fogType,1),y=1,v=1):_ instanceof c.FogExp2&&(u.uniform1f(l.fogDensity,_.density),u.uniform1i(l.fogType,2),y=2,v=2)):(u.uniform1i(l.fogType,
c.LineCurve3=c.Curve.create(function(e,t){this.v1=e,this.v2=t},function(e){var t=new c.Vector3;return t.subVectors(this.v2,this.v1),t.multiplyScalar(e),t.add(this.v1),t}),c.QuadraticBezierCurve3=c.Curve.create(function(e,t,r){this.v0=e,this.v1=t,this.v2=r},function(e){var t=new c.Vector3;return t.x=c.Shape.Utils.b2(e,this.v0.x,this.v1.x,this.v2.x),t.y=c.Shape.Utils.b2(e,this.v0.y,this.v1.y,this.v2.y),t.z=c.Shape.Utils.b2(e,this.v0.z,this.v1.z,this.v2.z),t}),c.CubicBezierCurve3=c.Curve.create(function(e,t,r,n){this.v0=e,this.v1=t,this.v2=r,this.v3=n},function(e){var t=new c.Vector3;return t.x=c.Shape.Utils.b3(e,this.v0.x,this.v1.x,this.v2.x,this.v3.x),t.y=c.Shape.Utils.b3(e,this.v0.y,this.v1.y,this.v2.y,this.v3.y),t.z=c.Shape.Utils.b3(e,this.v0.z,this.v1.z,this.v2.z,this.v3.z),t}),c.SplineCurve3=c.Curve.create(function(e){this.points=void 0==e?[]:e},function(e){var t=this.points,r=(t.length-1)*e,n=Math.floor(r),o=r-n,i=t[0==n?n:n-1],a=t[n],s=t[n>t.length-2?t.length-1:n+1],l=t[n>t.length-3?t.length-1:n+2],h=new c.Vector3;return h.x=c.Curve.Utils.interpolate(i.x,a.x,s.x,l.x,o),h.y=c.Curve.Utils.interpolate(i.y,a.y,s.y,l.y,o),h.z=c.Curve.Utils.interpolate(i.z,a.z,s.z,l.z,o),h}),c.ClosedSplineCurve3=c.Curve.create(function(e){this.points=void 0==e?[]:e},function(e){var t=this.points,r=(t.length-0)*e,n=Math.floor(r),o=r-n;n+=n>0?0:(Math.floor(Math.abs(n)/t.length)+1)*t.length;var i=t[(n-1)%t.length],a=t[n%t.length],s=t[(n+1)%t.length],l=t[(n+2)%t.length],h=new c.Vector3;return h.x=c.Curve.Utils.interpolate(i.x,a.x,s.x,l.x,o),h.y=c.Curve.Utils.interpolate(i.y,a.y,s.y,l.y,o),h.z=c.Curve.Utils.interpolate(i.z,a.z,s.z,l.z,o),h}),c.AnimationHandler={LINEAR:0,CATMULLROM:1,CATMULLROM_FORWARD:2,add:function(){console.warn("THREE.AnimationHandler.add() has been deprecated.")},get:function(){console.warn("THREE.AnimationHandler.get() has been deprecated.")},remove:function(){console.warn("THREE.AnimationHandler.remove() has been deprecated.")},animations:[],init:function(e){if(e.initialized===!0)return e;for(var t=0;t<e.hierarchy.length;t++){for(var r=0;r<e.hierarchy[t].keys.length;r++)if(e.hierarchy[t].keys[r].time<0&&(e.hierarchy[t].keys[r].time=0),void 0!==e.hierarchy[t].keys[r].rot&&!(e.hierarchy[t].keys[r].rot instanceof c.Quaternion)){var n=e.hierarchy[t].keys[r].rot;e.hierarchy[t].keys[r].rot=(new c.Quaternion).fromArray(n)}if(e.hierarchy[t].keys.length&&void 0!==e.hierarchy[t].keys[0].morphTargets){for(var o={},r=0;r<e.hierarchy[t].keys.length;r++)for(var i=0;i<e.hierarchy[t].keys[r].morphTargets.length;i++){var a=e.hierarchy[t].keys[r].morphTargets[i];o[a]=-1}e.hierarchy[t].usedMorphTargets=o;for(var r=0;r<e.hierarchy[t].keys.length;r++){var s={};for(var a in o){for(var i=0;i<e.hierarchy[t].keys[r].morphTargets.length;i++)if(e.hierarchy[t].keys[r].morphTargets[i]===a){s[a]=e.hierarchy[t].keys[r].morphTargetsInfluences[i];break}i===e.hierarchy[t].keys[r].morphTargets.length&&(s[a]=0)}e.hierarchy[t].keys[r].morphTargetsInfluences=s}}for(var r=1;r<e.hierarchy[t].keys.length;r++)e.hierarchy[t].keys[r].time===e.hierarchy[t].keys[r-1].time&&(e.hierarchy[t].keys.splice(r,1),r--);for(var r=0;r<e.hierarchy[t].keys.length;r++)e.hierarchy[t].keys[r].index=r}return e.initialized=!0,e},parse:function(e){var t=function(e){var t=function(t,r){return e.apply(this,arguments)};return t.toString=function(){return e.toString()},t}(function(e,r){r.push(e);for(var n=0;n<e.children.length;n++)t(e.children[n],r)}),r=[];if(e instanceof c.SkinnedMesh)for(var n=0;n<e.skeleton.bones.length;n++)r.push(e.skeleton.bones[n]);else t(e,r);return r},play:function(e){-1===this.animations.indexOf(e)&&this.animations.push(e)},stop:function(e){var t=this.animations.indexOf(e);-1!==t&&this.animations.splice(t,1)},update:function(e){for(var t=0;t<this.animations.length;t++)this.animations[t].resetBlendWeights();for(var t=0;t<this.animations.length;t++)this.animations[t].update(e)}},c.Animation=function(e,t){this.root=e,this.data=c.AnimationHandler.init(t),this.hierarchy=c.AnimationHandler.parse(e),this.currentTime=0,this.timeScale=1,this.isPlaying=!1,this.loop=!0,thi
this.computeVertexNormals()},c.TubeGeometry.prototype=Object.create(c.Geometry.prototype),c.TubeGeometry.prototype.constructor=c.TubeGeometry,c.TubeGeometry.NoTaper=function(e){return 1},c.TubeGeometry.SinusoidalTaper=function(e){return Math.sin(Math.PI*e)},c.TubeGeometry.FrenetFrames=function(e,t,r){function n(){p[0]=new c.Vector3,m[0]=new c.Vector3,i=Number.MAX_VALUE,a=Math.abs(d[0].x),s=Math.abs(d[0].y),l=Math.abs(d[0].z),i>=a&&(i=a,f.set(1,0,0)),i>=s&&(i=s,f.set(0,1,0)),i>=l&&f.set(0,0,1),g.crossVectors(d[0],f).normalize(),p[0].crossVectors(d[0],g),m[0].crossVectors(d[0],p[0])}var o,i,a,s,l,h,u,f=(new c.Vector3,new c.Vector3),d=(new c.Vector3,[]),p=[],m=[],g=new c.Vector3,y=new c.Matrix4,v=t+1,_=1e-4;for(this.tangents=d,this.normals=p,this.binormals=m,h=0;v>h;h++)u=h/(v-1),d[h]=e.getTangentAt(u),d[h].normalize();for(n(),h=1;v>h;h++)p[h]=p[h-1].clone(),m[h]=m[h-1].clone(),g.crossVectors(d[h-1],d[h]),g.length()>_&&(g.normalize(),o=Math.acos(c.Math.clamp(d[h-1].dot(d[h]),-1,1)),p[h].applyMatrix4(y.makeRotationAxis(g,o))),m[h].crossVectors(d[h],p[h]);if(r)for(o=Math.acos(c.Math.clamp(p[0].dot(p[v-1]),-1,1)),o/=v-1,d[0].dot(g.crossVectors(p[0],p[v-1]))>0&&(o=-o),h=1;v>h;h++)p[h].applyMatrix4(y.makeRotationAxis(d[h],o*h)),m[h].crossVectors(d[h],p[h])},c.PolyhedronGeometry=function(e,t,r,n){function o(e){var t=e.normalize().clone();t.index=u.vertices.push(t)-1;var r=s(e)/2/Math.PI+.5,n=l(e)/Math.PI+.5;return t.uv=new c.Vector2(r,1-n),t}function i(e,t,r){var n=new c.Face3(e.index,t.index,r.index,[e.clone(),t.clone(),r.clone()]);u.faces.push(n),b.copy(e).add(t).add(r).divideScalar(3);var o=s(b);u.faceVertexUvs[0].push([h(e.uv,e,o),h(t.uv,t,o),h(r.uv,r,o)])}function a(e,t){for(var r=Math.pow(2,t),n=(Math.pow(4,t),o(u.vertices[e.a])),a=o(u.vertices[e.b]),s=o(u.vertices[e.c]),l=[],h=0;r>=h;h++){l[h]=[];for(var c=o(n.clone().lerp(s,h/r)),f=o(a.clone().lerp(s,h/r)),d=r-h,p=0;d>=p;p++)0==p&&h==r?l[h][p]=c:l[h][p]=o(c.clone().lerp(f,p/d))}for(var h=0;r>h;h++)for(var p=0;2*(r-h)-1>p;p++){var m=Math.floor(p/2);p%2==0?i(l[h][m+1],l[h+1][m],l[h][m]):i(l[h][m+1],l[h+1][m+1],l[h+1][m])}}function s(e){return Math.atan2(e.z,-e.x)}function l(e){return Math.atan2(-e.y,Math.sqrt(e.x*e.x+e.z*e.z))}function h(e,t,r){return 0>r&&1===e.x&&(e=new c.Vector2(e.x-1,e.y)),0===t.x&&0===t.z&&(e=new c.Vector2(r/2/Math.PI+.5,e.y)),e.clone()}c.Geometry.call(this),this.type="PolyhedronGeometry",this.parameters={vertices:e,indices:t,radius:r,detail:n},r=r||1,n=n||0;for(var u=this,f=0,d=e.length;d>f;f+=3)o(new c.Vector3(e[f],e[f+1],e[f+2]));for(var p=this.vertices,m=[],f=0,g=0,d=t.length;d>f;f+=3,g++){var y=p[t[f]],v=p[t[f+1]],_=p[t[f+2]];m[g]=new c.Face3(y.index,v.index,_.index,[y.clone(),v.clone(),_.clone()])}for(var b=new c.Vector3,f=0,d=m.length;d>f;f++)a(m[f],n);for(var f=0,d=this.faceVertexUvs[0].length;d>f;f++){var w=this.faceVertexUvs[0][f],x=w[0].x,T=w[1].x,M=w[2].x,S=Math.max(x,Math.max(T,M)),C=Math.min(x,Math.min(T,M));S>.9&&.1>C&&(.2>x&&(w[0].x+=1),.2>T&&(w[1].x+=1),.2>M&&(w[2].x+=1))}for(var f=0,d=this.vertices.length;d>f;f++)this.vertices[f].multiplyScalar(r);this.mergeVertices(),this.computeFaceNormals(),this.boundingSphere=new c.Sphere(new c.Vector3,r)},c.PolyhedronGeometry.prototype=Object.create(c.Geometry.prototype),c.PolyhedronGeometry.prototype.constructor=c.PolyhedronGeometry,c.DodecahedronGeometry=function(e,t){this.parameters={radius:e,detail:t};var r=(1+Math.sqrt(5))/2,n=1/r,o=[-1,-1,-1,-1,-1,1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,1,1,1,-1,1,1,1,0,-n,-r,0,-n,r,0,n,-r,0,n,r,-n,-r,0,-n,r,0,n,-r,0,n,r,0,-r,0,-n,r,0,-n,-r,0,n,r,0,n],i=[3,11,7,3,7,15,3,15,13,7,19,17,7,17,6,7,6,15,17,4,8,17,8,10,17,10,6,8,0,16,8,16,2,8,2,10,0,12,1,0,1,18,0,18,16,6,10,2,6,2,13,6,13,15,2,16,18,2,18,3,2,3,13,18,1,9,18,9,11,18,11,3,4,14,12,4,12,0,4,0,8,11,9,5,11,5,19,11,19,7,19,5,14,19,14,4,19,4,17,1,12,14,1,14,5,1,5,9];c.PolyhedronGeometry.call(this,o,i,e,t)},c.DodecahedronGeometry.prototype=Object.create(c.Geometry.prototype),c.DodecahedronGeometry.prototype.constructor=c.DodecahedronGeometry,c.IcosahedronGeometry=function(e,t){var r=(1+Math.sqrt(5))/2,n=[-1,r,0,1,r,0
var o=this._getObjectForScene(t,r[n]);null!=o&&t.remove(o)}this._clearObjectForScene(t)}},e.exports=f}).call(this,require("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},require("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/release_modules/animation-visualize/src/DefaultEyeLighting.js","/release_modules/animation-visualize/src")},{"./RenderPlugin":45,_process:5,buffer:1,three:40}],43:[function(require,e,exports){(function(t,r,n,o,i,a,s,l,h){var u=require("ifr-geometry/src/loaders/ArticulatedModelLoader"),c=require("ifr-motion/src/loaders/KinematicsLoader"),f=require("ifr-motion/src/dofs/TextureControl"),d=require("three"),p=function(e){this._config=e,this._textureLoader=null,this._modelRoot=null,this._modelControlGroup=null,this.loadSucceeded=!1,this.loadMessage=""};p.prototype.setTextureLoader=function(e){this._textureLoader=e},p.prototype.load=function(e){var t=this,r=new u;r.modelLoader.defaultMaterial.side=d.DoubleSide,r.load("body model",t._config.getBodyGeometryURL(),t._config.getBodySkeletonURL(),function(){var n=r.getResult();if(n.success){t._modelRoot=n.modelRoot;var o=new c,i=o.getModelControlFactory(f.Factory.prototype._controlType);t._textureLoader&&i.setSharedImageLoader(t._textureLoader),o.load(t._config.getBodyKinematicsURL(),function(){var r=o.getResult();r.success?(t._modelControlGroup=r.modelControlGroup,t._modelControlGroup.attachToModel(t._modelRoot),t.loadSucceeded=!0):(t.loadSucceeded=!1,t.loadMessage="kinematics load failed with message: "+r.message+", URL = "+r.url),e&&e()})}else t.loadSucceeded=!1,t.loadMessage=""+n.message+", model URL = "+n.modelUrl+", skeleton URL = "+n.skeletonUrl,e&&e()})},p.prototype.getModelRoot=function(){return this._modelRoot},p.prototype.getModelControlGroup=function(){return this._modelControlGroup},p.prototype.constructFaceScreenRenderTarget=function(e){var t=new d.WebGLRenderTarget(800,450);t.minFilter=d.LinearFilter;var r=this.getModelRoot().getObjectByName(e.faceScreenMeshName,!0);return r.material.map=t,t},e.exports=p}).call(this,require("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},require("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/release_modules/animation-visualize/src/JiboBody.js","/release_modules/animation-visualize/src")},{_process:5,buffer:1,"ifr-geometry/src/loaders/ArticulatedModelLoader":68,"ifr-motion/src/dofs/TextureControl":93,"ifr-motion/src/loaders/KinematicsLoader":100,three:40}],44:[function(require,e,exports){(function(t,r,n,o,i,a,s,l,h){var u=require("ifr-geometry/src/loaders/ArticulatedModelLoader"),c=require("ifr-motion/src/loaders/KinematicsLoader"),f=require("ifr-motion/src/dofs/TextureControl"),d=require("three"),p=function(e){this._config=e,this._textureLoader=null,this._modelRoot=null,this._modelControlGroup=null,this.loadSucceeded=!1,this.loadMessage=""};p.prototype.setTextureLoader=function(e){this._textureLoader=e},p.prototype.load=function(e){var t=this,r=new u;r.load("eye model",t._config.getEyeGeometryURL(),t._config.getEyeSkeletonURL(),function(){var n=r.getResult();if(n.success){t._modelRoot=n.modelRoot;for(var o=0,i=.01,a=0;a<t._modelRoot.children.length;a++){var s=t._modelRoot.children[a];s instanceof d.SkinnedMesh&&(s.material.transparent=!0,s.frustumCulled=!1,s.position.z=o,o+=i)}var l=new c,h=l.getModelControlFactory(f.Factory.prototype._controlType);t._textureLoader&&h.setSharedImageLoader(t._textureLoader),l.load(t._config.getEyeKinematicsURL(),function(){var r=l.getResult();if(r.success){t._modelControlGroup=r.modelControlGroup,t._modelControlGroup.attachToModel(t._modelRoot);for(var n=0;n<t._modelControlGroup.getControlList().length;n++)"TEXTURE"===t._modelControlGroup.getControlList()[n].getControlType()&&t._modelControlGroup.getControlList()[n].setDefaultNormalURL(t._config.getDefaultNormalMap());t.loadSucceeded=!0}else t.loadSucceeded=!1,t.loadMessage="kinematics load failed with message: "+r.message+", URL = "+r.url;e&&e()})}else t.l
kw:" com edu gov net org ",ky:" com edu gov net org ",kz:" com edu gov mil net org ",lb:" com edu gov net org ",lk:" assn com edu gov grp hotel int ltd net ngo org sch soc web ",lr:" com edu gov net org ",lv:" asn com conf edu gov id mil net org ",ly:" com edu gov id med net org plc sch ",ma:" ac co gov m net org press ",mc:" asso tm ",me:" ac co edu gov its net org priv ",mg:" com edu gov mil nom org prd tm ",mk:" com edu gov inf name net org pro ",ml:" com edu gov net org presse ",mn:" edu gov org ",mo:" com edu gov net org ",mt:" com edu gov net org ",mv:" aero biz com coop edu gov info int mil museum name net org pro ",mw:" ac co com coop edu gov int museum net org ",mx:" com edu gob net org ",my:" com edu gov mil name net org sch ",nf:" arts com firm info net other per rec store web ",ng:" biz com edu gov mil mobi name net org sch ",ni:" ac co com edu gob mil net nom org ",np:" com edu gov mil net org ",nr:" biz com edu gov info net org ",om:" ac biz co com edu gov med mil museum net org pro sch ",pe:" com edu gob mil net nom org sld ",ph:" com edu gov i mil net ngo org ",pk:" biz com edu fam gob gok gon gop gos gov net org web ",pl:" art bialystok biz com edu gda gdansk gorzow gov info katowice krakow lodz lublin mil net ngo olsztyn org poznan pwr radom slupsk szczecin torun warszawa waw wroc wroclaw zgora ",pr:" ac biz com edu est gov info isla name net org pro prof ",ps:" com edu gov net org plo sec ",pw:" belau co ed go ne or ",ro:" arts com firm info nom nt org rec store tm www ",rs:" ac co edu gov in org ",sb:" com edu gov net org ",sc:" com edu gov net org ",sh:" co com edu gov net nom org ",sl:" com edu gov net org ",st:" co com consulado edu embaixada gov mil net org principe saotome store ",sv:" com edu gob org red ",sz:" ac co org ",tr:" av bbs bel biz com dr edu gen gov info k12 name net org pol tel tsk tv web ",tt:" aero biz cat co com coop edu gov info int jobs mil mobi museum name net org pro tel travel ",tw:" club com ebiz edu game gov idv mil net org ",mu:" ac co com gov net or org ",mz:" ac co edu gov org ",na:" co com ",nz:" ac co cri geek gen govt health iwi maori mil net org parliament school ",pa:" abo ac com edu gob ing med net nom org sld ",pt:" com edu gov int net nome org publ ",py:" com edu gov mil net org ",qa:" com edu gov mil net org ",re:" asso com nom ",ru:" ac adygeya altai amur arkhangelsk astrakhan bashkiria belgorod bir bryansk buryatia cbg chel chelyabinsk chita chukotka chuvashia com dagestan e-burg edu gov grozny int irkutsk ivanovo izhevsk jar joshkar-ola kalmykia kaluga kamchatka karelia kazan kchr kemerovo khabarovsk khakassia khv kirov koenig komi kostroma kranoyarsk kuban kurgan kursk lipetsk magadan mari mari-el marine mil mordovia mosreg msk murmansk nalchik net nnov nov novosibirsk nsk omsk orenburg org oryol penza perm pp pskov ptz rnd ryazan sakhalin samara saratov simbirsk smolensk spb stavropol stv surgut tambov tatarstan tom tomsk tsaritsyn tsk tula tuva tver tyumen udm udmurtia ulan-ude vladikavkaz vladimir vladivostok volgograd vologda voronezh vrn vyatka yakutia yamal yekaterinburg yuzhno-sakhalinsk ",rw:" ac co com edu gouv gov int mil net ",sa:" com edu gov med net org pub sch ",sd:" com edu gov info med net org tv ",se:" a ac b bd c d e f g h i k l m n o org p parti pp press r s t tm u w x y z ",sg:" com edu gov idn net org per ",sn:" art com edu gouv org perso univ ",sy:" com edu gov mil net news org ",th:" ac co go in mi net or ",tj:" ac biz co com edu go gov info int mil name net nic org test web ",tn:" agrinet com defense edunet ens fin gov ind info intl mincom nat net org perso rnrt rns rnu tourism ",tz:" ac co go ne or ",ua:" biz cherkassy chernigov chernovtsy ck cn co com crimea cv dn dnepropetrovsk donetsk dp edu gov if in ivano-frankivsk kh kharkov kherson khmelnitskiy kiev kirovograd km kr ks kv lg lugansk lutsk lviv me mk net nikolaev od odessa org pl poltava pp rovno rv sebastopol sumy te ternopil uzhgorod vinnica vn zaporizhzhe zhitomir zp zt ",ug:" ac co go ne or org sc ",uk:" ac bl british-library co cym gov govt icnet jet lea ltd me mil mod n
if(t.hostname=null,t.port=null,i===a)return t.path="",s.build();if(n=o.commonPath(s.path(),e.path()),!n)return s.build();var l=r.path.substring(n.length).replace(/[^\/]*$/,"").replace(/.*?\//g,"../");return t.path=l+t.path.substring(n.length),s.build()},g.equals=function(e){var t,r,n,i=this.clone(),a=new o(e),l={},h={},c={};if(i.normalize(),a.normalize(),i.toString()===a.toString())return!0;if(t=i.query(),r=a.query(),i.query(""),a.query(""),i.toString()!==a.toString())return!1;if(t.length!==r.length)return!1;l=o.parseQuery(t,this._parts.escapeQuerySpace),h=o.parseQuery(r,this._parts.escapeQuerySpace);for(n in l)if(y.call(l,n)){if(s(l[n])){if(!u(l[n],h[n]))return!1}else if(l[n]!==h[n])return!1;c[n]=!0}for(n in h)if(y.call(h,n)&&!c[n])return!1;return!0},g.duplicateQueryParameters=function(e){return this._parts.duplicateQueryParameters=!!e,this},g.escapeQuerySpace=function(e){return this._parts.escapeQuerySpace=!!e,this},o})}).call(this,require("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},require("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/release_modules/ifr-core/node_modules/URIjs/src/URI.js","/release_modules/ifr-core/node_modules/URIjs/src")},{"./IPv6":55,"./SecondLevelDomains":56,"./punycode":58,_process:5,buffer:1}],58:[function(require,t,exports){(function(r,n,o,i,a,s,l,h,u){!function(r){function o(e){throw RangeError(R[e])}function i(e,t){for(var r=e.length;r--;)e[r]=t(e[r]);return e}function a(e,t){return i(e.split(D),t).join(".")}function s(e){for(var t,r,n=[],o=0,i=e.length;i>o;)t=e.charCodeAt(o++),t>=55296&&56319>=t&&i>o?(r=e.charCodeAt(o++),56320==(64512&r)?n.push(((1023&t)<<10)+(1023&r)+65536):(n.push(t),o--)):n.push(t);return n}function l(e){return i(e,function(e){var t="";return e>65535&&(e-=65536,t+=N(e>>>10&1023|55296),e=56320|1023&e),t+=N(e)}).join("")}function h(e){return 10>e-48?e-22:26>e-65?e-65:26>e-97?e-97:x}function u(e,t){return e+22+75*(26>e)-((0!=t)<<5)}function c(e,t,r){var n=0;for(e=r?k(e/C):e>>1,e+=k(e/t);e>O*M>>1;n+=x)e=k(e/O);return k(n+(O+1)*e/(e+S))}function f(e){var t,r,n,i,a,s,u,f,d,p,m=[],g=e.length,y=0,v=A,_=E;for(r=e.lastIndexOf(L),0>r&&(r=0),n=0;r>n;++n)e.charCodeAt(n)>=128&&o("not-basic"),m.push(e.charCodeAt(n));for(i=r>0?r+1:0;g>i;){for(a=y,s=1,u=x;i>=g&&o("invalid-input"),f=h(e.charCodeAt(i++)),(f>=x||f>k((w-y)/s))&&o("overflow"),y+=f*s,d=_>=u?T:u>=_+M?M:u-_,!(d>f);u+=x)p=x-d,s>k(w/p)&&o("overflow"),s*=p;t=m.length+1,_=c(y-a,t,0==a),k(y/t)>w-v&&o("overflow"),v+=k(y/t),y%=t,m.splice(y++,0,v)}return l(m)}function d(e){var t,r,n,i,a,l,h,f,d,p,m,g,y,v,_,b=[];for(e=s(e),g=e.length,t=A,r=0,a=E,l=0;g>l;++l)m=e[l],128>m&&b.push(N(m));for(n=i=b.length,i&&b.push(L);g>n;){for(h=w,l=0;g>l;++l)m=e[l],m>=t&&h>m&&(h=m);for(y=n+1,h-t>k((w-r)/y)&&o("overflow"),r+=(h-t)*y,t=h,l=0;g>l;++l)if(m=e[l],t>m&&++r>w&&o("overflow"),m==t){for(f=r,d=x;p=a>=d?T:d>=a+M?M:d-a,!(p>f);d+=x)_=f-p,v=x-p,b.push(N(u(p+_%v,0))),f=k(_/v);b.push(N(u(f,0))),a=c(r,y,n==i),r=0,++n}++r,++t}return b.join("")}function p(e){return a(e,function(e){return P.test(e)?f(e.slice(4).toLowerCase()):e})}function m(e){return a(e,function(e){return F.test(e)?"xn--"+d(e):e})}var g="object"==typeof exports&&exports,y="object"==typeof t&&t&&t.exports==g&&t,v="object"==typeof n&&n;(v.global===v||v.window===v)&&(r=v);var _,b,w=2147483647,x=36,T=1,M=26,S=38,C=700,E=72,A=128,L="-",P=/^xn--/,F=/[^ -~]/,D=/\x2E|\u3002|\uFF0E|\uFF61/g,R={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},O=x-T,k=Math.floor,N=String.fromCharCode;if(_={version:"1.2.3",ucs2:{decode:s,encode:l},decode:f,encode:d,toASCII:m,toUnicode:p},"function"==typeof e&&"object"==typeof e.amd&&e.amd)e(function(){return _});else if(g&&!g.nodeType)if(y)y.exports=_;else for(b in _)_.hasOwnProperty(b)&&(g[b]=_[b]);else r.punycode=_}(this)}).call(this,require("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},require("buffer").Buffe
var r=t-e,n=Math.floor((r+Math.PI)/(2*Math.PI)),o=e+n*Math.PI*2;return o},e.exports=u}).call(this,require("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},require("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/release_modules/ifr-motion/src/base/CyclicMath.js","/release_modules/ifr-motion/src/base")},{_process:5,buffer:1}],76:[function(require,e,exports){(function(t,r,n,o,i,a,s,l,h){var u=require("./CyclicDOFTargetSelector"),c=(require("../dofs/DOFInfo"),function(e,t){var r,n={},o={},i=e.getDOFNames(),a={},s=function(e,t){var r=a[e],n=a[t];return null!=r&&null!=n?r-n:0};for(r=0;r<i.length;r++){var l=0,h=e.getModelControlGroup().getControlForDOF(i[r]);if(null!=h&&("ROTATION"===h.getControlType()||"TRANSLATION"===h.getControlType())){var c=h.getTransformName(),f=e.getTransform(c);if(null!=f)for(;null!=f.parent;)l++,f=f.parent}a[i[r]]=l}for(r=0;r<i.length;r++){var d=i[r];e.getModelControlGroup().getDOFInfo(d).isCyclic()&&(t&&t.hasOwnProperty(d)?n[d]=t[d]:n[d]=new u(d),o[d]=new u(d))}this.sortDOFsByDepth=function(e){return e.sort(s)},this.getGlobalTargetSelector=function(e){return n[e]},this.getLocalTargetSelector=function(e){return o[e]},this.refineToGloballyClosestTargetPose=function(e,t,r){null==r&&(r=e.getDOFNames());for(var n=this.sortDOFsByDepth(r.slice(0)),o=0;o<n.length;o++){var i=this.getGlobalTargetSelector(n[o]);if(i){var a=i.closestEquivalentRotation(e,t);t.set(n[o],a,0)}}},this.refineToLocallyClosestTargetPose=function(e,t,r){null==r&&(r=e.getDOFNames());for(var n=0;n<r.length;n++){var o=this.getLocalTargetSelector(r[n]);if(o){var i=o.closestEquivalentRotation(e,t);t.set(r[n],i,0)}}}});e.exports=c}).call(this,require("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},require("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/release_modules/node_modules/ifr-motion/src/base/DOFGlobalAlignment.js","/release_modules/node_modules/ifr-motion/src/base")},{"../dofs/DOFInfo":87,"./CyclicDOFTargetSelector":74,_process:5,buffer:1}],77:[function(require,e,exports){(function(t,r,n,o,i,a,s,l,h){var u=require("./Interpolators"),c=require("../dofs/TextureControl"),f=function(){this.interpolatorSet={}};f.prototype.addInterpolator=function(e,t){this.interpolatorSet[e]=t},f.prototype.getInterpolator=function(e){var t=this.interpolatorSet[e];return void 0!==t?t:null},f.prototype.addModelControlGroup=function(e){for(var t=e.getControlList(),r=0;r<t.length;r++)for(var n=t[r],o=n.getDOFNames(),i=0;i<o.length;i++)n instanceof c?this.addInterpolator(o[i],new u.DOFSampleInterpolator(new u.StepInterpolator)):this.addInterpolator(o[i],new u.DOFSampleInterpolator(new u.LinearInterpolator))},e.exports=f}).call(this,require("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},require("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/release_modules/node_modules/ifr-motion/src/base/InterpolatorSet.js","/release_modules/node_modules/ifr-motion/src/base")},{"../dofs/TextureControl":93,"./Interpolators":78,_process:5,buffer:1}],78:[function(require,e,exports){(function(t,r,n,o,i,a,s,l,h){var u={};u.BaseInterpolator=function(){},u.BaseInterpolator.prototype.interpolate=function(e,t,r){return e},u.StepInterpolator=function(e){u.BaseInterpolator.call(this),this.alphaThreshold=void 0!==e?e:1},u.StepInterpolator.prototype=Object.create(u.BaseInterpolator.prototype),u.StepInterpolator.prototype.constructor=u.StepInterpolator,u.StepInterpolator.prototype.interpolate=function(e,t,r){return r<this.alphaThreshold?e:t},u.LinearInterpolator=function(){u.BaseInterpolator.call(this)},u.LinearInterpolator.prototype=Object.create(u.BaseInterpolator.prototype),u.LinearInterpolator.prototype.constructor=u.LinearInterpolator,u.LinearInterpolator.prototype.interpolate=function(e,t,r){return(1-r)*e+r*t},u.DOFSampleInterpolator=function(e,t){u.BaseInterpolator.call(this),this.positionInterpolator=e,this.derivativeInterp
this._colorControl=t[r];break}if(null!==this._colorControl)break}},v.prototype.updateFromDOFValues=function(e){if(this._mesh&&e.hasOwnProperty(this._dofNames[0])){var t=e[this._dofNames[0]];return f.call(this,t)}return!1},v.prototype.updateFromPose=function(e){var t=e.get(this._dofNames[0],0);return this._mesh&&null!=t?f.call(this,t):!1},v.prototype.setTextureFromURL=function(e){if(this._mesh&&this._texture.sourceFile!==e){this._texture.sourceFile=e,this._blankTexture.needsUpdate=!0,this._mesh.material.map=this._blankTexture;var t=this;this._imageLoader.loadImage(e,function(){var e=t._imageLoader.getResult();e.success&&e.url===t._texture.sourceFile?(t._texture.image=e.image,t._texture.needsUpdate=!0,t._mesh.material.map=t._texture):e.success||y.error("TextureControl for DOF "+t._dofNames[0]+": image load failed, URL = "+e.url)})}},v.prototype.setNormalFromURL=function(e){if(this._mesh&&this._normal.sourceFile!==e){this._normal.sourceFile=e;var t=this;this._imageLoader.loadImage(e,function(){var e=t._imageLoader.getResult();e.success&&e.url===t._normal.sourceFile?(t._normal.image=e.image,t._normal.needsUpdate=!0,null==t._mesh.material.normalMap&&(t._mesh.material.needsUpdate=!0),t._mesh.material.normalMap=t._normal):e.success||y.error("TextureControl for DOF "+t._dofNames[0]+": normal load failed, URL = "+e.url)})}},v.prototype.getCopy=function(e){return e||(e=new v),d.prototype.getCopy.call(this,e),e._meshName=this._meshName,e._texture=this._texture?this._texture.clone():null,e._imageLoader=this._imageLoader,e._defaultNormalURL=this._defaultNormalURL,e},v.Factory=function(){this._sharedImageLoader=new m},v.Factory.prototype=Object.create(p.prototype),v.Factory.prototype.constructor=v.Factory,v.Factory.prototype._controlType=v.prototype._controlType,v.Factory.prototype._controlConstructor=v,v.Factory.prototype.setSharedImageLoader=function(e){this._sharedImageLoader=e},v.Factory.prototype.constructFromJson=function(e){var t=p.prototype.constructFromJson.call(this,e);return t&&t.setImageLoader(this._sharedImageLoader),t},e.exports=v}).call(this,require("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},require("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/release_modules/node_modules/ifr-motion/src/dofs/TextureControl.js","/release_modules/node_modules/ifr-motion/src/dofs")},{"./ModelControl":89,"./ModelControlFactory":90,_process:5,buffer:1,"ifr-core/src/SLog":62,"ifr-geometry/src/loaders/CachedImageLoader":69,three:40}],94:[function(require,e,exports){(function(t,r,n,o,i,a,s,l,h){function u(e){for(var t=(new p.Vector3).copy(this._initialPosition),r=new p.Vector3,n=0;n<e.length;n++){var o=p.Math.clamp(e[n],this._minList[n],this._maxList[n]);r.copy(this._translationalDirectionList[n]).multiplyScalar(o),t.add(r)}return t}var c=require("./ModelControl"),f=require("./ModelControlFactory"),d=require("ifr-geometry/src/BasicFrame"),p=require("three"),m=function(){c.call(this),this._skeletonFrameName=null,this._initialPosition=new p.Vector3,this._translationalDirectionList=[],this._minList=[],this._maxList=[],this._skeletonFrame=null};m.prototype=Object.create(c.prototype),m.prototype.constructor=m,m.prototype._controlType="TRANSLATION",m.prototype.setFromJson=function(e){c.prototype.setFromJson.call(this,e),this._dofNames.push(e.dofName),this._skeletonFrameName=e.skeletonFrameName,this._initialPosition.copy(d.vector3FromJson(e.xyzInitialPosition)),this._translationalDirectionList.push(d.vector3FromJson(e.xyzTranslationDirection)),this._minList.push(e.min),this._maxList.push(e.max)},m.prototype.appendControl=function(e){this._controlNames=this._controlNames.concat(e._controlNames),this._dofNames=this._dofNames.concat(e._dofNames),this._translationalDirectionList=this._translationalDirectionList.concat(e._translationalDirectionList),this._minList=this._minList.concat(e._minList),this._maxList=this._maxList.concat(e._maxList)},m.prototype.attachToModel=function(e){return this._skeletonFrame=null,null!=e&&e.hasOwnProperty(this._skeletonFrameName)
this.computeStabilizationDelta=function(l,h,u){if(r){var f=new d.PointNodeReport;if(e.getPose(l,a,n,null,f),f._pointSucceeded)null!=t&&t.refineToLocallyClosestTargetPose(i,a),c.subtract(a,i,!0,s);else for(var p=0;p<s.getDOFNames();p++)s.set(s.getDOFNames()[p],0,0)}else{s.clear();for(var m=0;m<o.length;m++)s.set(o[m],0,0)}return n.copy(u),null==h?e.getPose(l,i,u):i.setPose(h),r=!0,s},this.decomposeVelocity=function(r,n,o,i){null==i&&(i=0),null===h&&(h=new c(e.getName()+" Decomp Last Pose")),c.advanceByTime(r,!0,h,-0.02),e.getPose(r,a,o),e.getPose(h,l,o),null!=t&&t.refineToLocallyClosestTargetPose(l,a),c.subtract(a,l,!0,s);for(var f=s.getDOFNames(),d=0;d<f.length;d++){var p=f[d],m=r.get(p,1),g=s.get(p,0);0!==i&&Math.abs(g)>i&&(u.error("Clamping OST application of unfiltered offset of "+s+" to "+p+" as it is greater than "+i),g=0>g?-i:i);var y=50*g;n.set(p,m-y,1)}},this.reset=function(){r=!1}};e.exports=p}).call(this,require("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},require("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/release_modules/ifr-motion/src/lookat/OcularStabilizationTracker.js","/release_modules/ifr-motion/src/lookat")},{"../base/Pose":83,"./LookatNode":105,_process:5,buffer:1,"ifr-core/src/SLog":62,"ifr-geometry/src/ExtraMath":67,three:40}],108:[function(require,e,exports){(function(t,r,n,o,i,a,s,l,h){var u=(require("../dofs/RotationControl"),require("three"),require("./PointADOF")),c=require("./LookatDOF"),f=function(e,t,r,n,o,i,a,s){c.call(this,e,t),this._control=null,this._forwardDir=n,this._centralTransformName=r,this._internalDistance=i,this._planeNormal=o,this._controlledTransform=null,this._centralTransform=null,this._dofMin=a,this._dofMax=s};f.prototype=Object.create(c.prototype),f.prototype.constructor=f,f.prototype.connectToGroup=function(e){c.prototype.connectToGroup.call(this,e),this._kinematicGroup?(this._control=this._kinematicGroup.getModelControlGroup().getControlForDOF(this._controlledDOFName),this._controlledTransform=this._kinematicGroup.getTransform(this._control.getTransformName()),this._centralTransform=this._kinematicGroup.getTransform(this._centralTransformName)):(this._control=null,this._controlledTransform=null,this._centralTransform=null)},f.prototype.valToPointAtTarget=function(e,t){var r=u.planeIntersectFromRear(this._centralTransform,e,null,this._forwardDir,this._planeNormal,this._internalDistance,t);return Math.max(Math.min(r,this._dofMax),this._dofMin)},f.prototype.errorRatio=function(e){return Math.abs(e/(this._dofMax-this._dofMin))},f.prototype.suggestForwardTarget=function(e){return null==this._centralTransform?null:(e.copy(this._forwardDir),e.multiplyScalar(10),this._centralTransform.localToWorld(e),e)},e.exports=f}).call(this,require("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},require("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/release_modules/node_modules/ifr-motion/src/lookat/PlaneDisplacementLookatDOF.js","/release_modules/node_modules/ifr-motion/src/lookat")},{"../dofs/RotationControl":92,"./LookatDOF":103,"./PointADOF":109,_process:5,buffer:1,three:40}],109:[function(require,e,exports){(function(t,r,n,o,i,a,s,l,h){var u=(require("../dofs/RotationControl"),require("three")),c=require("ifr-core/src/SLog"),f="LOOKAT",d=.001,p=d*d,m=null,g=function(){this._angleToAxis=null,this._distanceToTarget=null},y={name:"PointADOF"};y.PointReport=g,y.setVisHelper=function(e){m=e};var v=function(e){return e=Math.abs(e%Math.PI),e=Math.abs(Math.PI/2-e),e=Math.PI/2-e},_=function(e,t){var r=(new u.Vector3).copy(e),n=r.angleTo(t),o=r.multiplyScalar(-1).angleTo(t);return o>=n?n>.1&&v(e.w)>d?(c(f,"Error, computed axis ("+r.x+", "+r.y+", "+r.z+") not so close ("+n+") to references axis ("+t.x+", "+t.y+", "+t.z+"), angle = "+e.w),null):e.w:o>.1&&v(e.w)>d?(c(f,"Error, computed axis ("+r.x+", "+r.y+", "+r.z+") not so close ("+n+") to references axis ("+t.x+", "+t.y+", "+t.z+"), angle = "+e.w),null):-e.w};y.get
}function n(e){d.enabled!==!1&&(y=v,window.addEventListener("keydown",r,!1))}function o(e){d.enabled!==!1&&(e.preventDefault(),e.stopPropagation(),y===p.NONE&&(y=e.button,0===e.button&&e.shiftKey&&(y=p.PAN)),y!==p.ROTATE||d.noRotate?y!==p.ZOOM||d.noZoom?y!==p.PAN||d.noPan||(C.copy(F(e.pageX,e.pageY)),E.copy(C)):(x.copy(F(e.pageX,e.pageY)),T.copy(x)):(b.copy(D(e.pageX,e.pageY)),w.copy(b)),document.addEventListener("mousemove",i,!1),document.addEventListener("mouseup",a,!1),d.dispatchEvent(L))}function i(e){d.enabled!==!1&&(e.preventDefault(),e.stopPropagation(),y!==p.ROTATE||d.noRotate?y!==p.ZOOM||d.noZoom?y!==p.PAN||d.noPan||E.copy(F(e.pageX,e.pageY)):T.copy(F(e.pageX,e.pageY)):w.copy(D(e.pageX,e.pageY)))}function a(e){d.enabled!==!1&&(e.preventDefault(),e.stopPropagation(),y=p.NONE,document.removeEventListener("mousemove",i),document.removeEventListener("mouseup",a),d.dispatchEvent(P))}function s(e){if(d.enabled!==!1){e.preventDefault(),e.stopPropagation();var t=0;e.wheelDelta?t=e.wheelDelta/40:e.detail&&(t=-e.detail/3),x.y+=.01*t,d.dispatchEvent(L),d.dispatchEvent(P)}}function l(e){if(d.enabled!==!1){switch(e.touches.length){case 1:y=p.TOUCH_ROTATE,b.copy(D(e.touches[0].pageX,e.touches[0].pageY)),w.copy(b);break;case 2:y=p.TOUCH_ZOOM_PAN;var t=e.touches[0].pageX-e.touches[1].pageX,r=e.touches[0].pageY-e.touches[1].pageY;S=M=Math.sqrt(t*t+r*r);var n=(e.touches[0].pageX+e.touches[1].pageX)/2,o=(e.touches[0].pageY+e.touches[1].pageY)/2;C.copy(F(n,o)),E.copy(C);break;default:y=p.NONE}d.dispatchEvent(L)}}function h(e){if(d.enabled!==!1)switch(e.preventDefault(),e.stopPropagation(),e.touches.length){case 1:w.copy(D(e.touches[0].pageX,e.touches[0].pageY));break;case 2:var t=e.touches[0].pageX-e.touches[1].pageX,r=e.touches[0].pageY-e.touches[1].pageY;S=Math.sqrt(t*t+r*r);var n=(e.touches[0].pageX+e.touches[1].pageX)/2,o=(e.touches[0].pageY+e.touches[1].pageY)/2;E.copy(F(n,o));break;default:y=p.NONE}}function c(e){if(d.enabled!==!1){switch(e.touches.length){case 1:w.copy(D(e.touches[0].pageX,e.touches[0].pageY)),b.copy(w);break;case 2:M=S=0;var t=(e.touches[0].pageX+e.touches[1].pageX)/2,r=(e.touches[0].pageY+e.touches[1].pageY)/2;E.copy(F(t,r)),C.copy(E)}y=p.NONE,d.dispatchEvent(P)}}function f(e){e.preventDefault()}var d=this,p={NONE:-1,ROTATE:0,ZOOM:1,PAN:2,TOUCH_ROTATE:3,TOUCH_ZOOM_PAN:4};this.object=e,this.domElement=null,this.enabled=!1,this.screen={left:0,top:0,width:0,height:0},this.rotateSpeed=1,this.zoomSpeed=1.2,this.panSpeed=.3,this.noRotate=!1,this.noZoom=!1,this.noPan=!1,this.noRoll=!1,this.staticMoving=!1,this.dynamicDampingFactor=.2,this.minDistance=0,this.maxDistance=1/0,this.keys=[65,83,68],this.target=new u.Vector3;var m=1e-6,g=new u.Vector3,y=p.NONE,v=p.NONE,_=new u.Vector3,b=new u.Vector3,w=new u.Vector3,x=new u.Vector2,T=new u.Vector2,M=0,S=0,C=new u.Vector2,E=new u.Vector2;this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.up0=this.object.up.clone();var A={type:"change"},L={type:"start"},P={type:"end"};this.handleResize=function(){if(d.enabled!==!1)if(this.domElement===document)this.screen.left=0,this.screen.top=0,this.screen.width=window.innerWidth,this.screen.height=window.innerHeight;else{var e=this.domElement.getBoundingClientRect(),t=this.domElement.ownerDocument.documentElement;this.screen.left=e.left+window.pageXOffset-t.clientLeft,this.screen.top=e.top+window.pageYOffset-t.clientTop,this.screen.width=e.width,this.screen.height=e.height}},this.handleEvent=function(e){"function"==typeof this[e.type]&&this[e.type](e)};var F=function(){var e=new u.Vector2;return function(t,r){return e.set((t-d.screen.left)/d.screen.width,(r-d.screen.top)/d.screen.height),e}}(),D=function(){var e=new u.Vector3,t=new u.Vector3,r=new u.Vector3;return function(n,o){r.set((n-.5*d.screen.width-d.screen.left)/(.5*d.screen.width),(.5*d.screen.height+d.screen.top-o)/(.5*d.screen.height),0);var i=r.length();return d.noRoll?i<Math.SQRT1_2?r.z=Math.sqrt(1-i*i):r.z=.5/i:i>1?r.normalize():r.z=Math.sqrt(1-i*i),_.copy(d.object.position).sub(d.target),e.copy(d.object.up).setLength(r.y),e.add(t.copy(d.ob