{"version":3,"sources":["webpack:///build/bundle.js","webpack:///webpack/bootstrap 110861404e1422b5c590","webpack:///./~/leapjs/~/underscore/underscore.js","webpack:///./~/gl-matrix/dist/gl-matrix.js","webpack:///./~/events/events.js","webpack:///./~/leapjs/lib/pointable.js","webpack:///./~/leapjs/lib/finger.js","webpack:///./~/leapjs/lib/hand.js","webpack:///./~/keyboardjs/lib/key-combo.js","webpack:///./~/leapjs/lib/frame.js","webpack:///./~/leapjs/lib/gesture.js","webpack:///./~/process/browser.js","webpack:///./src/names.js","webpack:///./~/keyboardjs/lib/locale.js","webpack:///./~/leapjs/lib/bone.js","webpack:///./~/leapjs/lib/circular_buffer.js","webpack:///./~/leapjs/lib/connection/base.js","webpack:///./~/leapjs/lib/dialog.js","webpack:///./~/leapjs/lib/interaction_box.js","webpack:///./~/leapjs/lib/protocol.js","webpack:///./~/random-js/lib/random.js","webpack:///./src/DataGUI.js","webpack:///./src/data.js","webpack:///./src/index.js","webpack:///./src/scenes/GameScene.js","webpack:///./src/scenes/LogoScene.js","webpack:///./src/utils/AssetsLoader.js","webpack:///./src/utils/SecretSymbols.js","webpack:///./src/utils/postprocessing/EffectComposer.js","webpack:///./src/utils/postprocessing/MaskPass.js","webpack:///./src/utils/postprocessing/RenderPass.js","webpack:///./src/utils/postprocessing/ShaderPass.js","webpack:///./src/utils/postprocessing/shaders/BadTVShader.js","webpack:///./src/utils/postprocessing/shaders/CopyShader.js","webpack:///./src/utils/postprocessing/shaders/FilmShader.js","webpack:///./src/utils/postprocessing/shaders/RGBShiftShader.js","webpack:///./src/utils/postprocessing/shaders/StaticShader.js","webpack:///./~/keyboardjs/index.js","webpack:///./~/keyboardjs/lib/keyboard.js","webpack:///./~/keyboardjs/locales/us.js","webpack:///./~/leapjs/lib/connection/browser.js","webpack:///./~/leapjs/lib/connection/node.js","webpack:///./~/leapjs/lib/controller.js","webpack:///./~/leapjs/lib/index.js","webpack:///./~/leapjs/lib/pipeline.js","webpack:///./~/leapjs/lib/ui.js","webpack:///./~/leapjs/lib/ui/cursor.js","webpack:///./~/leapjs/lib/ui/region.js","webpack:///./~/leapjs/lib/version.js","webpack:///./~/leapjs/~/ws/lib/browser.js","webpack:///./~/tween.js/src/Tween.js"],"names":["modules","__webpack_require__","moduleId","installedModules","exports","module","id","loaded","call","m","c","p","root","this","previousUnderscore","_","breaker","ArrayProto","Array","prototype","ObjProto","Object","FuncProto","Function","push","slice","concat","toString","hasOwnProperty","nativeForEach","forEach","nativeMap","map","nativeReduce","reduce","nativeReduceRight","reduceRight","nativeFilter","filter","nativeEvery","every","nativeSome","some","nativeIndexOf","indexOf","nativeLastIndexOf","lastIndexOf","nativeIsArray","isArray","nativeKeys","keys","nativeBind","bind","obj","_wrapped","VERSION","each","iterator","context","length","i","l","key","has","collect","results","value","index","list","reduceError","foldl","inject","memo","initial","arguments","TypeError","foldr","find","detect","result","any","select","reject","all","identity","contains","include","target","invoke","method","args","isFunc","isFunction","apply","pluck","where","attrs","first","isEmpty","findWhere","max","Math","Infinity","computed","min","shuffle","rand","shuffled","random","lookupIterator","sortBy","criteria","sort","left","right","a","b","group","behavior","groupBy","countBy","sortedIndex","array","low","high","mid","toArray","values","size","head","take","n","guard","last","rest","tail","drop","compact","flatten","input","shallow","output","without","difference","uniq","unique","isSorted","seen","union","intersection","item","other","zip","object","from","hasIndex","range","start","stop","step","len","ceil","idx","func","partial","bindAll","funcs","functions","f","memoize","hasher","delay","wait","setTimeout","defer","throttle","timeout","previous","later","Date","now","remaining","clearTimeout","debounce","immediate","callNow","once","ran","wrap","wrapper","compose","after","times","pairs","invert","methods","names","extend","source","prop","pick","copy","omit","defaults","clone","isObject","tap","interceptor","eq","aStack","bStack","className","String","global","multiline","ignoreCase","aCtor","constructor","bCtor","pop","isEqual","isString","isElement","nodeType","name","isArguments","isFinite","isNaN","parseFloat","isNumber","isBoolean","isNull","isUndefined","noConflict","accum","floor","entityMap","escape","&","<",">","\"","'","/","unescape","entityRegexes","RegExp","join","string","replace","match","property","mixin","idCounter","uniqueId","prefix","templateSettings","evaluate","interpolate","noMatch","escapes","\\","\r","\n","\t","
","
","escaper","template","text","data","settings","render","matcher","offset","variable","e","chain","_chain","_global","shim","GLMAT_EPSILON","GLMAT_ARRAY_TYPE","Float32Array","GLMAT_RANDOM","glMatrix","setMatrixArrayType","type","t","degree","PI","toRadian","vec2","create","out","fromValues","x","y","set","add","subtract","sub","multiply","mul","divide","div","scale","scaleAndAdd","distance","sqrt","dist","squaredDistance","sqrDist","squaredLength","sqrLen","negate","normalize","dot","cross","z","lerp","ax","ay","r","cos","sin","transformMat2","transformMat2d","transformMat3","transformMat4","vec","stride","count","fn","arg","str","vec3","az","bx","by","bz","zScale","transformQuat","q","qx","qy","qz","qw","ix","iy","iz","iw","rotateX","rotateY","rotateZ","vec4","w","aw","mat2","transpose","a1","a0","a2","a3","det","adjoint","determinant","b0","b1","b2","b3","rotate","rad","s","v","v0","v1","frob","pow","LDU","L","D","U","mat2d","aa","ab","ac","ad","atx","aty","a4","a5","b4","b5","translate","mat3","fromMat4","a01","a02","a12","a00","a10","a11","a20","a21","a22","b01","b11","b21","b00","b02","b10","b12","b20","b22","fromMat2d","fromQuat","x2","y2","z2","xx","yx","yy","zx","zy","zz","wx","wy","wz","normalFromMat4","a03","a13","a23","a30","a31","a32","a33","b03","b04","b05","b06","b07","b08","b09","mat4","axis","abs","fromRotationTranslation","xy","xz","yz","frustum","bottom","top","near","far","rl","tb","nf","perspective","fovy","aspect","tan","ortho","lr","bt","lookAt","eye","center","up","x0","x1","y0","y1","z0","z1","eyex","eyey","eyez","upx","upy","upz","centerx","centery","centerz","quat","rotationTo","tmpvec3","xUnitVec3","yUnitVec3","setAxisAngle","setAxes","matr","view","fromMat3","bw","calculateW","slerp","omega","cosom","sinom","scale0","scale1","acos","invDot","conjugate","fRoot","fTrace","j","k","EventEmitter","_events","_maxListeners","undefined","defaultMaxListeners","setMaxListeners","emit","er","handler","listeners","error","Error","err","addListener","listener","newListener","warned","console","trace","on","g","removeListener","fired","position","splice","removeAllListeners","ret","listenerCount","evlistener","emitter","Pointable","valid","handId","tool","width","direction","stabilizedTipPosition","tipPosition","tipVelocity","touchZone","touchDistance","timeVisible","hand","frame","Invalid","Bone","Dialog","Finger","dipPosition","pipPosition","mcpPosition","carpPosition","extended","finger","positions","bases","addBones","warnBones","metacarpal","prevJoint","nextJoint","basis","proximal","medial","distal","btipPosition","bones","Hand","palmPosition","palmVelocity","palmNormal","sphereCenter","sphereRadius","pointables","fingers","armBasis","arm","armWidth","elbow","wrist","tools","_translation","_rotation","_scaleFactor","stabilizedPalmPosition","grabStrength","pinchStrength","confidence","rotationAngle","sinceFrame","sinceHand","rot","rotationMatrix","cs","angle","rotAxis","rotationAxis","scaleFactor","exp","translation","pitch","atan2","yaw","roll","pointable","dump","KeyCombo","keyComboStr","sourceStr","subCombos","parseComboStr","keyNames","nextSubCombo","sequenceDeliminator","comboDeliminator","keyDeliminator","subComboStrs","_splitStr","combo","check","pressedKeyNames","startingKeyNameIndex","_checkSubCombo","otherKeyCombo","subCombo","otherSubCombo","keyName","deliminator","d","ca","ci","trim","endIndex","escapedKeyName","createGesture","InteractionBox","Frame","timestamp","hands","handsMap","interactionBox","gestures","pointablesMap","currentFrameRate","gestureIdx","gestureCount","postprocessData","handIdx","handCount","pointableIdx","pointableCount","pointableData","addPointable","thumb","indexFinger","middleFinger","ringFinger","pinky","JSON","stringify","Gesture","gesture","CircleGesture","SwipeGesture","ScreenTapGesture","KeyTapGesture","handIds","pointableIds","duration","state","gestureListener","controller","handlers","gestureMap","gestureTracker","cb","update","builder","complete","frames","lastGesture","lastFrame","startPosition","normal","progress","radius","speed","defaultSetTimout","defaultClearTimeout","runTimeout","fun","cachedSetTimeout","runClearTimeout","marker","cachedClearTimeout","cleanUpNextTick","draining","currentQueue","queue","queueIndex","drainQueue","run","Item","noop","process","nextTick","title","browser","env","argv","version","versions","off","binding","cwd","chdir","dir","umask","defineProperty","SOUND_GAME_MUSIC","SOUND_INTERSECT_CUBE_1","SOUND_INTERSECT_CUBE_2","SOUND_INTERSECT_CUBE_3","SOUND_INTERSECT_PADDLE","SOUND_BOOM","SOUND_VICTORY_VOICE","SOUND_LOSE_VOICE_1","SOUND_LOSE_VOICE_2","SOUND_START_VOICE","IMG_INTERACTOPUS_BG_BLACK","IMG_INTERACTOPUS_BG_TRANS","EVENT_FINAL_BLOCK_KILLED","EVENT_NO_LIVES","Locale","localeName","pressedKeys","_appliedMacros","_keyMap","_killKeyCodes","_macros","bindKeyCode","keyCode","bindMacro","macro","keyCombo","getKeyCodes","keyCodes","getKeyNames","setKillKey","pressKey","_applyMacros","releaseKey","killKeyCodeIndex","_clearMacros","macros","_center","_matrix","displacement","_left","matrix","CircularBuffer","pos","_buf","get","o","chooseProtocol","BaseConnection","opts","host","enableGestures","scheme","getScheme","port","getPort","background","optimizeHMD","requestProtocolVersion","defaultProtocolVersion","protocolVersionVerified","setBackground","setOptimizeHMD","log","getUrl","protocol","sendBackground","sendOptimizeHMD","handleOpen","connected","enabled","gesturesEnabled","send","encode","handleClose","code","reason","disconnect","startReconnection","connection","reconnectionTimer","setInterval","reconnect","stopReconnection","clearInterval","allowReconnect","socket","close","focusedState","connect","handleData","messageEvent","message","parse","setupSocket","reportFocus","sendFocused","options","createElement","element","document","style","textAlign","zIndex","dialog","appendChild","display","margin","padding","color","borderRadius","border","cursor","whiteSpace","transition","innerHTML","onclick","addEventListener","onmouseover","onmouseout","onmousemove","show","body","hide","removeChild","warnOutOfDate","params","url","returnTo","window","location","href","encodeURIComponent","event","popup","open","focus","getElementById","boxShadow","hasWarnedBones","warn","node","height","depth","denormalizePoint","normalizedPosition","normalizePoint","clamp","Event","header","JSONProtocol","focused","frameData","serviceVersion","versionLong","__WEBPACK_AMD_DEFINE_RESULT__","Random","engine","engines","nativeMath","returnValue","generate","addend","toInteger","number","convertSliceArgument","returnUndefined","imul","ah","al","bh","bl","stringRepeat","repeat","pattern","proto","mt19937","Int32Array","refreshData","tmp","temper","seedWithArray","sourceLength","next","uses","getUseCount","discard","seed","autoSeed","generateEntropyArray","browserCrypto","crypto","getRandomValues","getTime","int32","uint32","uint53","uint53Full","int53","int53Full","integer","isPowerOfTwoMinusOne","bitmask","masking","downscaleToLoopCheckedRange","extendedRange","maximum","downscaleToRange","isEvenlyDivisibleByMaxInt32","upscaleWithHighMasking","upscaleToLoopCheckedRange","upscaleWithinU53","highRange","upscaleWithinI53AndLoopCheck","RangeError","realZeroToOneInclusive","realZeroToOneExclusive","real","multiplier","inclusive","bool","isLeastBitTrue","lessThan","probability","percentage","scaled","round","numerator","denominator","begin","end","finish","distribution","picker","downTo","sample","population","sampleSize","tailLength","die","sideCount","dice","dieCount","uuid4","zeroPad","zeroCount","DEFAULT_STRING_POOL","pool","charAt","hex","LOWER_HEX_POOL","lowerHex","upperHex","toUpperCase","upper","date","_classCallCheck","instance","Constructor","_createClass","defineProperties","props","descriptor","enumerable","configurable","writable","protoProps","staticProps","DataGUI","gui","dat","GUI","addSlider","camera","lights","blocks","rotation","sphere","innerSphere","selectedData","delta","isOpen","folder","addFolder","param","block","ball","positionOriginal","_interopRequireWildcard","__esModule","newObj","_interopRequireDefault","default","_defineProperty","_LogoScene","_LogoScene2","_GameScene","_GameScene2","_SecretSymbols","_SecretSymbols2","_AssetsLoader","_AssetsLoader2","_names","App","_sounds","_images","_this","assets","sounds","images","wasGameRun","load","then","init","afterInit","eventLogoEl","locationValueEl","dateValueEl","timeValueEl","secretSymbolsLocation","rootEl","word","symbols","secretSymbolsDate","renderType","secretSymbolsTime","logoScene","_this2","getSound","loop","play","classList","remove","logoEl","reload","goGame","_this3","gameEl","game","goVictory","goLose","disable","enable","reveal","_events2","_DataGUI","_data","_data2","_keyboardjs","_keyboardjs2","_tween","_tween2","_randomJs","_randomJs2","_leapjs","_leapjs2","FIELD_WIDTH","FIELD_HEIGHT","BLOCK_SIZE","SPEED","GameScene","soundsSources","pyramidLevels","paused","renderer","scene","onRenderFnArr","requestAnimationFrame","isBallEnabled","initUi","livesAtBegin","currLives","renderLives","ui","lives","querySelector","html","playAudio","ballDx","ballDz","initSkyAndBoard","initBlocks","initBall","initAudio","paddleTweenData","minY","degToRad","maxY","leapPointBase","_paddleTweenData","iBox","leapPoint","normalizedPoint","normalizedPointBase","deltaY","finalDeltaY","preventRepeat","isLeftPressed","moveLeft","paddleTween","isRightPressed","moveRight","rotatePyramid","_paddleTweenData2","tween","newY1","newY2","Tween","to","onUpdate","onComplete","_this4","_paddleTweenData3","_this5","pyramidTween","blocksGroupRotationY","getRadForPyramid","deg","inc","newDeg","parseInt","newRad","soundName","isLoop","_this6","THREE","Scene","PerspectiveCamera","innerWidth","innerHeight","WebGLRenderer","antialias","shadowMapEnabled","shadowMapSoft","setSize","sortObjects","domElement","_this7","light","SpotLight","shadowCameraNear","castShadow","shadowDarkness","shadowMapWidth","shadowMapHeight","geometry","PlaneGeometry","material","MeshBasicMaterial","sky","Mesh","CubeGeometry","board","matrixAutoUpdate","receiveShadow","SphereGeometry","wireframe","mesh","Object3D","_this8","MeshLambertMaterial","bBox","BoundingBoxHelper","visible","isPaddle","box","intersectsBox","ballBox","rad2deg","ballAngle","atan","newBallAngle","newDx","paddle","_this9","levelNum","level","isCompleted","atLeastOneVisible","changePyramidBlocksYPosition","_this10","currLevel","getBlockOffset","_this11","blocksGroup","blocksGroupPivot","createBlock","isEdge","isFinalBlock","changePyramidBlocksYPositionIfNeeded","victory","yIndex","xIndex","isFinal","initBlocksPaddle","initBlocksBlocks","_this12","deathZone","_EffectComposer","_RenderPass","_ShaderPass","_MaskPass","_CopyShader","_FilmShader","_RGBShiftShader","_BadTVShader","_StaticShader","LOGO_WIDTH","LOGO_HEIGHT","LogoScene","onParamsChange","badTVPass","staticPass","rgbPass","filmPass","badTVParams","rgbParams","staticParams","filmParams","uniforms","distortion","distortion2","rollSpeed","amount","size2","sCount","sIntensity","nIntensity","onToggleShaders","renderPass","copyPass","composer","EffectComposer","addPass","renderToScreen","animate","isEnabled","shaderTime","time","onResize","updateProjectionMatrix","videoTexture","TextureLoader","minFilter","LinearFilter","magFilter","videoMaterial","planeGeometry","plane","RenderPass","ShaderPass","BadTVShader","RGBShiftShader","FilmShader","StaticShader","CopyShader","grayscale","mute","f1","onChange","listen","f2","f4","f3","AssetsLoader","imgSources","imgName","audioName","Promise","resolve","audioPromises","filename","soundUrl","audioPromise","loadAudio","buffer","audioEl","sourceEl","src","imagePromises","imgUrl","imagePromise","loadImage","img","loader","ImageLoader","image","xhr","audioLoader","AudioLoader","MIN_SYMBOLS_LENGTH","SecretSymbols","isRevealed","renderReveleadSymbols","renderSymbolsDate","renderSymbolsTime","renderSymbols","symbolsStrToArr","symbolsStr","arr","secret","innerText","day","month","year","h1","h2","m1","m2","renderTarget","parameters","format","RGBFormat","stencilBuffer","WebGLRenderTarget","renderTarget1","renderTarget2","writeBuffer","readBuffer","passes","swapBuffers","pass","insertPass","maskActive","il","needsSwap","stencilFunc","NOTEQUAL","EQUAL","MaskPass","ClearMaskPass","reset","clear","inverse","colorMask","depthMask","writeValue","clearValue","STENCIL_TEST","stencilOp","REPLACE","ALWAYS","clearStencil","KEEP","overrideMaterial","clearColor","clearAlpha","oldClearColor","Color","oldClearAlpha","getClearColor","getClearAlpha","setClearColor","shader","textureID","UniformsUtils","ShaderMaterial","vertexShader","fragmentShader","OrthographicCamera","quad","tDiffuse","opacity","Keyboard","keyboard","setLocale","targetWindow","targetElement","platform","userAgent","_locale","_currentContext","_contexts","_listeners","_appliedListeners","_locales","_targetElement","_targetWindow","_targetPlatform","_targetUserAgent","_isModernBrowser","_targetKeyDownBinding","_targetKeyUpBinding","_targetResetBinding","_paused","setContext","watch","localeBuilder","locale","_localeName","getLocale","localName","pressHandler","releaseHandler","preventRepeatByDefault","unbind","comboMatches","pressHandlerMatches","releaseHandlerMatches","contextName","releaseAllKeys","getContext","withContext","callback","previousContextName","targetPlatform","targetUserAgent","attachEvent","navigator","_bindEvent","_unbindEvent","_applyBindings","_clearBindings","pause","resume","eventName","removeEventListener","detachEvent","_getGroupedListeners","listenerGroups","listenerGroupMap","mapIndex","fromCharCode","capitalKeyName","leftCommandKeyCode","rightCommandKeyCode","semicolonKeyCode","dashKeyCode","BrowserConnection","startFocusLoop","stopFocusLoop","__proto__","useSecure","WebSocket","onopen","onclose","onmessage","onerror","focusDetectorTimer","propertyName","hidden","mozHidden","msHidden","webkitHidden","windowVisible","focusListener","updateFocusState","blurListener","isVisible","NodeConnection","Pipeline","Controller","inNode","frameEventName","useAnimationLoop","suppressAnimationLoop","loopWhileDisconnected","useAllPlugins","checkVersion","animationFrameRequested","onAnimationFrame","lastConnectionFrame","history","lastValidFrame","accumulatedGestures","connectionType","inBrowser","streamingCount","devices","plugins","_pluginPipelineSteps","_pluginExtendedMethods","useRegisteredPlugins","setupFrameEvents","setupConnectionEvents","startAnimationLoop","creator","inBackgroundPage","chrome","extension","getBackgroundPage","streaming","num","addStep","pipeline","processFrame","processFinishedFrame","historyIdx","emitHandEvents","backfillStreamingStartedEventsHandler","info","attached","backfillStreamingStoppedEvents","deviceId","checkOutOfDate","evt","oldInfo","changed","assert","protocolVersion","sV","pV","_pluginFactories","plugin","pluginName","factory","setPluginCallbacks","addWrappedStep","setPluginMethods","hash","klass","use","functionOrHash","pluginFactory","pluginInstance","stopUsing","extMethodHash","steps","extMethodHashes","removeStep","methodName","UI","loopController","stepsLength","dependencies","Region","Cursor","cursorPosition","Vector","enteredFrame","hasPointables","region","nearThreshold","setupNearRegion","updatePosition","clipper","nearRegion","mapToXY","normalized","full","major","minor","MozWebSocket","__WEBPACK_AMD_DEFINE_ARRAY__","TWEEN","_tweens","getAll","removeAll","preserve","hrtime","performance","_object","_valuesStart","_valuesEnd","_valuesStartRepeat","_duration","_repeat","_yoyo","_isPlaying","_reversed","_delayTime","_startTime","_easingFunction","Easing","Linear","None","_interpolationFunction","Interpolation","_chainedTweens","_onStartCallback","_onStartCallbackFired","_onUpdateCallback","_onCompleteCallback","_onStopCallback","field","properties","stopChainedTweens","numChainedTweens","yoyo","easing","interpolation","onStart","onStop","elapsed","Quadratic","In","Out","InOut","Cubic","Quartic","Quintic","Sinusoidal","Exponential","Circular","Elastic","Back","Bounce","Utils","Bezier","pw","bn","Bernstein","CatmullRom","p0","p1","fc","Factorial","p2","p3","t2","t3"],"mappings":"CAAS,SAAUA,GCInB,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAE,OAGA,IAAAC,GAAAF,EAAAD,IACAE,WACAE,GAAAJ,EACAK,UAUA,OANAP,GAAAE,GAAAM,KAAAH,EAAAD,QAAAC,IAAAD,QAAAH,GAGAI,EAAAE,UAGAF,EAAAD,QAvBA,GAAAD,KAqCA,OATAF,GAAAQ,EAAAT,EAGAC,EAAAS,EAAAP,EAGAF,EAAAU,EAAA,IAGAV,EAAA,KDMM,SAASI,EAAQD,EAASH,GAE/BI,EAAOD,QAAUH,EAAoB,KAKhC,SAASI,EAAQD,EAASH,eExChC,GAAAW,GAAAC,KAGAC,EAAAF,EAAAG,EAGAC,KAGAC,EAAAC,MAAAC,UAAAC,EAAAC,OAAAF,UAAAG,EAAAC,SAAAJ,UAGAK,EAAAP,EAAAO,KACAC,EAAAR,EAAAQ,MACAC,EAAAT,EAAAS,OACAC,EAAAP,EAAAO,SACAC,EAAAR,EAAAQ,eAKAC,EAAAZ,EAAAa,QACAC,EAAAd,EAAAe,IACAC,EAAAhB,EAAAiB,OACAC,EAAAlB,EAAAmB,YACAC,EAAApB,EAAAqB,OACAC,EAAAtB,EAAAuB,MACAC,EAAAxB,EAAAyB,KACAC,EAAA1B,EAAA2B,QACAC,EAAA5B,EAAA6B,YACAC,EAAA7B,MAAA8B,QACAC,EAAA5B,OAAA6B,KACAC,EAAA7B,EAAA8B,KAGArC,EAAA,SAAAsC,GACA,MAAAA,aAAAtC,GAAAsC,EACAxC,eAAAE,QACAF,KAAAyC,SAAAD,GADA,GAAAtC,GAAAsC,GASA,oBAAAhD,MAAAD,UACAA,EAAAC,EAAAD,QAAAW,GAEAX,EAAA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AA1T,IAAA,KAAA0T,EAAA1T,GAAA0T,EAAA7W,EAAAmD,EAAA,EAAAnD,EAAAmD,EAAA,GAAA0T,EAAA7W,EAAAmD,EAAA,EAAAnD,EAAAmD,EAAA,GAAA4G,EAAA5G,IAMA6hD,OAEAjC,OAAA,SAAAuC,EAAAC,EAAAh0C,GAEA,OAAAg0C,EAAAD,GAAA/zC,EAAA+zC,GAIAF,UAAA,SAAA19C,EAAAvE,GAEA,GAAAqiD,GAAA7D,EAAAuB,cAAA8B,MAAAS,SAEA,OAAAD,GAAA99C,GAAA89C,EAAAriD,GAAAqiD,EAAA99C,EAAAvE,IAIAsiD,UAAA,WAEA,GAAA/+C,IAAA,EAEA,iBAAAgB,GAEA,GAAAkP,GAAA,CAEA,IAAAlQ,EAAAgB,GACA,MAAAhB,GAAAgB,EAGA,QAAAvE,GAAAuE,EAAmBvE,EAAA,EAAOA,IAC1ByT,GAAAzT,CAIA,OADAuD,GAAAgB,GAAAkP,EACAA,MAMAyuC,WAAA,SAAAC,EAAAC,EAAAG,EAAAC,EAAAp0C,GAEA,GAAAuF,GAAA,IAAA4uC,EAAAJ,GACAvuC,EAAA,IAAA4uC,EAAAJ,GACAK,EAAAr0C,IACAs0C,EAAAt0C,EAAAq0C,CAEA,UAAAL,EAAA,EAAAG,EAAA5uC,EAAAC,GAAA8uC,MAAAN,EAAA,EAAAG,EAAA,EAAA5uC,EAAAC,GAAA6uC,EAAA9uC,EAAAvF,EAAAg0C,KASA,SAAAplD,GAKAuhD,KAAAhrB,EAAA,WACA,MAAAirB,IACGv8C,MAAAzF,EAAA+hD,KAAAliC,SAAAkX,IAAA92B,EAAAD,QAAA+2B,KAcFt2B,QlDi4a6BL,KAAKJ,EAASH,EAAoB","file":"./build/bundle.js","sourcesContent":["/******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId])\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\texports: {},\n/******/ \t\t\tid: moduleId,\n/******/ \t\t\tloaded: false\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.loaded = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"/\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(0);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ function(module, exports, __webpack_require__) {\n\n\tmodule.exports = __webpack_require__(22);\n\n\n/***/ },\n/* 1 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t// Underscore.js 1.4.4\n\t// http://underscorejs.org\n\t// (c) 2009-2013 Jeremy Ashkenas, DocumentCloud Inc.\n\t// Underscore may be freely distributed under the MIT license.\n\t\n\t(function() {\n\t\n\t // Baseline setup\n\t // --------------\n\t\n\t // Establish the root object, `window` in the browser, or `global` on the server.\n\t var root = this;\n\t\n\t // Save the previous value of the `_` variable.\n\t var previousUnderscore = root._;\n\t\n\t // Establish the object that gets returned to break out of a loop iteration.\n\t var breaker = {};\n\t\n\t // Save bytes in the minified (but not gzipped) version:\n\t var ArrayProto = Array.prototype, ObjProto = Object.prototype, FuncProto = Function.prototype;\n\t\n\t // Create quick reference variables for speed access to core prototypes.\n\t var push = ArrayProto.push,\n\t slice = ArrayProto.slice,\n\t concat = ArrayProto.concat,\n\t toString = ObjProto.toString,\n\t hasOwnProperty = ObjProto.hasOwnProperty;\n\t\n\t // All **ECMAScript 5** native function implementations that we hope to use\n\t // are declared here.\n\t var\n\t nativeForEach = ArrayProto.forEach,\n\t nativeMap = ArrayProto.map,\n\t nativeReduce = ArrayProto.reduce,\n\t nativeReduceRight = ArrayProto.reduceRight,\n\t nativeFilter = ArrayProto.filter,\n\t nativeEvery = ArrayProto.every,\n\t nativeSome = ArrayProto.some,\n\t nativeIndexOf = ArrayProto.indexOf,\n\t nativeLastIndexOf = ArrayProto.lastIndexOf,\n\t nativeIsArray = Array.isArray,\n\t nativeKeys = Object.keys,\n\t nativeBind = FuncProto.bind;\n\t\n\t // Create a safe reference to the Underscore object for use below.\n\t var _ = function(obj) {\n\t if (obj instanceof _) return obj;\n\t if (!(this instanceof _)) return new _(obj);\n\t this._wrapped = obj;\n\t };\n\t\n\t // Export the Underscore object for **Node.js**, with\n\t // backwards-compatibility for the old `require()` API. If we're in\n\t // the browser, add `_` as a global object via a string identifier,\n\t // for Closure Compiler \"advanced\" mode.\n\t if (true) {\n\t if (typeof module !== 'undefined' && module.exports) {\n\t exports = module.exports = _;\n\t }\n\t exports._ = _;\n\t } else {\n\t root._ = _;\n\t }\n\t\n\t // Current version.\n\t _.VERSION = '1.4.4';\n\t\n\t // Collection Functions\n\t // --------------------\n\t\n\t // The cornerstone, an `each` implementation, aka `forEach`.\n\t // Handles objects with the built-in `forEach`, arrays, and raw objects.\n\t // Delegates to **ECMAScript 5**'s native `forEach` if available.\n\t var each = _.each = _.forEach = function(obj, iterator, context) {\n\t if (obj == null) return;\n\t if (nativeForEach && obj.forEach === nativeForEach) {\n\t obj.forEach(iterator, context);\n\t } else if (obj.length === +obj.length) {\n\t for (var i = 0, l = obj.length; i < l; i++) {\n\t if (iterator.call(context, obj[i], i, obj) === breaker) return;\n\t }\n\t } else {\n\t for (var key in obj) {\n\t if (_.has(obj, key)) {\n\t if (iterator.call(context, obj[key], key, obj) === breaker) return;\n\t }\n\t }\n\t }\n\t };\n\t\n\t // Return the results of applying the iterator to each element.\n\t // Delegates to **ECMAScript 5**'s native `map` if available.\n\t _.map = _.collect = function(obj, iterator, context) {\n\t var results = [];\n\t if (obj == null) return results;\n\t if (nativeMap && obj.map === nativeMap) return obj.map(iterator, context);\n\t each(obj, function(value, index, list) {\n\t results[results.length] = iterator.call(context, value, index, list);\n\t });\n\t return results;\n\t };\n\t\n\t var reduceError = 'Reduce of empty array with no initial value';\n\t\n\t // **Reduce** builds up a single result from a list of values, aka `inject`,\n\t // or `foldl`. Delegates to **ECMAScript 5**'s native `reduce` if available.\n\t _.reduce = _.foldl = _.inject = function(obj, iterator, memo, context) {\n\t var initial = arguments.length > 2;\n\t if (obj == null) obj = [];\n\t if (nativeReduce && obj.reduce === nativeReduce) {\n\t if (context) iterator = _.bind(iterator, context);\n\t return initial ? obj.reduce(iterator, memo) : obj.reduce(iterator);\n\t }\n\t each(obj, function(value, index, list) {\n\t if (!initial) {\n\t memo = value;\n\t initial = true;\n\t } else {\n\t memo = iterator.call(context, memo, value, index, list);\n\t }\n\t });\n\t if (!initial) throw new TypeError(reduceError);\n\t return memo;\n\t };\n\t\n\t // The right-associative version of reduce, also known as `foldr`.\n\t // Delegates to **ECMAScript 5**'s native `reduceRight` if available.\n\t _.reduceRight = _.foldr = function(obj, iterator, memo, context) {\n\t var initial = arguments.length > 2;\n\t if (obj == null) obj = [];\n\t if (nativeReduceRight && obj.reduceRight === nativeReduceRight) {\n\t if (context) iterator = _.bind(iterator, context);\n\t return initial ? obj.reduceRight(iterator, memo) : obj.reduceRight(iterator);\n\t }\n\t var length = obj.length;\n\t if (length !== +length) {\n\t var keys = _.keys(obj);\n\t length = keys.length;\n\t }\n\t each(obj, function(value, index, list) {\n\t index = keys ? keys[--length] : --length;\n\t if (!initial) {\n\t memo = obj[index];\n\t initial = true;\n\t } else {\n\t memo = iterator.call(context, memo, obj[index], index, list);\n\t }\n\t });\n\t if (!initial) throw new TypeError(reduceError);\n\t return memo;\n\t };\n\t\n\t // Return the first value which passes a truth test. Aliased as `detect`.\n\t _.find = _.detect = function(obj, iterator, context) {\n\t var result;\n\t any(obj, function(value, index, list) {\n\t if (iterator.call(context, value, index, list)) {\n\t result = value;\n\t return true;\n\t }\n\t });\n\t return result;\n\t };\n\t\n\t // Return all the elements that pass a truth test.\n\t // Delegates to **ECMAScript 5**'s native `filter` if available.\n\t // Aliased as `select`.\n\t _.filter = _.select = function(obj, iterator, context) {\n\t var results = [];\n\t if (obj == null) return results;\n\t if (nativeFilter && obj.filter === nativeFilter) return obj.filter(iterator, context);\n\t each(obj, function(value, index, list) {\n\t if (iterator.call(context, value, index, list)) results[results.length] = value;\n\t });\n\t return results;\n\t };\n\t\n\t // Return all the elements for which a truth test fails.\n\t _.reject = function(obj, iterator, context) {\n\t return _.filter(obj, function(value, index, list) {\n\t return !iterator.call(context, value, index, list);\n\t }, context);\n\t };\n\t\n\t // Determine whether all of the elements match a truth test.\n\t // Delegates to **ECMAScript 5**'s native `every` if available.\n\t // Aliased as `all`.\n\t _.every = _.all = function(obj, iterator, context) {\n\t iterator || (iterator = _.identity);\n\t var result = true;\n\t if (obj == null) return result;\n\t if (nativeEvery && obj.every === nativeEvery) return obj.every(iterator, context);\n\t each(obj, function(value, index, list) {\n\t if (!(result = result && iterator.call(context, value, index, list))) return breaker;\n\t });\n\t return !!result;\n\t };\n\t\n\t // Determine if at least one element in the object matches a truth test.\n\t // Delegates to **ECMAScript 5**'s native `some` if available.\n\t // Aliased as `any`.\n\t var any = _.some = _.any = function(obj, iterator, context) {\n\t iterator || (iterator = _.identity);\n\t var result = false;\n\t if (obj == null) return result;\n\t if (nativeSome && obj.some === nativeSome) return obj.some(iterator, context);\n\t each(obj, function(value, index, list) {\n\t if (result || (result = iterator.call(context, value, index, list))) return breaker;\n\t });\n\t return !!result;\n\t };\n\t\n\t // Determine if the array or object contains a given value (using `===`).\n\t // Aliased as `include`.\n\t _.contains = _.include = function(obj, target) {\n\t if (obj == null) return false;\n\t if (nativeIndexOf && obj.indexOf === nativeIndexOf) return obj.indexOf(target) != -1;\n\t return any(obj, function(value) {\n\t return value === target;\n\t });\n\t };\n\t\n\t // Invoke a method (with arguments) on every item in a collection.\n\t _.invoke = function(obj, method) {\n\t var args = slice.call(arguments, 2);\n\t var isFunc = _.isFunction(method);\n\t return _.map(obj, function(value) {\n\t return (isFunc ? method : value[method]).apply(value, args);\n\t });\n\t };\n\t\n\t // Convenience version of a common use case of `map`: fetching a property.\n\t _.pluck = function(obj, key) {\n\t return _.map(obj, function(value){ return value[key]; });\n\t };\n\t\n\t // Convenience version of a common use case of `filter`: selecting only objects\n\t // containing specific `key:value` pairs.\n\t _.where = function(obj, attrs, first) {\n\t if (_.isEmpty(attrs)) return first ? null : [];\n\t return _[first ? 'find' : 'filter'](obj, function(value) {\n\t for (var key in attrs) {\n\t if (attrs[key] !== value[key]) return false;\n\t }\n\t return true;\n\t });\n\t };\n\t\n\t // Convenience version of a common use case of `find`: getting the first object\n\t // containing specific `key:value` pairs.\n\t _.findWhere = function(obj, attrs) {\n\t return _.where(obj, attrs, true);\n\t };\n\t\n\t // Return the maximum element or (element-based computation).\n\t // Can't optimize arrays of integers longer than 65,535 elements.\n\t // See: https://bugs.webkit.org/show_bug.cgi?id=80797\n\t _.max = function(obj, iterator, context) {\n\t if (!iterator && _.isArray(obj) && obj[0] === +obj[0] && obj.length < 65535) {\n\t return Math.max.apply(Math, obj);\n\t }\n\t if (!iterator && _.isEmpty(obj)) return -Infinity;\n\t var result = {computed : -Infinity, value: -Infinity};\n\t each(obj, function(value, index, list) {\n\t var computed = iterator ? iterator.call(context, value, index, list) : value;\n\t computed >= result.computed && (result = {value : value, computed : computed});\n\t });\n\t return result.value;\n\t };\n\t\n\t // Return the minimum element (or element-based computation).\n\t _.min = function(obj, iterator, context) {\n\t if (!iterator && _.isArray(obj) && obj[0] === +obj[0] && obj.length < 65535) {\n\t return Math.min.apply(Math, obj);\n\t }\n\t if (!iterator && _.isEmpty(obj)) return Infinity;\n\t var result = {computed : Infinity, value: Infinity};\n\t each(obj, function(value, index, list) {\n\t var computed = iterator ? iterator.call(context, value, index, list) : value;\n\t computed < result.computed && (result = {value : value, computed : computed});\n\t });\n\t return result.value;\n\t };\n\t\n\t // Shuffle an array.\n\t _.shuffle = function(obj) {\n\t var rand;\n\t var index = 0;\n\t var shuffled = [];\n\t each(obj, function(value) {\n\t rand = _.random(index++);\n\t shuffled[index - 1] = shuffled[rand];\n\t shuffled[rand] = value;\n\t });\n\t return shuffled;\n\t };\n\t\n\t // An internal function to generate lookup iterators.\n\t var lookupIterator = function(value) {\n\t return _.isFunction(value) ? value : function(obj){ return obj[value]; };\n\t };\n\t\n\t // Sort the object's values by a criterion produced by an iterator.\n\t _.sortBy = function(obj, value, context) {\n\t var iterator = lookupIterator(value);\n\t return _.pluck(_.map(obj, function(value, index, list) {\n\t return {\n\t value : value,\n\t index : index,\n\t criteria : iterator.call(context, value, index, list)\n\t };\n\t }).sort(function(left, right) {\n\t var a = left.criteria;\n\t var b = right.criteria;\n\t if (a !== b) {\n\t if (a > b || a === void 0) return 1;\n\t if (a < b || b === void 0) return -1;\n\t }\n\t return left.index < right.index ? -1 : 1;\n\t }), 'value');\n\t };\n\t\n\t // An internal function used for aggregate \"group by\" operations.\n\t var group = function(obj, value, context, behavior) {\n\t var result = {};\n\t var iterator = lookupIterator(value || _.identity);\n\t each(obj, function(value, index) {\n\t var key = iterator.call(context, value, index, obj);\n\t behavior(result, key, value);\n\t });\n\t return result;\n\t };\n\t\n\t // Groups the object's values by a criterion. Pass either a string attribute\n\t // to group by, or a function that returns the criterion.\n\t _.groupBy = function(obj, value, context) {\n\t return group(obj, value, context, function(result, key, value) {\n\t (_.has(result, key) ? result[key] : (result[key] = [])).push(value);\n\t });\n\t };\n\t\n\t // Counts instances of an object that group by a certain criterion. Pass\n\t // either a string attribute to count by, or a function that returns the\n\t // criterion.\n\t _.countBy = function(obj, value, context) {\n\t return group(obj, value, context, function(result, key) {\n\t if (!_.has(result, key)) result[key] = 0;\n\t result[key]++;\n\t });\n\t };\n\t\n\t // Use a comparator function to figure out the smallest index at which\n\t // an object should be inserted so as to maintain order. Uses binary search.\n\t _.sortedIndex = function(array, obj, iterator, context) {\n\t iterator = iterator == null ? _.identity : lookupIterator(iterator);\n\t var value = iterator.call(context, obj);\n\t var low = 0, high = array.length;\n\t while (low < high) {\n\t var mid = (low + high) >>> 1;\n\t iterator.call(context, array[mid]) < value ? low = mid + 1 : high = mid;\n\t }\n\t return low;\n\t };\n\t\n\t // Safely convert anything iterable into a real, live array.\n\t _.toArray = function(obj) {\n\t if (!obj) return [];\n\t if (_.isArray(obj)) return slice.call(obj);\n\t if (obj.length === +obj.length) return _.map(obj, _.identity);\n\t return _.values(obj);\n\t };\n\t\n\t // Return the number of elements in an object.\n\t _.size = function(obj) {\n\t if (obj == null) return 0;\n\t return (obj.length === +obj.length) ? obj.length : _.keys(obj).length;\n\t };\n\t\n\t // Array Functions\n\t // ---------------\n\t\n\t // Get the first element of an array. Passing **n** will return the first N\n\t // values in the array. Aliased as `head` and `take`. The **guard** check\n\t // allows it to work with `_.map`.\n\t _.first = _.head = _.take = function(array, n, guard) {\n\t if (array == null) return void 0;\n\t return (n != null) && !guard ? slice.call(array, 0, n) : array[0];\n\t };\n\t\n\t // Returns everything but the last entry of the array. Especially useful on\n\t // the arguments object. Passing **n** will return all the values in\n\t // the array, excluding the last N. The **guard** check allows it to work with\n\t // `_.map`.\n\t _.initial = function(array, n, guard) {\n\t return slice.call(array, 0, array.length - ((n == null) || guard ? 1 : n));\n\t };\n\t\n\t // Get the last element of an array. Passing **n** will return the last N\n\t // values in the array. The **guard** check allows it to work with `_.map`.\n\t _.last = function(array, n, guard) {\n\t if (array == null) return void 0;\n\t if ((n != null) && !guard) {\n\t return slice.call(array, Math.max(array.length - n, 0));\n\t } else {\n\t return array[array.length - 1];\n\t }\n\t };\n\t\n\t // Returns everything but the first entry of the array. Aliased as `tail` and `drop`.\n\t // Especially useful on the arguments object. Passing an **n** will return\n\t // the rest N values in the array. The **guard**\n\t // check allows it to work with `_.map`.\n\t _.rest = _.tail = _.drop = function(array, n, guard) {\n\t return slice.call(array, (n == null) || guard ? 1 : n);\n\t };\n\t\n\t // Trim out all falsy values from an array.\n\t _.compact = function(array) {\n\t return _.filter(array, _.identity);\n\t };\n\t\n\t // Internal implementation of a recursive `flatten` function.\n\t var flatten = function(input, shallow, output) {\n\t each(input, function(value) {\n\t if (_.isArray(value)) {\n\t shallow ? push.apply(output, value) : flatten(value, shallow, output);\n\t } else {\n\t output.push(value);\n\t }\n\t });\n\t return output;\n\t };\n\t\n\t // Return a completely flattened version of an array.\n\t _.flatten = function(array, shallow) {\n\t return flatten(array, shallow, []);\n\t };\n\t\n\t // Return a version of the array that does not contain the specified value(s).\n\t _.without = function(array) {\n\t return _.difference(array, slice.call(arguments, 1));\n\t };\n\t\n\t // Produce a duplicate-free version of the array. If the array has already\n\t // been sorted, you have the option of using a faster algorithm.\n\t // Aliased as `unique`.\n\t _.uniq = _.unique = function(array, isSorted, iterator, context) {\n\t if (_.isFunction(isSorted)) {\n\t context = iterator;\n\t iterator = isSorted;\n\t isSorted = false;\n\t }\n\t var initial = iterator ? _.map(array, iterator, context) : array;\n\t var results = [];\n\t var seen = [];\n\t each(initial, function(value, index) {\n\t if (isSorted ? (!index || seen[seen.length - 1] !== value) : !_.contains(seen, value)) {\n\t seen.push(value);\n\t results.push(array[index]);\n\t }\n\t });\n\t return results;\n\t };\n\t\n\t // Produce an array that contains the union: each distinct element from all of\n\t // the passed-in arrays.\n\t _.union = function() {\n\t return _.uniq(concat.apply(ArrayProto, arguments));\n\t };\n\t\n\t // Produce an array that contains every item shared between all the\n\t // passed-in arrays.\n\t _.intersection = function(array) {\n\t var rest = slice.call(arguments, 1);\n\t return _.filter(_.uniq(array), function(item) {\n\t return _.every(rest, function(other) {\n\t return _.indexOf(other, item) >= 0;\n\t });\n\t });\n\t };\n\t\n\t // Take the difference between one array and a number of other arrays.\n\t // Only the elements present in just the first array will remain.\n\t _.difference = function(array) {\n\t var rest = concat.apply(ArrayProto, slice.call(arguments, 1));\n\t return _.filter(array, function(value){ return !_.contains(rest, value); });\n\t };\n\t\n\t // Zip together multiple lists into a single array -- elements that share\n\t // an index go together.\n\t _.zip = function() {\n\t var args = slice.call(arguments);\n\t var length = _.max(_.pluck(args, 'length'));\n\t var results = new Array(length);\n\t for (var i = 0; i < length; i++) {\n\t results[i] = _.pluck(args, \"\" + i);\n\t }\n\t return results;\n\t };\n\t\n\t // Converts lists into objects. Pass either a single array of `[key, value]`\n\t // pairs, or two parallel arrays of the same length -- one of keys, and one of\n\t // the corresponding values.\n\t _.object = function(list, values) {\n\t if (list == null) return {};\n\t var result = {};\n\t for (var i = 0, l = list.length; i < l; i++) {\n\t if (values) {\n\t result[list[i]] = values[i];\n\t } else {\n\t result[list[i][0]] = list[i][1];\n\t }\n\t }\n\t return result;\n\t };\n\t\n\t // If the browser doesn't supply us with indexOf (I'm looking at you, **MSIE**),\n\t // we need this function. Return the position of the first occurrence of an\n\t // item in an array, or -1 if the item is not included in the array.\n\t // Delegates to **ECMAScript 5**'s native `indexOf` if available.\n\t // If the array is large and already in sort order, pass `true`\n\t // for **isSorted** to use binary search.\n\t _.indexOf = function(array, item, isSorted) {\n\t if (array == null) return -1;\n\t var i = 0, l = array.length;\n\t if (isSorted) {\n\t if (typeof isSorted == 'number') {\n\t i = (isSorted < 0 ? Math.max(0, l + isSorted) : isSorted);\n\t } else {\n\t i = _.sortedIndex(array, item);\n\t return array[i] === item ? i : -1;\n\t }\n\t }\n\t if (nativeIndexOf && array.indexOf === nativeIndexOf) return array.indexOf(item, isSorted);\n\t for (; i < l; i++) if (array[i] === item) return i;\n\t return -1;\n\t };\n\t\n\t // Delegates to **ECMAScript 5**'s native `lastIndexOf` if available.\n\t _.lastIndexOf = function(array, item, from) {\n\t if (array == null) return -1;\n\t var hasIndex = from != null;\n\t if (nativeLastIndexOf && array.lastIndexOf === nativeLastIndexOf) {\n\t return hasIndex ? array.lastIndexOf(item, from) : array.lastIndexOf(item);\n\t }\n\t var i = (hasIndex ? from : array.length);\n\t while (i--) if (array[i] === item) return i;\n\t return -1;\n\t };\n\t\n\t // Generate an integer Array containing an arithmetic progression. A port of\n\t // the native Python `range()` function. See\n\t // [the Python documentation](http://docs.python.org/library/functions.html#range).\n\t _.range = function(start, stop, step) {\n\t if (arguments.length <= 1) {\n\t stop = start || 0;\n\t start = 0;\n\t }\n\t step = arguments[2] || 1;\n\t\n\t var len = Math.max(Math.ceil((stop - start) / step), 0);\n\t var idx = 0;\n\t var range = new Array(len);\n\t\n\t while(idx < len) {\n\t range[idx++] = start;\n\t start += step;\n\t }\n\t\n\t return range;\n\t };\n\t\n\t // Function (ahem) Functions\n\t // ------------------\n\t\n\t // Create a function bound to a given object (assigning `this`, and arguments,\n\t // optionally). Delegates to **ECMAScript 5**'s native `Function.bind` if\n\t // available.\n\t _.bind = function(func, context) {\n\t if (func.bind === nativeBind && nativeBind) return nativeBind.apply(func, slice.call(arguments, 1));\n\t var args = slice.call(arguments, 2);\n\t return function() {\n\t return func.apply(context, args.concat(slice.call(arguments)));\n\t };\n\t };\n\t\n\t // Partially apply a function by creating a version that has had some of its\n\t // arguments pre-filled, without changing its dynamic `this` context.\n\t _.partial = function(func) {\n\t var args = slice.call(arguments, 1);\n\t return function() {\n\t return func.apply(this, args.concat(slice.call(arguments)));\n\t };\n\t };\n\t\n\t // Bind all of an object's methods to that object. Useful for ensuring that\n\t // all callbacks defined on an object belong to it.\n\t _.bindAll = function(obj) {\n\t var funcs = slice.call(arguments, 1);\n\t if (funcs.length === 0) funcs = _.functions(obj);\n\t each(funcs, function(f) { obj[f] = _.bind(obj[f], obj); });\n\t return obj;\n\t };\n\t\n\t // Memoize an expensive function by storing its results.\n\t _.memoize = function(func, hasher) {\n\t var memo = {};\n\t hasher || (hasher = _.identity);\n\t return function() {\n\t var key = hasher.apply(this, arguments);\n\t return _.has(memo, key) ? memo[key] : (memo[key] = func.apply(this, arguments));\n\t };\n\t };\n\t\n\t // Delays a function for the given number of milliseconds, and then calls\n\t // it with the arguments supplied.\n\t _.delay = function(func, wait) {\n\t var args = slice.call(arguments, 2);\n\t return setTimeout(function(){ return func.apply(null, args); }, wait);\n\t };\n\t\n\t // Defers a function, scheduling it to run after the current call stack has\n\t // cleared.\n\t _.defer = function(func) {\n\t return _.delay.apply(_, [func, 1].concat(slice.call(arguments, 1)));\n\t };\n\t\n\t // Returns a function, that, when invoked, will only be triggered at most once\n\t // during a given window of time.\n\t _.throttle = function(func, wait) {\n\t var context, args, timeout, result;\n\t var previous = 0;\n\t var later = function() {\n\t previous = new Date;\n\t timeout = null;\n\t result = func.apply(context, args);\n\t };\n\t return function() {\n\t var now = new Date;\n\t var remaining = wait - (now - previous);\n\t context = this;\n\t args = arguments;\n\t if (remaining <= 0) {\n\t clearTimeout(timeout);\n\t timeout = null;\n\t previous = now;\n\t result = func.apply(context, args);\n\t } else if (!timeout) {\n\t timeout = setTimeout(later, remaining);\n\t }\n\t return result;\n\t };\n\t };\n\t\n\t // Returns a function, that, as long as it continues to be invoked, will not\n\t // be triggered. The function will be called after it stops being called for\n\t // N milliseconds. If `immediate` is passed, trigger the function on the\n\t // leading edge, instead of the trailing.\n\t _.debounce = function(func, wait, immediate) {\n\t var timeout, result;\n\t return function() {\n\t var context = this, args = arguments;\n\t var later = function() {\n\t timeout = null;\n\t if (!immediate) result = func.apply(context, args);\n\t };\n\t var callNow = immediate && !timeout;\n\t clearTimeout(timeout);\n\t timeout = setTimeout(later, wait);\n\t if (callNow) result = func.apply(context, args);\n\t return result;\n\t };\n\t };\n\t\n\t // Returns a function that will be executed at most one time, no matter how\n\t // often you call it. Useful for lazy initialization.\n\t _.once = function(func) {\n\t var ran = false, memo;\n\t return function() {\n\t if (ran) return memo;\n\t ran = true;\n\t memo = func.apply(this, arguments);\n\t func = null;\n\t return memo;\n\t };\n\t };\n\t\n\t // Returns the first function passed as an argument to the second,\n\t // allowing you to adjust arguments, run code before and after, and\n\t // conditionally execute the original function.\n\t _.wrap = function(func, wrapper) {\n\t return function() {\n\t var args = [func];\n\t push.apply(args, arguments);\n\t return wrapper.apply(this, args);\n\t };\n\t };\n\t\n\t // Returns a function that is the composition of a list of functions, each\n\t // consuming the return value of the function that follows.\n\t _.compose = function() {\n\t var funcs = arguments;\n\t return function() {\n\t var args = arguments;\n\t for (var i = funcs.length - 1; i >= 0; i--) {\n\t args = [funcs[i].apply(this, args)];\n\t }\n\t return args[0];\n\t };\n\t };\n\t\n\t // Returns a function that will only be executed after being called N times.\n\t _.after = function(times, func) {\n\t if (times <= 0) return func();\n\t return function() {\n\t if (--times < 1) {\n\t return func.apply(this, arguments);\n\t }\n\t };\n\t };\n\t\n\t // Object Functions\n\t // ----------------\n\t\n\t // Retrieve the names of an object's properties.\n\t // Delegates to **ECMAScript 5**'s native `Object.keys`\n\t _.keys = nativeKeys || function(obj) {\n\t if (obj !== Object(obj)) throw new TypeError('Invalid object');\n\t var keys = [];\n\t for (var key in obj) if (_.has(obj, key)) keys[keys.length] = key;\n\t return keys;\n\t };\n\t\n\t // Retrieve the values of an object's properties.\n\t _.values = function(obj) {\n\t var values = [];\n\t for (var key in obj) if (_.has(obj, key)) values.push(obj[key]);\n\t return values;\n\t };\n\t\n\t // Convert an object into a list of `[key, value]` pairs.\n\t _.pairs = function(obj) {\n\t var pairs = [];\n\t for (var key in obj) if (_.has(obj, key)) pairs.push([key, obj[key]]);\n\t return pairs;\n\t };\n\t\n\t // Invert the keys and values of an object. The values must be serializable.\n\t _.invert = function(obj) {\n\t var result = {};\n\t for (var key in obj) if (_.has(obj, key)) result[obj[key]] = key;\n\t return result;\n\t };\n\t\n\t // Return a sorted list of the function names available on the object.\n\t // Aliased as `methods`\n\t _.functions = _.methods = function(obj) {\n\t var names = [];\n\t for (var key in obj) {\n\t if (_.isFunction(obj[key])) names.push(key);\n\t }\n\t return names.sort();\n\t };\n\t\n\t // Extend a given object with all the properties in passed-in object(s).\n\t _.extend = function(obj) {\n\t each(slice.call(arguments, 1), function(source) {\n\t if (source) {\n\t for (var prop in source) {\n\t obj[prop] = source[prop];\n\t }\n\t }\n\t });\n\t return obj;\n\t };\n\t\n\t // Return a copy of the object only containing the whitelisted properties.\n\t _.pick = function(obj) {\n\t var copy = {};\n\t var keys = concat.apply(ArrayProto, slice.call(arguments, 1));\n\t each(keys, function(key) {\n\t if (key in obj) copy[key] = obj[key];\n\t });\n\t return copy;\n\t };\n\t\n\t // Return a copy of the object without the blacklisted properties.\n\t _.omit = function(obj) {\n\t var copy = {};\n\t var keys = concat.apply(ArrayProto, slice.call(arguments, 1));\n\t for (var key in obj) {\n\t if (!_.contains(keys, key)) copy[key] = obj[key];\n\t }\n\t return copy;\n\t };\n\t\n\t // Fill in a given object with default properties.\n\t _.defaults = function(obj) {\n\t each(slice.call(arguments, 1), function(source) {\n\t if (source) {\n\t for (var prop in source) {\n\t if (obj[prop] == null) obj[prop] = source[prop];\n\t }\n\t }\n\t });\n\t return obj;\n\t };\n\t\n\t // Create a (shallow-cloned) duplicate of an object.\n\t _.clone = function(obj) {\n\t if (!_.isObject(obj)) return obj;\n\t return _.isArray(obj) ? obj.slice() : _.extend({}, obj);\n\t };\n\t\n\t // Invokes interceptor with the obj, and then returns obj.\n\t // The primary purpose of this method is to \"tap into\" a method chain, in\n\t // order to perform operations on intermediate results within the chain.\n\t _.tap = function(obj, interceptor) {\n\t interceptor(obj);\n\t return obj;\n\t };\n\t\n\t // Internal recursive comparison function for `isEqual`.\n\t var eq = function(a, b, aStack, bStack) {\n\t // Identical objects are equal. `0 === -0`, but they aren't identical.\n\t // See the Harmony `egal` proposal: http://wiki.ecmascript.org/doku.php?id=harmony:egal.\n\t if (a === b) return a !== 0 || 1 / a == 1 / b;\n\t // A strict comparison is necessary because `null == undefined`.\n\t if (a == null || b == null) return a === b;\n\t // Unwrap any wrapped objects.\n\t if (a instanceof _) a = a._wrapped;\n\t if (b instanceof _) b = b._wrapped;\n\t // Compare `[[Class]]` names.\n\t var className = toString.call(a);\n\t if (className != toString.call(b)) return false;\n\t switch (className) {\n\t // Strings, numbers, dates, and booleans are compared by value.\n\t case '[object String]':\n\t // Primitives and their corresponding object wrappers are equivalent; thus, `\"5\"` is\n\t // equivalent to `new String(\"5\")`.\n\t return a == String(b);\n\t case '[object Number]':\n\t // `NaN`s are equivalent, but non-reflexive. An `egal` comparison is performed for\n\t // other numeric values.\n\t return a != +a ? b != +b : (a == 0 ? 1 / a == 1 / b : a == +b);\n\t case '[object Date]':\n\t case '[object Boolean]':\n\t // Coerce dates and booleans to numeric primitive values. Dates are compared by their\n\t // millisecond representations. Note that invalid dates with millisecond representations\n\t // of `NaN` are not equivalent.\n\t return +a == +b;\n\t // RegExps are compared by their source patterns and flags.\n\t case '[object RegExp]':\n\t return a.source == b.source &&\n\t a.global == b.global &&\n\t a.multiline == b.multiline &&\n\t a.ignoreCase == b.ignoreCase;\n\t }\n\t if (typeof a != 'object' || typeof b != 'object') return false;\n\t // Assume equality for cyclic structures. The algorithm for detecting cyclic\n\t // structures is adapted from ES 5.1 section 15.12.3, abstract operation `JO`.\n\t var length = aStack.length;\n\t while (length--) {\n\t // Linear search. Performance is inversely proportional to the number of\n\t // unique nested structures.\n\t if (aStack[length] == a) return bStack[length] == b;\n\t }\n\t // Add the first object to the stack of traversed objects.\n\t aStack.push(a);\n\t bStack.push(b);\n\t var size = 0, result = true;\n\t // Recursively compare objects and arrays.\n\t if (className == '[object Array]') {\n\t // Compare array lengths to determine if a deep comparison is necessary.\n\t size = a.length;\n\t result = size == b.length;\n\t if (result) {\n\t // Deep compare the contents, ignoring non-numeric properties.\n\t while (size--) {\n\t if (!(result = eq(a[size], b[size], aStack, bStack))) break;\n\t }\n\t }\n\t } else {\n\t // Objects with different constructors are not equivalent, but `Object`s\n\t // from different frames are.\n\t var aCtor = a.constructor, bCtor = b.constructor;\n\t if (aCtor !== bCtor && !(_.isFunction(aCtor) && (aCtor instanceof aCtor) &&\n\t _.isFunction(bCtor) && (bCtor instanceof bCtor))) {\n\t return false;\n\t }\n\t // Deep compare objects.\n\t for (var key in a) {\n\t if (_.has(a, key)) {\n\t // Count the expected number of properties.\n\t size++;\n\t // Deep compare each member.\n\t if (!(result = _.has(b, key) && eq(a[key], b[key], aStack, bStack))) break;\n\t }\n\t }\n\t // Ensure that both objects contain the same number of properties.\n\t if (result) {\n\t for (key in b) {\n\t if (_.has(b, key) && !(size--)) break;\n\t }\n\t result = !size;\n\t }\n\t }\n\t // Remove the first object from the stack of traversed objects.\n\t aStack.pop();\n\t bStack.pop();\n\t return result;\n\t };\n\t\n\t // Perform a deep comparison to check if two objects are equal.\n\t _.isEqual = function(a, b) {\n\t return eq(a, b, [], []);\n\t };\n\t\n\t // Is a given array, string, or object empty?\n\t // An \"empty\" object has no enumerable own-properties.\n\t _.isEmpty = function(obj) {\n\t if (obj == null) return true;\n\t if (_.isArray(obj) || _.isString(obj)) return obj.length === 0;\n\t for (var key in obj) if (_.has(obj, key)) return false;\n\t return true;\n\t };\n\t\n\t // Is a given value a DOM element?\n\t _.isElement = function(obj) {\n\t return !!(obj && obj.nodeType === 1);\n\t };\n\t\n\t // Is a given value an array?\n\t // Delegates to ECMA5's native Array.isArray\n\t _.isArray = nativeIsArray || function(obj) {\n\t return toString.call(obj) == '[object Array]';\n\t };\n\t\n\t // Is a given variable an object?\n\t _.isObject = function(obj) {\n\t return obj === Object(obj);\n\t };\n\t\n\t // Add some isType methods: isArguments, isFunction, isString, isNumber, isDate, isRegExp.\n\t each(['Arguments', 'Function', 'String', 'Number', 'Date', 'RegExp'], function(name) {\n\t _['is' + name] = function(obj) {\n\t return toString.call(obj) == '[object ' + name + ']';\n\t };\n\t });\n\t\n\t // Define a fallback version of the method in browsers (ahem, IE), where\n\t // there isn't any inspectable \"Arguments\" type.\n\t if (!_.isArguments(arguments)) {\n\t _.isArguments = function(obj) {\n\t return !!(obj && _.has(obj, 'callee'));\n\t };\n\t }\n\t\n\t // Optimize `isFunction` if appropriate.\n\t if (true) {\n\t _.isFunction = function(obj) {\n\t return typeof obj === 'function';\n\t };\n\t }\n\t\n\t // Is a given object a finite number?\n\t _.isFinite = function(obj) {\n\t return isFinite(obj) && !isNaN(parseFloat(obj));\n\t };\n\t\n\t // Is the given value `NaN`? (NaN is the only number which does not equal itself).\n\t _.isNaN = function(obj) {\n\t return _.isNumber(obj) && obj != +obj;\n\t };\n\t\n\t // Is a given value a boolean?\n\t _.isBoolean = function(obj) {\n\t return obj === true || obj === false || toString.call(obj) == '[object Boolean]';\n\t };\n\t\n\t // Is a given value equal to null?\n\t _.isNull = function(obj) {\n\t return obj === null;\n\t };\n\t\n\t // Is a given variable undefined?\n\t _.isUndefined = function(obj) {\n\t return obj === void 0;\n\t };\n\t\n\t // Shortcut function for checking if an object has a given property directly\n\t // on itself (in other words, not on a prototype).\n\t _.has = function(obj, key) {\n\t return hasOwnProperty.call(obj, key);\n\t };\n\t\n\t // Utility Functions\n\t // -----------------\n\t\n\t // Run Underscore.js in *noConflict* mode, returning the `_` variable to its\n\t // previous owner. Returns a reference to the Underscore object.\n\t _.noConflict = function() {\n\t root._ = previousUnderscore;\n\t return this;\n\t };\n\t\n\t // Keep the identity function around for default iterators.\n\t _.identity = function(value) {\n\t return value;\n\t };\n\t\n\t // Run a function **n** times.\n\t _.times = function(n, iterator, context) {\n\t var accum = Array(n);\n\t for (var i = 0; i < n; i++) accum[i] = iterator.call(context, i);\n\t return accum;\n\t };\n\t\n\t // Return a random integer between min and max (inclusive).\n\t _.random = function(min, max) {\n\t if (max == null) {\n\t max = min;\n\t min = 0;\n\t }\n\t return min + Math.floor(Math.random() * (max - min + 1));\n\t };\n\t\n\t // List of HTML entities for escaping.\n\t var entityMap = {\n\t escape: {\n\t '&': '&',\n\t '<': '<',\n\t '>': '>',\n\t '\"': '"',\n\t \"'\": ''',\n\t '/': '/'\n\t }\n\t };\n\t entityMap.unescape = _.invert(entityMap.escape);\n\t\n\t // Regexes containing the keys and values listed immediately above.\n\t var entityRegexes = {\n\t escape: new RegExp('[' + _.keys(entityMap.escape).join('') + ']', 'g'),\n\t unescape: new RegExp('(' + _.keys(entityMap.unescape).join('|') + ')', 'g')\n\t };\n\t\n\t // Functions for escaping and unescaping strings to/from HTML interpolation.\n\t _.each(['escape', 'unescape'], function(method) {\n\t _[method] = function(string) {\n\t if (string == null) return '';\n\t return ('' + string).replace(entityRegexes[method], function(match) {\n\t return entityMap[method][match];\n\t });\n\t };\n\t });\n\t\n\t // If the value of the named property is a function then invoke it;\n\t // otherwise, return it.\n\t _.result = function(object, property) {\n\t if (object == null) return null;\n\t var value = object[property];\n\t return _.isFunction(value) ? value.call(object) : value;\n\t };\n\t\n\t // Add your own custom functions to the Underscore object.\n\t _.mixin = function(obj) {\n\t each(_.functions(obj), function(name){\n\t var func = _[name] = obj[name];\n\t _.prototype[name] = function() {\n\t var args = [this._wrapped];\n\t push.apply(args, arguments);\n\t return result.call(this, func.apply(_, args));\n\t };\n\t });\n\t };\n\t\n\t // Generate a unique integer id (unique within the entire client session).\n\t // Useful for temporary DOM ids.\n\t var idCounter = 0;\n\t _.uniqueId = function(prefix) {\n\t var id = ++idCounter + '';\n\t return prefix ? prefix + id : id;\n\t };\n\t\n\t // By default, Underscore uses ERB-style template delimiters, change the\n\t // following template settings to use alternative delimiters.\n\t _.templateSettings = {\n\t evaluate : /<%([\\s\\S]+?)%>/g,\n\t interpolate : /<%=([\\s\\S]+?)%>/g,\n\t escape : /<%-([\\s\\S]+?)%>/g\n\t };\n\t\n\t // When customizing `templateSettings`, if you don't want to define an\n\t // interpolation, evaluation or escaping regex, we need one that is\n\t // guaranteed not to match.\n\t var noMatch = /(.)^/;\n\t\n\t // Certain characters need to be escaped so that they can be put into a\n\t // string literal.\n\t var escapes = {\n\t \"'\": \"'\",\n\t '\\\\': '\\\\',\n\t '\\r': 'r',\n\t '\\n': 'n',\n\t '\\t': 't',\n\t '\\u2028': 'u2028',\n\t '\\u2029': 'u2029'\n\t };\n\t\n\t var escaper = /\\\\|'|\\r|\\n|\\t|\\u2028|\\u2029/g;\n\t\n\t // JavaScript micro-templating, similar to John Resig's implementation.\n\t // Underscore templating handles arbitrary delimiters, preserves whitespace,\n\t // and correctly escapes quotes within interpolated code.\n\t _.template = function(text, data, settings) {\n\t var render;\n\t settings = _.defaults({}, settings, _.templateSettings);\n\t\n\t // Combine delimiters into one regular expression via alternation.\n\t var matcher = new RegExp([\n\t (settings.escape || noMatch).source,\n\t (settings.interpolate || noMatch).source,\n\t (settings.evaluate || noMatch).source\n\t ].join('|') + '|$', 'g');\n\t\n\t // Compile the template source, escaping string literals appropriately.\n\t var index = 0;\n\t var source = \"__p+='\";\n\t text.replace(matcher, function(match, escape, interpolate, evaluate, offset) {\n\t source += text.slice(index, offset)\n\t .replace(escaper, function(match) { return '\\\\' + escapes[match]; });\n\t\n\t if (escape) {\n\t source += \"'+\\n((__t=(\" + escape + \"))==null?'':_.escape(__t))+\\n'\";\n\t }\n\t if (interpolate) {\n\t source += \"'+\\n((__t=(\" + interpolate + \"))==null?'':__t)+\\n'\";\n\t }\n\t if (evaluate) {\n\t source += \"';\\n\" + evaluate + \"\\n__p+='\";\n\t }\n\t index = offset + match.length;\n\t return match;\n\t });\n\t source += \"';\\n\";\n\t\n\t // If a variable is not specified, place data values in local scope.\n\t if (!settings.variable) source = 'with(obj||{}){\\n' + source + '}\\n';\n\t\n\t source = \"var __t,__p='',__j=Array.prototype.join,\" +\n\t \"print=function(){__p+=__j.call(arguments,'');};\\n\" +\n\t source + \"return __p;\\n\";\n\t\n\t try {\n\t render = new Function(settings.variable || 'obj', '_', source);\n\t } catch (e) {\n\t e.source = source;\n\t throw e;\n\t }\n\t\n\t if (data) return render(data, _);\n\t var template = function(data) {\n\t return render.call(this, data, _);\n\t };\n\t\n\t // Provide the compiled function source as a convenience for precompilation.\n\t template.source = 'function(' + (settings.variable || 'obj') + '){\\n' + source + '}';\n\t\n\t return template;\n\t };\n\t\n\t // Add a \"chain\" function, which will delegate to the wrapper.\n\t _.chain = function(obj) {\n\t return _(obj).chain();\n\t };\n\t\n\t // OOP\n\t // ---------------\n\t // If Underscore is called as a function, it returns a wrapped object that\n\t // can be used OO-style. This wrapper holds altered versions of all the\n\t // underscore functions. Wrapped objects may be chained.\n\t\n\t // Helper function to continue chaining intermediate results.\n\t var result = function(obj) {\n\t return this._chain ? _(obj).chain() : obj;\n\t };\n\t\n\t // Add all of the Underscore functions to the wrapper object.\n\t _.mixin(_);\n\t\n\t // Add all mutator Array functions to the wrapper.\n\t each(['pop', 'push', 'reverse', 'shift', 'sort', 'splice', 'unshift'], function(name) {\n\t var method = ArrayProto[name];\n\t _.prototype[name] = function() {\n\t var obj = this._wrapped;\n\t method.apply(obj, arguments);\n\t if ((name == 'shift' || name == 'splice') && obj.length === 0) delete obj[0];\n\t return result.call(this, obj);\n\t };\n\t });\n\t\n\t // Add all accessor Array functions to the wrapper.\n\t each(['concat', 'join', 'slice'], function(name) {\n\t var method = ArrayProto[name];\n\t _.prototype[name] = function() {\n\t return result.call(this, method.apply(this._wrapped, arguments));\n\t };\n\t });\n\t\n\t _.extend(_.prototype, {\n\t\n\t // Start chaining a wrapped Underscore object.\n\t chain: function() {\n\t this._chain = true;\n\t return this;\n\t },\n\t\n\t // Extracts the result from a wrapped and chained object.\n\t value: function() {\n\t return this._wrapped;\n\t }\n\t\n\t });\n\t\n\t}).call(this);\n\n\n/***/ },\n/* 2 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t/**\n\t * @fileoverview gl-matrix - High performance matrix and vector operations\n\t * @author Brandon Jones\n\t * @author Colin MacKenzie IV\n\t * @version 2.2.1\n\t */\n\t\n\t/* Copyright (c) 2013, Brandon Jones, Colin MacKenzie IV. All rights reserved.\n\t\n\tRedistribution and use in source and binary forms, with or without modification,\n\tare permitted provided that the following conditions are met:\n\t\n\t * Redistributions of source code must retain the above copyright notice, this\n\t list of conditions and the following disclaimer.\n\t * Redistributions in binary form must reproduce the above copyright notice,\n\t this list of conditions and the following disclaimer in the documentation\n\t and/or other materials provided with the distribution.\n\t\n\tTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n\tANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n\tWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n\tDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR\n\tANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n\t(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n\tLOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON\n\tANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n\t(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n\tSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */\n\t\n\t\n\t(function(_global) {\n\t \"use strict\";\n\t\n\t var shim = {};\n\t if (false) {\n\t if(typeof define == 'function' && typeof define.amd == 'object' && define.amd) {\n\t shim.exports = {};\n\t define(function() {\n\t return shim.exports;\n\t });\n\t } else {\n\t // gl-matrix lives in a browser, define its namespaces in global\n\t shim.exports = typeof(window) !== 'undefined' ? window : _global;\n\t }\n\t }\n\t else {\n\t // gl-matrix lives in commonjs, define its namespaces in exports\n\t shim.exports = exports;\n\t }\n\t\n\t (function(exports) {\n\t /* Copyright (c) 2013, Brandon Jones, Colin MacKenzie IV. All rights reserved.\n\t\n\tRedistribution and use in source and binary forms, with or without modification,\n\tare permitted provided that the following conditions are met:\n\t\n\t * Redistributions of source code must retain the above copyright notice, this\n\t list of conditions and the following disclaimer.\n\t * Redistributions in binary form must reproduce the above copyright notice,\n\t this list of conditions and the following disclaimer in the documentation \n\t and/or other materials provided with the distribution.\n\t\n\tTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n\tANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n\tWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE \n\tDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR\n\tANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n\t(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n\tLOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON\n\tANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n\t(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n\tSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */\n\t\n\t\n\tif(!GLMAT_EPSILON) {\n\t var GLMAT_EPSILON = 0.000001;\n\t}\n\t\n\tif(!GLMAT_ARRAY_TYPE) {\n\t var GLMAT_ARRAY_TYPE = (typeof Float32Array !== 'undefined') ? Float32Array : Array;\n\t}\n\t\n\tif(!GLMAT_RANDOM) {\n\t var GLMAT_RANDOM = Math.random;\n\t}\n\t\n\t/**\n\t * @class Common utilities\n\t * @name glMatrix\n\t */\n\tvar glMatrix = {};\n\t\n\t/**\n\t * Sets the type of array used when creating new vectors and matricies\n\t *\n\t * @param {Type} type Array type, such as Float32Array or Array\n\t */\n\tglMatrix.setMatrixArrayType = function(type) {\n\t GLMAT_ARRAY_TYPE = type;\n\t}\n\t\n\tif(typeof(exports) !== 'undefined') {\n\t exports.glMatrix = glMatrix;\n\t}\n\t\n\tvar degree = Math.PI / 180;\n\t\n\t/**\n\t* Convert Degree To Radian\n\t*\n\t* @param {Number} Angle in Degrees\n\t*/\n\tglMatrix.toRadian = function(a){\n\t return a * degree;\n\t}\n\t;\n\t/* Copyright (c) 2013, Brandon Jones, Colin MacKenzie IV. All rights reserved.\n\t\n\tRedistribution and use in source and binary forms, with or without modification,\n\tare permitted provided that the following conditions are met:\n\t\n\t * Redistributions of source code must retain the above copyright notice, this\n\t list of conditions and the following disclaimer.\n\t * Redistributions in binary form must reproduce the above copyright notice,\n\t this list of conditions and the following disclaimer in the documentation \n\t and/or other materials provided with the distribution.\n\t\n\tTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n\tANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n\tWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE \n\tDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR\n\tANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n\t(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n\tLOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON\n\tANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n\t(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n\tSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */\n\t\n\t/**\n\t * @class 2 Dimensional Vector\n\t * @name vec2\n\t */\n\t\n\tvar vec2 = {};\n\t\n\t/**\n\t * Creates a new, empty vec2\n\t *\n\t * @returns {vec2} a new 2D vector\n\t */\n\tvec2.create = function() {\n\t var out = new GLMAT_ARRAY_TYPE(2);\n\t out[0] = 0;\n\t out[1] = 0;\n\t return out;\n\t};\n\t\n\t/**\n\t * Creates a new vec2 initialized with values from an existing vector\n\t *\n\t * @param {vec2} a vector to clone\n\t * @returns {vec2} a new 2D vector\n\t */\n\tvec2.clone = function(a) {\n\t var out = new GLMAT_ARRAY_TYPE(2);\n\t out[0] = a[0];\n\t out[1] = a[1];\n\t return out;\n\t};\n\t\n\t/**\n\t * Creates a new vec2 initialized with the given values\n\t *\n\t * @param {Number} x X component\n\t * @param {Number} y Y component\n\t * @returns {vec2} a new 2D vector\n\t */\n\tvec2.fromValues = function(x, y) {\n\t var out = new GLMAT_ARRAY_TYPE(2);\n\t out[0] = x;\n\t out[1] = y;\n\t return out;\n\t};\n\t\n\t/**\n\t * Copy the values from one vec2 to another\n\t *\n\t * @param {vec2} out the receiving vector\n\t * @param {vec2} a the source vector\n\t * @returns {vec2} out\n\t */\n\tvec2.copy = function(out, a) {\n\t out[0] = a[0];\n\t out[1] = a[1];\n\t return out;\n\t};\n\t\n\t/**\n\t * Set the components of a vec2 to the given values\n\t *\n\t * @param {vec2} out the receiving vector\n\t * @param {Number} x X component\n\t * @param {Number} y Y component\n\t * @returns {vec2} out\n\t */\n\tvec2.set = function(out, x, y) {\n\t out[0] = x;\n\t out[1] = y;\n\t return out;\n\t};\n\t\n\t/**\n\t * Adds two vec2's\n\t *\n\t * @param {vec2} out the receiving vector\n\t * @param {vec2} a the first operand\n\t * @param {vec2} b the second operand\n\t * @returns {vec2} out\n\t */\n\tvec2.add = function(out, a, b) {\n\t out[0] = a[0] + b[0];\n\t out[1] = a[1] + b[1];\n\t return out;\n\t};\n\t\n\t/**\n\t * Subtracts vector b from vector a\n\t *\n\t * @param {vec2} out the receiving vector\n\t * @param {vec2} a the first operand\n\t * @param {vec2} b the second operand\n\t * @returns {vec2} out\n\t */\n\tvec2.subtract = function(out, a, b) {\n\t out[0] = a[0] - b[0];\n\t out[1] = a[1] - b[1];\n\t return out;\n\t};\n\t\n\t/**\n\t * Alias for {@link vec2.subtract}\n\t * @function\n\t */\n\tvec2.sub = vec2.subtract;\n\t\n\t/**\n\t * Multiplies two vec2's\n\t *\n\t * @param {vec2} out the receiving vector\n\t * @param {vec2} a the first operand\n\t * @param {vec2} b the second operand\n\t * @returns {vec2} out\n\t */\n\tvec2.multiply = function(out, a, b) {\n\t out[0] = a[0] * b[0];\n\t out[1] = a[1] * b[1];\n\t return out;\n\t};\n\t\n\t/**\n\t * Alias for {@link vec2.multiply}\n\t * @function\n\t */\n\tvec2.mul = vec2.multiply;\n\t\n\t/**\n\t * Divides two vec2's\n\t *\n\t * @param {vec2} out the receiving vector\n\t * @param {vec2} a the first operand\n\t * @param {vec2} b the second operand\n\t * @returns {vec2} out\n\t */\n\tvec2.divide = function(out, a, b) {\n\t out[0] = a[0] / b[0];\n\t out[1] = a[1] / b[1];\n\t return out;\n\t};\n\t\n\t/**\n\t * Alias for {@link vec2.divide}\n\t * @function\n\t */\n\tvec2.div = vec2.divide;\n\t\n\t/**\n\t * Returns the minimum of two vec2's\n\t *\n\t * @param {vec2} out the receiving vector\n\t * @param {vec2} a the first operand\n\t * @param {vec2} b the second operand\n\t * @returns {vec2} out\n\t */\n\tvec2.min = function(out, a, b) {\n\t out[0] = Math.min(a[0], b[0]);\n\t out[1] = Math.min(a[1], b[1]);\n\t return out;\n\t};\n\t\n\t/**\n\t * Returns the maximum of two vec2's\n\t *\n\t * @param {vec2} out the receiving vector\n\t * @param {vec2} a the first operand\n\t * @param {vec2} b the second operand\n\t * @returns {vec2} out\n\t */\n\tvec2.max = function(out, a, b) {\n\t out[0] = Math.max(a[0], b[0]);\n\t out[1] = Math.max(a[1], b[1]);\n\t return out;\n\t};\n\t\n\t/**\n\t * Scales a vec2 by a scalar number\n\t *\n\t * @param {vec2} out the receiving vector\n\t * @param {vec2} a the vector to scale\n\t * @param {Number} b amount to scale the vector by\n\t * @returns {vec2} out\n\t */\n\tvec2.scale = function(out, a, b) {\n\t out[0] = a[0] * b;\n\t out[1] = a[1] * b;\n\t return out;\n\t};\n\t\n\t/**\n\t * Adds two vec2's after scaling the second operand by a scalar value\n\t *\n\t * @param {vec2} out the receiving vector\n\t * @param {vec2} a the first operand\n\t * @param {vec2} b the second operand\n\t * @param {Number} scale the amount to scale b by before adding\n\t * @returns {vec2} out\n\t */\n\tvec2.scaleAndAdd = function(out, a, b, scale) {\n\t out[0] = a[0] + (b[0] * scale);\n\t out[1] = a[1] + (b[1] * scale);\n\t return out;\n\t};\n\t\n\t/**\n\t * Calculates the euclidian distance between two vec2's\n\t *\n\t * @param {vec2} a the first operand\n\t * @param {vec2} b the second operand\n\t * @returns {Number} distance between a and b\n\t */\n\tvec2.distance = function(a, b) {\n\t var x = b[0] - a[0],\n\t y = b[1] - a[1];\n\t return Math.sqrt(x*x + y*y);\n\t};\n\t\n\t/**\n\t * Alias for {@link vec2.distance}\n\t * @function\n\t */\n\tvec2.dist = vec2.distance;\n\t\n\t/**\n\t * Calculates the squared euclidian distance between two vec2's\n\t *\n\t * @param {vec2} a the first operand\n\t * @param {vec2} b the second operand\n\t * @returns {Number} squared distance between a and b\n\t */\n\tvec2.squaredDistance = function(a, b) {\n\t var x = b[0] - a[0],\n\t y = b[1] - a[1];\n\t return x*x + y*y;\n\t};\n\t\n\t/**\n\t * Alias for {@link vec2.squaredDistance}\n\t * @function\n\t */\n\tvec2.sqrDist = vec2.squaredDistance;\n\t\n\t/**\n\t * Calculates the length of a vec2\n\t *\n\t * @param {vec2} a vector to calculate length of\n\t * @returns {Number} length of a\n\t */\n\tvec2.length = function (a) {\n\t var x = a[0],\n\t y = a[1];\n\t return Math.sqrt(x*x + y*y);\n\t};\n\t\n\t/**\n\t * Alias for {@link vec2.length}\n\t * @function\n\t */\n\tvec2.len = vec2.length;\n\t\n\t/**\n\t * Calculates the squared length of a vec2\n\t *\n\t * @param {vec2} a vector to calculate squared length of\n\t * @returns {Number} squared length of a\n\t */\n\tvec2.squaredLength = function (a) {\n\t var x = a[0],\n\t y = a[1];\n\t return x*x + y*y;\n\t};\n\t\n\t/**\n\t * Alias for {@link vec2.squaredLength}\n\t * @function\n\t */\n\tvec2.sqrLen = vec2.squaredLength;\n\t\n\t/**\n\t * Negates the components of a vec2\n\t *\n\t * @param {vec2} out the receiving vector\n\t * @param {vec2} a vector to negate\n\t * @returns {vec2} out\n\t */\n\tvec2.negate = function(out, a) {\n\t out[0] = -a[0];\n\t out[1] = -a[1];\n\t return out;\n\t};\n\t\n\t/**\n\t * Normalize a vec2\n\t *\n\t * @param {vec2} out the receiving vector\n\t * @param {vec2} a vector to normalize\n\t * @returns {vec2} out\n\t */\n\tvec2.normalize = function(out, a) {\n\t var x = a[0],\n\t y = a[1];\n\t var len = x*x + y*y;\n\t if (len > 0) {\n\t //TODO: evaluate use of glm_invsqrt here?\n\t len = 1 / Math.sqrt(len);\n\t out[0] = a[0] * len;\n\t out[1] = a[1] * len;\n\t }\n\t return out;\n\t};\n\t\n\t/**\n\t * Calculates the dot product of two vec2's\n\t *\n\t * @param {vec2} a the first operand\n\t * @param {vec2} b the second operand\n\t * @returns {Number} dot product of a and b\n\t */\n\tvec2.dot = function (a, b) {\n\t return a[0] * b[0] + a[1] * b[1];\n\t};\n\t\n\t/**\n\t * Computes the cross product of two vec2's\n\t * Note that the cross product must by definition produce a 3D vector\n\t *\n\t * @param {vec3} out the receiving vector\n\t * @param {vec2} a the first operand\n\t * @param {vec2} b the second operand\n\t * @returns {vec3} out\n\t */\n\tvec2.cross = function(out, a, b) {\n\t var z = a[0] * b[1] - a[1] * b[0];\n\t out[0] = out[1] = 0;\n\t out[2] = z;\n\t return out;\n\t};\n\t\n\t/**\n\t * Performs a linear interpolation between two vec2's\n\t *\n\t * @param {vec2} out the receiving vector\n\t * @param {vec2} a the first operand\n\t * @param {vec2} b the second operand\n\t * @param {Number} t interpolation amount between the two inputs\n\t * @returns {vec2} out\n\t */\n\tvec2.lerp = function (out, a, b, t) {\n\t var ax = a[0],\n\t ay = a[1];\n\t out[0] = ax + t * (b[0] - ax);\n\t out[1] = ay + t * (b[1] - ay);\n\t return out;\n\t};\n\t\n\t/**\n\t * Generates a random vector with the given scale\n\t *\n\t * @param {vec2} out the receiving vector\n\t * @param {Number} [scale] Length of the resulting vector. If ommitted, a unit vector will be returned\n\t * @returns {vec2} out\n\t */\n\tvec2.random = function (out, scale) {\n\t scale = scale || 1.0;\n\t var r = GLMAT_RANDOM() * 2.0 * Math.PI;\n\t out[0] = Math.cos(r) * scale;\n\t out[1] = Math.sin(r) * scale;\n\t return out;\n\t};\n\t\n\t/**\n\t * Transforms the vec2 with a mat2\n\t *\n\t * @param {vec2} out the receiving vector\n\t * @param {vec2} a the vector to transform\n\t * @param {mat2} m matrix to transform with\n\t * @returns {vec2} out\n\t */\n\tvec2.transformMat2 = function(out, a, m) {\n\t var x = a[0],\n\t y = a[1];\n\t out[0] = m[0] * x + m[2] * y;\n\t out[1] = m[1] * x + m[3] * y;\n\t return out;\n\t};\n\t\n\t/**\n\t * Transforms the vec2 with a mat2d\n\t *\n\t * @param {vec2} out the receiving vector\n\t * @param {vec2} a the vector to transform\n\t * @param {mat2d} m matrix to transform with\n\t * @returns {vec2} out\n\t */\n\tvec2.transformMat2d = function(out, a, m) {\n\t var x = a[0],\n\t y = a[1];\n\t out[0] = m[0] * x + m[2] * y + m[4];\n\t out[1] = m[1] * x + m[3] * y + m[5];\n\t return out;\n\t};\n\t\n\t/**\n\t * Transforms the vec2 with a mat3\n\t * 3rd vector component is implicitly '1'\n\t *\n\t * @param {vec2} out the receiving vector\n\t * @param {vec2} a the vector to transform\n\t * @param {mat3} m matrix to transform with\n\t * @returns {vec2} out\n\t */\n\tvec2.transformMat3 = function(out, a, m) {\n\t var x = a[0],\n\t y = a[1];\n\t out[0] = m[0] * x + m[3] * y + m[6];\n\t out[1] = m[1] * x + m[4] * y + m[7];\n\t return out;\n\t};\n\t\n\t/**\n\t * Transforms the vec2 with a mat4\n\t * 3rd vector component is implicitly '0'\n\t * 4th vector component is implicitly '1'\n\t *\n\t * @param {vec2} out the receiving vector\n\t * @param {vec2} a the vector to transform\n\t * @param {mat4} m matrix to transform with\n\t * @returns {vec2} out\n\t */\n\tvec2.transformMat4 = function(out, a, m) {\n\t var x = a[0], \n\t y = a[1];\n\t out[0] = m[0] * x + m[4] * y + m[12];\n\t out[1] = m[1] * x + m[5] * y + m[13];\n\t return out;\n\t};\n\t\n\t/**\n\t * Perform some operation over an array of vec2s.\n\t *\n\t * @param {Array} a the array of vectors to iterate over\n\t * @param {Number} stride Number of elements between the start of each vec2. If 0 assumes tightly packed\n\t * @param {Number} offset Number of elements to skip at the beginning of the array\n\t * @param {Number} count Number of vec2s to iterate over. If 0 iterates over entire array\n\t * @param {Function} fn Function to call for each vector in the array\n\t * @param {Object} [arg] additional argument to pass to fn\n\t * @returns {Array} a\n\t * @function\n\t */\n\tvec2.forEach = (function() {\n\t var vec = vec2.create();\n\t\n\t return function(a, stride, offset, count, fn, arg) {\n\t var i, l;\n\t if(!stride) {\n\t stride = 2;\n\t }\n\t\n\t if(!offset) {\n\t offset = 0;\n\t }\n\t \n\t if(count) {\n\t l = Math.min((count * stride) + offset, a.length);\n\t } else {\n\t l = a.length;\n\t }\n\t\n\t for(i = offset; i < l; i += stride) {\n\t vec[0] = a[i]; vec[1] = a[i+1];\n\t fn(vec, vec, arg);\n\t a[i] = vec[0]; a[i+1] = vec[1];\n\t }\n\t \n\t return a;\n\t };\n\t})();\n\t\n\t/**\n\t * Returns a string representation of a vector\n\t *\n\t * @param {vec2} vec vector to represent as a string\n\t * @returns {String} string representation of the vector\n\t */\n\tvec2.str = function (a) {\n\t return 'vec2(' + a[0] + ', ' + a[1] + ')';\n\t};\n\t\n\tif(typeof(exports) !== 'undefined') {\n\t exports.vec2 = vec2;\n\t}\n\t;\n\t/* Copyright (c) 2013, Brandon Jones, Colin MacKenzie IV. All rights reserved.\n\t\n\tRedistribution and use in source and binary forms, with or without modification,\n\tare permitted provided that the following conditions are met:\n\t\n\t * Redistributions of source code must retain the above copyright notice, this\n\t list of conditions and the following disclaimer.\n\t * Redistributions in binary form must reproduce the above copyright notice,\n\t this list of conditions and the following disclaimer in the documentation \n\t and/or other materials provided with the distribution.\n\t\n\tTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n\tANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n\tWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE \n\tDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR\n\tANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n\t(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n\tLOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON\n\tANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n\t(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n\tSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */\n\t\n\t/**\n\t * @class 3 Dimensional Vector\n\t * @name vec3\n\t */\n\t\n\tvar vec3 = {};\n\t\n\t/**\n\t * Creates a new, empty vec3\n\t *\n\t * @returns {vec3} a new 3D vector\n\t */\n\tvec3.create = function() {\n\t var out = new GLMAT_ARRAY_TYPE(3);\n\t out[0] = 0;\n\t out[1] = 0;\n\t out[2] = 0;\n\t return out;\n\t};\n\t\n\t/**\n\t * Creates a new vec3 initialized with values from an existing vector\n\t *\n\t * @param {vec3} a vector to clone\n\t * @returns {vec3} a new 3D vector\n\t */\n\tvec3.clone = function(a) {\n\t var out = new GLMAT_ARRAY_TYPE(3);\n\t out[0] = a[0];\n\t out[1] = a[1];\n\t out[2] = a[2];\n\t return out;\n\t};\n\t\n\t/**\n\t * Creates a new vec3 initialized with the given values\n\t *\n\t * @param {Number} x X component\n\t * @param {Number} y Y component\n\t * @param {Number} z Z component\n\t * @returns {vec3} a new 3D vector\n\t */\n\tvec3.fromValues = function(x, y, z) {\n\t var out = new GLMAT_ARRAY_TYPE(3);\n\t out[0] = x;\n\t out[1] = y;\n\t out[2] = z;\n\t return out;\n\t};\n\t\n\t/**\n\t * Copy the values from one vec3 to another\n\t *\n\t * @param {vec3} out the receiving vector\n\t * @param {vec3} a the source vector\n\t * @returns {vec3} out\n\t */\n\tvec3.copy = function(out, a) {\n\t out[0] = a[0];\n\t out[1] = a[1];\n\t out[2] = a[2];\n\t return out;\n\t};\n\t\n\t/**\n\t * Set the components of a vec3 to the given values\n\t *\n\t * @param {vec3} out the receiving vector\n\t * @param {Number} x X component\n\t * @param {Number} y Y component\n\t * @param {Number} z Z component\n\t * @returns {vec3} out\n\t */\n\tvec3.set = function(out, x, y, z) {\n\t out[0] = x;\n\t out[1] = y;\n\t out[2] = z;\n\t return out;\n\t};\n\t\n\t/**\n\t * Adds two vec3's\n\t *\n\t * @param {vec3} out the receiving vector\n\t * @param {vec3} a the first operand\n\t * @param {vec3} b the second operand\n\t * @returns {vec3} out\n\t */\n\tvec3.add = function(out, a, b) {\n\t out[0] = a[0] + b[0];\n\t out[1] = a[1] + b[1];\n\t out[2] = a[2] + b[2];\n\t return out;\n\t};\n\t\n\t/**\n\t * Subtracts vector b from vector a\n\t *\n\t * @param {vec3} out the receiving vector\n\t * @param {vec3} a the first operand\n\t * @param {vec3} b the second operand\n\t * @returns {vec3} out\n\t */\n\tvec3.subtract = function(out, a, b) {\n\t out[0] = a[0] - b[0];\n\t out[1] = a[1] - b[1];\n\t out[2] = a[2] - b[2];\n\t return out;\n\t};\n\t\n\t/**\n\t * Alias for {@link vec3.subtract}\n\t * @function\n\t */\n\tvec3.sub = vec3.subtract;\n\t\n\t/**\n\t * Multiplies two vec3's\n\t *\n\t * @param {vec3} out the receiving vector\n\t * @param {vec3} a the first operand\n\t * @param {vec3} b the second operand\n\t * @returns {vec3} out\n\t */\n\tvec3.multiply = function(out, a, b) {\n\t out[0] = a[0] * b[0];\n\t out[1] = a[1] * b[1];\n\t out[2] = a[2] * b[2];\n\t return out;\n\t};\n\t\n\t/**\n\t * Alias for {@link vec3.multiply}\n\t * @function\n\t */\n\tvec3.mul = vec3.multiply;\n\t\n\t/**\n\t * Divides two vec3's\n\t *\n\t * @param {vec3} out the receiving vector\n\t * @param {vec3} a the first operand\n\t * @param {vec3} b the second operand\n\t * @returns {vec3} out\n\t */\n\tvec3.divide = function(out, a, b) {\n\t out[0] = a[0] / b[0];\n\t out[1] = a[1] / b[1];\n\t out[2] = a[2] / b[2];\n\t return out;\n\t};\n\t\n\t/**\n\t * Alias for {@link vec3.divide}\n\t * @function\n\t */\n\tvec3.div = vec3.divide;\n\t\n\t/**\n\t * Returns the minimum of two vec3's\n\t *\n\t * @param {vec3} out the receiving vector\n\t * @param {vec3} a the first operand\n\t * @param {vec3} b the second operand\n\t * @returns {vec3} out\n\t */\n\tvec3.min = function(out, a, b) {\n\t out[0] = Math.min(a[0], b[0]);\n\t out[1] = Math.min(a[1], b[1]);\n\t out[2] = Math.min(a[2], b[2]);\n\t return out;\n\t};\n\t\n\t/**\n\t * Returns the maximum of two vec3's\n\t *\n\t * @param {vec3} out the receiving vector\n\t * @param {vec3} a the first operand\n\t * @param {vec3} b the second operand\n\t * @returns {vec3} out\n\t */\n\tvec3.max = function(out, a, b) {\n\t out[0] = Math.max(a[0], b[0]);\n\t out[1] = Math.max(a[1], b[1]);\n\t out[2] = Math.max(a[2], b[2]);\n\t return out;\n\t};\n\t\n\t/**\n\t * Scales a vec3 by a scalar number\n\t *\n\t * @param {vec3} out the receiving vector\n\t * @param {vec3} a the vector to scale\n\t * @param {Number} b amount to scale the vector by\n\t * @returns {vec3} out\n\t */\n\tvec3.scale = function(out, a, b) {\n\t out[0] = a[0] * b;\n\t out[1] = a[1] * b;\n\t out[2] = a[2] * b;\n\t return out;\n\t};\n\t\n\t/**\n\t * Adds two vec3's after scaling the second operand by a scalar value\n\t *\n\t * @param {vec3} out the receiving vector\n\t * @param {vec3} a the first operand\n\t * @param {vec3} b the second operand\n\t * @param {Number} scale the amount to scale b by before adding\n\t * @returns {vec3} out\n\t */\n\tvec3.scaleAndAdd = function(out, a, b, scale) {\n\t out[0] = a[0] + (b[0] * scale);\n\t out[1] = a[1] + (b[1] * scale);\n\t out[2] = a[2] + (b[2] * scale);\n\t return out;\n\t};\n\t\n\t/**\n\t * Calculates the euclidian distance between two vec3's\n\t *\n\t * @param {vec3} a the first operand\n\t * @param {vec3} b the second operand\n\t * @returns {Number} distance between a and b\n\t */\n\tvec3.distance = function(a, b) {\n\t var x = b[0] - a[0],\n\t y = b[1] - a[1],\n\t z = b[2] - a[2];\n\t return Math.sqrt(x*x + y*y + z*z);\n\t};\n\t\n\t/**\n\t * Alias for {@link vec3.distance}\n\t * @function\n\t */\n\tvec3.dist = vec3.distance;\n\t\n\t/**\n\t * Calculates the squared euclidian distance between two vec3's\n\t *\n\t * @param {vec3} a the first operand\n\t * @param {vec3} b the second operand\n\t * @returns {Number} squared distance between a and b\n\t */\n\tvec3.squaredDistance = function(a, b) {\n\t var x = b[0] - a[0],\n\t y = b[1] - a[1],\n\t z = b[2] - a[2];\n\t return x*x + y*y + z*z;\n\t};\n\t\n\t/**\n\t * Alias for {@link vec3.squaredDistance}\n\t * @function\n\t */\n\tvec3.sqrDist = vec3.squaredDistance;\n\t\n\t/**\n\t * Calculates the length of a vec3\n\t *\n\t * @param {vec3} a vector to calculate length of\n\t * @returns {Number} length of a\n\t */\n\tvec3.length = function (a) {\n\t var x = a[0],\n\t y = a[1],\n\t z = a[2];\n\t return Math.sqrt(x*x + y*y + z*z);\n\t};\n\t\n\t/**\n\t * Alias for {@link vec3.length}\n\t * @function\n\t */\n\tvec3.len = vec3.length;\n\t\n\t/**\n\t * Calculates the squared length of a vec3\n\t *\n\t * @param {vec3} a vector to calculate squared length of\n\t * @returns {Number} squared length of a\n\t */\n\tvec3.squaredLength = function (a) {\n\t var x = a[0],\n\t y = a[1],\n\t z = a[2];\n\t return x*x + y*y + z*z;\n\t};\n\t\n\t/**\n\t * Alias for {@link vec3.squaredLength}\n\t * @function\n\t */\n\tvec3.sqrLen = vec3.squaredLength;\n\t\n\t/**\n\t * Negates the components of a vec3\n\t *\n\t * @param {vec3} out the receiving vector\n\t * @param {vec3} a vector to negate\n\t * @returns {vec3} out\n\t */\n\tvec3.negate = function(out, a) {\n\t out[0] = -a[0];\n\t out[1] = -a[1];\n\t out[2] = -a[2];\n\t return out;\n\t};\n\t\n\t/**\n\t * Normalize a vec3\n\t *\n\t * @param {vec3} out the receiving vector\n\t * @param {vec3} a vector to normalize\n\t * @returns {vec3} out\n\t */\n\tvec3.normalize = function(out, a) {\n\t var x = a[0],\n\t y = a[1],\n\t z = a[2];\n\t var len = x*x + y*y + z*z;\n\t if (len > 0) {\n\t //TODO: evaluate use of glm_invsqrt here?\n\t len = 1 / Math.sqrt(len);\n\t out[0] = a[0] * len;\n\t out[1] = a[1] * len;\n\t out[2] = a[2] * len;\n\t }\n\t return out;\n\t};\n\t\n\t/**\n\t * Calculates the dot product of two vec3's\n\t *\n\t * @param {vec3} a the first operand\n\t * @param {vec3} b the second operand\n\t * @returns {Number} dot product of a and b\n\t */\n\tvec3.dot = function (a, b) {\n\t return a[0] * b[0] + a[1] * b[1] + a[2] * b[2];\n\t};\n\t\n\t/**\n\t * Computes the cross product of two vec3's\n\t *\n\t * @param {vec3} out the receiving vector\n\t * @param {vec3} a the first operand\n\t * @param {vec3} b the second operand\n\t * @returns {vec3} out\n\t */\n\tvec3.cross = function(out, a, b) {\n\t var ax = a[0], ay = a[1], az = a[2],\n\t bx = b[0], by = b[1], bz = b[2];\n\t\n\t out[0] = ay * bz - az * by;\n\t out[1] = az * bx - ax * bz;\n\t out[2] = ax * by - ay * bx;\n\t return out;\n\t};\n\t\n\t/**\n\t * Performs a linear interpolation between two vec3's\n\t *\n\t * @param {vec3} out the receiving vector\n\t * @param {vec3} a the first operand\n\t * @param {vec3} b the second operand\n\t * @param {Number} t interpolation amount between the two inputs\n\t * @returns {vec3} out\n\t */\n\tvec3.lerp = function (out, a, b, t) {\n\t var ax = a[0],\n\t ay = a[1],\n\t az = a[2];\n\t out[0] = ax + t * (b[0] - ax);\n\t out[1] = ay + t * (b[1] - ay);\n\t out[2] = az + t * (b[2] - az);\n\t return out;\n\t};\n\t\n\t/**\n\t * Generates a random vector with the given scale\n\t *\n\t * @param {vec3} out the receiving vector\n\t * @param {Number} [scale] Length of the resulting vector. If ommitted, a unit vector will be returned\n\t * @returns {vec3} out\n\t */\n\tvec3.random = function (out, scale) {\n\t scale = scale || 1.0;\n\t\n\t var r = GLMAT_RANDOM() * 2.0 * Math.PI;\n\t var z = (GLMAT_RANDOM() * 2.0) - 1.0;\n\t var zScale = Math.sqrt(1.0-z*z) * scale;\n\t\n\t out[0] = Math.cos(r) * zScale;\n\t out[1] = Math.sin(r) * zScale;\n\t out[2] = z * scale;\n\t return out;\n\t};\n\t\n\t/**\n\t * Transforms the vec3 with a mat4.\n\t * 4th vector component is implicitly '1'\n\t *\n\t * @param {vec3} out the receiving vector\n\t * @param {vec3} a the vector to transform\n\t * @param {mat4} m matrix to transform with\n\t * @returns {vec3} out\n\t */\n\tvec3.transformMat4 = function(out, a, m) {\n\t var x = a[0], y = a[1], z = a[2];\n\t out[0] = m[0] * x + m[4] * y + m[8] * z + m[12];\n\t out[1] = m[1] * x + m[5] * y + m[9] * z + m[13];\n\t out[2] = m[2] * x + m[6] * y + m[10] * z + m[14];\n\t return out;\n\t};\n\t\n\t/**\n\t * Transforms the vec3 with a mat3.\n\t *\n\t * @param {vec3} out the receiving vector\n\t * @param {vec3} a the vector to transform\n\t * @param {mat4} m the 3x3 matrix to transform with\n\t * @returns {vec3} out\n\t */\n\tvec3.transformMat3 = function(out, a, m) {\n\t var x = a[0], y = a[1], z = a[2];\n\t out[0] = x * m[0] + y * m[3] + z * m[6];\n\t out[1] = x * m[1] + y * m[4] + z * m[7];\n\t out[2] = x * m[2] + y * m[5] + z * m[8];\n\t return out;\n\t};\n\t\n\t/**\n\t * Transforms the vec3 with a quat\n\t *\n\t * @param {vec3} out the receiving vector\n\t * @param {vec3} a the vector to transform\n\t * @param {quat} q quaternion to transform with\n\t * @returns {vec3} out\n\t */\n\tvec3.transformQuat = function(out, a, q) {\n\t // benchmarks: http://jsperf.com/quaternion-transform-vec3-implementations\n\t\n\t var x = a[0], y = a[1], z = a[2],\n\t qx = q[0], qy = q[1], qz = q[2], qw = q[3],\n\t\n\t // calculate quat * vec\n\t ix = qw * x + qy * z - qz * y,\n\t iy = qw * y + qz * x - qx * z,\n\t iz = qw * z + qx * y - qy * x,\n\t iw = -qx * x - qy * y - qz * z;\n\t\n\t // calculate result * inverse quat\n\t out[0] = ix * qw + iw * -qx + iy * -qz - iz * -qy;\n\t out[1] = iy * qw + iw * -qy + iz * -qx - ix * -qz;\n\t out[2] = iz * qw + iw * -qz + ix * -qy - iy * -qx;\n\t return out;\n\t};\n\t\n\t/*\n\t* Rotate a 3D vector around the x-axis\n\t* @param {vec3} out The receiving vec3\n\t* @param {vec3} a The vec3 point to rotate\n\t* @param {vec3} b The origin of the rotation\n\t* @param {Number} c The angle of rotation\n\t* @returns {vec3} out\n\t*/\n\tvec3.rotateX = function(out, a, b, c){\n\t var p = [], r=[];\n\t\t //Translate point to the origin\n\t\t p[0] = a[0] - b[0];\n\t\t p[1] = a[1] - b[1];\n\t \tp[2] = a[2] - b[2];\n\t\n\t\t //perform rotation\n\t\t r[0] = p[0];\n\t\t r[1] = p[1]*Math.cos(c) - p[2]*Math.sin(c);\n\t\t r[2] = p[1]*Math.sin(c) + p[2]*Math.cos(c);\n\t\n\t\t //translate to correct position\n\t\t out[0] = r[0] + b[0];\n\t\t out[1] = r[1] + b[1];\n\t\t out[2] = r[2] + b[2];\n\t\n\t \treturn out;\n\t};\n\t\n\t/*\n\t* Rotate a 3D vector around the y-axis\n\t* @param {vec3} out The receiving vec3\n\t* @param {vec3} a The vec3 point to rotate\n\t* @param {vec3} b The origin of the rotation\n\t* @param {Number} c The angle of rotation\n\t* @returns {vec3} out\n\t*/\n\tvec3.rotateY = function(out, a, b, c){\n\t \tvar p = [], r=[];\n\t \t//Translate point to the origin\n\t \tp[0] = a[0] - b[0];\n\t \tp[1] = a[1] - b[1];\n\t \tp[2] = a[2] - b[2];\n\t \n\t \t//perform rotation\n\t \tr[0] = p[2]*Math.sin(c) + p[0]*Math.cos(c);\n\t \tr[1] = p[1];\n\t \tr[2] = p[2]*Math.cos(c) - p[0]*Math.sin(c);\n\t \n\t \t//translate to correct position\n\t \tout[0] = r[0] + b[0];\n\t \tout[1] = r[1] + b[1];\n\t \tout[2] = r[2] + b[2];\n\t \n\t \treturn out;\n\t};\n\t\n\t/*\n\t* Rotate a 3D vector around the z-axis\n\t* @param {vec3} out The receiving vec3\n\t* @param {vec3} a The vec3 point to rotate\n\t* @param {vec3} b The origin of the rotation\n\t* @param {Number} c The angle of rotation\n\t* @returns {vec3} out\n\t*/\n\tvec3.rotateZ = function(out, a, b, c){\n\t \tvar p = [], r=[];\n\t \t//Translate point to the origin\n\t \tp[0] = a[0] - b[0];\n\t \tp[1] = a[1] - b[1];\n\t \tp[2] = a[2] - b[2];\n\t \n\t \t//perform rotation\n\t \tr[0] = p[0]*Math.cos(c) - p[1]*Math.sin(c);\n\t \tr[1] = p[0]*Math.sin(c) + p[1]*Math.cos(c);\n\t \tr[2] = p[2];\n\t \n\t \t//translate to correct position\n\t \tout[0] = r[0] + b[0];\n\t \tout[1] = r[1] + b[1];\n\t \tout[2] = r[2] + b[2];\n\t \n\t \treturn out;\n\t};\n\t\n\t/**\n\t * Perform some operation over an array of vec3s.\n\t *\n\t * @param {Array} a the array of vectors to iterate over\n\t * @param {Number} stride Number of elements between the start of each vec3. If 0 assumes tightly packed\n\t * @param {Number} offset Number of elements to skip at the beginning of the array\n\t * @param {Number} count Number of vec3s to iterate over. If 0 iterates over entire array\n\t * @param {Function} fn Function to call for each vector in the array\n\t * @param {Object} [arg] additional argument to pass to fn\n\t * @returns {Array} a\n\t * @function\n\t */\n\tvec3.forEach = (function() {\n\t var vec = vec3.create();\n\t\n\t return function(a, stride, offset, count, fn, arg) {\n\t var i, l;\n\t if(!stride) {\n\t stride = 3;\n\t }\n\t\n\t if(!offset) {\n\t offset = 0;\n\t }\n\t \n\t if(count) {\n\t l = Math.min((count * stride) + offset, a.length);\n\t } else {\n\t l = a.length;\n\t }\n\t\n\t for(i = offset; i < l; i += stride) {\n\t vec[0] = a[i]; vec[1] = a[i+1]; vec[2] = a[i+2];\n\t fn(vec, vec, arg);\n\t a[i] = vec[0]; a[i+1] = vec[1]; a[i+2] = vec[2];\n\t }\n\t \n\t return a;\n\t };\n\t})();\n\t\n\t/**\n\t * Returns a string representation of a vector\n\t *\n\t * @param {vec3} vec vector to represent as a string\n\t * @returns {String} string representation of the vector\n\t */\n\tvec3.str = function (a) {\n\t return 'vec3(' + a[0] + ', ' + a[1] + ', ' + a[2] + ')';\n\t};\n\t\n\tif(typeof(exports) !== 'undefined') {\n\t exports.vec3 = vec3;\n\t}\n\t;\n\t/* Copyright (c) 2013, Brandon Jones, Colin MacKenzie IV. All rights reserved.\n\t\n\tRedistribution and use in source and binary forms, with or without modification,\n\tare permitted provided that the following conditions are met:\n\t\n\t * Redistributions of source code must retain the above copyright notice, this\n\t list of conditions and the following disclaimer.\n\t * Redistributions in binary form must reproduce the above copyright notice,\n\t this list of conditions and the following disclaimer in the documentation \n\t and/or other materials provided with the distribution.\n\t\n\tTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n\tANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n\tWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE \n\tDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR\n\tANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n\t(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n\tLOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON\n\tANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n\t(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n\tSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */\n\t\n\t/**\n\t * @class 4 Dimensional Vector\n\t * @name vec4\n\t */\n\t\n\tvar vec4 = {};\n\t\n\t/**\n\t * Creates a new, empty vec4\n\t *\n\t * @returns {vec4} a new 4D vector\n\t */\n\tvec4.create = function() {\n\t var out = new GLMAT_ARRAY_TYPE(4);\n\t out[0] = 0;\n\t out[1] = 0;\n\t out[2] = 0;\n\t out[3] = 0;\n\t return out;\n\t};\n\t\n\t/**\n\t * Creates a new vec4 initialized with values from an existing vector\n\t *\n\t * @param {vec4} a vector to clone\n\t * @returns {vec4} a new 4D vector\n\t */\n\tvec4.clone = function(a) {\n\t var out = new GLMAT_ARRAY_TYPE(4);\n\t out[0] = a[0];\n\t out[1] = a[1];\n\t out[2] = a[2];\n\t out[3] = a[3];\n\t return out;\n\t};\n\t\n\t/**\n\t * Creates a new vec4 initialized with the given values\n\t *\n\t * @param {Number} x X component\n\t * @param {Number} y Y component\n\t * @param {Number} z Z component\n\t * @param {Number} w W component\n\t * @returns {vec4} a new 4D vector\n\t */\n\tvec4.fromValues = function(x, y, z, w) {\n\t var out = new GLMAT_ARRAY_TYPE(4);\n\t out[0] = x;\n\t out[1] = y;\n\t out[2] = z;\n\t out[3] = w;\n\t return out;\n\t};\n\t\n\t/**\n\t * Copy the values from one vec4 to another\n\t *\n\t * @param {vec4} out the receiving vector\n\t * @param {vec4} a the source vector\n\t * @returns {vec4} out\n\t */\n\tvec4.copy = function(out, a) {\n\t out[0] = a[0];\n\t out[1] = a[1];\n\t out[2] = a[2];\n\t out[3] = a[3];\n\t return out;\n\t};\n\t\n\t/**\n\t * Set the components of a vec4 to the given values\n\t *\n\t * @param {vec4} out the receiving vector\n\t * @param {Number} x X component\n\t * @param {Number} y Y component\n\t * @param {Number} z Z component\n\t * @param {Number} w W component\n\t * @returns {vec4} out\n\t */\n\tvec4.set = function(out, x, y, z, w) {\n\t out[0] = x;\n\t out[1] = y;\n\t out[2] = z;\n\t out[3] = w;\n\t return out;\n\t};\n\t\n\t/**\n\t * Adds two vec4's\n\t *\n\t * @param {vec4} out the receiving vector\n\t * @param {vec4} a the first operand\n\t * @param {vec4} b the second operand\n\t * @returns {vec4} out\n\t */\n\tvec4.add = function(out, a, b) {\n\t out[0] = a[0] + b[0];\n\t out[1] = a[1] + b[1];\n\t out[2] = a[2] + b[2];\n\t out[3] = a[3] + b[3];\n\t return out;\n\t};\n\t\n\t/**\n\t * Subtracts vector b from vector a\n\t *\n\t * @param {vec4} out the receiving vector\n\t * @param {vec4} a the first operand\n\t * @param {vec4} b the second operand\n\t * @returns {vec4} out\n\t */\n\tvec4.subtract = function(out, a, b) {\n\t out[0] = a[0] - b[0];\n\t out[1] = a[1] - b[1];\n\t out[2] = a[2] - b[2];\n\t out[3] = a[3] - b[3];\n\t return out;\n\t};\n\t\n\t/**\n\t * Alias for {@link vec4.subtract}\n\t * @function\n\t */\n\tvec4.sub = vec4.subtract;\n\t\n\t/**\n\t * Multiplies two vec4's\n\t *\n\t * @param {vec4} out the receiving vector\n\t * @param {vec4} a the first operand\n\t * @param {vec4} b the second operand\n\t * @returns {vec4} out\n\t */\n\tvec4.multiply = function(out, a, b) {\n\t out[0] = a[0] * b[0];\n\t out[1] = a[1] * b[1];\n\t out[2] = a[2] * b[2];\n\t out[3] = a[3] * b[3];\n\t return out;\n\t};\n\t\n\t/**\n\t * Alias for {@link vec4.multiply}\n\t * @function\n\t */\n\tvec4.mul = vec4.multiply;\n\t\n\t/**\n\t * Divides two vec4's\n\t *\n\t * @param {vec4} out the receiving vector\n\t * @param {vec4} a the first operand\n\t * @param {vec4} b the second operand\n\t * @returns {vec4} out\n\t */\n\tvec4.divide = function(out, a, b) {\n\t out[0] = a[0] / b[0];\n\t out[1] = a[1] / b[1];\n\t out[2] = a[2] / b[2];\n\t out[3] = a[3] / b[3];\n\t return out;\n\t};\n\t\n\t/**\n\t * Alias for {@link vec4.divide}\n\t * @function\n\t */\n\tvec4.div = vec4.divide;\n\t\n\t/**\n\t * Returns the minimum of two vec4's\n\t *\n\t * @param {vec4} out the receiving vector\n\t * @param {vec4} a the first operand\n\t * @param {vec4} b the second operand\n\t * @returns {vec4} out\n\t */\n\tvec4.min = function(out, a, b) {\n\t out[0] = Math.min(a[0], b[0]);\n\t out[1] = Math.min(a[1], b[1]);\n\t out[2] = Math.min(a[2], b[2]);\n\t out[3] = Math.min(a[3], b[3]);\n\t return out;\n\t};\n\t\n\t/**\n\t * Returns the maximum of two vec4's\n\t *\n\t * @param {vec4} out the receiving vector\n\t * @param {vec4} a the first operand\n\t * @param {vec4} b the second operand\n\t * @returns {vec4} out\n\t */\n\tvec4.max = function(out, a, b) {\n\t out[0] = Math.max(a[0], b[0]);\n\t out[1] = Math.max(a[1], b[1]);\n\t out[2] = Math.max(a[2], b[2]);\n\t out[3] = Math.max(a[3], b[3]);\n\t return out;\n\t};\n\t\n\t/**\n\t * Scales a vec4 by a scalar number\n\t *\n\t * @param {vec4} out the receiving vector\n\t * @param {vec4} a the vector to scale\n\t * @param {Number} b amount to scale the vector by\n\t * @returns {vec4} out\n\t */\n\tvec4.scale = function(out, a, b) {\n\t out[0] = a[0] * b;\n\t out[1] = a[1] * b;\n\t out[2] = a[2] * b;\n\t out[3] = a[3] * b;\n\t return out;\n\t};\n\t\n\t/**\n\t * Adds two vec4's after scaling the second operand by a scalar value\n\t *\n\t * @param {vec4} out the receiving vector\n\t * @param {vec4} a the first operand\n\t * @param {vec4} b the second operand\n\t * @param {Number} scale the amount to scale b by before adding\n\t * @returns {vec4} out\n\t */\n\tvec4.scaleAndAdd = function(out, a, b, scale) {\n\t out[0] = a[0] + (b[0] * scale);\n\t out[1] = a[1] + (b[1] * scale);\n\t out[2] = a[2] + (b[2] * scale);\n\t out[3] = a[3] + (b[3] * scale);\n\t return out;\n\t};\n\t\n\t/**\n\t * Calculates the euclidian distance between two vec4's\n\t *\n\t * @param {vec4} a the first operand\n\t * @param {vec4} b the second operand\n\t * @returns {Number} distance between a and b\n\t */\n\tvec4.distance = function(a, b) {\n\t var x = b[0] - a[0],\n\t y = b[1] - a[1],\n\t z = b[2] - a[2],\n\t w = b[3] - a[3];\n\t return Math.sqrt(x*x + y*y + z*z + w*w);\n\t};\n\t\n\t/**\n\t * Alias for {@link vec4.distance}\n\t * @function\n\t */\n\tvec4.dist = vec4.distance;\n\t\n\t/**\n\t * Calculates the squared euclidian distance between two vec4's\n\t *\n\t * @param {vec4} a the first operand\n\t * @param {vec4} b the second operand\n\t * @returns {Number} squared distance between a and b\n\t */\n\tvec4.squaredDistance = function(a, b) {\n\t var x = b[0] - a[0],\n\t y = b[1] - a[1],\n\t z = b[2] - a[2],\n\t w = b[3] - a[3];\n\t return x*x + y*y + z*z + w*w;\n\t};\n\t\n\t/**\n\t * Alias for {@link vec4.squaredDistance}\n\t * @function\n\t */\n\tvec4.sqrDist = vec4.squaredDistance;\n\t\n\t/**\n\t * Calculates the length of a vec4\n\t *\n\t * @param {vec4} a vector to calculate length of\n\t * @returns {Number} length of a\n\t */\n\tvec4.length = function (a) {\n\t var x = a[0],\n\t y = a[1],\n\t z = a[2],\n\t w = a[3];\n\t return Math.sqrt(x*x + y*y + z*z + w*w);\n\t};\n\t\n\t/**\n\t * Alias for {@link vec4.length}\n\t * @function\n\t */\n\tvec4.len = vec4.length;\n\t\n\t/**\n\t * Calculates the squared length of a vec4\n\t *\n\t * @param {vec4} a vector to calculate squared length of\n\t * @returns {Number} squared length of a\n\t */\n\tvec4.squaredLength = function (a) {\n\t var x = a[0],\n\t y = a[1],\n\t z = a[2],\n\t w = a[3];\n\t return x*x + y*y + z*z + w*w;\n\t};\n\t\n\t/**\n\t * Alias for {@link vec4.squaredLength}\n\t * @function\n\t */\n\tvec4.sqrLen = vec4.squaredLength;\n\t\n\t/**\n\t * Negates the components of a vec4\n\t *\n\t * @param {vec4} out the receiving vector\n\t * @param {vec4} a vector to negate\n\t * @returns {vec4} out\n\t */\n\tvec4.negate = function(out, a) {\n\t out[0] = -a[0];\n\t out[1] = -a[1];\n\t out[2] = -a[2];\n\t out[3] = -a[3];\n\t return out;\n\t};\n\t\n\t/**\n\t * Normalize a vec4\n\t *\n\t * @param {vec4} out the receiving vector\n\t * @param {vec4} a vector to normalize\n\t * @returns {vec4} out\n\t */\n\tvec4.normalize = function(out, a) {\n\t var x = a[0],\n\t y = a[1],\n\t z = a[2],\n\t w = a[3];\n\t var len = x*x + y*y + z*z + w*w;\n\t if (len > 0) {\n\t len = 1 / Math.sqrt(len);\n\t out[0] = a[0] * len;\n\t out[1] = a[1] * len;\n\t out[2] = a[2] * len;\n\t out[3] = a[3] * len;\n\t }\n\t return out;\n\t};\n\t\n\t/**\n\t * Calculates the dot product of two vec4's\n\t *\n\t * @param {vec4} a the first operand\n\t * @param {vec4} b the second operand\n\t * @returns {Number} dot product of a and b\n\t */\n\tvec4.dot = function (a, b) {\n\t return a[0] * b[0] + a[1] * b[1] + a[2] * b[2] + a[3] * b[3];\n\t};\n\t\n\t/**\n\t * Performs a linear interpolation between two vec4's\n\t *\n\t * @param {vec4} out the receiving vector\n\t * @param {vec4} a the first operand\n\t * @param {vec4} b the second operand\n\t * @param {Number} t interpolation amount between the two inputs\n\t * @returns {vec4} out\n\t */\n\tvec4.lerp = function (out, a, b, t) {\n\t var ax = a[0],\n\t ay = a[1],\n\t az = a[2],\n\t aw = a[3];\n\t out[0] = ax + t * (b[0] - ax);\n\t out[1] = ay + t * (b[1] - ay);\n\t out[2] = az + t * (b[2] - az);\n\t out[3] = aw + t * (b[3] - aw);\n\t return out;\n\t};\n\t\n\t/**\n\t * Generates a random vector with the given scale\n\t *\n\t * @param {vec4} out the receiving vector\n\t * @param {Number} [scale] Length of the resulting vector. If ommitted, a unit vector will be returned\n\t * @returns {vec4} out\n\t */\n\tvec4.random = function (out, scale) {\n\t scale = scale || 1.0;\n\t\n\t //TODO: This is a pretty awful way of doing this. Find something better.\n\t out[0] = GLMAT_RANDOM();\n\t out[1] = GLMAT_RANDOM();\n\t out[2] = GLMAT_RANDOM();\n\t out[3] = GLMAT_RANDOM();\n\t vec4.normalize(out, out);\n\t vec4.scale(out, out, scale);\n\t return out;\n\t};\n\t\n\t/**\n\t * Transforms the vec4 with a mat4.\n\t *\n\t * @param {vec4} out the receiving vector\n\t * @param {vec4} a the vector to transform\n\t * @param {mat4} m matrix to transform with\n\t * @returns {vec4} out\n\t */\n\tvec4.transformMat4 = function(out, a, m) {\n\t var x = a[0], y = a[1], z = a[2], w = a[3];\n\t out[0] = m[0] * x + m[4] * y + m[8] * z + m[12] * w;\n\t out[1] = m[1] * x + m[5] * y + m[9] * z + m[13] * w;\n\t out[2] = m[2] * x + m[6] * y + m[10] * z + m[14] * w;\n\t out[3] = m[3] * x + m[7] * y + m[11] * z + m[15] * w;\n\t return out;\n\t};\n\t\n\t/**\n\t * Transforms the vec4 with a quat\n\t *\n\t * @param {vec4} out the receiving vector\n\t * @param {vec4} a the vector to transform\n\t * @param {quat} q quaternion to transform with\n\t * @returns {vec4} out\n\t */\n\tvec4.transformQuat = function(out, a, q) {\n\t var x = a[0], y = a[1], z = a[2],\n\t qx = q[0], qy = q[1], qz = q[2], qw = q[3],\n\t\n\t // calculate quat * vec\n\t ix = qw * x + qy * z - qz * y,\n\t iy = qw * y + qz * x - qx * z,\n\t iz = qw * z + qx * y - qy * x,\n\t iw = -qx * x - qy * y - qz * z;\n\t\n\t // calculate result * inverse quat\n\t out[0] = ix * qw + iw * -qx + iy * -qz - iz * -qy;\n\t out[1] = iy * qw + iw * -qy + iz * -qx - ix * -qz;\n\t out[2] = iz * qw + iw * -qz + ix * -qy - iy * -qx;\n\t return out;\n\t};\n\t\n\t/**\n\t * Perform some operation over an array of vec4s.\n\t *\n\t * @param {Array} a the array of vectors to iterate over\n\t * @param {Number} stride Number of elements between the start of each vec4. If 0 assumes tightly packed\n\t * @param {Number} offset Number of elements to skip at the beginning of the array\n\t * @param {Number} count Number of vec2s to iterate over. If 0 iterates over entire array\n\t * @param {Function} fn Function to call for each vector in the array\n\t * @param {Object} [arg] additional argument to pass to fn\n\t * @returns {Array} a\n\t * @function\n\t */\n\tvec4.forEach = (function() {\n\t var vec = vec4.create();\n\t\n\t return function(a, stride, offset, count, fn, arg) {\n\t var i, l;\n\t if(!stride) {\n\t stride = 4;\n\t }\n\t\n\t if(!offset) {\n\t offset = 0;\n\t }\n\t \n\t if(count) {\n\t l = Math.min((count * stride) + offset, a.length);\n\t } else {\n\t l = a.length;\n\t }\n\t\n\t for(i = offset; i < l; i += stride) {\n\t vec[0] = a[i]; vec[1] = a[i+1]; vec[2] = a[i+2]; vec[3] = a[i+3];\n\t fn(vec, vec, arg);\n\t a[i] = vec[0]; a[i+1] = vec[1]; a[i+2] = vec[2]; a[i+3] = vec[3];\n\t }\n\t \n\t return a;\n\t };\n\t})();\n\t\n\t/**\n\t * Returns a string representation of a vector\n\t *\n\t * @param {vec4} vec vector to represent as a string\n\t * @returns {String} string representation of the vector\n\t */\n\tvec4.str = function (a) {\n\t return 'vec4(' + a[0] + ', ' + a[1] + ', ' + a[2] + ', ' + a[3] + ')';\n\t};\n\t\n\tif(typeof(exports) !== 'undefined') {\n\t exports.vec4 = vec4;\n\t}\n\t;\n\t/* Copyright (c) 2013, Brandon Jones, Colin MacKenzie IV. All rights reserved.\n\t\n\tRedistribution and use in source and binary forms, with or without modification,\n\tare permitted provided that the following conditions are met:\n\t\n\t * Redistributions of source code must retain the above copyright notice, this\n\t list of conditions and the following disclaimer.\n\t * Redistributions in binary form must reproduce the above copyright notice,\n\t this list of conditions and the following disclaimer in the documentation \n\t and/or other materials provided with the distribution.\n\t\n\tTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n\tANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n\tWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE \n\tDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR\n\tANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n\t(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n\tLOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON\n\tANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n\t(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n\tSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */\n\t\n\t/**\n\t * @class 2x2 Matrix\n\t * @name mat2\n\t */\n\t\n\tvar mat2 = {};\n\t\n\t/**\n\t * Creates a new identity mat2\n\t *\n\t * @returns {mat2} a new 2x2 matrix\n\t */\n\tmat2.create = function() {\n\t var out = new GLMAT_ARRAY_TYPE(4);\n\t out[0] = 1;\n\t out[1] = 0;\n\t out[2] = 0;\n\t out[3] = 1;\n\t return out;\n\t};\n\t\n\t/**\n\t * Creates a new mat2 initialized with values from an existing matrix\n\t *\n\t * @param {mat2} a matrix to clone\n\t * @returns {mat2} a new 2x2 matrix\n\t */\n\tmat2.clone = function(a) {\n\t var out = new GLMAT_ARRAY_TYPE(4);\n\t out[0] = a[0];\n\t out[1] = a[1];\n\t out[2] = a[2];\n\t out[3] = a[3];\n\t return out;\n\t};\n\t\n\t/**\n\t * Copy the values from one mat2 to another\n\t *\n\t * @param {mat2} out the receiving matrix\n\t * @param {mat2} a the source matrix\n\t * @returns {mat2} out\n\t */\n\tmat2.copy = function(out, a) {\n\t out[0] = a[0];\n\t out[1] = a[1];\n\t out[2] = a[2];\n\t out[3] = a[3];\n\t return out;\n\t};\n\t\n\t/**\n\t * Set a mat2 to the identity matrix\n\t *\n\t * @param {mat2} out the receiving matrix\n\t * @returns {mat2} out\n\t */\n\tmat2.identity = function(out) {\n\t out[0] = 1;\n\t out[1] = 0;\n\t out[2] = 0;\n\t out[3] = 1;\n\t return out;\n\t};\n\t\n\t/**\n\t * Transpose the values of a mat2\n\t *\n\t * @param {mat2} out the receiving matrix\n\t * @param {mat2} a the source matrix\n\t * @returns {mat2} out\n\t */\n\tmat2.transpose = function(out, a) {\n\t // If we are transposing ourselves we can skip a few steps but have to cache some values\n\t if (out === a) {\n\t var a1 = a[1];\n\t out[1] = a[2];\n\t out[2] = a1;\n\t } else {\n\t out[0] = a[0];\n\t out[1] = a[2];\n\t out[2] = a[1];\n\t out[3] = a[3];\n\t }\n\t \n\t return out;\n\t};\n\t\n\t/**\n\t * Inverts a mat2\n\t *\n\t * @param {mat2} out the receiving matrix\n\t * @param {mat2} a the source matrix\n\t * @returns {mat2} out\n\t */\n\tmat2.invert = function(out, a) {\n\t var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3],\n\t\n\t // Calculate the determinant\n\t det = a0 * a3 - a2 * a1;\n\t\n\t if (!det) {\n\t return null;\n\t }\n\t det = 1.0 / det;\n\t \n\t out[0] = a3 * det;\n\t out[1] = -a1 * det;\n\t out[2] = -a2 * det;\n\t out[3] = a0 * det;\n\t\n\t return out;\n\t};\n\t\n\t/**\n\t * Calculates the adjugate of a mat2\n\t *\n\t * @param {mat2} out the receiving matrix\n\t * @param {mat2} a the source matrix\n\t * @returns {mat2} out\n\t */\n\tmat2.adjoint = function(out, a) {\n\t // Caching this value is nessecary if out == a\n\t var a0 = a[0];\n\t out[0] = a[3];\n\t out[1] = -a[1];\n\t out[2] = -a[2];\n\t out[3] = a0;\n\t\n\t return out;\n\t};\n\t\n\t/**\n\t * Calculates the determinant of a mat2\n\t *\n\t * @param {mat2} a the source matrix\n\t * @returns {Number} determinant of a\n\t */\n\tmat2.determinant = function (a) {\n\t return a[0] * a[3] - a[2] * a[1];\n\t};\n\t\n\t/**\n\t * Multiplies two mat2's\n\t *\n\t * @param {mat2} out the receiving matrix\n\t * @param {mat2} a the first operand\n\t * @param {mat2} b the second operand\n\t * @returns {mat2} out\n\t */\n\tmat2.multiply = function (out, a, b) {\n\t var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3];\n\t var b0 = b[0], b1 = b[1], b2 = b[2], b3 = b[3];\n\t out[0] = a0 * b0 + a2 * b1;\n\t out[1] = a1 * b0 + a3 * b1;\n\t out[2] = a0 * b2 + a2 * b3;\n\t out[3] = a1 * b2 + a3 * b3;\n\t return out;\n\t};\n\t\n\t/**\n\t * Alias for {@link mat2.multiply}\n\t * @function\n\t */\n\tmat2.mul = mat2.multiply;\n\t\n\t/**\n\t * Rotates a mat2 by the given angle\n\t *\n\t * @param {mat2} out the receiving matrix\n\t * @param {mat2} a the matrix to rotate\n\t * @param {Number} rad the angle to rotate the matrix by\n\t * @returns {mat2} out\n\t */\n\tmat2.rotate = function (out, a, rad) {\n\t var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3],\n\t s = Math.sin(rad),\n\t c = Math.cos(rad);\n\t out[0] = a0 * c + a2 * s;\n\t out[1] = a1 * c + a3 * s;\n\t out[2] = a0 * -s + a2 * c;\n\t out[3] = a1 * -s + a3 * c;\n\t return out;\n\t};\n\t\n\t/**\n\t * Scales the mat2 by the dimensions in the given vec2\n\t *\n\t * @param {mat2} out the receiving matrix\n\t * @param {mat2} a the matrix to rotate\n\t * @param {vec2} v the vec2 to scale the matrix by\n\t * @returns {mat2} out\n\t **/\n\tmat2.scale = function(out, a, v) {\n\t var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3],\n\t v0 = v[0], v1 = v[1];\n\t out[0] = a0 * v0;\n\t out[1] = a1 * v0;\n\t out[2] = a2 * v1;\n\t out[3] = a3 * v1;\n\t return out;\n\t};\n\t\n\t/**\n\t * Returns a string representation of a mat2\n\t *\n\t * @param {mat2} mat matrix to represent as a string\n\t * @returns {String} string representation of the matrix\n\t */\n\tmat2.str = function (a) {\n\t return 'mat2(' + a[0] + ', ' + a[1] + ', ' + a[2] + ', ' + a[3] + ')';\n\t};\n\t\n\t/**\n\t * Returns Frobenius norm of a mat2\n\t *\n\t * @param {mat2} a the matrix to calculate Frobenius norm of\n\t * @returns {Number} Frobenius norm\n\t */\n\tmat2.frob = function (a) {\n\t return(Math.sqrt(Math.pow(a[0], 2) + Math.pow(a[1], 2) + Math.pow(a[2], 2) + Math.pow(a[3], 2)))\n\t};\n\t\n\t/**\n\t * Returns L, D and U matrices (Lower triangular, Diagonal and Upper triangular) by factorizing the input matrix\n\t * @param {mat2} L the lower triangular matrix \n\t * @param {mat2} D the diagonal matrix \n\t * @param {mat2} U the upper triangular matrix \n\t * @param {mat2} a the input matrix to factorize\n\t */\n\t\n\tmat2.LDU = function (L, D, U, a) { \n\t L[2] = a[2]/a[0]; \n\t U[0] = a[0]; \n\t U[1] = a[1]; \n\t U[3] = a[3] - L[2] * U[1]; \n\t return [L, D, U]; \n\t}; \n\t\n\tif(typeof(exports) !== 'undefined') {\n\t exports.mat2 = mat2;\n\t}\n\t;\n\t/* Copyright (c) 2013, Brandon Jones, Colin MacKenzie IV. All rights reserved.\n\t\n\tRedistribution and use in source and binary forms, with or without modification,\n\tare permitted provided that the following conditions are met:\n\t\n\t * Redistributions of source code must retain the above copyright notice, this\n\t list of conditions and the following disclaimer.\n\t * Redistributions in binary form must reproduce the above copyright notice,\n\t this list of conditions and the following disclaimer in the documentation \n\t and/or other materials provided with the distribution.\n\t\n\tTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n\tANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n\tWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE \n\tDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR\n\tANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n\t(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n\tLOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON\n\tANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n\t(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n\tSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */\n\t\n\t/**\n\t * @class 2x3 Matrix\n\t * @name mat2d\n\t * \n\t * @description \n\t * A mat2d contains six elements defined as:\n\t *
\n\t * [a, c, tx,\n\t *  b, d, ty]\n\t * 
\n\t * This is a short form for the 3x3 matrix:\n\t *
\n\t * [a, c, tx,\n\t *  b, d, ty,\n\t *  0, 0, 1]\n\t * 
\n\t * The last row is ignored so the array is shorter and operations are faster.\n\t */\n\t\n\tvar mat2d = {};\n\t\n\t/**\n\t * Creates a new identity mat2d\n\t *\n\t * @returns {mat2d} a new 2x3 matrix\n\t */\n\tmat2d.create = function() {\n\t var out = new GLMAT_ARRAY_TYPE(6);\n\t out[0] = 1;\n\t out[1] = 0;\n\t out[2] = 0;\n\t out[3] = 1;\n\t out[4] = 0;\n\t out[5] = 0;\n\t return out;\n\t};\n\t\n\t/**\n\t * Creates a new mat2d initialized with values from an existing matrix\n\t *\n\t * @param {mat2d} a matrix to clone\n\t * @returns {mat2d} a new 2x3 matrix\n\t */\n\tmat2d.clone = function(a) {\n\t var out = new GLMAT_ARRAY_TYPE(6);\n\t out[0] = a[0];\n\t out[1] = a[1];\n\t out[2] = a[2];\n\t out[3] = a[3];\n\t out[4] = a[4];\n\t out[5] = a[5];\n\t return out;\n\t};\n\t\n\t/**\n\t * Copy the values from one mat2d to another\n\t *\n\t * @param {mat2d} out the receiving matrix\n\t * @param {mat2d} a the source matrix\n\t * @returns {mat2d} out\n\t */\n\tmat2d.copy = function(out, a) {\n\t out[0] = a[0];\n\t out[1] = a[1];\n\t out[2] = a[2];\n\t out[3] = a[3];\n\t out[4] = a[4];\n\t out[5] = a[5];\n\t return out;\n\t};\n\t\n\t/**\n\t * Set a mat2d to the identity matrix\n\t *\n\t * @param {mat2d} out the receiving matrix\n\t * @returns {mat2d} out\n\t */\n\tmat2d.identity = function(out) {\n\t out[0] = 1;\n\t out[1] = 0;\n\t out[2] = 0;\n\t out[3] = 1;\n\t out[4] = 0;\n\t out[5] = 0;\n\t return out;\n\t};\n\t\n\t/**\n\t * Inverts a mat2d\n\t *\n\t * @param {mat2d} out the receiving matrix\n\t * @param {mat2d} a the source matrix\n\t * @returns {mat2d} out\n\t */\n\tmat2d.invert = function(out, a) {\n\t var aa = a[0], ab = a[1], ac = a[2], ad = a[3],\n\t atx = a[4], aty = a[5];\n\t\n\t var det = aa * ad - ab * ac;\n\t if(!det){\n\t return null;\n\t }\n\t det = 1.0 / det;\n\t\n\t out[0] = ad * det;\n\t out[1] = -ab * det;\n\t out[2] = -ac * det;\n\t out[3] = aa * det;\n\t out[4] = (ac * aty - ad * atx) * det;\n\t out[5] = (ab * atx - aa * aty) * det;\n\t return out;\n\t};\n\t\n\t/**\n\t * Calculates the determinant of a mat2d\n\t *\n\t * @param {mat2d} a the source matrix\n\t * @returns {Number} determinant of a\n\t */\n\tmat2d.determinant = function (a) {\n\t return a[0] * a[3] - a[1] * a[2];\n\t};\n\t\n\t/**\n\t * Multiplies two mat2d's\n\t *\n\t * @param {mat2d} out the receiving matrix\n\t * @param {mat2d} a the first operand\n\t * @param {mat2d} b the second operand\n\t * @returns {mat2d} out\n\t */\n\tmat2d.multiply = function (out, a, b) {\n\t var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3], a4 = a[4], a5 = a[5],\n\t b0 = b[0], b1 = b[1], b2 = b[2], b3 = b[3], b4 = b[4], b5 = b[5];\n\t out[0] = a0 * b0 + a2 * b1;\n\t out[1] = a1 * b0 + a3 * b1;\n\t out[2] = a0 * b2 + a2 * b3;\n\t out[3] = a1 * b2 + a3 * b3;\n\t out[4] = a0 * b4 + a2 * b5 + a4;\n\t out[5] = a1 * b4 + a3 * b5 + a5;\n\t return out;\n\t};\n\t\n\t/**\n\t * Alias for {@link mat2d.multiply}\n\t * @function\n\t */\n\tmat2d.mul = mat2d.multiply;\n\t\n\t\n\t/**\n\t * Rotates a mat2d by the given angle\n\t *\n\t * @param {mat2d} out the receiving matrix\n\t * @param {mat2d} a the matrix to rotate\n\t * @param {Number} rad the angle to rotate the matrix by\n\t * @returns {mat2d} out\n\t */\n\tmat2d.rotate = function (out, a, rad) {\n\t var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3], a4 = a[4], a5 = a[5],\n\t s = Math.sin(rad),\n\t c = Math.cos(rad);\n\t out[0] = a0 * c + a2 * s;\n\t out[1] = a1 * c + a3 * s;\n\t out[2] = a0 * -s + a2 * c;\n\t out[3] = a1 * -s + a3 * c;\n\t out[4] = a4;\n\t out[5] = a5;\n\t return out;\n\t};\n\t\n\t/**\n\t * Scales the mat2d by the dimensions in the given vec2\n\t *\n\t * @param {mat2d} out the receiving matrix\n\t * @param {mat2d} a the matrix to translate\n\t * @param {vec2} v the vec2 to scale the matrix by\n\t * @returns {mat2d} out\n\t **/\n\tmat2d.scale = function(out, a, v) {\n\t var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3], a4 = a[4], a5 = a[5],\n\t v0 = v[0], v1 = v[1];\n\t out[0] = a0 * v0;\n\t out[1] = a1 * v0;\n\t out[2] = a2 * v1;\n\t out[3] = a3 * v1;\n\t out[4] = a4;\n\t out[5] = a5;\n\t return out;\n\t};\n\t\n\t/**\n\t * Translates the mat2d by the dimensions in the given vec2\n\t *\n\t * @param {mat2d} out the receiving matrix\n\t * @param {mat2d} a the matrix to translate\n\t * @param {vec2} v the vec2 to translate the matrix by\n\t * @returns {mat2d} out\n\t **/\n\tmat2d.translate = function(out, a, v) {\n\t var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3], a4 = a[4], a5 = a[5],\n\t v0 = v[0], v1 = v[1];\n\t out[0] = a0;\n\t out[1] = a1;\n\t out[2] = a2;\n\t out[3] = a3;\n\t out[4] = a0 * v0 + a2 * v1 + a4;\n\t out[5] = a1 * v0 + a3 * v1 + a5;\n\t return out;\n\t};\n\t\n\t/**\n\t * Returns a string representation of a mat2d\n\t *\n\t * @param {mat2d} a matrix to represent as a string\n\t * @returns {String} string representation of the matrix\n\t */\n\tmat2d.str = function (a) {\n\t return 'mat2d(' + a[0] + ', ' + a[1] + ', ' + a[2] + ', ' + \n\t a[3] + ', ' + a[4] + ', ' + a[5] + ')';\n\t};\n\t\n\t/**\n\t * Returns Frobenius norm of a mat2d\n\t *\n\t * @param {mat2d} a the matrix to calculate Frobenius norm of\n\t * @returns {Number} Frobenius norm\n\t */\n\tmat2d.frob = function (a) { \n\t return(Math.sqrt(Math.pow(a[0], 2) + Math.pow(a[1], 2) + Math.pow(a[2], 2) + Math.pow(a[3], 2) + Math.pow(a[4], 2) + Math.pow(a[5], 2) + 1))\n\t}; \n\t\n\tif(typeof(exports) !== 'undefined') {\n\t exports.mat2d = mat2d;\n\t}\n\t;\n\t/* Copyright (c) 2013, Brandon Jones, Colin MacKenzie IV. All rights reserved.\n\t\n\tRedistribution and use in source and binary forms, with or without modification,\n\tare permitted provided that the following conditions are met:\n\t\n\t * Redistributions of source code must retain the above copyright notice, this\n\t list of conditions and the following disclaimer.\n\t * Redistributions in binary form must reproduce the above copyright notice,\n\t this list of conditions and the following disclaimer in the documentation \n\t and/or other materials provided with the distribution.\n\t\n\tTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n\tANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n\tWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE \n\tDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR\n\tANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n\t(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n\tLOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON\n\tANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n\t(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n\tSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */\n\t\n\t/**\n\t * @class 3x3 Matrix\n\t * @name mat3\n\t */\n\t\n\tvar mat3 = {};\n\t\n\t/**\n\t * Creates a new identity mat3\n\t *\n\t * @returns {mat3} a new 3x3 matrix\n\t */\n\tmat3.create = function() {\n\t var out = new GLMAT_ARRAY_TYPE(9);\n\t out[0] = 1;\n\t out[1] = 0;\n\t out[2] = 0;\n\t out[3] = 0;\n\t out[4] = 1;\n\t out[5] = 0;\n\t out[6] = 0;\n\t out[7] = 0;\n\t out[8] = 1;\n\t return out;\n\t};\n\t\n\t/**\n\t * Copies the upper-left 3x3 values into the given mat3.\n\t *\n\t * @param {mat3} out the receiving 3x3 matrix\n\t * @param {mat4} a the source 4x4 matrix\n\t * @returns {mat3} out\n\t */\n\tmat3.fromMat4 = function(out, a) {\n\t out[0] = a[0];\n\t out[1] = a[1];\n\t out[2] = a[2];\n\t out[3] = a[4];\n\t out[4] = a[5];\n\t out[5] = a[6];\n\t out[6] = a[8];\n\t out[7] = a[9];\n\t out[8] = a[10];\n\t return out;\n\t};\n\t\n\t/**\n\t * Creates a new mat3 initialized with values from an existing matrix\n\t *\n\t * @param {mat3} a matrix to clone\n\t * @returns {mat3} a new 3x3 matrix\n\t */\n\tmat3.clone = function(a) {\n\t var out = new GLMAT_ARRAY_TYPE(9);\n\t out[0] = a[0];\n\t out[1] = a[1];\n\t out[2] = a[2];\n\t out[3] = a[3];\n\t out[4] = a[4];\n\t out[5] = a[5];\n\t out[6] = a[6];\n\t out[7] = a[7];\n\t out[8] = a[8];\n\t return out;\n\t};\n\t\n\t/**\n\t * Copy the values from one mat3 to another\n\t *\n\t * @param {mat3} out the receiving matrix\n\t * @param {mat3} a the source matrix\n\t * @returns {mat3} out\n\t */\n\tmat3.copy = function(out, a) {\n\t out[0] = a[0];\n\t out[1] = a[1];\n\t out[2] = a[2];\n\t out[3] = a[3];\n\t out[4] = a[4];\n\t out[5] = a[5];\n\t out[6] = a[6];\n\t out[7] = a[7];\n\t out[8] = a[8];\n\t return out;\n\t};\n\t\n\t/**\n\t * Set a mat3 to the identity matrix\n\t *\n\t * @param {mat3} out the receiving matrix\n\t * @returns {mat3} out\n\t */\n\tmat3.identity = function(out) {\n\t out[0] = 1;\n\t out[1] = 0;\n\t out[2] = 0;\n\t out[3] = 0;\n\t out[4] = 1;\n\t out[5] = 0;\n\t out[6] = 0;\n\t out[7] = 0;\n\t out[8] = 1;\n\t return out;\n\t};\n\t\n\t/**\n\t * Transpose the values of a mat3\n\t *\n\t * @param {mat3} out the receiving matrix\n\t * @param {mat3} a the source matrix\n\t * @returns {mat3} out\n\t */\n\tmat3.transpose = function(out, a) {\n\t // If we are transposing ourselves we can skip a few steps but have to cache some values\n\t if (out === a) {\n\t var a01 = a[1], a02 = a[2], a12 = a[5];\n\t out[1] = a[3];\n\t out[2] = a[6];\n\t out[3] = a01;\n\t out[5] = a[7];\n\t out[6] = a02;\n\t out[7] = a12;\n\t } else {\n\t out[0] = a[0];\n\t out[1] = a[3];\n\t out[2] = a[6];\n\t out[3] = a[1];\n\t out[4] = a[4];\n\t out[5] = a[7];\n\t out[6] = a[2];\n\t out[7] = a[5];\n\t out[8] = a[8];\n\t }\n\t \n\t return out;\n\t};\n\t\n\t/**\n\t * Inverts a mat3\n\t *\n\t * @param {mat3} out the receiving matrix\n\t * @param {mat3} a the source matrix\n\t * @returns {mat3} out\n\t */\n\tmat3.invert = function(out, a) {\n\t var a00 = a[0], a01 = a[1], a02 = a[2],\n\t a10 = a[3], a11 = a[4], a12 = a[5],\n\t a20 = a[6], a21 = a[7], a22 = a[8],\n\t\n\t b01 = a22 * a11 - a12 * a21,\n\t b11 = -a22 * a10 + a12 * a20,\n\t b21 = a21 * a10 - a11 * a20,\n\t\n\t // Calculate the determinant\n\t det = a00 * b01 + a01 * b11 + a02 * b21;\n\t\n\t if (!det) { \n\t return null; \n\t }\n\t det = 1.0 / det;\n\t\n\t out[0] = b01 * det;\n\t out[1] = (-a22 * a01 + a02 * a21) * det;\n\t out[2] = (a12 * a01 - a02 * a11) * det;\n\t out[3] = b11 * det;\n\t out[4] = (a22 * a00 - a02 * a20) * det;\n\t out[5] = (-a12 * a00 + a02 * a10) * det;\n\t out[6] = b21 * det;\n\t out[7] = (-a21 * a00 + a01 * a20) * det;\n\t out[8] = (a11 * a00 - a01 * a10) * det;\n\t return out;\n\t};\n\t\n\t/**\n\t * Calculates the adjugate of a mat3\n\t *\n\t * @param {mat3} out the receiving matrix\n\t * @param {mat3} a the source matrix\n\t * @returns {mat3} out\n\t */\n\tmat3.adjoint = function(out, a) {\n\t var a00 = a[0], a01 = a[1], a02 = a[2],\n\t a10 = a[3], a11 = a[4], a12 = a[5],\n\t a20 = a[6], a21 = a[7], a22 = a[8];\n\t\n\t out[0] = (a11 * a22 - a12 * a21);\n\t out[1] = (a02 * a21 - a01 * a22);\n\t out[2] = (a01 * a12 - a02 * a11);\n\t out[3] = (a12 * a20 - a10 * a22);\n\t out[4] = (a00 * a22 - a02 * a20);\n\t out[5] = (a02 * a10 - a00 * a12);\n\t out[6] = (a10 * a21 - a11 * a20);\n\t out[7] = (a01 * a20 - a00 * a21);\n\t out[8] = (a00 * a11 - a01 * a10);\n\t return out;\n\t};\n\t\n\t/**\n\t * Calculates the determinant of a mat3\n\t *\n\t * @param {mat3} a the source matrix\n\t * @returns {Number} determinant of a\n\t */\n\tmat3.determinant = function (a) {\n\t var a00 = a[0], a01 = a[1], a02 = a[2],\n\t a10 = a[3], a11 = a[4], a12 = a[5],\n\t a20 = a[6], a21 = a[7], a22 = a[8];\n\t\n\t return a00 * (a22 * a11 - a12 * a21) + a01 * (-a22 * a10 + a12 * a20) + a02 * (a21 * a10 - a11 * a20);\n\t};\n\t\n\t/**\n\t * Multiplies two mat3's\n\t *\n\t * @param {mat3} out the receiving matrix\n\t * @param {mat3} a the first operand\n\t * @param {mat3} b the second operand\n\t * @returns {mat3} out\n\t */\n\tmat3.multiply = function (out, a, b) {\n\t var a00 = a[0], a01 = a[1], a02 = a[2],\n\t a10 = a[3], a11 = a[4], a12 = a[5],\n\t a20 = a[6], a21 = a[7], a22 = a[8],\n\t\n\t b00 = b[0], b01 = b[1], b02 = b[2],\n\t b10 = b[3], b11 = b[4], b12 = b[5],\n\t b20 = b[6], b21 = b[7], b22 = b[8];\n\t\n\t out[0] = b00 * a00 + b01 * a10 + b02 * a20;\n\t out[1] = b00 * a01 + b01 * a11 + b02 * a21;\n\t out[2] = b00 * a02 + b01 * a12 + b02 * a22;\n\t\n\t out[3] = b10 * a00 + b11 * a10 + b12 * a20;\n\t out[4] = b10 * a01 + b11 * a11 + b12 * a21;\n\t out[5] = b10 * a02 + b11 * a12 + b12 * a22;\n\t\n\t out[6] = b20 * a00 + b21 * a10 + b22 * a20;\n\t out[7] = b20 * a01 + b21 * a11 + b22 * a21;\n\t out[8] = b20 * a02 + b21 * a12 + b22 * a22;\n\t return out;\n\t};\n\t\n\t/**\n\t * Alias for {@link mat3.multiply}\n\t * @function\n\t */\n\tmat3.mul = mat3.multiply;\n\t\n\t/**\n\t * Translate a mat3 by the given vector\n\t *\n\t * @param {mat3} out the receiving matrix\n\t * @param {mat3} a the matrix to translate\n\t * @param {vec2} v vector to translate by\n\t * @returns {mat3} out\n\t */\n\tmat3.translate = function(out, a, v) {\n\t var a00 = a[0], a01 = a[1], a02 = a[2],\n\t a10 = a[3], a11 = a[4], a12 = a[5],\n\t a20 = a[6], a21 = a[7], a22 = a[8],\n\t x = v[0], y = v[1];\n\t\n\t out[0] = a00;\n\t out[1] = a01;\n\t out[2] = a02;\n\t\n\t out[3] = a10;\n\t out[4] = a11;\n\t out[5] = a12;\n\t\n\t out[6] = x * a00 + y * a10 + a20;\n\t out[7] = x * a01 + y * a11 + a21;\n\t out[8] = x * a02 + y * a12 + a22;\n\t return out;\n\t};\n\t\n\t/**\n\t * Rotates a mat3 by the given angle\n\t *\n\t * @param {mat3} out the receiving matrix\n\t * @param {mat3} a the matrix to rotate\n\t * @param {Number} rad the angle to rotate the matrix by\n\t * @returns {mat3} out\n\t */\n\tmat3.rotate = function (out, a, rad) {\n\t var a00 = a[0], a01 = a[1], a02 = a[2],\n\t a10 = a[3], a11 = a[4], a12 = a[5],\n\t a20 = a[6], a21 = a[7], a22 = a[8],\n\t\n\t s = Math.sin(rad),\n\t c = Math.cos(rad);\n\t\n\t out[0] = c * a00 + s * a10;\n\t out[1] = c * a01 + s * a11;\n\t out[2] = c * a02 + s * a12;\n\t\n\t out[3] = c * a10 - s * a00;\n\t out[4] = c * a11 - s * a01;\n\t out[5] = c * a12 - s * a02;\n\t\n\t out[6] = a20;\n\t out[7] = a21;\n\t out[8] = a22;\n\t return out;\n\t};\n\t\n\t/**\n\t * Scales the mat3 by the dimensions in the given vec2\n\t *\n\t * @param {mat3} out the receiving matrix\n\t * @param {mat3} a the matrix to rotate\n\t * @param {vec2} v the vec2 to scale the matrix by\n\t * @returns {mat3} out\n\t **/\n\tmat3.scale = function(out, a, v) {\n\t var x = v[0], y = v[1];\n\t\n\t out[0] = x * a[0];\n\t out[1] = x * a[1];\n\t out[2] = x * a[2];\n\t\n\t out[3] = y * a[3];\n\t out[4] = y * a[4];\n\t out[5] = y * a[5];\n\t\n\t out[6] = a[6];\n\t out[7] = a[7];\n\t out[8] = a[8];\n\t return out;\n\t};\n\t\n\t/**\n\t * Copies the values from a mat2d into a mat3\n\t *\n\t * @param {mat3} out the receiving matrix\n\t * @param {mat2d} a the matrix to copy\n\t * @returns {mat3} out\n\t **/\n\tmat3.fromMat2d = function(out, a) {\n\t out[0] = a[0];\n\t out[1] = a[1];\n\t out[2] = 0;\n\t\n\t out[3] = a[2];\n\t out[4] = a[3];\n\t out[5] = 0;\n\t\n\t out[6] = a[4];\n\t out[7] = a[5];\n\t out[8] = 1;\n\t return out;\n\t};\n\t\n\t/**\n\t* Calculates a 3x3 matrix from the given quaternion\n\t*\n\t* @param {mat3} out mat3 receiving operation result\n\t* @param {quat} q Quaternion to create matrix from\n\t*\n\t* @returns {mat3} out\n\t*/\n\tmat3.fromQuat = function (out, q) {\n\t var x = q[0], y = q[1], z = q[2], w = q[3],\n\t x2 = x + x,\n\t y2 = y + y,\n\t z2 = z + z,\n\t\n\t xx = x * x2,\n\t yx = y * x2,\n\t yy = y * y2,\n\t zx = z * x2,\n\t zy = z * y2,\n\t zz = z * z2,\n\t wx = w * x2,\n\t wy = w * y2,\n\t wz = w * z2;\n\t\n\t out[0] = 1 - yy - zz;\n\t out[3] = yx - wz;\n\t out[6] = zx + wy;\n\t\n\t out[1] = yx + wz;\n\t out[4] = 1 - xx - zz;\n\t out[7] = zy - wx;\n\t\n\t out[2] = zx - wy;\n\t out[5] = zy + wx;\n\t out[8] = 1 - xx - yy;\n\t\n\t return out;\n\t};\n\t\n\t/**\n\t* Calculates a 3x3 normal matrix (transpose inverse) from the 4x4 matrix\n\t*\n\t* @param {mat3} out mat3 receiving operation result\n\t* @param {mat4} a Mat4 to derive the normal matrix from\n\t*\n\t* @returns {mat3} out\n\t*/\n\tmat3.normalFromMat4 = function (out, a) {\n\t var a00 = a[0], a01 = a[1], a02 = a[2], a03 = a[3],\n\t a10 = a[4], a11 = a[5], a12 = a[6], a13 = a[7],\n\t a20 = a[8], a21 = a[9], a22 = a[10], a23 = a[11],\n\t a30 = a[12], a31 = a[13], a32 = a[14], a33 = a[15],\n\t\n\t b00 = a00 * a11 - a01 * a10,\n\t b01 = a00 * a12 - a02 * a10,\n\t b02 = a00 * a13 - a03 * a10,\n\t b03 = a01 * a12 - a02 * a11,\n\t b04 = a01 * a13 - a03 * a11,\n\t b05 = a02 * a13 - a03 * a12,\n\t b06 = a20 * a31 - a21 * a30,\n\t b07 = a20 * a32 - a22 * a30,\n\t b08 = a20 * a33 - a23 * a30,\n\t b09 = a21 * a32 - a22 * a31,\n\t b10 = a21 * a33 - a23 * a31,\n\t b11 = a22 * a33 - a23 * a32,\n\t\n\t // Calculate the determinant\n\t det = b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;\n\t\n\t if (!det) { \n\t return null; \n\t }\n\t det = 1.0 / det;\n\t\n\t out[0] = (a11 * b11 - a12 * b10 + a13 * b09) * det;\n\t out[1] = (a12 * b08 - a10 * b11 - a13 * b07) * det;\n\t out[2] = (a10 * b10 - a11 * b08 + a13 * b06) * det;\n\t\n\t out[3] = (a02 * b10 - a01 * b11 - a03 * b09) * det;\n\t out[4] = (a00 * b11 - a02 * b08 + a03 * b07) * det;\n\t out[5] = (a01 * b08 - a00 * b10 - a03 * b06) * det;\n\t\n\t out[6] = (a31 * b05 - a32 * b04 + a33 * b03) * det;\n\t out[7] = (a32 * b02 - a30 * b05 - a33 * b01) * det;\n\t out[8] = (a30 * b04 - a31 * b02 + a33 * b00) * det;\n\t\n\t return out;\n\t};\n\t\n\t/**\n\t * Returns a string representation of a mat3\n\t *\n\t * @param {mat3} mat matrix to represent as a string\n\t * @returns {String} string representation of the matrix\n\t */\n\tmat3.str = function (a) {\n\t return 'mat3(' + a[0] + ', ' + a[1] + ', ' + a[2] + ', ' + \n\t a[3] + ', ' + a[4] + ', ' + a[5] + ', ' + \n\t a[6] + ', ' + a[7] + ', ' + a[8] + ')';\n\t};\n\t\n\t/**\n\t * Returns Frobenius norm of a mat3\n\t *\n\t * @param {mat3} a the matrix to calculate Frobenius norm of\n\t * @returns {Number} Frobenius norm\n\t */\n\tmat3.frob = function (a) {\n\t return(Math.sqrt(Math.pow(a[0], 2) + Math.pow(a[1], 2) + Math.pow(a[2], 2) + Math.pow(a[3], 2) + Math.pow(a[4], 2) + Math.pow(a[5], 2) + Math.pow(a[6], 2) + Math.pow(a[7], 2) + Math.pow(a[8], 2)))\n\t};\n\t\n\t\n\tif(typeof(exports) !== 'undefined') {\n\t exports.mat3 = mat3;\n\t}\n\t;\n\t/* Copyright (c) 2013, Brandon Jones, Colin MacKenzie IV. All rights reserved.\n\t\n\tRedistribution and use in source and binary forms, with or without modification,\n\tare permitted provided that the following conditions are met:\n\t\n\t * Redistributions of source code must retain the above copyright notice, this\n\t list of conditions and the following disclaimer.\n\t * Redistributions in binary form must reproduce the above copyright notice,\n\t this list of conditions and the following disclaimer in the documentation \n\t and/or other materials provided with the distribution.\n\t\n\tTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n\tANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n\tWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE \n\tDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR\n\tANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n\t(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n\tLOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON\n\tANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n\t(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n\tSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */\n\t\n\t/**\n\t * @class 4x4 Matrix\n\t * @name mat4\n\t */\n\t\n\tvar mat4 = {};\n\t\n\t/**\n\t * Creates a new identity mat4\n\t *\n\t * @returns {mat4} a new 4x4 matrix\n\t */\n\tmat4.create = function() {\n\t var out = new GLMAT_ARRAY_TYPE(16);\n\t out[0] = 1;\n\t out[1] = 0;\n\t out[2] = 0;\n\t out[3] = 0;\n\t out[4] = 0;\n\t out[5] = 1;\n\t out[6] = 0;\n\t out[7] = 0;\n\t out[8] = 0;\n\t out[9] = 0;\n\t out[10] = 1;\n\t out[11] = 0;\n\t out[12] = 0;\n\t out[13] = 0;\n\t out[14] = 0;\n\t out[15] = 1;\n\t return out;\n\t};\n\t\n\t/**\n\t * Creates a new mat4 initialized with values from an existing matrix\n\t *\n\t * @param {mat4} a matrix to clone\n\t * @returns {mat4} a new 4x4 matrix\n\t */\n\tmat4.clone = function(a) {\n\t var out = new GLMAT_ARRAY_TYPE(16);\n\t out[0] = a[0];\n\t out[1] = a[1];\n\t out[2] = a[2];\n\t out[3] = a[3];\n\t out[4] = a[4];\n\t out[5] = a[5];\n\t out[6] = a[6];\n\t out[7] = a[7];\n\t out[8] = a[8];\n\t out[9] = a[9];\n\t out[10] = a[10];\n\t out[11] = a[11];\n\t out[12] = a[12];\n\t out[13] = a[13];\n\t out[14] = a[14];\n\t out[15] = a[15];\n\t return out;\n\t};\n\t\n\t/**\n\t * Copy the values from one mat4 to another\n\t *\n\t * @param {mat4} out the receiving matrix\n\t * @param {mat4} a the source matrix\n\t * @returns {mat4} out\n\t */\n\tmat4.copy = function(out, a) {\n\t out[0] = a[0];\n\t out[1] = a[1];\n\t out[2] = a[2];\n\t out[3] = a[3];\n\t out[4] = a[4];\n\t out[5] = a[5];\n\t out[6] = a[6];\n\t out[7] = a[7];\n\t out[8] = a[8];\n\t out[9] = a[9];\n\t out[10] = a[10];\n\t out[11] = a[11];\n\t out[12] = a[12];\n\t out[13] = a[13];\n\t out[14] = a[14];\n\t out[15] = a[15];\n\t return out;\n\t};\n\t\n\t/**\n\t * Set a mat4 to the identity matrix\n\t *\n\t * @param {mat4} out the receiving matrix\n\t * @returns {mat4} out\n\t */\n\tmat4.identity = function(out) {\n\t out[0] = 1;\n\t out[1] = 0;\n\t out[2] = 0;\n\t out[3] = 0;\n\t out[4] = 0;\n\t out[5] = 1;\n\t out[6] = 0;\n\t out[7] = 0;\n\t out[8] = 0;\n\t out[9] = 0;\n\t out[10] = 1;\n\t out[11] = 0;\n\t out[12] = 0;\n\t out[13] = 0;\n\t out[14] = 0;\n\t out[15] = 1;\n\t return out;\n\t};\n\t\n\t/**\n\t * Transpose the values of a mat4\n\t *\n\t * @param {mat4} out the receiving matrix\n\t * @param {mat4} a the source matrix\n\t * @returns {mat4} out\n\t */\n\tmat4.transpose = function(out, a) {\n\t // If we are transposing ourselves we can skip a few steps but have to cache some values\n\t if (out === a) {\n\t var a01 = a[1], a02 = a[2], a03 = a[3],\n\t a12 = a[6], a13 = a[7],\n\t a23 = a[11];\n\t\n\t out[1] = a[4];\n\t out[2] = a[8];\n\t out[3] = a[12];\n\t out[4] = a01;\n\t out[6] = a[9];\n\t out[7] = a[13];\n\t out[8] = a02;\n\t out[9] = a12;\n\t out[11] = a[14];\n\t out[12] = a03;\n\t out[13] = a13;\n\t out[14] = a23;\n\t } else {\n\t out[0] = a[0];\n\t out[1] = a[4];\n\t out[2] = a[8];\n\t out[3] = a[12];\n\t out[4] = a[1];\n\t out[5] = a[5];\n\t out[6] = a[9];\n\t out[7] = a[13];\n\t out[8] = a[2];\n\t out[9] = a[6];\n\t out[10] = a[10];\n\t out[11] = a[14];\n\t out[12] = a[3];\n\t out[13] = a[7];\n\t out[14] = a[11];\n\t out[15] = a[15];\n\t }\n\t \n\t return out;\n\t};\n\t\n\t/**\n\t * Inverts a mat4\n\t *\n\t * @param {mat4} out the receiving matrix\n\t * @param {mat4} a the source matrix\n\t * @returns {mat4} out\n\t */\n\tmat4.invert = function(out, a) {\n\t var a00 = a[0], a01 = a[1], a02 = a[2], a03 = a[3],\n\t a10 = a[4], a11 = a[5], a12 = a[6], a13 = a[7],\n\t a20 = a[8], a21 = a[9], a22 = a[10], a23 = a[11],\n\t a30 = a[12], a31 = a[13], a32 = a[14], a33 = a[15],\n\t\n\t b00 = a00 * a11 - a01 * a10,\n\t b01 = a00 * a12 - a02 * a10,\n\t b02 = a00 * a13 - a03 * a10,\n\t b03 = a01 * a12 - a02 * a11,\n\t b04 = a01 * a13 - a03 * a11,\n\t b05 = a02 * a13 - a03 * a12,\n\t b06 = a20 * a31 - a21 * a30,\n\t b07 = a20 * a32 - a22 * a30,\n\t b08 = a20 * a33 - a23 * a30,\n\t b09 = a21 * a32 - a22 * a31,\n\t b10 = a21 * a33 - a23 * a31,\n\t b11 = a22 * a33 - a23 * a32,\n\t\n\t // Calculate the determinant\n\t det = b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;\n\t\n\t if (!det) { \n\t return null; \n\t }\n\t det = 1.0 / det;\n\t\n\t out[0] = (a11 * b11 - a12 * b10 + a13 * b09) * det;\n\t out[1] = (a02 * b10 - a01 * b11 - a03 * b09) * det;\n\t out[2] = (a31 * b05 - a32 * b04 + a33 * b03) * det;\n\t out[3] = (a22 * b04 - a21 * b05 - a23 * b03) * det;\n\t out[4] = (a12 * b08 - a10 * b11 - a13 * b07) * det;\n\t out[5] = (a00 * b11 - a02 * b08 + a03 * b07) * det;\n\t out[6] = (a32 * b02 - a30 * b05 - a33 * b01) * det;\n\t out[7] = (a20 * b05 - a22 * b02 + a23 * b01) * det;\n\t out[8] = (a10 * b10 - a11 * b08 + a13 * b06) * det;\n\t out[9] = (a01 * b08 - a00 * b10 - a03 * b06) * det;\n\t out[10] = (a30 * b04 - a31 * b02 + a33 * b00) * det;\n\t out[11] = (a21 * b02 - a20 * b04 - a23 * b00) * det;\n\t out[12] = (a11 * b07 - a10 * b09 - a12 * b06) * det;\n\t out[13] = (a00 * b09 - a01 * b07 + a02 * b06) * det;\n\t out[14] = (a31 * b01 - a30 * b03 - a32 * b00) * det;\n\t out[15] = (a20 * b03 - a21 * b01 + a22 * b00) * det;\n\t\n\t return out;\n\t};\n\t\n\t/**\n\t * Calculates the adjugate of a mat4\n\t *\n\t * @param {mat4} out the receiving matrix\n\t * @param {mat4} a the source matrix\n\t * @returns {mat4} out\n\t */\n\tmat4.adjoint = function(out, a) {\n\t var a00 = a[0], a01 = a[1], a02 = a[2], a03 = a[3],\n\t a10 = a[4], a11 = a[5], a12 = a[6], a13 = a[7],\n\t a20 = a[8], a21 = a[9], a22 = a[10], a23 = a[11],\n\t a30 = a[12], a31 = a[13], a32 = a[14], a33 = a[15];\n\t\n\t out[0] = (a11 * (a22 * a33 - a23 * a32) - a21 * (a12 * a33 - a13 * a32) + a31 * (a12 * a23 - a13 * a22));\n\t out[1] = -(a01 * (a22 * a33 - a23 * a32) - a21 * (a02 * a33 - a03 * a32) + a31 * (a02 * a23 - a03 * a22));\n\t out[2] = (a01 * (a12 * a33 - a13 * a32) - a11 * (a02 * a33 - a03 * a32) + a31 * (a02 * a13 - a03 * a12));\n\t out[3] = -(a01 * (a12 * a23 - a13 * a22) - a11 * (a02 * a23 - a03 * a22) + a21 * (a02 * a13 - a03 * a12));\n\t out[4] = -(a10 * (a22 * a33 - a23 * a32) - a20 * (a12 * a33 - a13 * a32) + a30 * (a12 * a23 - a13 * a22));\n\t out[5] = (a00 * (a22 * a33 - a23 * a32) - a20 * (a02 * a33 - a03 * a32) + a30 * (a02 * a23 - a03 * a22));\n\t out[6] = -(a00 * (a12 * a33 - a13 * a32) - a10 * (a02 * a33 - a03 * a32) + a30 * (a02 * a13 - a03 * a12));\n\t out[7] = (a00 * (a12 * a23 - a13 * a22) - a10 * (a02 * a23 - a03 * a22) + a20 * (a02 * a13 - a03 * a12));\n\t out[8] = (a10 * (a21 * a33 - a23 * a31) - a20 * (a11 * a33 - a13 * a31) + a30 * (a11 * a23 - a13 * a21));\n\t out[9] = -(a00 * (a21 * a33 - a23 * a31) - a20 * (a01 * a33 - a03 * a31) + a30 * (a01 * a23 - a03 * a21));\n\t out[10] = (a00 * (a11 * a33 - a13 * a31) - a10 * (a01 * a33 - a03 * a31) + a30 * (a01 * a13 - a03 * a11));\n\t out[11] = -(a00 * (a11 * a23 - a13 * a21) - a10 * (a01 * a23 - a03 * a21) + a20 * (a01 * a13 - a03 * a11));\n\t out[12] = -(a10 * (a21 * a32 - a22 * a31) - a20 * (a11 * a32 - a12 * a31) + a30 * (a11 * a22 - a12 * a21));\n\t out[13] = (a00 * (a21 * a32 - a22 * a31) - a20 * (a01 * a32 - a02 * a31) + a30 * (a01 * a22 - a02 * a21));\n\t out[14] = -(a00 * (a11 * a32 - a12 * a31) - a10 * (a01 * a32 - a02 * a31) + a30 * (a01 * a12 - a02 * a11));\n\t out[15] = (a00 * (a11 * a22 - a12 * a21) - a10 * (a01 * a22 - a02 * a21) + a20 * (a01 * a12 - a02 * a11));\n\t return out;\n\t};\n\t\n\t/**\n\t * Calculates the determinant of a mat4\n\t *\n\t * @param {mat4} a the source matrix\n\t * @returns {Number} determinant of a\n\t */\n\tmat4.determinant = function (a) {\n\t var a00 = a[0], a01 = a[1], a02 = a[2], a03 = a[3],\n\t a10 = a[4], a11 = a[5], a12 = a[6], a13 = a[7],\n\t a20 = a[8], a21 = a[9], a22 = a[10], a23 = a[11],\n\t a30 = a[12], a31 = a[13], a32 = a[14], a33 = a[15],\n\t\n\t b00 = a00 * a11 - a01 * a10,\n\t b01 = a00 * a12 - a02 * a10,\n\t b02 = a00 * a13 - a03 * a10,\n\t b03 = a01 * a12 - a02 * a11,\n\t b04 = a01 * a13 - a03 * a11,\n\t b05 = a02 * a13 - a03 * a12,\n\t b06 = a20 * a31 - a21 * a30,\n\t b07 = a20 * a32 - a22 * a30,\n\t b08 = a20 * a33 - a23 * a30,\n\t b09 = a21 * a32 - a22 * a31,\n\t b10 = a21 * a33 - a23 * a31,\n\t b11 = a22 * a33 - a23 * a32;\n\t\n\t // Calculate the determinant\n\t return b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;\n\t};\n\t\n\t/**\n\t * Multiplies two mat4's\n\t *\n\t * @param {mat4} out the receiving matrix\n\t * @param {mat4} a the first operand\n\t * @param {mat4} b the second operand\n\t * @returns {mat4} out\n\t */\n\tmat4.multiply = function (out, a, b) {\n\t var a00 = a[0], a01 = a[1], a02 = a[2], a03 = a[3],\n\t a10 = a[4], a11 = a[5], a12 = a[6], a13 = a[7],\n\t a20 = a[8], a21 = a[9], a22 = a[10], a23 = a[11],\n\t a30 = a[12], a31 = a[13], a32 = a[14], a33 = a[15];\n\t\n\t // Cache only the current line of the second matrix\n\t var b0 = b[0], b1 = b[1], b2 = b[2], b3 = b[3]; \n\t out[0] = b0*a00 + b1*a10 + b2*a20 + b3*a30;\n\t out[1] = b0*a01 + b1*a11 + b2*a21 + b3*a31;\n\t out[2] = b0*a02 + b1*a12 + b2*a22 + b3*a32;\n\t out[3] = b0*a03 + b1*a13 + b2*a23 + b3*a33;\n\t\n\t b0 = b[4]; b1 = b[5]; b2 = b[6]; b3 = b[7];\n\t out[4] = b0*a00 + b1*a10 + b2*a20 + b3*a30;\n\t out[5] = b0*a01 + b1*a11 + b2*a21 + b3*a31;\n\t out[6] = b0*a02 + b1*a12 + b2*a22 + b3*a32;\n\t out[7] = b0*a03 + b1*a13 + b2*a23 + b3*a33;\n\t\n\t b0 = b[8]; b1 = b[9]; b2 = b[10]; b3 = b[11];\n\t out[8] = b0*a00 + b1*a10 + b2*a20 + b3*a30;\n\t out[9] = b0*a01 + b1*a11 + b2*a21 + b3*a31;\n\t out[10] = b0*a02 + b1*a12 + b2*a22 + b3*a32;\n\t out[11] = b0*a03 + b1*a13 + b2*a23 + b3*a33;\n\t\n\t b0 = b[12]; b1 = b[13]; b2 = b[14]; b3 = b[15];\n\t out[12] = b0*a00 + b1*a10 + b2*a20 + b3*a30;\n\t out[13] = b0*a01 + b1*a11 + b2*a21 + b3*a31;\n\t out[14] = b0*a02 + b1*a12 + b2*a22 + b3*a32;\n\t out[15] = b0*a03 + b1*a13 + b2*a23 + b3*a33;\n\t return out;\n\t};\n\t\n\t/**\n\t * Alias for {@link mat4.multiply}\n\t * @function\n\t */\n\tmat4.mul = mat4.multiply;\n\t\n\t/**\n\t * Translate a mat4 by the given vector\n\t *\n\t * @param {mat4} out the receiving matrix\n\t * @param {mat4} a the matrix to translate\n\t * @param {vec3} v vector to translate by\n\t * @returns {mat4} out\n\t */\n\tmat4.translate = function (out, a, v) {\n\t var x = v[0], y = v[1], z = v[2],\n\t a00, a01, a02, a03,\n\t a10, a11, a12, a13,\n\t a20, a21, a22, a23;\n\t\n\t if (a === out) {\n\t out[12] = a[0] * x + a[4] * y + a[8] * z + a[12];\n\t out[13] = a[1] * x + a[5] * y + a[9] * z + a[13];\n\t out[14] = a[2] * x + a[6] * y + a[10] * z + a[14];\n\t out[15] = a[3] * x + a[7] * y + a[11] * z + a[15];\n\t } else {\n\t a00 = a[0]; a01 = a[1]; a02 = a[2]; a03 = a[3];\n\t a10 = a[4]; a11 = a[5]; a12 = a[6]; a13 = a[7];\n\t a20 = a[8]; a21 = a[9]; a22 = a[10]; a23 = a[11];\n\t\n\t out[0] = a00; out[1] = a01; out[2] = a02; out[3] = a03;\n\t out[4] = a10; out[5] = a11; out[6] = a12; out[7] = a13;\n\t out[8] = a20; out[9] = a21; out[10] = a22; out[11] = a23;\n\t\n\t out[12] = a00 * x + a10 * y + a20 * z + a[12];\n\t out[13] = a01 * x + a11 * y + a21 * z + a[13];\n\t out[14] = a02 * x + a12 * y + a22 * z + a[14];\n\t out[15] = a03 * x + a13 * y + a23 * z + a[15];\n\t }\n\t\n\t return out;\n\t};\n\t\n\t/**\n\t * Scales the mat4 by the dimensions in the given vec3\n\t *\n\t * @param {mat4} out the receiving matrix\n\t * @param {mat4} a the matrix to scale\n\t * @param {vec3} v the vec3 to scale the matrix by\n\t * @returns {mat4} out\n\t **/\n\tmat4.scale = function(out, a, v) {\n\t var x = v[0], y = v[1], z = v[2];\n\t\n\t out[0] = a[0] * x;\n\t out[1] = a[1] * x;\n\t out[2] = a[2] * x;\n\t out[3] = a[3] * x;\n\t out[4] = a[4] * y;\n\t out[5] = a[5] * y;\n\t out[6] = a[6] * y;\n\t out[7] = a[7] * y;\n\t out[8] = a[8] * z;\n\t out[9] = a[9] * z;\n\t out[10] = a[10] * z;\n\t out[11] = a[11] * z;\n\t out[12] = a[12];\n\t out[13] = a[13];\n\t out[14] = a[14];\n\t out[15] = a[15];\n\t return out;\n\t};\n\t\n\t/**\n\t * Rotates a mat4 by the given angle\n\t *\n\t * @param {mat4} out the receiving matrix\n\t * @param {mat4} a the matrix to rotate\n\t * @param {Number} rad the angle to rotate the matrix by\n\t * @param {vec3} axis the axis to rotate around\n\t * @returns {mat4} out\n\t */\n\tmat4.rotate = function (out, a, rad, axis) {\n\t var x = axis[0], y = axis[1], z = axis[2],\n\t len = Math.sqrt(x * x + y * y + z * z),\n\t s, c, t,\n\t a00, a01, a02, a03,\n\t a10, a11, a12, a13,\n\t a20, a21, a22, a23,\n\t b00, b01, b02,\n\t b10, b11, b12,\n\t b20, b21, b22;\n\t\n\t if (Math.abs(len) < GLMAT_EPSILON) { return null; }\n\t \n\t len = 1 / len;\n\t x *= len;\n\t y *= len;\n\t z *= len;\n\t\n\t s = Math.sin(rad);\n\t c = Math.cos(rad);\n\t t = 1 - c;\n\t\n\t a00 = a[0]; a01 = a[1]; a02 = a[2]; a03 = a[3];\n\t a10 = a[4]; a11 = a[5]; a12 = a[6]; a13 = a[7];\n\t a20 = a[8]; a21 = a[9]; a22 = a[10]; a23 = a[11];\n\t\n\t // Construct the elements of the rotation matrix\n\t b00 = x * x * t + c; b01 = y * x * t + z * s; b02 = z * x * t - y * s;\n\t b10 = x * y * t - z * s; b11 = y * y * t + c; b12 = z * y * t + x * s;\n\t b20 = x * z * t + y * s; b21 = y * z * t - x * s; b22 = z * z * t + c;\n\t\n\t // Perform rotation-specific matrix multiplication\n\t out[0] = a00 * b00 + a10 * b01 + a20 * b02;\n\t out[1] = a01 * b00 + a11 * b01 + a21 * b02;\n\t out[2] = a02 * b00 + a12 * b01 + a22 * b02;\n\t out[3] = a03 * b00 + a13 * b01 + a23 * b02;\n\t out[4] = a00 * b10 + a10 * b11 + a20 * b12;\n\t out[5] = a01 * b10 + a11 * b11 + a21 * b12;\n\t out[6] = a02 * b10 + a12 * b11 + a22 * b12;\n\t out[7] = a03 * b10 + a13 * b11 + a23 * b12;\n\t out[8] = a00 * b20 + a10 * b21 + a20 * b22;\n\t out[9] = a01 * b20 + a11 * b21 + a21 * b22;\n\t out[10] = a02 * b20 + a12 * b21 + a22 * b22;\n\t out[11] = a03 * b20 + a13 * b21 + a23 * b22;\n\t\n\t if (a !== out) { // If the source and destination differ, copy the unchanged last row\n\t out[12] = a[12];\n\t out[13] = a[13];\n\t out[14] = a[14];\n\t out[15] = a[15];\n\t }\n\t return out;\n\t};\n\t\n\t/**\n\t * Rotates a matrix by the given angle around the X axis\n\t *\n\t * @param {mat4} out the receiving matrix\n\t * @param {mat4} a the matrix to rotate\n\t * @param {Number} rad the angle to rotate the matrix by\n\t * @returns {mat4} out\n\t */\n\tmat4.rotateX = function (out, a, rad) {\n\t var s = Math.sin(rad),\n\t c = Math.cos(rad),\n\t a10 = a[4],\n\t a11 = a[5],\n\t a12 = a[6],\n\t a13 = a[7],\n\t a20 = a[8],\n\t a21 = a[9],\n\t a22 = a[10],\n\t a23 = a[11];\n\t\n\t if (a !== out) { // If the source and destination differ, copy the unchanged rows\n\t out[0] = a[0];\n\t out[1] = a[1];\n\t out[2] = a[2];\n\t out[3] = a[3];\n\t out[12] = a[12];\n\t out[13] = a[13];\n\t out[14] = a[14];\n\t out[15] = a[15];\n\t }\n\t\n\t // Perform axis-specific matrix multiplication\n\t out[4] = a10 * c + a20 * s;\n\t out[5] = a11 * c + a21 * s;\n\t out[6] = a12 * c + a22 * s;\n\t out[7] = a13 * c + a23 * s;\n\t out[8] = a20 * c - a10 * s;\n\t out[9] = a21 * c - a11 * s;\n\t out[10] = a22 * c - a12 * s;\n\t out[11] = a23 * c - a13 * s;\n\t return out;\n\t};\n\t\n\t/**\n\t * Rotates a matrix by the given angle around the Y axis\n\t *\n\t * @param {mat4} out the receiving matrix\n\t * @param {mat4} a the matrix to rotate\n\t * @param {Number} rad the angle to rotate the matrix by\n\t * @returns {mat4} out\n\t */\n\tmat4.rotateY = function (out, a, rad) {\n\t var s = Math.sin(rad),\n\t c = Math.cos(rad),\n\t a00 = a[0],\n\t a01 = a[1],\n\t a02 = a[2],\n\t a03 = a[3],\n\t a20 = a[8],\n\t a21 = a[9],\n\t a22 = a[10],\n\t a23 = a[11];\n\t\n\t if (a !== out) { // If the source and destination differ, copy the unchanged rows\n\t out[4] = a[4];\n\t out[5] = a[5];\n\t out[6] = a[6];\n\t out[7] = a[7];\n\t out[12] = a[12];\n\t out[13] = a[13];\n\t out[14] = a[14];\n\t out[15] = a[15];\n\t }\n\t\n\t // Perform axis-specific matrix multiplication\n\t out[0] = a00 * c - a20 * s;\n\t out[1] = a01 * c - a21 * s;\n\t out[2] = a02 * c - a22 * s;\n\t out[3] = a03 * c - a23 * s;\n\t out[8] = a00 * s + a20 * c;\n\t out[9] = a01 * s + a21 * c;\n\t out[10] = a02 * s + a22 * c;\n\t out[11] = a03 * s + a23 * c;\n\t return out;\n\t};\n\t\n\t/**\n\t * Rotates a matrix by the given angle around the Z axis\n\t *\n\t * @param {mat4} out the receiving matrix\n\t * @param {mat4} a the matrix to rotate\n\t * @param {Number} rad the angle to rotate the matrix by\n\t * @returns {mat4} out\n\t */\n\tmat4.rotateZ = function (out, a, rad) {\n\t var s = Math.sin(rad),\n\t c = Math.cos(rad),\n\t a00 = a[0],\n\t a01 = a[1],\n\t a02 = a[2],\n\t a03 = a[3],\n\t a10 = a[4],\n\t a11 = a[5],\n\t a12 = a[6],\n\t a13 = a[7];\n\t\n\t if (a !== out) { // If the source and destination differ, copy the unchanged last row\n\t out[8] = a[8];\n\t out[9] = a[9];\n\t out[10] = a[10];\n\t out[11] = a[11];\n\t out[12] = a[12];\n\t out[13] = a[13];\n\t out[14] = a[14];\n\t out[15] = a[15];\n\t }\n\t\n\t // Perform axis-specific matrix multiplication\n\t out[0] = a00 * c + a10 * s;\n\t out[1] = a01 * c + a11 * s;\n\t out[2] = a02 * c + a12 * s;\n\t out[3] = a03 * c + a13 * s;\n\t out[4] = a10 * c - a00 * s;\n\t out[5] = a11 * c - a01 * s;\n\t out[6] = a12 * c - a02 * s;\n\t out[7] = a13 * c - a03 * s;\n\t return out;\n\t};\n\t\n\t/**\n\t * Creates a matrix from a quaternion rotation and vector translation\n\t * This is equivalent to (but much faster than):\n\t *\n\t * mat4.identity(dest);\n\t * mat4.translate(dest, vec);\n\t * var quatMat = mat4.create();\n\t * quat4.toMat4(quat, quatMat);\n\t * mat4.multiply(dest, quatMat);\n\t *\n\t * @param {mat4} out mat4 receiving operation result\n\t * @param {quat4} q Rotation quaternion\n\t * @param {vec3} v Translation vector\n\t * @returns {mat4} out\n\t */\n\tmat4.fromRotationTranslation = function (out, q, v) {\n\t // Quaternion math\n\t var x = q[0], y = q[1], z = q[2], w = q[3],\n\t x2 = x + x,\n\t y2 = y + y,\n\t z2 = z + z,\n\t\n\t xx = x * x2,\n\t xy = x * y2,\n\t xz = x * z2,\n\t yy = y * y2,\n\t yz = y * z2,\n\t zz = z * z2,\n\t wx = w * x2,\n\t wy = w * y2,\n\t wz = w * z2;\n\t\n\t out[0] = 1 - (yy + zz);\n\t out[1] = xy + wz;\n\t out[2] = xz - wy;\n\t out[3] = 0;\n\t out[4] = xy - wz;\n\t out[5] = 1 - (xx + zz);\n\t out[6] = yz + wx;\n\t out[7] = 0;\n\t out[8] = xz + wy;\n\t out[9] = yz - wx;\n\t out[10] = 1 - (xx + yy);\n\t out[11] = 0;\n\t out[12] = v[0];\n\t out[13] = v[1];\n\t out[14] = v[2];\n\t out[15] = 1;\n\t \n\t return out;\n\t};\n\t\n\tmat4.fromQuat = function (out, q) {\n\t var x = q[0], y = q[1], z = q[2], w = q[3],\n\t x2 = x + x,\n\t y2 = y + y,\n\t z2 = z + z,\n\t\n\t xx = x * x2,\n\t yx = y * x2,\n\t yy = y * y2,\n\t zx = z * x2,\n\t zy = z * y2,\n\t zz = z * z2,\n\t wx = w * x2,\n\t wy = w * y2,\n\t wz = w * z2;\n\t\n\t out[0] = 1 - yy - zz;\n\t out[1] = yx + wz;\n\t out[2] = zx - wy;\n\t out[3] = 0;\n\t\n\t out[4] = yx - wz;\n\t out[5] = 1 - xx - zz;\n\t out[6] = zy + wx;\n\t out[7] = 0;\n\t\n\t out[8] = zx + wy;\n\t out[9] = zy - wx;\n\t out[10] = 1 - xx - yy;\n\t out[11] = 0;\n\t\n\t out[12] = 0;\n\t out[13] = 0;\n\t out[14] = 0;\n\t out[15] = 1;\n\t\n\t return out;\n\t};\n\t\n\t/**\n\t * Generates a frustum matrix with the given bounds\n\t *\n\t * @param {mat4} out mat4 frustum matrix will be written into\n\t * @param {Number} left Left bound of the frustum\n\t * @param {Number} right Right bound of the frustum\n\t * @param {Number} bottom Bottom bound of the frustum\n\t * @param {Number} top Top bound of the frustum\n\t * @param {Number} near Near bound of the frustum\n\t * @param {Number} far Far bound of the frustum\n\t * @returns {mat4} out\n\t */\n\tmat4.frustum = function (out, left, right, bottom, top, near, far) {\n\t var rl = 1 / (right - left),\n\t tb = 1 / (top - bottom),\n\t nf = 1 / (near - far);\n\t out[0] = (near * 2) * rl;\n\t out[1] = 0;\n\t out[2] = 0;\n\t out[3] = 0;\n\t out[4] = 0;\n\t out[5] = (near * 2) * tb;\n\t out[6] = 0;\n\t out[7] = 0;\n\t out[8] = (right + left) * rl;\n\t out[9] = (top + bottom) * tb;\n\t out[10] = (far + near) * nf;\n\t out[11] = -1;\n\t out[12] = 0;\n\t out[13] = 0;\n\t out[14] = (far * near * 2) * nf;\n\t out[15] = 0;\n\t return out;\n\t};\n\t\n\t/**\n\t * Generates a perspective projection matrix with the given bounds\n\t *\n\t * @param {mat4} out mat4 frustum matrix will be written into\n\t * @param {number} fovy Vertical field of view in radians\n\t * @param {number} aspect Aspect ratio. typically viewport width/height\n\t * @param {number} near Near bound of the frustum\n\t * @param {number} far Far bound of the frustum\n\t * @returns {mat4} out\n\t */\n\tmat4.perspective = function (out, fovy, aspect, near, far) {\n\t var f = 1.0 / Math.tan(fovy / 2),\n\t nf = 1 / (near - far);\n\t out[0] = f / aspect;\n\t out[1] = 0;\n\t out[2] = 0;\n\t out[3] = 0;\n\t out[4] = 0;\n\t out[5] = f;\n\t out[6] = 0;\n\t out[7] = 0;\n\t out[8] = 0;\n\t out[9] = 0;\n\t out[10] = (far + near) * nf;\n\t out[11] = -1;\n\t out[12] = 0;\n\t out[13] = 0;\n\t out[14] = (2 * far * near) * nf;\n\t out[15] = 0;\n\t return out;\n\t};\n\t\n\t/**\n\t * Generates a orthogonal projection matrix with the given bounds\n\t *\n\t * @param {mat4} out mat4 frustum matrix will be written into\n\t * @param {number} left Left bound of the frustum\n\t * @param {number} right Right bound of the frustum\n\t * @param {number} bottom Bottom bound of the frustum\n\t * @param {number} top Top bound of the frustum\n\t * @param {number} near Near bound of the frustum\n\t * @param {number} far Far bound of the frustum\n\t * @returns {mat4} out\n\t */\n\tmat4.ortho = function (out, left, right, bottom, top, near, far) {\n\t var lr = 1 / (left - right),\n\t bt = 1 / (bottom - top),\n\t nf = 1 / (near - far);\n\t out[0] = -2 * lr;\n\t out[1] = 0;\n\t out[2] = 0;\n\t out[3] = 0;\n\t out[4] = 0;\n\t out[5] = -2 * bt;\n\t out[6] = 0;\n\t out[7] = 0;\n\t out[8] = 0;\n\t out[9] = 0;\n\t out[10] = 2 * nf;\n\t out[11] = 0;\n\t out[12] = (left + right) * lr;\n\t out[13] = (top + bottom) * bt;\n\t out[14] = (far + near) * nf;\n\t out[15] = 1;\n\t return out;\n\t};\n\t\n\t/**\n\t * Generates a look-at matrix with the given eye position, focal point, and up axis\n\t *\n\t * @param {mat4} out mat4 frustum matrix will be written into\n\t * @param {vec3} eye Position of the viewer\n\t * @param {vec3} center Point the viewer is looking at\n\t * @param {vec3} up vec3 pointing up\n\t * @returns {mat4} out\n\t */\n\tmat4.lookAt = function (out, eye, center, up) {\n\t var x0, x1, x2, y0, y1, y2, z0, z1, z2, len,\n\t eyex = eye[0],\n\t eyey = eye[1],\n\t eyez = eye[2],\n\t upx = up[0],\n\t upy = up[1],\n\t upz = up[2],\n\t centerx = center[0],\n\t centery = center[1],\n\t centerz = center[2];\n\t\n\t if (Math.abs(eyex - centerx) < GLMAT_EPSILON &&\n\t Math.abs(eyey - centery) < GLMAT_EPSILON &&\n\t Math.abs(eyez - centerz) < GLMAT_EPSILON) {\n\t return mat4.identity(out);\n\t }\n\t\n\t z0 = eyex - centerx;\n\t z1 = eyey - centery;\n\t z2 = eyez - centerz;\n\t\n\t len = 1 / Math.sqrt(z0 * z0 + z1 * z1 + z2 * z2);\n\t z0 *= len;\n\t z1 *= len;\n\t z2 *= len;\n\t\n\t x0 = upy * z2 - upz * z1;\n\t x1 = upz * z0 - upx * z2;\n\t x2 = upx * z1 - upy * z0;\n\t len = Math.sqrt(x0 * x0 + x1 * x1 + x2 * x2);\n\t if (!len) {\n\t x0 = 0;\n\t x1 = 0;\n\t x2 = 0;\n\t } else {\n\t len = 1 / len;\n\t x0 *= len;\n\t x1 *= len;\n\t x2 *= len;\n\t }\n\t\n\t y0 = z1 * x2 - z2 * x1;\n\t y1 = z2 * x0 - z0 * x2;\n\t y2 = z0 * x1 - z1 * x0;\n\t\n\t len = Math.sqrt(y0 * y0 + y1 * y1 + y2 * y2);\n\t if (!len) {\n\t y0 = 0;\n\t y1 = 0;\n\t y2 = 0;\n\t } else {\n\t len = 1 / len;\n\t y0 *= len;\n\t y1 *= len;\n\t y2 *= len;\n\t }\n\t\n\t out[0] = x0;\n\t out[1] = y0;\n\t out[2] = z0;\n\t out[3] = 0;\n\t out[4] = x1;\n\t out[5] = y1;\n\t out[6] = z1;\n\t out[7] = 0;\n\t out[8] = x2;\n\t out[9] = y2;\n\t out[10] = z2;\n\t out[11] = 0;\n\t out[12] = -(x0 * eyex + x1 * eyey + x2 * eyez);\n\t out[13] = -(y0 * eyex + y1 * eyey + y2 * eyez);\n\t out[14] = -(z0 * eyex + z1 * eyey + z2 * eyez);\n\t out[15] = 1;\n\t\n\t return out;\n\t};\n\t\n\t/**\n\t * Returns a string representation of a mat4\n\t *\n\t * @param {mat4} mat matrix to represent as a string\n\t * @returns {String} string representation of the matrix\n\t */\n\tmat4.str = function (a) {\n\t return 'mat4(' + a[0] + ', ' + a[1] + ', ' + a[2] + ', ' + a[3] + ', ' +\n\t a[4] + ', ' + a[5] + ', ' + a[6] + ', ' + a[7] + ', ' +\n\t a[8] + ', ' + a[9] + ', ' + a[10] + ', ' + a[11] + ', ' + \n\t a[12] + ', ' + a[13] + ', ' + a[14] + ', ' + a[15] + ')';\n\t};\n\t\n\t/**\n\t * Returns Frobenius norm of a mat4\n\t *\n\t * @param {mat4} a the matrix to calculate Frobenius norm of\n\t * @returns {Number} Frobenius norm\n\t */\n\tmat4.frob = function (a) {\n\t return(Math.sqrt(Math.pow(a[0], 2) + Math.pow(a[1], 2) + Math.pow(a[2], 2) + Math.pow(a[3], 2) + Math.pow(a[4], 2) + Math.pow(a[5], 2) + Math.pow(a[6], 2) + Math.pow(a[6], 2) + Math.pow(a[7], 2) + Math.pow(a[8], 2) + Math.pow(a[9], 2) + Math.pow(a[10], 2) + Math.pow(a[11], 2) + Math.pow(a[12], 2) + Math.pow(a[13], 2) + Math.pow(a[14], 2) + Math.pow(a[15], 2) ))\n\t};\n\t\n\t\n\tif(typeof(exports) !== 'undefined') {\n\t exports.mat4 = mat4;\n\t}\n\t;\n\t/* Copyright (c) 2013, Brandon Jones, Colin MacKenzie IV. All rights reserved.\n\t\n\tRedistribution and use in source and binary forms, with or without modification,\n\tare permitted provided that the following conditions are met:\n\t\n\t * Redistributions of source code must retain the above copyright notice, this\n\t list of conditions and the following disclaimer.\n\t * Redistributions in binary form must reproduce the above copyright notice,\n\t this list of conditions and the following disclaimer in the documentation \n\t and/or other materials provided with the distribution.\n\t\n\tTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n\tANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n\tWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE \n\tDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR\n\tANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n\t(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n\tLOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON\n\tANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n\t(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n\tSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */\n\t\n\t/**\n\t * @class Quaternion\n\t * @name quat\n\t */\n\t\n\tvar quat = {};\n\t\n\t/**\n\t * Creates a new identity quat\n\t *\n\t * @returns {quat} a new quaternion\n\t */\n\tquat.create = function() {\n\t var out = new GLMAT_ARRAY_TYPE(4);\n\t out[0] = 0;\n\t out[1] = 0;\n\t out[2] = 0;\n\t out[3] = 1;\n\t return out;\n\t};\n\t\n\t/**\n\t * Sets a quaternion to represent the shortest rotation from one\n\t * vector to another.\n\t *\n\t * Both vectors are assumed to be unit length.\n\t *\n\t * @param {quat} out the receiving quaternion.\n\t * @param {vec3} a the initial vector\n\t * @param {vec3} b the destination vector\n\t * @returns {quat} out\n\t */\n\tquat.rotationTo = (function() {\n\t var tmpvec3 = vec3.create();\n\t var xUnitVec3 = vec3.fromValues(1,0,0);\n\t var yUnitVec3 = vec3.fromValues(0,1,0);\n\t\n\t return function(out, a, b) {\n\t var dot = vec3.dot(a, b);\n\t if (dot < -0.999999) {\n\t vec3.cross(tmpvec3, xUnitVec3, a);\n\t if (vec3.length(tmpvec3) < 0.000001)\n\t vec3.cross(tmpvec3, yUnitVec3, a);\n\t vec3.normalize(tmpvec3, tmpvec3);\n\t quat.setAxisAngle(out, tmpvec3, Math.PI);\n\t return out;\n\t } else if (dot > 0.999999) {\n\t out[0] = 0;\n\t out[1] = 0;\n\t out[2] = 0;\n\t out[3] = 1;\n\t return out;\n\t } else {\n\t vec3.cross(tmpvec3, a, b);\n\t out[0] = tmpvec3[0];\n\t out[1] = tmpvec3[1];\n\t out[2] = tmpvec3[2];\n\t out[3] = 1 + dot;\n\t return quat.normalize(out, out);\n\t }\n\t };\n\t})();\n\t\n\t/**\n\t * Sets the specified quaternion with values corresponding to the given\n\t * axes. Each axis is a vec3 and is expected to be unit length and\n\t * perpendicular to all other specified axes.\n\t *\n\t * @param {vec3} view the vector representing the viewing direction\n\t * @param {vec3} right the vector representing the local \"right\" direction\n\t * @param {vec3} up the vector representing the local \"up\" direction\n\t * @returns {quat} out\n\t */\n\tquat.setAxes = (function() {\n\t var matr = mat3.create();\n\t\n\t return function(out, view, right, up) {\n\t matr[0] = right[0];\n\t matr[3] = right[1];\n\t matr[6] = right[2];\n\t\n\t matr[1] = up[0];\n\t matr[4] = up[1];\n\t matr[7] = up[2];\n\t\n\t matr[2] = -view[0];\n\t matr[5] = -view[1];\n\t matr[8] = -view[2];\n\t\n\t return quat.normalize(out, quat.fromMat3(out, matr));\n\t };\n\t})();\n\t\n\t/**\n\t * Creates a new quat initialized with values from an existing quaternion\n\t *\n\t * @param {quat} a quaternion to clone\n\t * @returns {quat} a new quaternion\n\t * @function\n\t */\n\tquat.clone = vec4.clone;\n\t\n\t/**\n\t * Creates a new quat initialized with the given values\n\t *\n\t * @param {Number} x X component\n\t * @param {Number} y Y component\n\t * @param {Number} z Z component\n\t * @param {Number} w W component\n\t * @returns {quat} a new quaternion\n\t * @function\n\t */\n\tquat.fromValues = vec4.fromValues;\n\t\n\t/**\n\t * Copy the values from one quat to another\n\t *\n\t * @param {quat} out the receiving quaternion\n\t * @param {quat} a the source quaternion\n\t * @returns {quat} out\n\t * @function\n\t */\n\tquat.copy = vec4.copy;\n\t\n\t/**\n\t * Set the components of a quat to the given values\n\t *\n\t * @param {quat} out the receiving quaternion\n\t * @param {Number} x X component\n\t * @param {Number} y Y component\n\t * @param {Number} z Z component\n\t * @param {Number} w W component\n\t * @returns {quat} out\n\t * @function\n\t */\n\tquat.set = vec4.set;\n\t\n\t/**\n\t * Set a quat to the identity quaternion\n\t *\n\t * @param {quat} out the receiving quaternion\n\t * @returns {quat} out\n\t */\n\tquat.identity = function(out) {\n\t out[0] = 0;\n\t out[1] = 0;\n\t out[2] = 0;\n\t out[3] = 1;\n\t return out;\n\t};\n\t\n\t/**\n\t * Sets a quat from the given angle and rotation axis,\n\t * then returns it.\n\t *\n\t * @param {quat} out the receiving quaternion\n\t * @param {vec3} axis the axis around which to rotate\n\t * @param {Number} rad the angle in radians\n\t * @returns {quat} out\n\t **/\n\tquat.setAxisAngle = function(out, axis, rad) {\n\t rad = rad * 0.5;\n\t var s = Math.sin(rad);\n\t out[0] = s * axis[0];\n\t out[1] = s * axis[1];\n\t out[2] = s * axis[2];\n\t out[3] = Math.cos(rad);\n\t return out;\n\t};\n\t\n\t/**\n\t * Adds two quat's\n\t *\n\t * @param {quat} out the receiving quaternion\n\t * @param {quat} a the first operand\n\t * @param {quat} b the second operand\n\t * @returns {quat} out\n\t * @function\n\t */\n\tquat.add = vec4.add;\n\t\n\t/**\n\t * Multiplies two quat's\n\t *\n\t * @param {quat} out the receiving quaternion\n\t * @param {quat} a the first operand\n\t * @param {quat} b the second operand\n\t * @returns {quat} out\n\t */\n\tquat.multiply = function(out, a, b) {\n\t var ax = a[0], ay = a[1], az = a[2], aw = a[3],\n\t bx = b[0], by = b[1], bz = b[2], bw = b[3];\n\t\n\t out[0] = ax * bw + aw * bx + ay * bz - az * by;\n\t out[1] = ay * bw + aw * by + az * bx - ax * bz;\n\t out[2] = az * bw + aw * bz + ax * by - ay * bx;\n\t out[3] = aw * bw - ax * bx - ay * by - az * bz;\n\t return out;\n\t};\n\t\n\t/**\n\t * Alias for {@link quat.multiply}\n\t * @function\n\t */\n\tquat.mul = quat.multiply;\n\t\n\t/**\n\t * Scales a quat by a scalar number\n\t *\n\t * @param {quat} out the receiving vector\n\t * @param {quat} a the vector to scale\n\t * @param {Number} b amount to scale the vector by\n\t * @returns {quat} out\n\t * @function\n\t */\n\tquat.scale = vec4.scale;\n\t\n\t/**\n\t * Rotates a quaternion by the given angle about the X axis\n\t *\n\t * @param {quat} out quat receiving operation result\n\t * @param {quat} a quat to rotate\n\t * @param {number} rad angle (in radians) to rotate\n\t * @returns {quat} out\n\t */\n\tquat.rotateX = function (out, a, rad) {\n\t rad *= 0.5; \n\t\n\t var ax = a[0], ay = a[1], az = a[2], aw = a[3],\n\t bx = Math.sin(rad), bw = Math.cos(rad);\n\t\n\t out[0] = ax * bw + aw * bx;\n\t out[1] = ay * bw + az * bx;\n\t out[2] = az * bw - ay * bx;\n\t out[3] = aw * bw - ax * bx;\n\t return out;\n\t};\n\t\n\t/**\n\t * Rotates a quaternion by the given angle about the Y axis\n\t *\n\t * @param {quat} out quat receiving operation result\n\t * @param {quat} a quat to rotate\n\t * @param {number} rad angle (in radians) to rotate\n\t * @returns {quat} out\n\t */\n\tquat.rotateY = function (out, a, rad) {\n\t rad *= 0.5; \n\t\n\t var ax = a[0], ay = a[1], az = a[2], aw = a[3],\n\t by = Math.sin(rad), bw = Math.cos(rad);\n\t\n\t out[0] = ax * bw - az * by;\n\t out[1] = ay * bw + aw * by;\n\t out[2] = az * bw + ax * by;\n\t out[3] = aw * bw - ay * by;\n\t return out;\n\t};\n\t\n\t/**\n\t * Rotates a quaternion by the given angle about the Z axis\n\t *\n\t * @param {quat} out quat receiving operation result\n\t * @param {quat} a quat to rotate\n\t * @param {number} rad angle (in radians) to rotate\n\t * @returns {quat} out\n\t */\n\tquat.rotateZ = function (out, a, rad) {\n\t rad *= 0.5; \n\t\n\t var ax = a[0], ay = a[1], az = a[2], aw = a[3],\n\t bz = Math.sin(rad), bw = Math.cos(rad);\n\t\n\t out[0] = ax * bw + ay * bz;\n\t out[1] = ay * bw - ax * bz;\n\t out[2] = az * bw + aw * bz;\n\t out[3] = aw * bw - az * bz;\n\t return out;\n\t};\n\t\n\t/**\n\t * Calculates the W component of a quat from the X, Y, and Z components.\n\t * Assumes that quaternion is 1 unit in length.\n\t * Any existing W component will be ignored.\n\t *\n\t * @param {quat} out the receiving quaternion\n\t * @param {quat} a quat to calculate W component of\n\t * @returns {quat} out\n\t */\n\tquat.calculateW = function (out, a) {\n\t var x = a[0], y = a[1], z = a[2];\n\t\n\t out[0] = x;\n\t out[1] = y;\n\t out[2] = z;\n\t out[3] = -Math.sqrt(Math.abs(1.0 - x * x - y * y - z * z));\n\t return out;\n\t};\n\t\n\t/**\n\t * Calculates the dot product of two quat's\n\t *\n\t * @param {quat} a the first operand\n\t * @param {quat} b the second operand\n\t * @returns {Number} dot product of a and b\n\t * @function\n\t */\n\tquat.dot = vec4.dot;\n\t\n\t/**\n\t * Performs a linear interpolation between two quat's\n\t *\n\t * @param {quat} out the receiving quaternion\n\t * @param {quat} a the first operand\n\t * @param {quat} b the second operand\n\t * @param {Number} t interpolation amount between the two inputs\n\t * @returns {quat} out\n\t * @function\n\t */\n\tquat.lerp = vec4.lerp;\n\t\n\t/**\n\t * Performs a spherical linear interpolation between two quat\n\t *\n\t * @param {quat} out the receiving quaternion\n\t * @param {quat} a the first operand\n\t * @param {quat} b the second operand\n\t * @param {Number} t interpolation amount between the two inputs\n\t * @returns {quat} out\n\t */\n\tquat.slerp = function (out, a, b, t) {\n\t // benchmarks:\n\t // http://jsperf.com/quaternion-slerp-implementations\n\t\n\t var ax = a[0], ay = a[1], az = a[2], aw = a[3],\n\t bx = b[0], by = b[1], bz = b[2], bw = b[3];\n\t\n\t var omega, cosom, sinom, scale0, scale1;\n\t\n\t // calc cosine\n\t cosom = ax * bx + ay * by + az * bz + aw * bw;\n\t // adjust signs (if necessary)\n\t if ( cosom < 0.0 ) {\n\t cosom = -cosom;\n\t bx = - bx;\n\t by = - by;\n\t bz = - bz;\n\t bw = - bw;\n\t }\n\t // calculate coefficients\n\t if ( (1.0 - cosom) > 0.000001 ) {\n\t // standard case (slerp)\n\t omega = Math.acos(cosom);\n\t sinom = Math.sin(omega);\n\t scale0 = Math.sin((1.0 - t) * omega) / sinom;\n\t scale1 = Math.sin(t * omega) / sinom;\n\t } else { \n\t // \"from\" and \"to\" quaternions are very close \n\t // ... so we can do a linear interpolation\n\t scale0 = 1.0 - t;\n\t scale1 = t;\n\t }\n\t // calculate final values\n\t out[0] = scale0 * ax + scale1 * bx;\n\t out[1] = scale0 * ay + scale1 * by;\n\t out[2] = scale0 * az + scale1 * bz;\n\t out[3] = scale0 * aw + scale1 * bw;\n\t \n\t return out;\n\t};\n\t\n\t/**\n\t * Calculates the inverse of a quat\n\t *\n\t * @param {quat} out the receiving quaternion\n\t * @param {quat} a quat to calculate inverse of\n\t * @returns {quat} out\n\t */\n\tquat.invert = function(out, a) {\n\t var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3],\n\t dot = a0*a0 + a1*a1 + a2*a2 + a3*a3,\n\t invDot = dot ? 1.0/dot : 0;\n\t \n\t // TODO: Would be faster to return [0,0,0,0] immediately if dot == 0\n\t\n\t out[0] = -a0*invDot;\n\t out[1] = -a1*invDot;\n\t out[2] = -a2*invDot;\n\t out[3] = a3*invDot;\n\t return out;\n\t};\n\t\n\t/**\n\t * Calculates the conjugate of a quat\n\t * If the quaternion is normalized, this function is faster than quat.inverse and produces the same result.\n\t *\n\t * @param {quat} out the receiving quaternion\n\t * @param {quat} a quat to calculate conjugate of\n\t * @returns {quat} out\n\t */\n\tquat.conjugate = function (out, a) {\n\t out[0] = -a[0];\n\t out[1] = -a[1];\n\t out[2] = -a[2];\n\t out[3] = a[3];\n\t return out;\n\t};\n\t\n\t/**\n\t * Calculates the length of a quat\n\t *\n\t * @param {quat} a vector to calculate length of\n\t * @returns {Number} length of a\n\t * @function\n\t */\n\tquat.length = vec4.length;\n\t\n\t/**\n\t * Alias for {@link quat.length}\n\t * @function\n\t */\n\tquat.len = quat.length;\n\t\n\t/**\n\t * Calculates the squared length of a quat\n\t *\n\t * @param {quat} a vector to calculate squared length of\n\t * @returns {Number} squared length of a\n\t * @function\n\t */\n\tquat.squaredLength = vec4.squaredLength;\n\t\n\t/**\n\t * Alias for {@link quat.squaredLength}\n\t * @function\n\t */\n\tquat.sqrLen = quat.squaredLength;\n\t\n\t/**\n\t * Normalize a quat\n\t *\n\t * @param {quat} out the receiving quaternion\n\t * @param {quat} a quaternion to normalize\n\t * @returns {quat} out\n\t * @function\n\t */\n\tquat.normalize = vec4.normalize;\n\t\n\t/**\n\t * Creates a quaternion from the given 3x3 rotation matrix.\n\t *\n\t * NOTE: The resultant quaternion is not normalized, so you should be sure\n\t * to renormalize the quaternion yourself where necessary.\n\t *\n\t * @param {quat} out the receiving quaternion\n\t * @param {mat3} m rotation matrix\n\t * @returns {quat} out\n\t * @function\n\t */\n\tquat.fromMat3 = function(out, m) {\n\t // Algorithm in Ken Shoemake's article in 1987 SIGGRAPH course notes\n\t // article \"Quaternion Calculus and Fast Animation\".\n\t var fTrace = m[0] + m[4] + m[8];\n\t var fRoot;\n\t\n\t if ( fTrace > 0.0 ) {\n\t // |w| > 1/2, may as well choose w > 1/2\n\t fRoot = Math.sqrt(fTrace + 1.0); // 2w\n\t out[3] = 0.5 * fRoot;\n\t fRoot = 0.5/fRoot; // 1/(4w)\n\t out[0] = (m[7]-m[5])*fRoot;\n\t out[1] = (m[2]-m[6])*fRoot;\n\t out[2] = (m[3]-m[1])*fRoot;\n\t } else {\n\t // |w| <= 1/2\n\t var i = 0;\n\t if ( m[4] > m[0] )\n\t i = 1;\n\t if ( m[8] > m[i*3+i] )\n\t i = 2;\n\t var j = (i+1)%3;\n\t var k = (i+2)%3;\n\t \n\t fRoot = Math.sqrt(m[i*3+i]-m[j*3+j]-m[k*3+k] + 1.0);\n\t out[i] = 0.5 * fRoot;\n\t fRoot = 0.5 / fRoot;\n\t out[3] = (m[k*3+j] - m[j*3+k]) * fRoot;\n\t out[j] = (m[j*3+i] + m[i*3+j]) * fRoot;\n\t out[k] = (m[k*3+i] + m[i*3+k]) * fRoot;\n\t }\n\t \n\t return out;\n\t};\n\t\n\t/**\n\t * Returns a string representation of a quatenion\n\t *\n\t * @param {quat} vec vector to represent as a string\n\t * @returns {String} string representation of the vector\n\t */\n\tquat.str = function (a) {\n\t return 'quat(' + a[0] + ', ' + a[1] + ', ' + a[2] + ', ' + a[3] + ')';\n\t};\n\t\n\tif(typeof(exports) !== 'undefined') {\n\t exports.quat = quat;\n\t}\n\t;\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t })(shim.exports);\n\t})(this);\n\n\n/***/ },\n/* 3 */\n/***/ function(module, exports) {\n\n\t// Copyright Joyent, Inc. and other Node contributors.\n\t//\n\t// Permission is hereby granted, free of charge, to any person obtaining a\n\t// copy of this software and associated documentation files (the\n\t// \"Software\"), to deal in the Software without restriction, including\n\t// without limitation the rights to use, copy, modify, merge, publish,\n\t// distribute, sublicense, and/or sell copies of the Software, and to permit\n\t// persons to whom the Software is furnished to do so, subject to the\n\t// following conditions:\n\t//\n\t// The above copyright notice and this permission notice shall be included\n\t// in all copies or substantial portions of the Software.\n\t//\n\t// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n\t// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n\t// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n\t// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n\t// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n\t// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n\t// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\t\n\tfunction EventEmitter() {\n\t this._events = this._events || {};\n\t this._maxListeners = this._maxListeners || undefined;\n\t}\n\tmodule.exports = EventEmitter;\n\t\n\t// Backwards-compat with node 0.10.x\n\tEventEmitter.EventEmitter = EventEmitter;\n\t\n\tEventEmitter.prototype._events = undefined;\n\tEventEmitter.prototype._maxListeners = undefined;\n\t\n\t// By default EventEmitters will print a warning if more than 10 listeners are\n\t// added to it. This is a useful default which helps finding memory leaks.\n\tEventEmitter.defaultMaxListeners = 10;\n\t\n\t// Obviously not all Emitters should be limited to 10. This function allows\n\t// that to be increased. Set to zero for unlimited.\n\tEventEmitter.prototype.setMaxListeners = function(n) {\n\t if (!isNumber(n) || n < 0 || isNaN(n))\n\t throw TypeError('n must be a positive number');\n\t this._maxListeners = n;\n\t return this;\n\t};\n\t\n\tEventEmitter.prototype.emit = function(type) {\n\t var er, handler, len, args, i, listeners;\n\t\n\t if (!this._events)\n\t this._events = {};\n\t\n\t // If there is no 'error' event listener then throw.\n\t if (type === 'error') {\n\t if (!this._events.error ||\n\t (isObject(this._events.error) && !this._events.error.length)) {\n\t er = arguments[1];\n\t if (er instanceof Error) {\n\t throw er; // Unhandled 'error' event\n\t } else {\n\t // At least give some kind of context to the user\n\t var err = new Error('Uncaught, unspecified \"error\" event. (' + er + ')');\n\t err.context = er;\n\t throw err;\n\t }\n\t }\n\t }\n\t\n\t handler = this._events[type];\n\t\n\t if (isUndefined(handler))\n\t return false;\n\t\n\t if (isFunction(handler)) {\n\t switch (arguments.length) {\n\t // fast cases\n\t case 1:\n\t handler.call(this);\n\t break;\n\t case 2:\n\t handler.call(this, arguments[1]);\n\t break;\n\t case 3:\n\t handler.call(this, arguments[1], arguments[2]);\n\t break;\n\t // slower\n\t default:\n\t args = Array.prototype.slice.call(arguments, 1);\n\t handler.apply(this, args);\n\t }\n\t } else if (isObject(handler)) {\n\t args = Array.prototype.slice.call(arguments, 1);\n\t listeners = handler.slice();\n\t len = listeners.length;\n\t for (i = 0; i < len; i++)\n\t listeners[i].apply(this, args);\n\t }\n\t\n\t return true;\n\t};\n\t\n\tEventEmitter.prototype.addListener = function(type, listener) {\n\t var m;\n\t\n\t if (!isFunction(listener))\n\t throw TypeError('listener must be a function');\n\t\n\t if (!this._events)\n\t this._events = {};\n\t\n\t // To avoid recursion in the case that type === \"newListener\"! Before\n\t // adding it to the listeners, first emit \"newListener\".\n\t if (this._events.newListener)\n\t this.emit('newListener', type,\n\t isFunction(listener.listener) ?\n\t listener.listener : listener);\n\t\n\t if (!this._events[type])\n\t // Optimize the case of one listener. Don't need the extra array object.\n\t this._events[type] = listener;\n\t else if (isObject(this._events[type]))\n\t // If we've already got an array, just append.\n\t this._events[type].push(listener);\n\t else\n\t // Adding the second element, need to change to array.\n\t this._events[type] = [this._events[type], listener];\n\t\n\t // Check for listener leak\n\t if (isObject(this._events[type]) && !this._events[type].warned) {\n\t if (!isUndefined(this._maxListeners)) {\n\t m = this._maxListeners;\n\t } else {\n\t m = EventEmitter.defaultMaxListeners;\n\t }\n\t\n\t if (m && m > 0 && this._events[type].length > m) {\n\t this._events[type].warned = true;\n\t console.error('(node) warning: possible EventEmitter memory ' +\n\t 'leak detected. %d listeners added. ' +\n\t 'Use emitter.setMaxListeners() to increase limit.',\n\t this._events[type].length);\n\t if (typeof console.trace === 'function') {\n\t // not supported in IE 10\n\t console.trace();\n\t }\n\t }\n\t }\n\t\n\t return this;\n\t};\n\t\n\tEventEmitter.prototype.on = EventEmitter.prototype.addListener;\n\t\n\tEventEmitter.prototype.once = function(type, listener) {\n\t if (!isFunction(listener))\n\t throw TypeError('listener must be a function');\n\t\n\t var fired = false;\n\t\n\t function g() {\n\t this.removeListener(type, g);\n\t\n\t if (!fired) {\n\t fired = true;\n\t listener.apply(this, arguments);\n\t }\n\t }\n\t\n\t g.listener = listener;\n\t this.on(type, g);\n\t\n\t return this;\n\t};\n\t\n\t// emits a 'removeListener' event iff the listener was removed\n\tEventEmitter.prototype.removeListener = function(type, listener) {\n\t var list, position, length, i;\n\t\n\t if (!isFunction(listener))\n\t throw TypeError('listener must be a function');\n\t\n\t if (!this._events || !this._events[type])\n\t return this;\n\t\n\t list = this._events[type];\n\t length = list.length;\n\t position = -1;\n\t\n\t if (list === listener ||\n\t (isFunction(list.listener) && list.listener === listener)) {\n\t delete this._events[type];\n\t if (this._events.removeListener)\n\t this.emit('removeListener', type, listener);\n\t\n\t } else if (isObject(list)) {\n\t for (i = length; i-- > 0;) {\n\t if (list[i] === listener ||\n\t (list[i].listener && list[i].listener === listener)) {\n\t position = i;\n\t break;\n\t }\n\t }\n\t\n\t if (position < 0)\n\t return this;\n\t\n\t if (list.length === 1) {\n\t list.length = 0;\n\t delete this._events[type];\n\t } else {\n\t list.splice(position, 1);\n\t }\n\t\n\t if (this._events.removeListener)\n\t this.emit('removeListener', type, listener);\n\t }\n\t\n\t return this;\n\t};\n\t\n\tEventEmitter.prototype.removeAllListeners = function(type) {\n\t var key, listeners;\n\t\n\t if (!this._events)\n\t return this;\n\t\n\t // not listening for removeListener, no need to emit\n\t if (!this._events.removeListener) {\n\t if (arguments.length === 0)\n\t this._events = {};\n\t else if (this._events[type])\n\t delete this._events[type];\n\t return this;\n\t }\n\t\n\t // emit removeListener for all listeners on all events\n\t if (arguments.length === 0) {\n\t for (key in this._events) {\n\t if (key === 'removeListener') continue;\n\t this.removeAllListeners(key);\n\t }\n\t this.removeAllListeners('removeListener');\n\t this._events = {};\n\t return this;\n\t }\n\t\n\t listeners = this._events[type];\n\t\n\t if (isFunction(listeners)) {\n\t this.removeListener(type, listeners);\n\t } else if (listeners) {\n\t // LIFO order\n\t while (listeners.length)\n\t this.removeListener(type, listeners[listeners.length - 1]);\n\t }\n\t delete this._events[type];\n\t\n\t return this;\n\t};\n\t\n\tEventEmitter.prototype.listeners = function(type) {\n\t var ret;\n\t if (!this._events || !this._events[type])\n\t ret = [];\n\t else if (isFunction(this._events[type]))\n\t ret = [this._events[type]];\n\t else\n\t ret = this._events[type].slice();\n\t return ret;\n\t};\n\t\n\tEventEmitter.prototype.listenerCount = function(type) {\n\t if (this._events) {\n\t var evlistener = this._events[type];\n\t\n\t if (isFunction(evlistener))\n\t return 1;\n\t else if (evlistener)\n\t return evlistener.length;\n\t }\n\t return 0;\n\t};\n\t\n\tEventEmitter.listenerCount = function(emitter, type) {\n\t return emitter.listenerCount(type);\n\t};\n\t\n\tfunction isFunction(arg) {\n\t return typeof arg === 'function';\n\t}\n\t\n\tfunction isNumber(arg) {\n\t return typeof arg === 'number';\n\t}\n\t\n\tfunction isObject(arg) {\n\t return typeof arg === 'object' && arg !== null;\n\t}\n\t\n\tfunction isUndefined(arg) {\n\t return arg === void 0;\n\t}\n\n\n/***/ },\n/* 4 */\n/***/ function(module, exports, __webpack_require__) {\n\n\tvar glMatrix = __webpack_require__(2)\n\t , vec3 = glMatrix.vec3;\n\t\n\t/**\n\t * Constructs a Pointable object.\n\t *\n\t * An uninitialized pointable is considered invalid.\n\t * Get valid Pointable objects from a Frame or a Hand object.\n\t *\n\t * @class Pointable\n\t * @memberof Leap\n\t * @classdesc\n\t * The Pointable class reports the physical characteristics of a detected\n\t * finger or tool.\n\t *\n\t * Both fingers and tools are classified as Pointable objects. Use the\n\t * Pointable.tool property to determine whether a Pointable object represents a\n\t * tool or finger. The Leap classifies a detected entity as a tool when it is\n\t * thinner, straighter, and longer than a typical finger.\n\t *\n\t * Note that Pointable objects can be invalid, which means that they do not\n\t * contain valid tracking data and do not correspond to a physical entity.\n\t * Invalid Pointable objects can be the result of asking for a Pointable object\n\t * using an ID from an earlier frame when no Pointable objects with that ID\n\t * exist in the current frame. A Pointable object created from the Pointable\n\t * constructor is also invalid. Test for validity with the Pointable.valid\n\t * property.\n\t */\n\tvar Pointable = module.exports = function(data) {\n\t /**\n\t * Indicates whether this is a valid Pointable object.\n\t *\n\t * @member valid\n\t * @type {Boolean}\n\t * @memberof Leap.Pointable.prototype\n\t */\n\t this.valid = true;\n\t /**\n\t * A unique ID assigned to this Pointable object, whose value remains the\n\t * same across consecutive frames while the tracked finger or tool remains\n\t * visible. If tracking is lost (for example, when a finger is occluded by\n\t * another finger or when it is withdrawn from the Leap field of view), the\n\t * Leap may assign a new ID when it detects the entity in a future frame.\n\t *\n\t * Use the ID value with the pointable() functions defined for the\n\t * {@link Frame} and {@link Frame.Hand} classes to find this\n\t * Pointable object in future frames.\n\t *\n\t * @member id\n\t * @type {String}\n\t * @memberof Leap.Pointable.prototype\n\t */\n\t this.id = data.id;\n\t this.handId = data.handId;\n\t /**\n\t * The estimated length of the finger or tool in millimeters.\n\t *\n\t * The reported length is the visible length of the finger or tool from the\n\t * hand to tip. If the length isn't known, then a value of 0 is returned.\n\t *\n\t * @member length\n\t * @type {number}\n\t * @memberof Leap.Pointable.prototype\n\t */\n\t this.length = data.length;\n\t /**\n\t * Whether or not the Pointable is believed to be a tool.\n\t * Tools are generally longer, thinner, and straighter than fingers.\n\t *\n\t * If tool is false, then this Pointable must be a finger.\n\t *\n\t * @member tool\n\t * @type {Boolean}\n\t * @memberof Leap.Pointable.prototype\n\t */\n\t this.tool = data.tool;\n\t /**\n\t * The estimated width of the tool in millimeters.\n\t *\n\t * The reported width is the average width of the visible portion of the\n\t * tool from the hand to the tip. If the width isn't known,\n\t * then a value of 0 is returned.\n\t *\n\t * Pointable objects representing fingers do not have a width property.\n\t *\n\t * @member width\n\t * @type {number}\n\t * @memberof Leap.Pointable.prototype\n\t */\n\t this.width = data.width;\n\t /**\n\t * The direction in which this finger or tool is pointing.\n\t *\n\t * The direction is expressed as a unit vector pointing in the same\n\t * direction as the tip.\n\t *\n\t * ![Finger](images/Leap_Finger_Model.png)\n\t * @member direction\n\t * @type {number[]}\n\t * @memberof Leap.Pointable.prototype\n\t */\n\t this.direction = data.direction;\n\t /**\n\t * The tip position in millimeters from the Leap origin.\n\t * Stabilized\n\t *\n\t * @member stabilizedTipPosition\n\t * @type {number[]}\n\t * @memberof Leap.Pointable.prototype\n\t */\n\t this.stabilizedTipPosition = data.stabilizedTipPosition;\n\t /**\n\t * The tip position in millimeters from the Leap origin.\n\t *\n\t * @member tipPosition\n\t * @type {number[]}\n\t * @memberof Leap.Pointable.prototype\n\t */\n\t this.tipPosition = data.tipPosition;\n\t /**\n\t * The rate of change of the tip position in millimeters/second.\n\t *\n\t * @member tipVelocity\n\t * @type {number[]}\n\t * @memberof Leap.Pointable.prototype\n\t */\n\t this.tipVelocity = data.tipVelocity;\n\t /**\n\t * The current touch zone of this Pointable object.\n\t *\n\t * The Leap Motion software computes the touch zone based on a floating touch\n\t * plane that adapts to the user's finger movement and hand posture. The Leap\n\t * Motion software interprets purposeful movements toward this plane as potential touch\n\t * points. When a Pointable moves close to the adaptive touch plane, it enters the\n\t * \"hovering\" zone. When a Pointable reaches or passes through the plane, it enters\n\t * the \"touching\" zone.\n\t *\n\t * The possible states include:\n\t *\n\t * * \"none\" -- The Pointable is outside the hovering zone.\n\t * * \"hovering\" -- The Pointable is close to, but not touching the touch plane.\n\t * * \"touching\" -- The Pointable has penetrated the touch plane.\n\t *\n\t * The touchDistance value provides a normalized indication of the distance to\n\t * the touch plane when the Pointable is in the hovering or touching zones.\n\t *\n\t * @member touchZone\n\t * @type {String}\n\t * @memberof Leap.Pointable.prototype\n\t */\n\t this.touchZone = data.touchZone;\n\t /**\n\t * A value proportional to the distance between this Pointable object and the\n\t * adaptive touch plane.\n\t *\n\t * ![Touch Distance](images/Leap_Touch_Plane.png)\n\t *\n\t * The touch distance is a value in the range [-1, 1]. The value 1.0 indicates the\n\t * Pointable is at the far edge of the hovering zone. The value 0 indicates the\n\t * Pointable is just entering the touching zone. A value of -1.0 indicates the\n\t * Pointable is firmly within the touching zone. Values in between are\n\t * proportional to the distance from the plane. Thus, the touchDistance of 0.5\n\t * indicates that the Pointable is halfway into the hovering zone.\n\t *\n\t * You can use the touchDistance value to modulate visual feedback given to the\n\t * user as their fingers close in on a touch target, such as a button.\n\t *\n\t * @member touchDistance\n\t * @type {number}\n\t * @memberof Leap.Pointable.prototype\n\t */\n\t this.touchDistance = data.touchDistance;\n\t\n\t /**\n\t * How long the pointable has been visible in seconds.\n\t *\n\t * @member timeVisible\n\t * @type {number}\n\t * @memberof Leap.Pointable.prototype\n\t */\n\t this.timeVisible = data.timeVisible;\n\t}\n\t\n\t/**\n\t * A string containing a brief, human readable description of the Pointable\n\t * object.\n\t *\n\t * @method toString\n\t * @memberof Leap.Pointable.prototype\n\t * @returns {String} A description of the Pointable object as a string.\n\t */\n\tPointable.prototype.toString = function() {\n\t return \"Pointable [ id:\" + this.id + \" \" + this.length + \"mmx | width:\" + this.width + \"mm | direction:\" + this.direction + ' ]';\n\t}\n\t\n\t/**\n\t * Returns the hand which the pointable is attached to.\n\t */\n\tPointable.prototype.hand = function(){\n\t return this.frame.hand(this.handId);\n\t}\n\t\n\t/**\n\t * An invalid Pointable object.\n\t *\n\t * You can use this Pointable instance in comparisons testing\n\t * whether a given Pointable instance is valid or invalid. (You can also use the\n\t * Pointable.valid property.)\n\t\n\t * @static\n\t * @type {Leap.Pointable}\n\t * @name Invalid\n\t * @memberof Leap.Pointable\n\t */\n\tPointable.Invalid = { valid: false };\n\n\n/***/ },\n/* 5 */\n/***/ function(module, exports, __webpack_require__) {\n\n\tvar Pointable = __webpack_require__(4),\n\t Bone = __webpack_require__(13)\n\t , Dialog = __webpack_require__(16)\n\t , _ = __webpack_require__(1);\n\t\n\t/**\n\t* Constructs a Finger object.\n\t*\n\t* An uninitialized finger is considered invalid.\n\t* Get valid Finger objects from a Frame or a Hand object.\n\t*\n\t* @class Finger\n\t* @memberof Leap\n\t* @classdesc\n\t* The Finger class reports the physical characteristics of a finger.\n\t*\n\t* Both fingers and tools are classified as Pointable objects. Use the\n\t* Pointable.tool property to determine whether a Pointable object represents a\n\t* tool or finger. The Leap classifies a detected entity as a tool when it is\n\t* thinner, straighter, and longer than a typical finger.\n\t*\n\t* Note that Finger objects can be invalid, which means that they do not\n\t* contain valid tracking data and do not correspond to a physical entity.\n\t* Invalid Finger objects can be the result of asking for a Finger object\n\t* using an ID from an earlier frame when no Finger objects with that ID\n\t* exist in the current frame. A Finger object created from the Finger\n\t* constructor is also invalid. Test for validity with the Pointable.valid\n\t* property.\n\t*/\n\tvar Finger = module.exports = function(data) {\n\t Pointable.call(this, data); // use pointable as super-constructor\n\t \n\t /**\n\t * The position of the distal interphalangeal joint of the finger.\n\t * This joint is closest to the tip.\n\t * \n\t * The distal interphalangeal joint is located between the most extreme segment\n\t * of the finger (the distal phalanx) and the middle segment (the medial\n\t * phalanx).\n\t *\n\t * @member dipPosition\n\t * @type {number[]}\n\t * @memberof Leap.Finger.prototype\n\t */ \n\t this.dipPosition = data.dipPosition;\n\t\n\t /**\n\t * The position of the proximal interphalangeal joint of the finger. This joint is the middle\n\t * joint of a finger.\n\t *\n\t * The proximal interphalangeal joint is located between the two finger segments\n\t * closest to the hand (the proximal and the medial phalanges). On a thumb,\n\t * which lacks an medial phalanx, this joint index identifies the knuckle joint\n\t * between the proximal phalanx and the metacarpal bone.\n\t *\n\t * @member pipPosition\n\t * @type {number[]}\n\t * @memberof Leap.Finger.prototype\n\t */ \n\t this.pipPosition = data.pipPosition;\n\t\n\t /**\n\t * The position of the metacarpopophalangeal joint, or knuckle, of the finger.\n\t *\n\t * The metacarpopophalangeal joint is located at the base of a finger between\n\t * the metacarpal bone and the first phalanx. The common name for this joint is\n\t * the knuckle.\n\t *\n\t * On a thumb, which has one less phalanx than a finger, this joint index\n\t * identifies the thumb joint near the base of the hand, between the carpal\n\t * and metacarpal bones.\n\t *\n\t * @member mcpPosition\n\t * @type {number[]}\n\t * @memberof Leap.Finger.prototype\n\t */ \n\t this.mcpPosition = data.mcpPosition;\n\t\n\t /**\n\t * The position of the Carpometacarpal joint\n\t *\n\t * This is at the distal end of the wrist, and has no common name.\n\t *\n\t */\n\t this.carpPosition = data.carpPosition;\n\t\n\t /**\n\t * Whether or not this finger is in an extended posture.\n\t *\n\t * A finger is considered extended if it is extended straight from the hand as if\n\t * pointing. A finger is not extended when it is bent down and curled towards the \n\t * palm.\n\t * @member extended\n\t * @type {Boolean}\n\t * @memberof Leap.Finger.prototype\n\t */\n\t this.extended = data.extended;\n\t\n\t /**\n\t * An integer code for the name of this finger.\n\t * \n\t * * 0 -- thumb\n\t * * 1 -- index finger\n\t * * 2 -- middle finger\n\t * * 3 -- ring finger\n\t * * 4 -- pinky\n\t *\n\t * @member type\n\t * @type {number}\n\t * @memberof Leap.Finger.prototype\n\t */\n\t this.type = data.type;\n\t\n\t this.finger = true;\n\t \n\t /**\n\t * The joint positions of this finger as an array in the order base to tip.\n\t *\n\t * @member positions\n\t * @type {array[]}\n\t * @memberof Leap.Finger.prototype\n\t */\n\t this.positions = [this.carpPosition, this.mcpPosition, this.pipPosition, this.dipPosition, this.tipPosition];\n\t\n\t if (data.bases){\n\t this.addBones(data);\n\t } else {\n\t Dialog.warnBones();\n\t }\n\t\n\t};\n\t\n\t_.extend(Finger.prototype, Pointable.prototype);\n\t\n\t\n\tFinger.prototype.addBones = function(data){\n\t /**\n\t * Four bones per finger, from wrist outwards:\n\t * metacarpal, proximal, medial, and distal.\n\t *\n\t * See http://en.wikipedia.org/wiki/Interphalangeal_articulations_of_hand\n\t */\n\t this.metacarpal = new Bone(this, {\n\t type: 0,\n\t width: this.width,\n\t prevJoint: this.carpPosition,\n\t nextJoint: this.mcpPosition,\n\t basis: data.bases[0]\n\t });\n\t\n\t this.proximal = new Bone(this, {\n\t type: 1,\n\t width: this.width,\n\t prevJoint: this.mcpPosition,\n\t nextJoint: this.pipPosition,\n\t basis: data.bases[1]\n\t });\n\t\n\t this.medial = new Bone(this, {\n\t type: 2,\n\t width: this.width,\n\t prevJoint: this.pipPosition,\n\t nextJoint: this.dipPosition,\n\t basis: data.bases[2]\n\t });\n\t\n\t /**\n\t * Note that the `distal.nextJoint` position is slightly different from the `finger.tipPosition`.\n\t * The former is at the very end of the bone, where the latter is the center of a sphere positioned at\n\t * the tip of the finger. The btipPosition \"bone tip position\" is a few mm closer to the wrist than\n\t * the tipPosition.\n\t * @type {Bone}\n\t */\n\t this.distal = new Bone(this, {\n\t type: 3,\n\t width: this.width,\n\t prevJoint: this.dipPosition,\n\t nextJoint: data.btipPosition,\n\t basis: data.bases[3]\n\t });\n\t\n\t this.bones = [this.metacarpal, this.proximal, this.medial, this.distal];\n\t};\n\t\n\tFinger.prototype.toString = function() {\n\t return \"Finger [ id:\" + this.id + \" \" + this.length + \"mmx | width:\" + this.width + \"mm | direction:\" + this.direction + ' ]';\n\t};\n\t\n\tFinger.Invalid = { valid: false };\n\n\n/***/ },\n/* 6 */\n/***/ function(module, exports, __webpack_require__) {\n\n\tvar Pointable = __webpack_require__(4)\n\t , Bone = __webpack_require__(13)\n\t , glMatrix = __webpack_require__(2)\n\t , mat3 = glMatrix.mat3\n\t , vec3 = glMatrix.vec3\n\t , _ = __webpack_require__(1);\n\t\n\t/**\n\t * Constructs a Hand object.\n\t *\n\t * An uninitialized hand is considered invalid.\n\t * Get valid Hand objects from a Frame object.\n\t * @class Hand\n\t * @memberof Leap\n\t * @classdesc\n\t * The Hand class reports the physical characteristics of a detected hand.\n\t *\n\t * Hand tracking data includes a palm position and velocity; vectors for\n\t * the palm normal and direction to the fingers; properties of a sphere fit\n\t * to the hand; and lists of the attached fingers and tools.\n\t *\n\t * Note that Hand objects can be invalid, which means that they do not contain\n\t * valid tracking data and do not correspond to a physical entity. Invalid Hand\n\t * objects can be the result of asking for a Hand object using an ID from an\n\t * earlier frame when no Hand objects with that ID exist in the current frame.\n\t * A Hand object created from the Hand constructor is also invalid.\n\t * Test for validity with the [Hand.valid]{@link Leap.Hand#valid} property.\n\t */\n\tvar Hand = module.exports = function(data) {\n\t /**\n\t * A unique ID assigned to this Hand object, whose value remains the same\n\t * across consecutive frames while the tracked hand remains visible. If\n\t * tracking is lost (for example, when a hand is occluded by another hand\n\t * or when it is withdrawn from or reaches the edge of the Leap field of view),\n\t * the Leap may assign a new ID when it detects the hand in a future frame.\n\t *\n\t * Use the ID value with the {@link Frame.hand}() function to find this\n\t * Hand object in future frames.\n\t *\n\t * @member id\n\t * @memberof Leap.Hand.prototype\n\t * @type {String}\n\t */\n\t this.id = data.id;\n\t /**\n\t * The center position of the palm in millimeters from the Leap origin.\n\t * @member palmPosition\n\t * @memberof Leap.Hand.prototype\n\t * @type {number[]}\n\t */\n\t this.palmPosition = data.palmPosition;\n\t /**\n\t * The direction from the palm position toward the fingers.\n\t *\n\t * The direction is expressed as a unit vector pointing in the same\n\t * direction as the directed line from the palm position to the fingers.\n\t *\n\t * @member direction\n\t * @memberof Leap.Hand.prototype\n\t * @type {number[]}\n\t */\n\t this.direction = data.direction;\n\t /**\n\t * The rate of change of the palm position in millimeters/second.\n\t *\n\t * @member palmVeclocity\n\t * @memberof Leap.Hand.prototype\n\t * @type {number[]}\n\t */\n\t this.palmVelocity = data.palmVelocity;\n\t /**\n\t * The normal vector to the palm. If your hand is flat, this vector will\n\t * point downward, or \"out\" of the front surface of your palm.\n\t *\n\t * ![Palm Vectors](images/Leap_Palm_Vectors.png)\n\t *\n\t * The direction is expressed as a unit vector pointing in the same\n\t * direction as the palm normal (that is, a vector orthogonal to the palm).\n\t * @member palmNormal\n\t * @memberof Leap.Hand.prototype\n\t * @type {number[]}\n\t */\n\t this.palmNormal = data.palmNormal;\n\t /**\n\t * The center of a sphere fit to the curvature of this hand.\n\t *\n\t * This sphere is placed roughly as if the hand were holding a ball.\n\t *\n\t * ![Hand Ball](images/Leap_Hand_Ball.png)\n\t * @member sphereCenter\n\t * @memberof Leap.Hand.prototype\n\t * @type {number[]}\n\t */\n\t this.sphereCenter = data.sphereCenter;\n\t /**\n\t * The radius of a sphere fit to the curvature of this hand, in millimeters.\n\t *\n\t * This sphere is placed roughly as if the hand were holding a ball. Thus the\n\t * size of the sphere decreases as the fingers are curled into a fist.\n\t *\n\t * @member sphereRadius\n\t * @memberof Leap.Hand.prototype\n\t * @type {number}\n\t */\n\t this.sphereRadius = data.sphereRadius;\n\t /**\n\t * Reports whether this is a valid Hand object.\n\t *\n\t * @member valid\n\t * @memberof Leap.Hand.prototype\n\t * @type {boolean}\n\t */\n\t this.valid = true;\n\t /**\n\t * The list of Pointable objects (fingers and tools) detected in this frame\n\t * that are associated with this hand, given in arbitrary order. The list\n\t * can be empty if no fingers or tools associated with this hand are detected.\n\t *\n\t * Use the {@link Pointable} tool property to determine\n\t * whether or not an item in the list represents a tool or finger.\n\t * You can also get only the tools using the Hand.tools[] list or\n\t * only the fingers using the Hand.fingers[] list.\n\t *\n\t * @member pointables[]\n\t * @memberof Leap.Hand.prototype\n\t * @type {Leap.Pointable[]}\n\t */\n\t this.pointables = [];\n\t /**\n\t * The list of fingers detected in this frame that are attached to\n\t * this hand, given in arbitrary order.\n\t *\n\t * The list can be empty if no fingers attached to this hand are detected.\n\t *\n\t * @member fingers[]\n\t * @memberof Leap.Hand.prototype\n\t * @type {Leap.Pointable[]}\n\t */\n\t this.fingers = [];\n\t \n\t if (data.armBasis){\n\t this.arm = new Bone(this, {\n\t type: 4,\n\t width: data.armWidth,\n\t prevJoint: data.elbow,\n\t nextJoint: data.wrist,\n\t basis: data.armBasis\n\t });\n\t }else{\n\t this.arm = null;\n\t }\n\t \n\t /**\n\t * The list of tools detected in this frame that are held by this\n\t * hand, given in arbitrary order.\n\t *\n\t * The list can be empty if no tools held by this hand are detected.\n\t *\n\t * @member tools[]\n\t * @memberof Leap.Hand.prototype\n\t * @type {Leap.Pointable[]}\n\t */\n\t this.tools = [];\n\t this._translation = data.t;\n\t this._rotation = _.flatten(data.r);\n\t this._scaleFactor = data.s;\n\t\n\t /**\n\t * Time the hand has been visible in seconds.\n\t *\n\t * @member timeVisible\n\t * @memberof Leap.Hand.prototype\n\t * @type {number}\n\t */\n\t this.timeVisible = data.timeVisible;\n\t\n\t /**\n\t * The palm position with stabalization\n\t * @member stabilizedPalmPosition\n\t * @memberof Leap.Hand.prototype\n\t * @type {number[]}\n\t */\n\t this.stabilizedPalmPosition = data.stabilizedPalmPosition;\n\t\n\t /**\n\t * Reports whether this is a left or a right hand.\n\t *\n\t * @member type\n\t * @type {String}\n\t * @memberof Leap.Hand.prototype\n\t */\n\t this.type = data.type;\n\t this.grabStrength = data.grabStrength;\n\t this.pinchStrength = data.pinchStrength;\n\t this.confidence = data.confidence;\n\t}\n\t\n\t/**\n\t * The finger with the specified ID attached to this hand.\n\t *\n\t * Use this function to retrieve a Pointable object representing a finger\n\t * attached to this hand using an ID value obtained from a previous frame.\n\t * This function always returns a Pointable object, but if no finger\n\t * with the specified ID is present, an invalid Pointable object is returned.\n\t *\n\t * Note that the ID values assigned to fingers persist across frames, but only\n\t * until tracking of a particular finger is lost. If tracking of a finger is\n\t * lost and subsequently regained, the new Finger object representing that\n\t * finger may have a different ID than that representing the finger in an\n\t * earlier frame.\n\t *\n\t * @method finger\n\t * @memberof Leap.Hand.prototype\n\t * @param {String} id The ID value of a finger from a previous frame.\n\t * @returns {Leap.Pointable} The Finger object with\n\t * the matching ID if one exists for this hand in this frame; otherwise, an\n\t * invalid Finger object is returned.\n\t */\n\tHand.prototype.finger = function(id) {\n\t var finger = this.frame.finger(id);\n\t return (finger && (finger.handId == this.id)) ? finger : Pointable.Invalid;\n\t}\n\t\n\t/**\n\t * The angle of rotation around the rotation axis derived from the change in\n\t * orientation of this hand, and any associated fingers and tools, between the\n\t * current frame and the specified frame.\n\t *\n\t * The returned angle is expressed in radians measured clockwise around the\n\t * rotation axis (using the right-hand rule) between the start and end frames.\n\t * The value is always between 0 and pi radians (0 and 180 degrees).\n\t *\n\t * If a corresponding Hand object is not found in sinceFrame, or if either\n\t * this frame or sinceFrame are invalid Frame objects, then the angle of rotation is zero.\n\t *\n\t * @method rotationAngle\n\t * @memberof Leap.Hand.prototype\n\t * @param {Leap.Frame} sinceFrame The starting frame for computing the relative rotation.\n\t * @param {numnber[]} [axis] The axis to measure rotation around.\n\t * @returns {number} A positive value representing the heuristically determined\n\t * rotational change of the hand between the current frame and that specified in\n\t * the sinceFrame parameter.\n\t */\n\tHand.prototype.rotationAngle = function(sinceFrame, axis) {\n\t if (!this.valid || !sinceFrame.valid) return 0.0;\n\t var sinceHand = sinceFrame.hand(this.id);\n\t if(!sinceHand.valid) return 0.0;\n\t var rot = this.rotationMatrix(sinceFrame);\n\t var cs = (rot[0] + rot[4] + rot[8] - 1.0)*0.5\n\t var angle = Math.acos(cs);\n\t angle = isNaN(angle) ? 0.0 : angle;\n\t if (axis !== undefined) {\n\t var rotAxis = this.rotationAxis(sinceFrame);\n\t angle *= vec3.dot(rotAxis, vec3.normalize(vec3.create(), axis));\n\t }\n\t return angle;\n\t}\n\t\n\t/**\n\t * The axis of rotation derived from the change in orientation of this hand, and\n\t * any associated fingers and tools, between the current frame and the specified frame.\n\t *\n\t * The returned direction vector is normalized.\n\t *\n\t * If a corresponding Hand object is not found in sinceFrame, or if either\n\t * this frame or sinceFrame are invalid Frame objects, then this method returns a zero vector.\n\t *\n\t * @method rotationAxis\n\t * @memberof Leap.Hand.prototype\n\t * @param {Leap.Frame} sinceFrame The starting frame for computing the relative rotation.\n\t * @returns {number[]} A normalized direction Vector representing the axis of the heuristically determined\n\t * rotational change of the hand between the current frame and that specified in the sinceFrame parameter.\n\t */\n\tHand.prototype.rotationAxis = function(sinceFrame) {\n\t if (!this.valid || !sinceFrame.valid) return vec3.create();\n\t var sinceHand = sinceFrame.hand(this.id);\n\t if (!sinceHand.valid) return vec3.create();\n\t return vec3.normalize(vec3.create(), [\n\t this._rotation[7] - sinceHand._rotation[5],\n\t this._rotation[2] - sinceHand._rotation[6],\n\t this._rotation[3] - sinceHand._rotation[1]\n\t ]);\n\t}\n\t\n\t/**\n\t * The transform matrix expressing the rotation derived from the change in\n\t * orientation of this hand, and any associated fingers and tools, between\n\t * the current frame and the specified frame.\n\t *\n\t * If a corresponding Hand object is not found in sinceFrame, or if either\n\t * this frame or sinceFrame are invalid Frame objects, then this method returns\n\t * an identity matrix.\n\t *\n\t * @method rotationMatrix\n\t * @memberof Leap.Hand.prototype\n\t * @param {Leap.Frame} sinceFrame The starting frame for computing the relative rotation.\n\t * @returns {number[]} A transformation Matrix containing the heuristically determined\n\t * rotational change of the hand between the current frame and that specified in the sinceFrame parameter.\n\t */\n\tHand.prototype.rotationMatrix = function(sinceFrame) {\n\t if (!this.valid || !sinceFrame.valid) return mat3.create();\n\t var sinceHand = sinceFrame.hand(this.id);\n\t if(!sinceHand.valid) return mat3.create();\n\t var transpose = mat3.transpose(mat3.create(), this._rotation);\n\t var m = mat3.multiply(mat3.create(), sinceHand._rotation, transpose);\n\t return m;\n\t}\n\t\n\t/**\n\t * The scale factor derived from the hand's motion between the current frame and the specified frame.\n\t *\n\t * The scale factor is always positive. A value of 1.0 indicates no scaling took place.\n\t * Values between 0.0 and 1.0 indicate contraction and values greater than 1.0 indicate expansion.\n\t *\n\t * The Leap derives scaling from the relative inward or outward motion of a hand\n\t * and its associated fingers and tools (independent of translation and rotation).\n\t *\n\t * If a corresponding Hand object is not found in sinceFrame, or if either this frame or sinceFrame\n\t * are invalid Frame objects, then this method returns 1.0.\n\t *\n\t * @method scaleFactor\n\t * @memberof Leap.Hand.prototype\n\t * @param {Leap.Frame} sinceFrame The starting frame for computing the relative scaling.\n\t * @returns {number} A positive value representing the heuristically determined\n\t * scaling change ratio of the hand between the current frame and that specified in the sinceFrame parameter.\n\t */\n\tHand.prototype.scaleFactor = function(sinceFrame) {\n\t if (!this.valid || !sinceFrame.valid) return 1.0;\n\t var sinceHand = sinceFrame.hand(this.id);\n\t if(!sinceHand.valid) return 1.0;\n\t\n\t return Math.exp(this._scaleFactor - sinceHand._scaleFactor);\n\t}\n\t\n\t/**\n\t * The change of position of this hand between the current frame and the specified frame\n\t *\n\t * The returned translation vector provides the magnitude and direction of the\n\t * movement in millimeters.\n\t *\n\t * If a corresponding Hand object is not found in sinceFrame, or if either this frame or\n\t * sinceFrame are invalid Frame objects, then this method returns a zero vector.\n\t *\n\t * @method translation\n\t * @memberof Leap.Hand.prototype\n\t * @param {Leap.Frame} sinceFrame The starting frame for computing the relative translation.\n\t * @returns {number[]} A Vector representing the heuristically determined change in hand\n\t * position between the current frame and that specified in the sinceFrame parameter.\n\t */\n\tHand.prototype.translation = function(sinceFrame) {\n\t if (!this.valid || !sinceFrame.valid) return vec3.create();\n\t var sinceHand = sinceFrame.hand(this.id);\n\t if(!sinceHand.valid) return vec3.create();\n\t return [\n\t this._translation[0] - sinceHand._translation[0],\n\t this._translation[1] - sinceHand._translation[1],\n\t this._translation[2] - sinceHand._translation[2]\n\t ];\n\t}\n\t\n\t/**\n\t * A string containing a brief, human readable description of the Hand object.\n\t * @method toString\n\t * @memberof Leap.Hand.prototype\n\t * @returns {String} A description of the Hand as a string.\n\t */\n\tHand.prototype.toString = function() {\n\t return \"Hand (\" + this.type + \") [ id: \"+ this.id + \" | palm velocity:\"+this.palmVelocity+\" | sphere center:\"+this.sphereCenter+\" ] \";\n\t}\n\t\n\t/**\n\t * The pitch angle in radians.\n\t *\n\t * Pitch is the angle between the negative z-axis and the projection of\n\t * the vector onto the y-z plane. In other words, pitch represents rotation\n\t * around the x-axis.\n\t * If the vector points upward, the returned angle is between 0 and pi radians\n\t * (180 degrees); if it points downward, the angle is between 0 and -pi radians.\n\t *\n\t * @method pitch\n\t * @memberof Leap.Hand.prototype\n\t * @returns {number} The angle of this vector above or below the horizon (x-z plane).\n\t *\n\t */\n\tHand.prototype.pitch = function() {\n\t return Math.atan2(this.direction[1], -this.direction[2]);\n\t}\n\t\n\t/**\n\t * The yaw angle in radians.\n\t *\n\t * Yaw is the angle between the negative z-axis and the projection of\n\t * the vector onto the x-z plane. In other words, yaw represents rotation\n\t * around the y-axis. If the vector points to the right of the negative z-axis,\n\t * then the returned angle is between 0 and pi radians (180 degrees);\n\t * if it points to the left, the angle is between 0 and -pi radians.\n\t *\n\t * @method yaw\n\t * @memberof Leap.Hand.prototype\n\t * @returns {number} The angle of this vector to the right or left of the y-axis.\n\t *\n\t */\n\tHand.prototype.yaw = function() {\n\t return Math.atan2(this.direction[0], -this.direction[2]);\n\t}\n\t\n\t/**\n\t * The roll angle in radians.\n\t *\n\t * Roll is the angle between the y-axis and the projection of\n\t * the vector onto the x-y plane. In other words, roll represents rotation\n\t * around the z-axis. If the vector points to the left of the y-axis,\n\t * then the returned angle is between 0 and pi radians (180 degrees);\n\t * if it points to the right, the angle is between 0 and -pi radians.\n\t *\n\t * @method roll\n\t * @memberof Leap.Hand.prototype\n\t * @returns {number} The angle of this vector to the right or left of the y-axis.\n\t *\n\t */\n\tHand.prototype.roll = function() {\n\t return Math.atan2(this.palmNormal[0], -this.palmNormal[1]);\n\t}\n\t\n\t/**\n\t * An invalid Hand object.\n\t *\n\t * You can use an invalid Hand object in comparisons testing\n\t * whether a given Hand instance is valid or invalid. (You can also use the\n\t * Hand valid property.)\n\t *\n\t * @static\n\t * @type {Leap.Hand}\n\t * @name Invalid\n\t * @memberof Leap.Hand\n\t */\n\tHand.Invalid = {\n\t valid: false,\n\t fingers: [],\n\t tools: [],\n\t pointables: [],\n\t left: false,\n\t pointable: function() { return Pointable.Invalid },\n\t finger: function() { return Pointable.Invalid },\n\t toString: function() { return \"invalid frame\" },\n\t dump: function() { return this.toString(); },\n\t rotationAngle: function() { return 0.0; },\n\t rotationMatrix: function() { return mat3.create(); },\n\t rotationAxis: function() { return vec3.create(); },\n\t scaleFactor: function() { return 1.0; },\n\t translation: function() { return vec3.create(); }\n\t};\n\n\n/***/ },\n/* 7 */\n/***/ function(module, exports) {\n\n\t\n\tfunction KeyCombo(keyComboStr) {\n\t this.sourceStr = keyComboStr;\n\t this.subCombos = KeyCombo.parseComboStr(keyComboStr);\n\t this.keyNames = this.subCombos.reduce(function(memo, nextSubCombo) {\n\t return memo.concat(nextSubCombo);\n\t });\n\t}\n\t\n\t// TODO: Add support for key combo sequences\n\tKeyCombo.sequenceDeliminator = '>>';\n\tKeyCombo.comboDeliminator = '>';\n\tKeyCombo.keyDeliminator = '+';\n\t\n\tKeyCombo.parseComboStr = function(keyComboStr) {\n\t var subComboStrs = KeyCombo._splitStr(keyComboStr, KeyCombo.comboDeliminator);\n\t var combo = [];\n\t\n\t for (var i = 0 ; i < subComboStrs.length; i += 1) {\n\t combo.push(KeyCombo._splitStr(subComboStrs[i], KeyCombo.keyDeliminator));\n\t }\n\t return combo;\n\t};\n\t\n\tKeyCombo.prototype.check = function(pressedKeyNames) {\n\t var startingKeyNameIndex = 0;\n\t for (var i = 0; i < this.subCombos.length; i += 1) {\n\t startingKeyNameIndex = this._checkSubCombo(\n\t this.subCombos[i],\n\t startingKeyNameIndex,\n\t pressedKeyNames\n\t );\n\t if (startingKeyNameIndex === -1) { return false; }\n\t }\n\t return true;\n\t};\n\t\n\tKeyCombo.prototype.isEqual = function(otherKeyCombo) {\n\t if (\n\t !otherKeyCombo ||\n\t typeof otherKeyCombo !== 'string' &&\n\t typeof otherKeyCombo !== 'object'\n\t ) { return false; }\n\t\n\t if (typeof otherKeyCombo === 'string') {\n\t otherKeyCombo = new KeyCombo(otherKeyCombo);\n\t }\n\t\n\t if (this.subCombos.length !== otherKeyCombo.subCombos.length) {\n\t return false;\n\t }\n\t for (var i = 0; i < this.subCombos.length; i += 1) {\n\t if (this.subCombos[i].length !== otherKeyCombo.subCombos[i].length) {\n\t return false;\n\t }\n\t }\n\t\n\t for (var i = 0; i < this.subCombos.length; i += 1) {\n\t var subCombo = this.subCombos[i];\n\t var otherSubCombo = otherKeyCombo.subCombos[i].slice(0);\n\t\n\t for (var j = 0; j < subCombo.length; j += 1) {\n\t var keyName = subCombo[j];\n\t var index = otherSubCombo.indexOf(keyName);\n\t\n\t if (index > -1) {\n\t otherSubCombo.splice(index, 1);\n\t }\n\t }\n\t if (otherSubCombo.length !== 0) {\n\t return false;\n\t }\n\t }\n\t\n\t return true;\n\t};\n\t\n\tKeyCombo._splitStr = function(str, deliminator) {\n\t var s = str;\n\t var d = deliminator;\n\t var c = '';\n\t var ca = [];\n\t\n\t for (var ci = 0; ci < s.length; ci += 1) {\n\t if (ci > 0 && s[ci] === d && s[ci - 1] !== '\\\\') {\n\t ca.push(c.trim());\n\t c = '';\n\t ci += 1;\n\t }\n\t c += s[ci];\n\t }\n\t if (c) { ca.push(c.trim()); }\n\t\n\t return ca;\n\t};\n\t\n\tKeyCombo.prototype._checkSubCombo = function(subCombo, startingKeyNameIndex, pressedKeyNames) {\n\t subCombo = subCombo.slice(0);\n\t pressedKeyNames = pressedKeyNames.slice(startingKeyNameIndex);\n\t\n\t var endIndex = startingKeyNameIndex;\n\t for (var i = 0; i < subCombo.length; i += 1) {\n\t\n\t var keyName = subCombo[i];\n\t if (keyName[0] === '\\\\') {\n\t var escapedKeyName = keyName.slice(1);\n\t if (\n\t escapedKeyName === KeyCombo.comboDeliminator ||\n\t escapedKeyName === KeyCombo.keyDeliminator\n\t ) {\n\t keyName = escapedKeyName;\n\t }\n\t }\n\t\n\t var index = pressedKeyNames.indexOf(keyName);\n\t if (index > -1) {\n\t subCombo.splice(i, 1);\n\t i -= 1;\n\t if (index > endIndex) {\n\t endIndex = index;\n\t }\n\t if (subCombo.length === 0) {\n\t return endIndex;\n\t }\n\t }\n\t }\n\t return -1;\n\t};\n\t\n\t\n\tmodule.exports = KeyCombo;\n\n\n/***/ },\n/* 8 */\n/***/ function(module, exports, __webpack_require__) {\n\n\tvar Hand = __webpack_require__(6)\n\t , Pointable = __webpack_require__(4)\n\t , createGesture = __webpack_require__(9).createGesture\n\t , glMatrix = __webpack_require__(2)\n\t , mat3 = glMatrix.mat3\n\t , vec3 = glMatrix.vec3\n\t , InteractionBox = __webpack_require__(17)\n\t , Finger = __webpack_require__(5)\n\t , _ = __webpack_require__(1);\n\t\n\t/**\n\t * Constructs a Frame object.\n\t *\n\t * Frame instances created with this constructor are invalid.\n\t * Get valid Frame objects by calling the\n\t * [Controller.frame]{@link Leap.Controller#frame}() function.\n\t *\n\t * @class Frame\n\t * @memberof Leap\n\t * @classdesc\n\t * The Frame class represents a set of hand and finger tracking data detected\n\t * in a single frame.\n\t *\n\t * The Leap detects hands, fingers and tools within the tracking area, reporting\n\t * their positions, orientations and motions in frames at the Leap frame rate.\n\t *\n\t * Access Frame objects using the [Controller.frame]{@link Leap.Controller#frame}() function.\n\t */\n\tvar Frame = module.exports = function(data) {\n\t /**\n\t * Reports whether this Frame instance is valid.\n\t *\n\t * A valid Frame is one generated by the Controller object that contains\n\t * tracking data for all detected entities. An invalid Frame contains no\n\t * actual tracking data, but you can call its functions without risk of a\n\t * undefined object exception. The invalid Frame mechanism makes it more\n\t * convenient to track individual data across the frame history. For example,\n\t * you can invoke:\n\t *\n\t * ```javascript\n\t * var finger = controller.frame(n).finger(fingerID);\n\t * ```\n\t *\n\t * for an arbitrary Frame history value, \"n\", without first checking whether\n\t * frame(n) returned a null object. (You should still check that the\n\t * returned Finger instance is valid.)\n\t *\n\t * @member valid\n\t * @memberof Leap.Frame.prototype\n\t * @type {Boolean}\n\t */\n\t this.valid = true;\n\t /**\n\t * A unique ID for this Frame. Consecutive frames processed by the Leap\n\t * have consecutive increasing values.\n\t * @member id\n\t * @memberof Leap.Frame.prototype\n\t * @type {String}\n\t */\n\t this.id = data.id;\n\t /**\n\t * The frame capture time in microseconds elapsed since the Leap started.\n\t * @member timestamp\n\t * @memberof Leap.Frame.prototype\n\t * @type {number}\n\t */\n\t this.timestamp = data.timestamp;\n\t /**\n\t * The list of Hand objects detected in this frame, given in arbitrary order.\n\t * The list can be empty if no hands are detected.\n\t *\n\t * @member hands[]\n\t * @memberof Leap.Frame.prototype\n\t * @type {Leap.Hand}\n\t */\n\t this.hands = [];\n\t this.handsMap = {};\n\t /**\n\t * The list of Pointable objects (fingers and tools) detected in this frame,\n\t * given in arbitrary order. The list can be empty if no fingers or tools are\n\t * detected.\n\t *\n\t * @member pointables[]\n\t * @memberof Leap.Frame.prototype\n\t * @type {Leap.Pointable}\n\t */\n\t this.pointables = [];\n\t /**\n\t * The list of Tool objects detected in this frame, given in arbitrary order.\n\t * The list can be empty if no tools are detected.\n\t *\n\t * @member tools[]\n\t * @memberof Leap.Frame.prototype\n\t * @type {Leap.Pointable}\n\t */\n\t this.tools = [];\n\t /**\n\t * The list of Finger objects detected in this frame, given in arbitrary order.\n\t * The list can be empty if no fingers are detected.\n\t * @member fingers[]\n\t * @memberof Leap.Frame.prototype\n\t * @type {Leap.Pointable}\n\t */\n\t this.fingers = [];\n\t\n\t /**\n\t * The InteractionBox associated with the current frame.\n\t *\n\t * @member interactionBox\n\t * @memberof Leap.Frame.prototype\n\t * @type {Leap.InteractionBox}\n\t */\n\t if (data.interactionBox) {\n\t this.interactionBox = new InteractionBox(data.interactionBox);\n\t }\n\t this.gestures = [];\n\t this.pointablesMap = {};\n\t this._translation = data.t;\n\t this._rotation = _.flatten(data.r);\n\t this._scaleFactor = data.s;\n\t this.data = data;\n\t this.type = 'frame'; // used by event emitting\n\t this.currentFrameRate = data.currentFrameRate;\n\t\n\t if (data.gestures) {\n\t /**\n\t * The list of Gesture objects detected in this frame, given in arbitrary order.\n\t * The list can be empty if no gestures are detected.\n\t *\n\t * Circle and swipe gestures are updated every frame. Tap gestures\n\t * only appear in the list for a single frame.\n\t * @member gestures[]\n\t * @memberof Leap.Frame.prototype\n\t * @type {Leap.Gesture}\n\t */\n\t for (var gestureIdx = 0, gestureCount = data.gestures.length; gestureIdx != gestureCount; gestureIdx++) {\n\t this.gestures.push(createGesture(data.gestures[gestureIdx]));\n\t }\n\t }\n\t this.postprocessData(data);\n\t};\n\t\n\tFrame.prototype.postprocessData = function(data){\n\t if (!data) {\n\t data = this.data;\n\t }\n\t\n\t for (var handIdx = 0, handCount = data.hands.length; handIdx != handCount; handIdx++) {\n\t var hand = new Hand(data.hands[handIdx]);\n\t hand.frame = this;\n\t this.hands.push(hand);\n\t this.handsMap[hand.id] = hand;\n\t }\n\t\n\t data.pointables = _.sortBy(data.pointables, function(pointable) { return pointable.id });\n\t\n\t for (var pointableIdx = 0, pointableCount = data.pointables.length; pointableIdx != pointableCount; pointableIdx++) {\n\t var pointableData = data.pointables[pointableIdx];\n\t var pointable = pointableData.dipPosition ? new Finger(pointableData) : new Pointable(pointableData);\n\t pointable.frame = this;\n\t this.addPointable(pointable);\n\t }\n\t};\n\t\n\t/**\n\t * Adds data from a pointable element into the pointablesMap; \n\t * also adds the pointable to the frame.handsMap hand to which it belongs,\n\t * and to the hand's tools or hand's fingers map.\n\t * \n\t * @param pointable {Object} a Pointable\n\t */\n\tFrame.prototype.addPointable = function (pointable) {\n\t this.pointables.push(pointable);\n\t this.pointablesMap[pointable.id] = pointable;\n\t (pointable.tool ? this.tools : this.fingers).push(pointable);\n\t if (pointable.handId !== undefined && this.handsMap.hasOwnProperty(pointable.handId)) {\n\t var hand = this.handsMap[pointable.handId];\n\t hand.pointables.push(pointable);\n\t (pointable.tool ? hand.tools : hand.fingers).push(pointable);\n\t switch (pointable.type){\n\t case 0:\n\t hand.thumb = pointable;\n\t break;\n\t case 1:\n\t hand.indexFinger = pointable;\n\t break;\n\t case 2:\n\t hand.middleFinger = pointable;\n\t break;\n\t case 3:\n\t hand.ringFinger = pointable;\n\t break;\n\t case 4:\n\t hand.pinky = pointable;\n\t break;\n\t }\n\t }\n\t};\n\t\n\t/**\n\t * The tool with the specified ID in this frame.\n\t *\n\t * Use the Frame tool() function to retrieve a tool from\n\t * this frame using an ID value obtained from a previous frame.\n\t * This function always returns a Pointable object, but if no tool\n\t * with the specified ID is present, an invalid Pointable object is returned.\n\t *\n\t * Note that ID values persist across frames, but only until tracking of a\n\t * particular object is lost. If tracking of a tool is lost and subsequently\n\t * regained, the new Pointable object representing that tool may have a\n\t * different ID than that representing the tool in an earlier frame.\n\t *\n\t * @method tool\n\t * @memberof Leap.Frame.prototype\n\t * @param {String} id The ID value of a Tool object from a previous frame.\n\t * @returns {Leap.Pointable} The tool with the\n\t * matching ID if one exists in this frame; otherwise, an invalid Pointable object\n\t * is returned.\n\t */\n\tFrame.prototype.tool = function(id) {\n\t var pointable = this.pointable(id);\n\t return pointable.tool ? pointable : Pointable.Invalid;\n\t};\n\t\n\t/**\n\t * The Pointable object with the specified ID in this frame.\n\t *\n\t * Use the Frame pointable() function to retrieve the Pointable object from\n\t * this frame using an ID value obtained from a previous frame.\n\t * This function always returns a Pointable object, but if no finger or tool\n\t * with the specified ID is present, an invalid Pointable object is returned.\n\t *\n\t * Note that ID values persist across frames, but only until tracking of a\n\t * particular object is lost. If tracking of a finger or tool is lost and subsequently\n\t * regained, the new Pointable object representing that finger or tool may have\n\t * a different ID than that representing the finger or tool in an earlier frame.\n\t *\n\t * @method pointable\n\t * @memberof Leap.Frame.prototype\n\t * @param {String} id The ID value of a Pointable object from a previous frame.\n\t * @returns {Leap.Pointable} The Pointable object with\n\t * the matching ID if one exists in this frame;\n\t * otherwise, an invalid Pointable object is returned.\n\t */\n\tFrame.prototype.pointable = function(id) {\n\t return this.pointablesMap[id] || Pointable.Invalid;\n\t};\n\t\n\t/**\n\t * The finger with the specified ID in this frame.\n\t *\n\t * Use the Frame finger() function to retrieve the finger from\n\t * this frame using an ID value obtained from a previous frame.\n\t * This function always returns a Finger object, but if no finger\n\t * with the specified ID is present, an invalid Pointable object is returned.\n\t *\n\t * Note that ID values persist across frames, but only until tracking of a\n\t * particular object is lost. If tracking of a finger is lost and subsequently\n\t * regained, the new Pointable object representing that physical finger may have\n\t * a different ID than that representing the finger in an earlier frame.\n\t *\n\t * @method finger\n\t * @memberof Leap.Frame.prototype\n\t * @param {String} id The ID value of a finger from a previous frame.\n\t * @returns {Leap.Pointable} The finger with the\n\t * matching ID if one exists in this frame; otherwise, an invalid Pointable\n\t * object is returned.\n\t */\n\tFrame.prototype.finger = function(id) {\n\t var pointable = this.pointable(id);\n\t return !pointable.tool ? pointable : Pointable.Invalid;\n\t};\n\t\n\t/**\n\t * The Hand object with the specified ID in this frame.\n\t *\n\t * Use the Frame hand() function to retrieve the Hand object from\n\t * this frame using an ID value obtained from a previous frame.\n\t * This function always returns a Hand object, but if no hand\n\t * with the specified ID is present, an invalid Hand object is returned.\n\t *\n\t * Note that ID values persist across frames, but only until tracking of a\n\t * particular object is lost. If tracking of a hand is lost and subsequently\n\t * regained, the new Hand object representing that physical hand may have\n\t * a different ID than that representing the physical hand in an earlier frame.\n\t *\n\t * @method hand\n\t * @memberof Leap.Frame.prototype\n\t * @param {String} id The ID value of a Hand object from a previous frame.\n\t * @returns {Leap.Hand} The Hand object with the matching\n\t * ID if one exists in this frame; otherwise, an invalid Hand object is returned.\n\t */\n\tFrame.prototype.hand = function(id) {\n\t return this.handsMap[id] || Hand.Invalid;\n\t};\n\t\n\t/**\n\t * The angle of rotation around the rotation axis derived from the overall\n\t * rotational motion between the current frame and the specified frame.\n\t *\n\t * The returned angle is expressed in radians measured clockwise around\n\t * the rotation axis (using the right-hand rule) between the start and end frames.\n\t * The value is always between 0 and pi radians (0 and 180 degrees).\n\t *\n\t * The Leap derives frame rotation from the relative change in position and\n\t * orientation of all objects detected in the field of view.\n\t *\n\t * If either this frame or sinceFrame is an invalid Frame object, then the\n\t * angle of rotation is zero.\n\t *\n\t * @method rotationAngle\n\t * @memberof Leap.Frame.prototype\n\t * @param {Leap.Frame} sinceFrame The starting frame for computing the relative rotation.\n\t * @param {number[]} [axis] The axis to measure rotation around.\n\t * @returns {number} A positive value containing the heuristically determined\n\t * rotational change between the current frame and that specified in the sinceFrame parameter.\n\t */\n\tFrame.prototype.rotationAngle = function(sinceFrame, axis) {\n\t if (!this.valid || !sinceFrame.valid) return 0.0;\n\t\n\t var rot = this.rotationMatrix(sinceFrame);\n\t var cs = (rot[0] + rot[4] + rot[8] - 1.0)*0.5;\n\t var angle = Math.acos(cs);\n\t angle = isNaN(angle) ? 0.0 : angle;\n\t\n\t if (axis !== undefined) {\n\t var rotAxis = this.rotationAxis(sinceFrame);\n\t angle *= vec3.dot(rotAxis, vec3.normalize(vec3.create(), axis));\n\t }\n\t\n\t return angle;\n\t};\n\t\n\t/**\n\t * The axis of rotation derived from the overall rotational motion between\n\t * the current frame and the specified frame.\n\t *\n\t * The returned direction vector is normalized.\n\t *\n\t * The Leap derives frame rotation from the relative change in position and\n\t * orientation of all objects detected in the field of view.\n\t *\n\t * If either this frame or sinceFrame is an invalid Frame object, or if no\n\t * rotation is detected between the two frames, a zero vector is returned.\n\t *\n\t * @method rotationAxis\n\t * @memberof Leap.Frame.prototype\n\t * @param {Leap.Frame} sinceFrame The starting frame for computing the relative rotation.\n\t * @returns {number[]} A normalized direction vector representing the axis of the heuristically determined\n\t * rotational change between the current frame and that specified in the sinceFrame parameter.\n\t */\n\tFrame.prototype.rotationAxis = function(sinceFrame) {\n\t if (!this.valid || !sinceFrame.valid) return vec3.create();\n\t return vec3.normalize(vec3.create(), [\n\t this._rotation[7] - sinceFrame._rotation[5],\n\t this._rotation[2] - sinceFrame._rotation[6],\n\t this._rotation[3] - sinceFrame._rotation[1]\n\t ]);\n\t}\n\t\n\t/**\n\t * The transform matrix expressing the rotation derived from the overall\n\t * rotational motion between the current frame and the specified frame.\n\t *\n\t * The Leap derives frame rotation from the relative change in position and\n\t * orientation of all objects detected in the field of view.\n\t *\n\t * If either this frame or sinceFrame is an invalid Frame object, then\n\t * this method returns an identity matrix.\n\t *\n\t * @method rotationMatrix\n\t * @memberof Leap.Frame.prototype\n\t * @param {Leap.Frame} sinceFrame The starting frame for computing the relative rotation.\n\t * @returns {number[]} A transformation matrix containing the heuristically determined\n\t * rotational change between the current frame and that specified in the sinceFrame parameter.\n\t */\n\tFrame.prototype.rotationMatrix = function(sinceFrame) {\n\t if (!this.valid || !sinceFrame.valid) return mat3.create();\n\t var transpose = mat3.transpose(mat3.create(), this._rotation)\n\t return mat3.multiply(mat3.create(), sinceFrame._rotation, transpose);\n\t}\n\t\n\t/**\n\t * The scale factor derived from the overall motion between the current frame and the specified frame.\n\t *\n\t * The scale factor is always positive. A value of 1.0 indicates no scaling took place.\n\t * Values between 0.0 and 1.0 indicate contraction and values greater than 1.0 indicate expansion.\n\t *\n\t * The Leap derives scaling from the relative inward or outward motion of all\n\t * objects detected in the field of view (independent of translation and rotation).\n\t *\n\t * If either this frame or sinceFrame is an invalid Frame object, then this method returns 1.0.\n\t *\n\t * @method scaleFactor\n\t * @memberof Leap.Frame.prototype\n\t * @param {Leap.Frame} sinceFrame The starting frame for computing the relative scaling.\n\t * @returns {number} A positive value representing the heuristically determined\n\t * scaling change ratio between the current frame and that specified in the sinceFrame parameter.\n\t */\n\tFrame.prototype.scaleFactor = function(sinceFrame) {\n\t if (!this.valid || !sinceFrame.valid) return 1.0;\n\t return Math.exp(this._scaleFactor - sinceFrame._scaleFactor);\n\t}\n\t\n\t/**\n\t * The change of position derived from the overall linear motion between the\n\t * current frame and the specified frame.\n\t *\n\t * The returned translation vector provides the magnitude and direction of the\n\t * movement in millimeters.\n\t *\n\t * The Leap derives frame translation from the linear motion of all objects\n\t * detected in the field of view.\n\t *\n\t * If either this frame or sinceFrame is an invalid Frame object, then this\n\t * method returns a zero vector.\n\t *\n\t * @method translation\n\t * @memberof Leap.Frame.prototype\n\t * @param {Leap.Frame} sinceFrame The starting frame for computing the relative translation.\n\t * @returns {number[]} A vector representing the heuristically determined change in\n\t * position of all objects between the current frame and that specified in the sinceFrame parameter.\n\t */\n\tFrame.prototype.translation = function(sinceFrame) {\n\t if (!this.valid || !sinceFrame.valid) return vec3.create();\n\t return vec3.subtract(vec3.create(), this._translation, sinceFrame._translation);\n\t}\n\t\n\t/**\n\t * A string containing a brief, human readable description of the Frame object.\n\t *\n\t * @method toString\n\t * @memberof Leap.Frame.prototype\n\t * @returns {String} A brief description of this frame.\n\t */\n\tFrame.prototype.toString = function() {\n\t var str = \"Frame [ id:\"+this.id+\" | timestamp:\"+this.timestamp+\" | Hand count:(\"+this.hands.length+\") | Pointable count:(\"+this.pointables.length+\")\";\n\t if (this.gestures) str += \" | Gesture count:(\"+this.gestures.length+\")\";\n\t str += \" ]\";\n\t return str;\n\t}\n\t\n\t/**\n\t * Returns a JSON-formatted string containing the hands, pointables and gestures\n\t * in this frame.\n\t *\n\t * @method dump\n\t * @memberof Leap.Frame.prototype\n\t * @returns {String} A JSON-formatted string.\n\t */\n\tFrame.prototype.dump = function() {\n\t var out = '';\n\t out += \"Frame Info:
\";\n\t out += this.toString();\n\t out += \"

Hands:
\"\n\t for (var handIdx = 0, handCount = this.hands.length; handIdx != handCount; handIdx++) {\n\t out += \" \"+ this.hands[handIdx].toString() + \"
\";\n\t }\n\t out += \"

Pointables:
\";\n\t for (var pointableIdx = 0, pointableCount = this.pointables.length; pointableIdx != pointableCount; pointableIdx++) {\n\t out += \" \"+ this.pointables[pointableIdx].toString() + \"
\";\n\t }\n\t if (this.gestures) {\n\t out += \"

Gestures:
\";\n\t for (var gestureIdx = 0, gestureCount = this.gestures.length; gestureIdx != gestureCount; gestureIdx++) {\n\t out += \" \"+ this.gestures[gestureIdx].toString() + \"
\";\n\t }\n\t }\n\t out += \"

Raw JSON:
\";\n\t out += JSON.stringify(this.data);\n\t return out;\n\t}\n\t\n\t/**\n\t * An invalid Frame object.\n\t *\n\t * You can use this invalid Frame in comparisons testing\n\t * whether a given Frame instance is valid or invalid. (You can also check the\n\t * [Frame.valid]{@link Leap.Frame#valid} property.)\n\t *\n\t * @static\n\t * @type {Leap.Frame}\n\t * @name Invalid\n\t * @memberof Leap.Frame\n\t */\n\tFrame.Invalid = {\n\t valid: false,\n\t hands: [],\n\t fingers: [],\n\t tools: [],\n\t gestures: [],\n\t pointables: [],\n\t pointable: function() { return Pointable.Invalid },\n\t finger: function() { return Pointable.Invalid },\n\t hand: function() { return Hand.Invalid },\n\t toString: function() { return \"invalid frame\" },\n\t dump: function() { return this.toString() },\n\t rotationAngle: function() { return 0.0; },\n\t rotationMatrix: function() { return mat3.create(); },\n\t rotationAxis: function() { return vec3.create(); },\n\t scaleFactor: function() { return 1.0; },\n\t translation: function() { return vec3.create(); }\n\t};\n\n\n/***/ },\n/* 9 */\n/***/ function(module, exports, __webpack_require__) {\n\n\tvar glMatrix = __webpack_require__(2)\n\t , vec3 = glMatrix.vec3\n\t , EventEmitter = __webpack_require__(3).EventEmitter\n\t , _ = __webpack_require__(1);\n\t\n\t/**\n\t * Constructs a new Gesture object.\n\t *\n\t * An uninitialized Gesture object is considered invalid. Get valid instances\n\t * of the Gesture class, which will be one of the Gesture subclasses, from a\n\t * Frame object.\n\t *\n\t * @class Gesture\n\t * @abstract\n\t * @memberof Leap\n\t * @classdesc\n\t * The Gesture class represents a recognized movement by the user.\n\t *\n\t * The Leap watches the activity within its field of view for certain movement\n\t * patterns typical of a user gesture or command. For example, a movement from side to\n\t * side with the hand can indicate a swipe gesture, while a finger poking forward\n\t * can indicate a screen tap gesture.\n\t *\n\t * When the Leap recognizes a gesture, it assigns an ID and adds a\n\t * Gesture object to the frame gesture list. For continuous gestures, which\n\t * occur over many frames, the Leap updates the gesture by adding\n\t * a Gesture object having the same ID and updated properties in each\n\t * subsequent frame.\n\t *\n\t * **Important:** Recognition for each type of gesture must be enabled;\n\t * otherwise **no gestures are recognized or reported**.\n\t *\n\t * Subclasses of Gesture define the properties for the specific movement patterns\n\t * recognized by the Leap.\n\t *\n\t * The Gesture subclasses for include:\n\t *\n\t * * CircleGesture -- A circular movement by a finger.\n\t * * SwipeGesture -- A straight line movement by the hand with fingers extended.\n\t * * ScreenTapGesture -- A forward tapping movement by a finger.\n\t * * KeyTapGesture -- A downward tapping movement by a finger.\n\t *\n\t * Circle and swipe gestures are continuous and these objects can have a\n\t * state of start, update, and stop.\n\t *\n\t * The screen tap gesture is a discrete gesture. The Leap only creates a single\n\t * ScreenTapGesture object appears for each tap and it always has a stop state.\n\t *\n\t * Get valid Gesture instances from a Frame object. You can get a list of gestures\n\t * from the Frame gestures array. You can also use the Frame gesture() method\n\t * to find a gesture in the current frame using an ID value obtained in a\n\t * previous frame.\n\t *\n\t * Gesture objects can be invalid. For example, when you get a gesture by ID\n\t * using Frame.gesture(), and there is no gesture with that ID in the current\n\t * frame, then gesture() returns an Invalid Gesture object (rather than a null\n\t * value). Always check object validity in situations where a gesture might be\n\t * invalid.\n\t */\n\tvar createGesture = exports.createGesture = function(data) {\n\t var gesture;\n\t switch (data.type) {\n\t case 'circle':\n\t gesture = new CircleGesture(data);\n\t break;\n\t case 'swipe':\n\t gesture = new SwipeGesture(data);\n\t break;\n\t case 'screenTap':\n\t gesture = new ScreenTapGesture(data);\n\t break;\n\t case 'keyTap':\n\t gesture = new KeyTapGesture(data);\n\t break;\n\t default:\n\t throw \"unknown gesture type\";\n\t }\n\t\n\t /**\n\t * The gesture ID.\n\t *\n\t * All Gesture objects belonging to the same recognized movement share the\n\t * same ID value. Use the ID value with the Frame::gesture() method to\n\t * find updates related to this Gesture object in subsequent frames.\n\t *\n\t * @member id\n\t * @memberof Leap.Gesture.prototype\n\t * @type {number}\n\t */\n\t gesture.id = data.id;\n\t /**\n\t * The list of hands associated with this Gesture, if any.\n\t *\n\t * If no hands are related to this gesture, the list is empty.\n\t *\n\t * @member handIds\n\t * @memberof Leap.Gesture.prototype\n\t * @type {Array}\n\t */\n\t gesture.handIds = data.handIds.slice();\n\t /**\n\t * The list of fingers and tools associated with this Gesture, if any.\n\t *\n\t * If no Pointable objects are related to this gesture, the list is empty.\n\t *\n\t * @member pointableIds\n\t * @memberof Leap.Gesture.prototype\n\t * @type {Array}\n\t */\n\t gesture.pointableIds = data.pointableIds.slice();\n\t /**\n\t * The elapsed duration of the recognized movement up to the\n\t * frame containing this Gesture object, in microseconds.\n\t *\n\t * The duration reported for the first Gesture in the sequence (with the\n\t * start state) will typically be a small positive number since\n\t * the movement must progress far enough for the Leap to recognize it as\n\t * an intentional gesture.\n\t *\n\t * @member duration\n\t * @memberof Leap.Gesture.prototype\n\t * @type {number}\n\t */\n\t gesture.duration = data.duration;\n\t /**\n\t * The gesture ID.\n\t *\n\t * Recognized movements occur over time and have a beginning, a middle,\n\t * and an end. The 'state()' attribute reports where in that sequence this\n\t * Gesture object falls.\n\t *\n\t * Possible values for the state field are:\n\t *\n\t * * start\n\t * * update\n\t * * stop\n\t *\n\t * @member state\n\t * @memberof Leap.Gesture.prototype\n\t * @type {String}\n\t */\n\t gesture.state = data.state;\n\t /**\n\t * The gesture type.\n\t *\n\t * Possible values for the type field are:\n\t *\n\t * * circle\n\t * * swipe\n\t * * screenTap\n\t * * keyTap\n\t *\n\t * @member type\n\t * @memberof Leap.Gesture.prototype\n\t * @type {String}\n\t */\n\t gesture.type = data.type;\n\t return gesture;\n\t}\n\t\n\t/*\n\t * Returns a builder object, which uses method chaining for gesture callback binding.\n\t */\n\tvar gestureListener = exports.gestureListener = function(controller, type) {\n\t var handlers = {};\n\t var gestureMap = {};\n\t\n\t controller.on('gesture', function(gesture, frame) {\n\t if (gesture.type == type) {\n\t if (gesture.state == \"start\" || gesture.state == \"stop\") {\n\t if (gestureMap[gesture.id] === undefined) {\n\t var gestureTracker = new Gesture(gesture, frame);\n\t gestureMap[gesture.id] = gestureTracker;\n\t _.each(handlers, function(cb, name) {\n\t gestureTracker.on(name, cb);\n\t });\n\t }\n\t }\n\t gestureMap[gesture.id].update(gesture, frame);\n\t if (gesture.state == \"stop\") {\n\t delete gestureMap[gesture.id];\n\t }\n\t }\n\t });\n\t var builder = {\n\t start: function(cb) {\n\t handlers['start'] = cb;\n\t return builder;\n\t },\n\t stop: function(cb) {\n\t handlers['stop'] = cb;\n\t return builder;\n\t },\n\t complete: function(cb) {\n\t handlers['stop'] = cb;\n\t return builder;\n\t },\n\t update: function(cb) {\n\t handlers['update'] = cb;\n\t return builder;\n\t }\n\t }\n\t return builder;\n\t}\n\t\n\tvar Gesture = exports.Gesture = function(gesture, frame) {\n\t this.gestures = [gesture];\n\t this.frames = [frame];\n\t}\n\t\n\tGesture.prototype.update = function(gesture, frame) {\n\t this.lastGesture = gesture;\n\t this.lastFrame = frame;\n\t this.gestures.push(gesture);\n\t this.frames.push(frame);\n\t this.emit(gesture.state, this);\n\t}\n\t\n\tGesture.prototype.translation = function() {\n\t return vec3.subtract(vec3.create(), this.lastGesture.startPosition, this.lastGesture.position);\n\t}\n\t\n\t_.extend(Gesture.prototype, EventEmitter.prototype);\n\t\n\t/**\n\t * Constructs a new CircleGesture object.\n\t *\n\t * An uninitialized CircleGesture object is considered invalid. Get valid instances\n\t * of the CircleGesture class from a Frame object.\n\t *\n\t * @class CircleGesture\n\t * @memberof Leap\n\t * @augments Leap.Gesture\n\t * @classdesc\n\t * The CircleGesture classes represents a circular finger movement.\n\t *\n\t * A circle movement is recognized when the tip of a finger draws a circle\n\t * within the Leap field of view.\n\t *\n\t * ![CircleGesture](images/Leap_Gesture_Circle.png)\n\t *\n\t * Circle gestures are continuous. The CircleGesture objects for the gesture have\n\t * three possible states:\n\t *\n\t * * start -- The circle gesture has just started. The movement has\n\t * progressed far enough for the recognizer to classify it as a circle.\n\t * * update -- The circle gesture is continuing.\n\t * * stop -- The circle gesture is finished.\n\t */\n\tvar CircleGesture = function(data) {\n\t /**\n\t * The center point of the circle within the Leap frame of reference.\n\t *\n\t * @member center\n\t * @memberof Leap.CircleGesture.prototype\n\t * @type {number[]}\n\t */\n\t this.center = data.center;\n\t /**\n\t * The normal vector for the circle being traced.\n\t *\n\t * If you draw the circle clockwise, the normal vector points in the same\n\t * general direction as the pointable object drawing the circle. If you draw\n\t * the circle counterclockwise, the normal points back toward the\n\t * pointable. If the angle between the normal and the pointable object\n\t * drawing the circle is less than 90 degrees, then the circle is clockwise.\n\t *\n\t * ```javascript\n\t * var clockwiseness;\n\t * if (circle.pointable.direction.angleTo(circle.normal) <= PI/4) {\n\t * clockwiseness = \"clockwise\";\n\t * }\n\t * else\n\t * {\n\t * clockwiseness = \"counterclockwise\";\n\t * }\n\t * ```\n\t *\n\t * @member normal\n\t * @memberof Leap.CircleGesture.prototype\n\t * @type {number[]}\n\t */\n\t this.normal = data.normal;\n\t /**\n\t * The number of times the finger tip has traversed the circle.\n\t *\n\t * Progress is reported as a positive number of the number. For example,\n\t * a progress value of .5 indicates that the finger has gone halfway\n\t * around, while a value of 3 indicates that the finger has gone around\n\t * the the circle three times.\n\t *\n\t * Progress starts where the circle gesture began. Since the circle\n\t * must be partially formed before the Leap can recognize it, progress\n\t * will be greater than zero when a circle gesture first appears in the\n\t * frame.\n\t *\n\t * @member progress\n\t * @memberof Leap.CircleGesture.prototype\n\t * @type {number}\n\t */\n\t this.progress = data.progress;\n\t /**\n\t * The radius of the circle in mm.\n\t *\n\t * @member radius\n\t * @memberof Leap.CircleGesture.prototype\n\t * @type {number}\n\t */\n\t this.radius = data.radius;\n\t}\n\t\n\tCircleGesture.prototype.toString = function() {\n\t return \"CircleGesture [\"+JSON.stringify(this)+\"]\";\n\t}\n\t\n\t/**\n\t * Constructs a new SwipeGesture object.\n\t *\n\t * An uninitialized SwipeGesture object is considered invalid. Get valid instances\n\t * of the SwipeGesture class from a Frame object.\n\t *\n\t * @class SwipeGesture\n\t * @memberof Leap\n\t * @augments Leap.Gesture\n\t * @classdesc\n\t * The SwipeGesture class represents a swiping motion of a finger or tool.\n\t *\n\t * ![SwipeGesture](images/Leap_Gesture_Swipe.png)\n\t *\n\t * Swipe gestures are continuous.\n\t */\n\tvar SwipeGesture = function(data) {\n\t /**\n\t * The starting position within the Leap frame of\n\t * reference, in mm.\n\t *\n\t * @member startPosition\n\t * @memberof Leap.SwipeGesture.prototype\n\t * @type {number[]}\n\t */\n\t this.startPosition = data.startPosition;\n\t /**\n\t * The current swipe position within the Leap frame of\n\t * reference, in mm.\n\t *\n\t * @member position\n\t * @memberof Leap.SwipeGesture.prototype\n\t * @type {number[]}\n\t */\n\t this.position = data.position;\n\t /**\n\t * The unit direction vector parallel to the swipe motion.\n\t *\n\t * You can compare the components of the vector to classify the swipe as\n\t * appropriate for your application. For example, if you are using swipes\n\t * for two dimensional scrolling, you can compare the x and y values to\n\t * determine if the swipe is primarily horizontal or vertical.\n\t *\n\t * @member direction\n\t * @memberof Leap.SwipeGesture.prototype\n\t * @type {number[]}\n\t */\n\t this.direction = data.direction;\n\t /**\n\t * The speed of the finger performing the swipe gesture in\n\t * millimeters per second.\n\t *\n\t * @member speed\n\t * @memberof Leap.SwipeGesture.prototype\n\t * @type {number}\n\t */\n\t this.speed = data.speed;\n\t}\n\t\n\tSwipeGesture.prototype.toString = function() {\n\t return \"SwipeGesture [\"+JSON.stringify(this)+\"]\";\n\t}\n\t\n\t/**\n\t * Constructs a new ScreenTapGesture object.\n\t *\n\t * An uninitialized ScreenTapGesture object is considered invalid. Get valid instances\n\t * of the ScreenTapGesture class from a Frame object.\n\t *\n\t * @class ScreenTapGesture\n\t * @memberof Leap\n\t * @augments Leap.Gesture\n\t * @classdesc\n\t * The ScreenTapGesture class represents a tapping gesture by a finger or tool.\n\t *\n\t * A screen tap gesture is recognized when the tip of a finger pokes forward\n\t * and then springs back to approximately the original postion, as if\n\t * tapping a vertical screen. The tapping finger must pause briefly before beginning the tap.\n\t *\n\t * ![ScreenTap](images/Leap_Gesture_Tap2.png)\n\t *\n\t * ScreenTap gestures are discrete. The ScreenTapGesture object representing a tap always\n\t * has the state, STATE_STOP. Only one ScreenTapGesture object is created for each\n\t * screen tap gesture recognized.\n\t */\n\tvar ScreenTapGesture = function(data) {\n\t /**\n\t * The position where the screen tap is registered.\n\t *\n\t * @member position\n\t * @memberof Leap.ScreenTapGesture.prototype\n\t * @type {number[]}\n\t */\n\t this.position = data.position;\n\t /**\n\t * The direction of finger tip motion.\n\t *\n\t * @member direction\n\t * @memberof Leap.ScreenTapGesture.prototype\n\t * @type {number[]}\n\t */\n\t this.direction = data.direction;\n\t /**\n\t * The progess value is always 1.0 for a screen tap gesture.\n\t *\n\t * @member progress\n\t * @memberof Leap.ScreenTapGesture.prototype\n\t * @type {number}\n\t */\n\t this.progress = data.progress;\n\t}\n\t\n\tScreenTapGesture.prototype.toString = function() {\n\t return \"ScreenTapGesture [\"+JSON.stringify(this)+\"]\";\n\t}\n\t\n\t/**\n\t * Constructs a new KeyTapGesture object.\n\t *\n\t * An uninitialized KeyTapGesture object is considered invalid. Get valid instances\n\t * of the KeyTapGesture class from a Frame object.\n\t *\n\t * @class KeyTapGesture\n\t * @memberof Leap\n\t * @augments Leap.Gesture\n\t * @classdesc\n\t * The KeyTapGesture class represents a tapping gesture by a finger or tool.\n\t *\n\t * A key tap gesture is recognized when the tip of a finger rotates down toward the\n\t * palm and then springs back to approximately the original postion, as if\n\t * tapping. The tapping finger must pause briefly before beginning the tap.\n\t *\n\t * ![KeyTap](images/Leap_Gesture_Tap.png)\n\t *\n\t * Key tap gestures are discrete. The KeyTapGesture object representing a tap always\n\t * has the state, STATE_STOP. Only one KeyTapGesture object is created for each\n\t * key tap gesture recognized.\n\t */\n\tvar KeyTapGesture = function(data) {\n\t /**\n\t * The position where the key tap is registered.\n\t *\n\t * @member position\n\t * @memberof Leap.KeyTapGesture.prototype\n\t * @type {number[]}\n\t */\n\t this.position = data.position;\n\t /**\n\t * The direction of finger tip motion.\n\t *\n\t * @member direction\n\t * @memberof Leap.KeyTapGesture.prototype\n\t * @type {number[]}\n\t */\n\t this.direction = data.direction;\n\t /**\n\t * The progess value is always 1.0 for a key tap gesture.\n\t *\n\t * @member progress\n\t * @memberof Leap.KeyTapGesture.prototype\n\t * @type {number}\n\t */\n\t this.progress = data.progress;\n\t}\n\t\n\tKeyTapGesture.prototype.toString = function() {\n\t return \"KeyTapGesture [\"+JSON.stringify(this)+\"]\";\n\t}\n\n\n/***/ },\n/* 10 */\n/***/ function(module, exports) {\n\n\t// shim for using process in browser\n\tvar process = module.exports = {};\n\t\n\t// cached from whatever global is present so that test runners that stub it\n\t// don't break things. But we need to wrap it in a try catch in case it is\n\t// wrapped in strict mode code which doesn't define any globals. It's inside a\n\t// function because try/catches deoptimize in certain engines.\n\t\n\tvar cachedSetTimeout;\n\tvar cachedClearTimeout;\n\t\n\tfunction defaultSetTimout() {\n\t throw new Error('setTimeout has not been defined');\n\t}\n\tfunction defaultClearTimeout () {\n\t throw new Error('clearTimeout has not been defined');\n\t}\n\t(function () {\n\t try {\n\t if (typeof setTimeout === 'function') {\n\t cachedSetTimeout = setTimeout;\n\t } else {\n\t cachedSetTimeout = defaultSetTimout;\n\t }\n\t } catch (e) {\n\t cachedSetTimeout = defaultSetTimout;\n\t }\n\t try {\n\t if (typeof clearTimeout === 'function') {\n\t cachedClearTimeout = clearTimeout;\n\t } else {\n\t cachedClearTimeout = defaultClearTimeout;\n\t }\n\t } catch (e) {\n\t cachedClearTimeout = defaultClearTimeout;\n\t }\n\t} ())\n\tfunction runTimeout(fun) {\n\t if (cachedSetTimeout === setTimeout) {\n\t //normal enviroments in sane situations\n\t return setTimeout(fun, 0);\n\t }\n\t // if setTimeout wasn't available but was latter defined\n\t if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n\t cachedSetTimeout = setTimeout;\n\t return setTimeout(fun, 0);\n\t }\n\t try {\n\t // when when somebody has screwed with setTimeout but no I.E. maddness\n\t return cachedSetTimeout(fun, 0);\n\t } catch(e){\n\t try {\n\t // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n\t return cachedSetTimeout.call(null, fun, 0);\n\t } catch(e){\n\t // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n\t return cachedSetTimeout.call(this, fun, 0);\n\t }\n\t }\n\t\n\t\n\t}\n\tfunction runClearTimeout(marker) {\n\t if (cachedClearTimeout === clearTimeout) {\n\t //normal enviroments in sane situations\n\t return clearTimeout(marker);\n\t }\n\t // if clearTimeout wasn't available but was latter defined\n\t if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n\t cachedClearTimeout = clearTimeout;\n\t return clearTimeout(marker);\n\t }\n\t try {\n\t // when when somebody has screwed with setTimeout but no I.E. maddness\n\t return cachedClearTimeout(marker);\n\t } catch (e){\n\t try {\n\t // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n\t return cachedClearTimeout.call(null, marker);\n\t } catch (e){\n\t // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n\t // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n\t return cachedClearTimeout.call(this, marker);\n\t }\n\t }\n\t\n\t\n\t\n\t}\n\tvar queue = [];\n\tvar draining = false;\n\tvar currentQueue;\n\tvar queueIndex = -1;\n\t\n\tfunction cleanUpNextTick() {\n\t if (!draining || !currentQueue) {\n\t return;\n\t }\n\t draining = false;\n\t if (currentQueue.length) {\n\t queue = currentQueue.concat(queue);\n\t } else {\n\t queueIndex = -1;\n\t }\n\t if (queue.length) {\n\t drainQueue();\n\t }\n\t}\n\t\n\tfunction drainQueue() {\n\t if (draining) {\n\t return;\n\t }\n\t var timeout = runTimeout(cleanUpNextTick);\n\t draining = true;\n\t\n\t var len = queue.length;\n\t while(len) {\n\t currentQueue = queue;\n\t queue = [];\n\t while (++queueIndex < len) {\n\t if (currentQueue) {\n\t currentQueue[queueIndex].run();\n\t }\n\t }\n\t queueIndex = -1;\n\t len = queue.length;\n\t }\n\t currentQueue = null;\n\t draining = false;\n\t runClearTimeout(timeout);\n\t}\n\t\n\tprocess.nextTick = function (fun) {\n\t var args = new Array(arguments.length - 1);\n\t if (arguments.length > 1) {\n\t for (var i = 1; i < arguments.length; i++) {\n\t args[i - 1] = arguments[i];\n\t }\n\t }\n\t queue.push(new Item(fun, args));\n\t if (queue.length === 1 && !draining) {\n\t runTimeout(drainQueue);\n\t }\n\t};\n\t\n\t// v8 likes predictible objects\n\tfunction Item(fun, array) {\n\t this.fun = fun;\n\t this.array = array;\n\t}\n\tItem.prototype.run = function () {\n\t this.fun.apply(null, this.array);\n\t};\n\tprocess.title = 'browser';\n\tprocess.browser = true;\n\tprocess.env = {};\n\tprocess.argv = [];\n\tprocess.version = ''; // empty string to avoid regexp issues\n\tprocess.versions = {};\n\t\n\tfunction noop() {}\n\t\n\tprocess.on = noop;\n\tprocess.addListener = noop;\n\tprocess.once = noop;\n\tprocess.off = noop;\n\tprocess.removeListener = noop;\n\tprocess.removeAllListeners = noop;\n\tprocess.emit = noop;\n\t\n\tprocess.binding = function (name) {\n\t throw new Error('process.binding is not supported');\n\t};\n\t\n\tprocess.cwd = function () { return '/' };\n\tprocess.chdir = function (dir) {\n\t throw new Error('process.chdir is not supported');\n\t};\n\tprocess.umask = function() { return 0; };\n\n\n/***/ },\n/* 11 */\n/***/ function(module, exports) {\n\n\t'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\tvar SOUND_GAME_MUSIC = exports.SOUND_GAME_MUSIC = 'gameMusic';\n\tvar SOUND_INTERSECT_CUBE_1 = exports.SOUND_INTERSECT_CUBE_1 = 'intersectCube1';\n\tvar SOUND_INTERSECT_CUBE_2 = exports.SOUND_INTERSECT_CUBE_2 = 'intersectCube2';\n\tvar SOUND_INTERSECT_CUBE_3 = exports.SOUND_INTERSECT_CUBE_3 = 'intersectCube3';\n\tvar SOUND_INTERSECT_PADDLE = exports.SOUND_INTERSECT_PADDLE = 'intersectPaddle';\n\tvar SOUND_BOOM = exports.SOUND_BOOM = 'boom';\n\tvar SOUND_VICTORY_VOICE = exports.SOUND_VICTORY_VOICE = 'victory';\n\tvar SOUND_LOSE_VOICE_1 = exports.SOUND_LOSE_VOICE_1 = 'lose1';\n\tvar SOUND_LOSE_VOICE_2 = exports.SOUND_LOSE_VOICE_2 = 'lose2';\n\tvar SOUND_START_VOICE = exports.SOUND_START_VOICE = 'start';\n\t\n\tvar IMG_INTERACTOPUS_BG_BLACK = exports.IMG_INTERACTOPUS_BG_BLACK = 'interactopusBgBlack';\n\tvar IMG_INTERACTOPUS_BG_TRANS = exports.IMG_INTERACTOPUS_BG_TRANS = 'interactopusBgTrans';\n\t\n\tvar EVENT_FINAL_BLOCK_KILLED = exports.EVENT_FINAL_BLOCK_KILLED = 'finalBlockKilled';\n\tvar EVENT_NO_LIVES = exports.EVENT_NO_LIVES = 'noLives';\n\n/***/ },\n/* 12 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\n\tvar KeyCombo = __webpack_require__(7);\n\t\n\t\n\tfunction Locale(name) {\n\t this.localeName = name;\n\t this.pressedKeys = [];\n\t this._appliedMacros = [];\n\t this._keyMap = {};\n\t this._killKeyCodes = [];\n\t this._macros = [];\n\t}\n\t\n\tLocale.prototype.bindKeyCode = function(keyCode, keyNames) {\n\t if (typeof keyNames === 'string') {\n\t keyNames = [keyNames];\n\t }\n\t\n\t this._keyMap[keyCode] = keyNames;\n\t};\n\t\n\tLocale.prototype.bindMacro = function(keyComboStr, keyNames) {\n\t if (typeof keyNames === 'string') {\n\t keyNames = [ keyNames ];\n\t }\n\t\n\t var handler = null;\n\t if (typeof keyNames === 'function') {\n\t handler = keyNames;\n\t keyNames = null;\n\t }\n\t\n\t var macro = {\n\t keyCombo : new KeyCombo(keyComboStr),\n\t keyNames : keyNames,\n\t handler : handler\n\t };\n\t\n\t this._macros.push(macro);\n\t};\n\t\n\tLocale.prototype.getKeyCodes = function(keyName) {\n\t var keyCodes = [];\n\t for (var keyCode in this._keyMap) {\n\t var index = this._keyMap[keyCode].indexOf(keyName);\n\t if (index > -1) { keyCodes.push(keyCode|0); }\n\t }\n\t return keyCodes;\n\t};\n\t\n\tLocale.prototype.getKeyNames = function(keyCode) {\n\t return this._keyMap[keyCode] || [];\n\t};\n\t\n\tLocale.prototype.setKillKey = function(keyCode) {\n\t if (typeof keyCode === 'string') {\n\t var keyCodes = this.getKeyCodes(keyCode);\n\t for (var i = 0; i < keyCodes.length; i += 1) {\n\t this.setKillKey(keyCodes[i]);\n\t }\n\t return;\n\t }\n\t\n\t this._killKeyCodes.push(keyCode);\n\t};\n\t\n\tLocale.prototype.pressKey = function(keyCode) {\n\t if (typeof keyCode === 'string') {\n\t var keyCodes = this.getKeyCodes(keyCode);\n\t for (var i = 0; i < keyCodes.length; i += 1) {\n\t this.pressKey(keyCodes[i]);\n\t }\n\t return;\n\t }\n\t\n\t var keyNames = this.getKeyNames(keyCode);\n\t for (var i = 0; i < keyNames.length; i += 1) {\n\t if (this.pressedKeys.indexOf(keyNames[i]) === -1) {\n\t this.pressedKeys.push(keyNames[i]);\n\t }\n\t }\n\t\n\t this._applyMacros();\n\t};\n\t\n\tLocale.prototype.releaseKey = function(keyCode) {\n\t if (typeof keyCode === 'string') {\n\t var keyCodes = this.getKeyCodes(keyCode);\n\t for (var i = 0; i < keyCodes.length; i += 1) {\n\t this.releaseKey(keyCodes[i]);\n\t }\n\t }\n\t\n\t else {\n\t var keyNames = this.getKeyNames(keyCode);\n\t var killKeyCodeIndex = this._killKeyCodes.indexOf(keyCode);\n\t \n\t if (killKeyCodeIndex > -1) {\n\t this.pressedKeys.length = 0;\n\t } else {\n\t for (var i = 0; i < keyNames.length; i += 1) {\n\t var index = this.pressedKeys.indexOf(keyNames[i]);\n\t if (index > -1) {\n\t this.pressedKeys.splice(index, 1);\n\t }\n\t }\n\t }\n\t\n\t this._clearMacros();\n\t }\n\t};\n\t\n\tLocale.prototype._applyMacros = function() {\n\t var macros = this._macros.slice(0);\n\t for (var i = 0; i < macros.length; i += 1) {\n\t var macro = macros[i];\n\t if (macro.keyCombo.check(this.pressedKeys)) {\n\t if (macro.handler) {\n\t macro.keyNames = macro.handler(this.pressedKeys);\n\t }\n\t for (var j = 0; j < macro.keyNames.length; j += 1) {\n\t if (this.pressedKeys.indexOf(macro.keyNames[j]) === -1) {\n\t this.pressedKeys.push(macro.keyNames[j]);\n\t }\n\t }\n\t this._appliedMacros.push(macro);\n\t }\n\t }\n\t};\n\t\n\tLocale.prototype._clearMacros = function() {\n\t for (var i = 0; i < this._appliedMacros.length; i += 1) {\n\t var macro = this._appliedMacros[i];\n\t if (!macro.keyCombo.check(this.pressedKeys)) {\n\t for (var j = 0; j < macro.keyNames.length; j += 1) {\n\t var index = this.pressedKeys.indexOf(macro.keyNames[j]);\n\t if (index > -1) {\n\t this.pressedKeys.splice(index, 1);\n\t }\n\t }\n\t if (macro.handler) {\n\t macro.keyNames = null;\n\t }\n\t this._appliedMacros.splice(i, 1);\n\t i -= 1;\n\t }\n\t }\n\t};\n\t\n\t\n\tmodule.exports = Locale;\n\n\n/***/ },\n/* 13 */\n/***/ function(module, exports, __webpack_require__) {\n\n\tvar Pointable = __webpack_require__(4),\n\t glMatrix = __webpack_require__(2)\n\t , vec3 = glMatrix.vec3\n\t , mat3 = glMatrix.mat3\n\t , mat4 = glMatrix.mat4\n\t , _ = __webpack_require__(1);\n\t\n\t\n\tvar Bone = module.exports = function(finger, data) {\n\t this.finger = finger;\n\t\n\t this._center = null, this._matrix = null;\n\t\n\t /**\n\t * An integer code for the name of this bone.\n\t *\n\t * * 0 -- metacarpal\n\t * * 1 -- proximal\n\t * * 2 -- medial\n\t * * 3 -- distal\n\t * * 4 -- arm\n\t *\n\t * @member type\n\t * @type {number}\n\t * @memberof Leap.Bone.prototype\n\t */\n\t this.type = data.type;\n\t\n\t /**\n\t * The position of the previous, or base joint of the bone closer to the wrist.\n\t * @type {vector3}\n\t */\n\t this.prevJoint = data.prevJoint;\n\t\n\t /**\n\t * The position of the next joint, or the end of the bone closer to the finger tip.\n\t * @type {vector3}\n\t */\n\t this.nextJoint = data.nextJoint;\n\t\n\t /**\n\t * The estimated width of the tool in millimeters.\n\t *\n\t * The reported width is the average width of the visible portion of the\n\t * tool from the hand to the tip. If the width isn't known,\n\t * then a value of 0 is returned.\n\t *\n\t * Pointable objects representing fingers do not have a width property.\n\t *\n\t * @member width\n\t * @type {number}\n\t * @memberof Leap.Pointable.prototype\n\t */\n\t this.width = data.width;\n\t\n\t var displacement = new Array(3);\n\t vec3.sub(displacement, data.nextJoint, data.prevJoint);\n\t\n\t this.length = vec3.length(displacement);\n\t\n\t\n\t /**\n\t *\n\t * These fully-specify the orientation of the bone.\n\t * See examples/threejs-bones.html for more info\n\t * Three vec3s:\n\t * x (red): The rotation axis of the finger, pointing outwards. (In general, away from the thumb )\n\t * y (green): The \"up\" vector, orienting the top of the finger\n\t * z (blue): The roll axis of the bone.\n\t *\n\t * Most up vectors will be pointing the same direction, except for the thumb, which is more rightwards.\n\t *\n\t * The thumb has one fewer bones than the fingers, but there are the same number of joints & joint-bases provided\n\t * the first two appear in the same position, but only the second (proximal) rotates.\n\t *\n\t * Normalized.\n\t */\n\t this.basis = data.basis;\n\t};\n\t\n\tBone.prototype.left = function(){\n\t\n\t if (this._left) return this._left;\n\t\n\t this._left = mat3.determinant(this.basis[0].concat(this.basis[1]).concat(this.basis[2])) < 0;\n\t\n\t return this._left;\n\t\n\t};\n\t\n\t\n\t/**\n\t * The Affine transformation matrix describing the orientation of the bone, in global Leap-space.\n\t * It contains a 3x3 rotation matrix (in the \"top left\"), and center coordinates in the fourth column.\n\t *\n\t * Unlike the basis, the right and left hands have the same coordinate system.\n\t *\n\t */\n\tBone.prototype.matrix = function(){\n\t\n\t if (this._matrix) return this._matrix;\n\t\n\t var b = this.basis,\n\t t = this._matrix = mat4.create();\n\t\n\t // open transform mat4 from rotation mat3\n\t t[0] = b[0][0], t[1] = b[0][1], t[2] = b[0][2];\n\t t[4] = b[1][0], t[5] = b[1][1], t[6] = b[1][2];\n\t t[8] = b[2][0], t[9] = b[2][1], t[10] = b[2][2];\n\t\n\t t[3] = this.center()[0];\n\t t[7] = this.center()[1];\n\t t[11] = this.center()[2];\n\t\n\t if ( this.left() ) {\n\t // flip the basis to be right-handed\n\t t[0] *= -1;\n\t t[1] *= -1;\n\t t[2] *= -1;\n\t }\n\t\n\t return this._matrix;\n\t};\n\t\n\t/**\n\t * Helper method to linearly interpolate between the two ends of the bone.\n\t *\n\t * when t = 0, the position of prevJoint will be returned\n\t * when t = 1, the position of nextJoint will be returned\n\t */\n\tBone.prototype.lerp = function(out, t){\n\t\n\t vec3.lerp(out, this.prevJoint, this.nextJoint, t);\n\t\n\t};\n\t\n\t/**\n\t *\n\t * The center position of the bone\n\t * Returns a vec3 array.\n\t *\n\t */\n\tBone.prototype.center = function(){\n\t\n\t if (this._center) return this._center;\n\t\n\t var center = vec3.create();\n\t this.lerp(center, 0.5);\n\t this._center = center;\n\t return center;\n\t\n\t};\n\t\n\t// The negative of the z-basis\n\tBone.prototype.direction = function(){\n\t\n\t return [\n\t this.basis[2][0] * -1,\n\t this.basis[2][1] * -1,\n\t this.basis[2][2] * -1\n\t ];\n\t\n\t};\n\n\n/***/ },\n/* 14 */\n/***/ function(module, exports) {\n\n\tvar CircularBuffer = module.exports = function(size) {\n\t this.pos = 0;\n\t this._buf = [];\n\t this.size = size;\n\t}\n\t\n\tCircularBuffer.prototype.get = function(i) {\n\t if (i == undefined) i = 0;\n\t if (i >= this.size) return undefined;\n\t if (i >= this._buf.length) return undefined;\n\t return this._buf[(this.pos - i - 1) % this.size];\n\t}\n\t\n\tCircularBuffer.prototype.push = function(o) {\n\t this._buf[this.pos % this.size] = o;\n\t return this.pos++;\n\t}\n\n\n/***/ },\n/* 15 */\n/***/ function(module, exports, __webpack_require__) {\n\n\tvar chooseProtocol = __webpack_require__(18).chooseProtocol\n\t , EventEmitter = __webpack_require__(3).EventEmitter\n\t , _ = __webpack_require__(1);\n\t\n\tvar BaseConnection = module.exports = function(opts) {\n\t this.opts = _.defaults(opts || {}, {\n\t host : '127.0.0.1',\n\t enableGestures: false,\n\t scheme: this.getScheme(),\n\t port: this.getPort(),\n\t background: false,\n\t optimizeHMD: false,\n\t requestProtocolVersion: BaseConnection.defaultProtocolVersion\n\t });\n\t this.host = this.opts.host;\n\t this.port = this.opts.port;\n\t this.scheme = this.opts.scheme;\n\t this.protocolVersionVerified = false;\n\t this.background = null;\n\t this.optimizeHMD = null;\n\t this.on('ready', function() {\n\t this.enableGestures(this.opts.enableGestures);\n\t this.setBackground(this.opts.background);\n\t this.setOptimizeHMD(this.opts.optimizeHMD);\n\t\n\t if (this.opts.optimizeHMD){\n\t console.log(\"Optimized for head mounted display usage.\");\n\t }else {\n\t console.log(\"Optimized for desktop usage.\");\n\t }\n\t\n\t });\n\t};\n\t\n\t// The latest available:\n\tBaseConnection.defaultProtocolVersion = 6;\n\t\n\tBaseConnection.prototype.getUrl = function() {\n\t return this.scheme + \"//\" + this.host + \":\" + this.port + \"/v\" + this.opts.requestProtocolVersion + \".json\";\n\t}\n\t\n\t\n\tBaseConnection.prototype.getScheme = function(){\n\t return 'ws:'\n\t}\n\t\n\tBaseConnection.prototype.getPort = function(){\n\t return 6437\n\t}\n\t\n\t\n\tBaseConnection.prototype.setBackground = function(state) {\n\t this.opts.background = state;\n\t if (this.protocol && this.protocol.sendBackground && this.background !== this.opts.background) {\n\t this.background = this.opts.background;\n\t this.protocol.sendBackground(this, this.opts.background);\n\t }\n\t}\n\t\n\tBaseConnection.prototype.setOptimizeHMD = function(state) {\n\t this.opts.optimizeHMD = state;\n\t if (this.protocol && this.protocol.sendOptimizeHMD && this.optimizeHMD !== this.opts.optimizeHMD) {\n\t this.optimizeHMD = this.opts.optimizeHMD;\n\t this.protocol.sendOptimizeHMD(this, this.opts.optimizeHMD);\n\t }\n\t}\n\t\n\tBaseConnection.prototype.handleOpen = function() {\n\t if (!this.connected) {\n\t this.connected = true;\n\t this.emit('connect');\n\t }\n\t}\n\t\n\tBaseConnection.prototype.enableGestures = function(enabled) {\n\t this.gesturesEnabled = enabled ? true : false;\n\t this.send(this.protocol.encode({\"enableGestures\": this.gesturesEnabled}));\n\t}\n\t\n\tBaseConnection.prototype.handleClose = function(code, reason) {\n\t if (!this.connected) return;\n\t this.disconnect();\n\t\n\t // 1001 - an active connection is closed\n\t // 1006 - cannot connect\n\t if (code === 1001 && this.opts.requestProtocolVersion > 1) {\n\t if (this.protocolVersionVerified) {\n\t this.protocolVersionVerified = false;\n\t }else{\n\t this.opts.requestProtocolVersion--;\n\t }\n\t }\n\t this.startReconnection();\n\t}\n\t\n\tBaseConnection.prototype.startReconnection = function() {\n\t var connection = this;\n\t if(!this.reconnectionTimer){\n\t (this.reconnectionTimer = setInterval(function() { connection.reconnect() }, 500));\n\t }\n\t}\n\t\n\tBaseConnection.prototype.stopReconnection = function() {\n\t this.reconnectionTimer = clearInterval(this.reconnectionTimer);\n\t}\n\t\n\t// By default, disconnect will prevent auto-reconnection.\n\t// Pass in true to allow the reconnection loop not be interrupted continue\n\tBaseConnection.prototype.disconnect = function(allowReconnect) {\n\t if (!allowReconnect) this.stopReconnection();\n\t if (!this.socket) return;\n\t this.socket.close();\n\t delete this.socket;\n\t delete this.protocol;\n\t delete this.background; // This is not persisted when reconnecting to the web socket server\n\t delete this.optimizeHMD;\n\t delete this.focusedState;\n\t if (this.connected) {\n\t this.connected = false;\n\t this.emit('disconnect');\n\t }\n\t return true;\n\t}\n\t\n\tBaseConnection.prototype.reconnect = function() {\n\t if (this.connected) {\n\t this.stopReconnection();\n\t } else {\n\t this.disconnect(true);\n\t this.connect();\n\t }\n\t}\n\t\n\tBaseConnection.prototype.handleData = function(data) {\n\t var message = JSON.parse(data);\n\t\n\t var messageEvent;\n\t if (this.protocol === undefined) {\n\t messageEvent = this.protocol = chooseProtocol(message);\n\t this.protocolVersionVerified = true;\n\t this.emit('ready');\n\t } else {\n\t messageEvent = this.protocol(message);\n\t }\n\t this.emit(messageEvent.type, messageEvent);\n\t}\n\t\n\tBaseConnection.prototype.connect = function() {\n\t if (this.socket) return;\n\t this.socket = this.setupSocket();\n\t return true;\n\t}\n\t\n\tBaseConnection.prototype.send = function(data) {\n\t this.socket.send(data);\n\t}\n\t\n\tBaseConnection.prototype.reportFocus = function(state) {\n\t if (!this.connected || this.focusedState === state) return;\n\t this.focusedState = state;\n\t this.emit(this.focusedState ? 'focus' : 'blur');\n\t if (this.protocol && this.protocol.sendFocused) {\n\t this.protocol.sendFocused(this, this.focusedState);\n\t }\n\t}\n\t\n\t_.extend(BaseConnection.prototype, EventEmitter.prototype);\n\n/***/ },\n/* 16 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t/* WEBPACK VAR INJECTION */(function(process) {var Dialog = module.exports = function(message, options){\n\t this.options = (options || {});\n\t this.message = message;\n\t\n\t this.createElement();\n\t};\n\t\n\tDialog.prototype.createElement = function(){\n\t this.element = document.createElement('div');\n\t this.element.className = \"leapjs-dialog\";\n\t this.element.style.position = \"fixed\";\n\t this.element.style.top = '8px';\n\t this.element.style.left = 0;\n\t this.element.style.right = 0;\n\t this.element.style.textAlign = 'center';\n\t this.element.style.zIndex = 1000;\n\t\n\t var dialog = document.createElement('div');\n\t this.element.appendChild(dialog);\n\t dialog.style.className = \"leapjs-dialog\";\n\t dialog.style.display = \"inline-block\";\n\t dialog.style.margin = \"auto\";\n\t dialog.style.padding = \"8px\";\n\t dialog.style.color = \"#222\";\n\t dialog.style.background = \"#eee\";\n\t dialog.style.borderRadius = \"4px\";\n\t dialog.style.border = \"1px solid #999\";\n\t dialog.style.textAlign = \"left\";\n\t dialog.style.cursor = \"pointer\";\n\t dialog.style.whiteSpace = \"nowrap\";\n\t dialog.style.transition = \"box-shadow 1s linear\";\n\t dialog.innerHTML = this.message;\n\t\n\t\n\t if (this.options.onclick){\n\t dialog.addEventListener('click', this.options.onclick);\n\t }\n\t\n\t if (this.options.onmouseover){\n\t dialog.addEventListener('mouseover', this.options.onmouseover);\n\t }\n\t\n\t if (this.options.onmouseout){\n\t dialog.addEventListener('mouseout', this.options.onmouseout);\n\t }\n\t\n\t if (this.options.onmousemove){\n\t dialog.addEventListener('mousemove', this.options.onmousemove);\n\t }\n\t};\n\t\n\tDialog.prototype.show = function(){\n\t document.body.appendChild(this.element);\n\t return this;\n\t};\n\t\n\tDialog.prototype.hide = function(){\n\t document.body.removeChild(this.element);\n\t return this;\n\t};\n\t\n\t\n\t\n\t\n\t// Shows a DOM dialog box with links to developer.leapmotion.com to upgrade\n\t// This will work whether or not the Leap is plugged in,\n\t// As long as it is called after a call to .connect() and the 'ready' event has fired.\n\tDialog.warnOutOfDate = function(params){\n\t params || (params = {});\n\t\n\t var url = \"http://developer.leapmotion.com?\";\n\t\n\t params.returnTo = window.location.href;\n\t\n\t for (var key in params){\n\t url += key + '=' + encodeURIComponent(params[key]) + '&';\n\t }\n\t\n\t var dialog,\n\t onclick = function(event){\n\t\n\t if (event.target.id != 'leapjs-decline-upgrade'){\n\t\n\t var popup = window.open(url,\n\t '_blank',\n\t 'height=800,width=1000,location=1,menubar=1,resizable=1,status=1,toolbar=1,scrollbars=1'\n\t );\n\t\n\t if (window.focus) {popup.focus()}\n\t\n\t }\n\t\n\t dialog.hide();\n\t\n\t return true;\n\t },\n\t\n\t\n\t message = \"This site requires Leap Motion Tracking V2.\" +\n\t \"\" +\n\t \"\";\n\t\n\t dialog = new Dialog(message, {\n\t onclick: onclick,\n\t onmousemove: function(e){\n\t if (e.target == document.getElementById('leapjs-decline-upgrade')){\n\t document.getElementById('leapjs-decline-upgrade').style.color = '#000';\n\t document.getElementById('leapjs-decline-upgrade').style.boxShadow = '0px 0px 2px #5daa00';\n\t\n\t document.getElementById('leapjs-accept-upgrade').style.color = '#444';\n\t document.getElementById('leapjs-accept-upgrade').style.boxShadow = 'none';\n\t }else{\n\t document.getElementById('leapjs-accept-upgrade').style.color = '#000';\n\t document.getElementById('leapjs-accept-upgrade').style.boxShadow = '0px 0px 2px #5daa00';\n\t\n\t document.getElementById('leapjs-decline-upgrade').style.color = '#444';\n\t document.getElementById('leapjs-decline-upgrade').style.boxShadow = 'none';\n\t }\n\t },\n\t onmouseout: function(){\n\t document.getElementById('leapjs-decline-upgrade').style.color = '#444';\n\t document.getElementById('leapjs-decline-upgrade').style.boxShadow = 'none';\n\t document.getElementById('leapjs-accept-upgrade').style.color = '#444';\n\t document.getElementById('leapjs-accept-upgrade').style.boxShadow = 'none';\n\t }\n\t }\n\t );\n\t\n\t return dialog.show();\n\t};\n\t\n\t\n\t// Tracks whether we've warned for lack of bones API. This will be shown only for early private-beta members.\n\tDialog.hasWarnedBones = false;\n\t\n\tDialog.warnBones = function(){\n\t if (this.hasWarnedBones) return;\n\t this.hasWarnedBones = true;\n\t\n\t console.warn(\"Your Leap Service is out of date\");\n\t\n\t if ( !(typeof(process) !== 'undefined' && process.versions && process.versions.node) ){\n\t this.warnOutOfDate({reason: 'bones'});\n\t }\n\t\n\t}\n\t/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(10)))\n\n/***/ },\n/* 17 */\n/***/ function(module, exports, __webpack_require__) {\n\n\tvar glMatrix = __webpack_require__(2)\n\t , vec3 = glMatrix.vec3;\n\t\n\t/**\n\t * Constructs a InteractionBox object.\n\t *\n\t * @class InteractionBox\n\t * @memberof Leap\n\t * @classdesc\n\t * The InteractionBox class represents a box-shaped region completely within\n\t * the field of view of the Leap Motion controller.\n\t *\n\t * The interaction box is an axis-aligned rectangular prism and provides\n\t * normalized coordinates for hands, fingers, and tools within this box.\n\t * The InteractionBox class can make it easier to map positions in the\n\t * Leap Motion coordinate system to 2D or 3D coordinate systems used\n\t * for application drawing.\n\t *\n\t * ![Interaction Box](images/Leap_InteractionBox.png)\n\t *\n\t * The InteractionBox region is defined by a center and dimensions along the x, y, and z axes.\n\t */\n\tvar InteractionBox = module.exports = function(data) {\n\t /**\n\t * Indicates whether this is a valid InteractionBox object.\n\t *\n\t * @member valid\n\t * @type {Boolean}\n\t * @memberof Leap.InteractionBox.prototype\n\t */\n\t this.valid = true;\n\t /**\n\t * The center of the InteractionBox in device coordinates (millimeters).\n\t * This point is equidistant from all sides of the box.\n\t *\n\t * @member center\n\t * @type {number[]}\n\t * @memberof Leap.InteractionBox.prototype\n\t */\n\t this.center = data.center;\n\t\n\t this.size = data.size;\n\t /**\n\t * The width of the InteractionBox in millimeters, measured along the x-axis.\n\t *\n\t * @member width\n\t * @type {number}\n\t * @memberof Leap.InteractionBox.prototype\n\t */\n\t this.width = data.size[0];\n\t /**\n\t * The height of the InteractionBox in millimeters, measured along the y-axis.\n\t *\n\t * @member height\n\t * @type {number}\n\t * @memberof Leap.InteractionBox.prototype\n\t */\n\t this.height = data.size[1];\n\t /**\n\t * The depth of the InteractionBox in millimeters, measured along the z-axis.\n\t *\n\t * @member depth\n\t * @type {number}\n\t * @memberof Leap.InteractionBox.prototype\n\t */\n\t this.depth = data.size[2];\n\t}\n\t\n\t/**\n\t * Converts a position defined by normalized InteractionBox coordinates\n\t * into device coordinates in millimeters.\n\t *\n\t * This function performs the inverse of normalizePoint().\n\t *\n\t * @method denormalizePoint\n\t * @memberof Leap.InteractionBox.prototype\n\t * @param {number[]} normalizedPosition The input position in InteractionBox coordinates.\n\t * @returns {number[]} The corresponding denormalized position in device coordinates.\n\t */\n\tInteractionBox.prototype.denormalizePoint = function(normalizedPosition) {\n\t return vec3.fromValues(\n\t (normalizedPosition[0] - 0.5) * this.size[0] + this.center[0],\n\t (normalizedPosition[1] - 0.5) * this.size[1] + this.center[1],\n\t (normalizedPosition[2] - 0.5) * this.size[2] + this.center[2]\n\t );\n\t}\n\t\n\t/**\n\t * Normalizes the coordinates of a point using the interaction box.\n\t *\n\t * Coordinates from the Leap Motion frame of reference (millimeters) are\n\t * converted to a range of [0..1] such that the minimum value of the\n\t * InteractionBox maps to 0 and the maximum value of the InteractionBox maps to 1.\n\t *\n\t * @method normalizePoint\n\t * @memberof Leap.InteractionBox.prototype\n\t * @param {number[]} position The input position in device coordinates.\n\t * @param {Boolean} clamp Whether or not to limit the output value to the range [0,1]\n\t * when the input position is outside the InteractionBox. Defaults to true.\n\t * @returns {number[]} The normalized position.\n\t */\n\tInteractionBox.prototype.normalizePoint = function(position, clamp) {\n\t var vec = vec3.fromValues(\n\t ((position[0] - this.center[0]) / this.size[0]) + 0.5,\n\t ((position[1] - this.center[1]) / this.size[1]) + 0.5,\n\t ((position[2] - this.center[2]) / this.size[2]) + 0.5\n\t );\n\t\n\t if (clamp) {\n\t vec[0] = Math.min(Math.max(vec[0], 0), 1);\n\t vec[1] = Math.min(Math.max(vec[1], 0), 1);\n\t vec[2] = Math.min(Math.max(vec[2], 0), 1);\n\t }\n\t return vec;\n\t}\n\t\n\t/**\n\t * Writes a brief, human readable description of the InteractionBox object.\n\t *\n\t * @method toString\n\t * @memberof Leap.InteractionBox.prototype\n\t * @returns {String} A description of the InteractionBox object as a string.\n\t */\n\tInteractionBox.prototype.toString = function() {\n\t return \"InteractionBox [ width:\" + this.width + \" | height:\" + this.height + \" | depth:\" + this.depth + \" ]\";\n\t}\n\t\n\t/**\n\t * An invalid InteractionBox object.\n\t *\n\t * You can use this InteractionBox instance in comparisons testing\n\t * whether a given InteractionBox instance is valid or invalid. (You can also use the\n\t * InteractionBox.valid property.)\n\t *\n\t * @static\n\t * @type {Leap.InteractionBox}\n\t * @name Invalid\n\t * @memberof Leap.InteractionBox\n\t */\n\tInteractionBox.Invalid = { valid: false };\n\n\n/***/ },\n/* 18 */\n/***/ function(module, exports, __webpack_require__) {\n\n\tvar Frame = __webpack_require__(8)\n\t , Hand = __webpack_require__(6)\n\t , Pointable = __webpack_require__(4)\n\t , Finger = __webpack_require__(5)\n\t , _ = __webpack_require__(1)\n\t , EventEmitter = __webpack_require__(3).EventEmitter;\n\t\n\tvar Event = function(data) {\n\t this.type = data.type;\n\t this.state = data.state;\n\t};\n\t\n\texports.chooseProtocol = function(header) {\n\t var protocol;\n\t switch(header.version) {\n\t case 1:\n\t case 2:\n\t case 3:\n\t case 4:\n\t case 5:\n\t case 6:\n\t protocol = JSONProtocol(header);\n\t protocol.sendBackground = function(connection, state) {\n\t connection.send(protocol.encode({background: state}));\n\t }\n\t protocol.sendFocused = function(connection, state) {\n\t connection.send(protocol.encode({focused: state}));\n\t }\n\t protocol.sendOptimizeHMD = function(connection, state) {\n\t connection.send(protocol.encode({optimizeHMD: state}));\n\t }\n\t break;\n\t default:\n\t throw \"unrecognized version\";\n\t }\n\t return protocol;\n\t}\n\t\n\tvar JSONProtocol = exports.JSONProtocol = function(header) {\n\t\n\t var protocol = function(frameData) {\n\t\n\t if (frameData.event) {\n\t\n\t return new Event(frameData.event);\n\t\n\t } else {\n\t\n\t protocol.emit('beforeFrameCreated', frameData);\n\t\n\t var frame = new Frame(frameData);\n\t\n\t protocol.emit('afterFrameCreated', frame, frameData);\n\t\n\t return frame;\n\t\n\t }\n\t\n\t };\n\t\n\t protocol.encode = function(message) {\n\t return JSON.stringify(message);\n\t };\n\t protocol.version = header.version;\n\t protocol.serviceVersion = header.serviceVersion;\n\t protocol.versionLong = 'Version ' + header.version;\n\t protocol.type = 'protocol';\n\t\n\t _.extend(protocol, EventEmitter.prototype);\n\t\n\t return protocol;\n\t};\n\t\n\t\n\n\n/***/ },\n/* 19 */\n/***/ function(module, exports, __webpack_require__) {\n\n\tvar __WEBPACK_AMD_DEFINE_RESULT__;/*jshint eqnull:true*/\n\t(function (root) {\n\t \"use strict\";\n\t\n\t var GLOBAL_KEY = \"Random\";\n\t\n\t var imul = (typeof Math.imul !== \"function\" || Math.imul(0xffffffff, 5) !== -5 ?\n\t function (a, b) {\n\t var ah = (a >>> 16) & 0xffff;\n\t var al = a & 0xffff;\n\t var bh = (b >>> 16) & 0xffff;\n\t var bl = b & 0xffff;\n\t // the shift by 0 fixes the sign on the high part\n\t // the final |0 converts the unsigned value into a signed value\n\t return (al * bl) + (((ah * bl + al * bh) << 16) >>> 0) | 0;\n\t } :\n\t Math.imul);\n\t\n\t var stringRepeat = (typeof String.prototype.repeat === \"function\" && \"x\".repeat(3) === \"xxx\" ?\n\t function (x, y) {\n\t return x.repeat(y);\n\t } : function (pattern, count) {\n\t var result = \"\";\n\t while (count > 0) {\n\t if (count & 1) {\n\t result += pattern;\n\t }\n\t count >>= 1;\n\t pattern += pattern;\n\t }\n\t return result;\n\t });\n\t\n\t function Random(engine) {\n\t if (!(this instanceof Random)) {\n\t return new Random(engine);\n\t }\n\t\n\t if (engine == null) {\n\t engine = Random.engines.nativeMath;\n\t } else if (typeof engine !== \"function\") {\n\t throw new TypeError(\"Expected engine to be a function, got \" + typeof engine);\n\t }\n\t this.engine = engine;\n\t }\n\t var proto = Random.prototype;\n\t\n\t Random.engines = {\n\t nativeMath: function () {\n\t return (Math.random() * 0x100000000) | 0;\n\t },\n\t mt19937: (function (Int32Array) {\n\t // http://en.wikipedia.org/wiki/Mersenne_twister\n\t function refreshData(data) {\n\t var k = 0;\n\t var tmp = 0;\n\t for (;\n\t (k | 0) < 227; k = (k + 1) | 0) {\n\t tmp = (data[k] & 0x80000000) | (data[(k + 1) | 0] & 0x7fffffff);\n\t data[k] = data[(k + 397) | 0] ^ (tmp >>> 1) ^ ((tmp & 0x1) ? 0x9908b0df : 0);\n\t }\n\t\n\t for (;\n\t (k | 0) < 623; k = (k + 1) | 0) {\n\t tmp = (data[k] & 0x80000000) | (data[(k + 1) | 0] & 0x7fffffff);\n\t data[k] = data[(k - 227) | 0] ^ (tmp >>> 1) ^ ((tmp & 0x1) ? 0x9908b0df : 0);\n\t }\n\t\n\t tmp = (data[623] & 0x80000000) | (data[0] & 0x7fffffff);\n\t data[623] = data[396] ^ (tmp >>> 1) ^ ((tmp & 0x1) ? 0x9908b0df : 0);\n\t }\n\t\n\t function temper(value) {\n\t value ^= value >>> 11;\n\t value ^= (value << 7) & 0x9d2c5680;\n\t value ^= (value << 15) & 0xefc60000;\n\t return value ^ (value >>> 18);\n\t }\n\t\n\t function seedWithArray(data, source) {\n\t var i = 1;\n\t var j = 0;\n\t var sourceLength = source.length;\n\t var k = Math.max(sourceLength, 624) | 0;\n\t var previous = data[0] | 0;\n\t for (;\n\t (k | 0) > 0; --k) {\n\t data[i] = previous = ((data[i] ^ imul((previous ^ (previous >>> 30)), 0x0019660d)) + (source[j] | 0) + (j | 0)) | 0;\n\t i = (i + 1) | 0;\n\t ++j;\n\t if ((i | 0) > 623) {\n\t data[0] = data[623];\n\t i = 1;\n\t }\n\t if (j >= sourceLength) {\n\t j = 0;\n\t }\n\t }\n\t for (k = 623;\n\t (k | 0) > 0; --k) {\n\t data[i] = previous = ((data[i] ^ imul((previous ^ (previous >>> 30)), 0x5d588b65)) - i) | 0;\n\t i = (i + 1) | 0;\n\t if ((i | 0) > 623) {\n\t data[0] = data[623];\n\t i = 1;\n\t }\n\t }\n\t data[0] = 0x80000000;\n\t }\n\t\n\t function mt19937() {\n\t var data = new Int32Array(624);\n\t var index = 0;\n\t var uses = 0;\n\t\n\t function next() {\n\t if ((index | 0) >= 624) {\n\t refreshData(data);\n\t index = 0;\n\t }\n\t\n\t var value = data[index];\n\t index = (index + 1) | 0;\n\t uses += 1;\n\t return temper(value) | 0;\n\t }\n\t next.getUseCount = function() {\n\t return uses;\n\t };\n\t next.discard = function (count) {\n\t uses += count;\n\t if ((index | 0) >= 624) {\n\t refreshData(data);\n\t index = 0;\n\t }\n\t while ((count - index) > 624) {\n\t count -= 624 - index;\n\t refreshData(data);\n\t index = 0;\n\t }\n\t index = (index + count) | 0;\n\t return next;\n\t };\n\t next.seed = function (initial) {\n\t var previous = 0;\n\t data[0] = previous = initial | 0;\n\t\n\t for (var i = 1; i < 624; i = (i + 1) | 0) {\n\t data[i] = previous = (imul((previous ^ (previous >>> 30)), 0x6c078965) + i) | 0;\n\t }\n\t index = 624;\n\t uses = 0;\n\t return next;\n\t };\n\t next.seedWithArray = function (source) {\n\t next.seed(0x012bd6aa);\n\t seedWithArray(data, source);\n\t return next;\n\t };\n\t next.autoSeed = function () {\n\t return next.seedWithArray(Random.generateEntropyArray());\n\t };\n\t return next;\n\t }\n\t\n\t return mt19937;\n\t }(typeof Int32Array === \"function\" ? Int32Array : Array)),\n\t browserCrypto: (typeof crypto !== \"undefined\" && typeof crypto.getRandomValues === \"function\" && typeof Int32Array === \"function\") ? (function () {\n\t var data = null;\n\t var index = 128;\n\t\n\t return function () {\n\t if (index >= 128) {\n\t if (data === null) {\n\t data = new Int32Array(128);\n\t }\n\t crypto.getRandomValues(data);\n\t index = 0;\n\t }\n\t\n\t return data[index++] | 0;\n\t };\n\t }()) : null\n\t };\n\t\n\t Random.generateEntropyArray = function () {\n\t var array = [];\n\t var engine = Random.engines.nativeMath;\n\t for (var i = 0; i < 16; ++i) {\n\t array[i] = engine() | 0;\n\t }\n\t array.push(new Date().getTime() | 0);\n\t return array;\n\t };\n\t\n\t function returnValue(value) {\n\t return function () {\n\t return value;\n\t };\n\t }\n\t\n\t // [-0x80000000, 0x7fffffff]\n\t Random.int32 = function (engine) {\n\t return engine() | 0;\n\t };\n\t proto.int32 = function () {\n\t return Random.int32(this.engine);\n\t };\n\t\n\t // [0, 0xffffffff]\n\t Random.uint32 = function (engine) {\n\t return engine() >>> 0;\n\t };\n\t proto.uint32 = function () {\n\t return Random.uint32(this.engine);\n\t };\n\t\n\t // [0, 0x1fffffffffffff]\n\t Random.uint53 = function (engine) {\n\t var high = engine() & 0x1fffff;\n\t var low = engine() >>> 0;\n\t return (high * 0x100000000) + low;\n\t };\n\t proto.uint53 = function () {\n\t return Random.uint53(this.engine);\n\t };\n\t\n\t // [0, 0x20000000000000]\n\t Random.uint53Full = function (engine) {\n\t while (true) {\n\t var high = engine() | 0;\n\t if (high & 0x200000) {\n\t if ((high & 0x3fffff) === 0x200000 && (engine() | 0) === 0) {\n\t return 0x20000000000000;\n\t }\n\t } else {\n\t var low = engine() >>> 0;\n\t return ((high & 0x1fffff) * 0x100000000) + low;\n\t }\n\t }\n\t };\n\t proto.uint53Full = function () {\n\t return Random.uint53Full(this.engine);\n\t };\n\t\n\t // [-0x20000000000000, 0x1fffffffffffff]\n\t Random.int53 = function (engine) {\n\t var high = engine() | 0;\n\t var low = engine() >>> 0;\n\t return ((high & 0x1fffff) * 0x100000000) + low + (high & 0x200000 ? -0x20000000000000 : 0);\n\t };\n\t proto.int53 = function () {\n\t return Random.int53(this.engine);\n\t };\n\t\n\t // [-0x20000000000000, 0x20000000000000]\n\t Random.int53Full = function (engine) {\n\t while (true) {\n\t var high = engine() | 0;\n\t if (high & 0x400000) {\n\t if ((high & 0x7fffff) === 0x400000 && (engine() | 0) === 0) {\n\t return 0x20000000000000;\n\t }\n\t } else {\n\t var low = engine() >>> 0;\n\t return ((high & 0x1fffff) * 0x100000000) + low + (high & 0x200000 ? -0x20000000000000 : 0);\n\t }\n\t }\n\t };\n\t proto.int53Full = function () {\n\t return Random.int53Full(this.engine);\n\t };\n\t\n\t function add(generate, addend) {\n\t if (addend === 0) {\n\t return generate;\n\t } else {\n\t return function (engine) {\n\t return generate(engine) + addend;\n\t };\n\t }\n\t }\n\t\n\t Random.integer = (function () {\n\t function isPowerOfTwoMinusOne(value) {\n\t return ((value + 1) & value) === 0;\n\t }\n\t\n\t function bitmask(masking) {\n\t return function (engine) {\n\t return engine() & masking;\n\t };\n\t }\n\t\n\t function downscaleToLoopCheckedRange(range) {\n\t var extendedRange = range + 1;\n\t var maximum = extendedRange * Math.floor(0x100000000 / extendedRange);\n\t return function (engine) {\n\t var value = 0;\n\t do {\n\t value = engine() >>> 0;\n\t } while (value >= maximum);\n\t return value % extendedRange;\n\t };\n\t }\n\t\n\t function downscaleToRange(range) {\n\t if (isPowerOfTwoMinusOne(range)) {\n\t return bitmask(range);\n\t } else {\n\t return downscaleToLoopCheckedRange(range);\n\t }\n\t }\n\t\n\t function isEvenlyDivisibleByMaxInt32(value) {\n\t return (value | 0) === 0;\n\t }\n\t\n\t function upscaleWithHighMasking(masking) {\n\t return function (engine) {\n\t var high = engine() & masking;\n\t var low = engine() >>> 0;\n\t return (high * 0x100000000) + low;\n\t };\n\t }\n\t\n\t function upscaleToLoopCheckedRange(extendedRange) {\n\t var maximum = extendedRange * Math.floor(0x20000000000000 / extendedRange);\n\t return function (engine) {\n\t var ret = 0;\n\t do {\n\t var high = engine() & 0x1fffff;\n\t var low = engine() >>> 0;\n\t ret = (high * 0x100000000) + low;\n\t } while (ret >= maximum);\n\t return ret % extendedRange;\n\t };\n\t }\n\t\n\t function upscaleWithinU53(range) {\n\t var extendedRange = range + 1;\n\t if (isEvenlyDivisibleByMaxInt32(extendedRange)) {\n\t var highRange = ((extendedRange / 0x100000000) | 0) - 1;\n\t if (isPowerOfTwoMinusOne(highRange)) {\n\t return upscaleWithHighMasking(highRange);\n\t }\n\t }\n\t return upscaleToLoopCheckedRange(extendedRange);\n\t }\n\t\n\t function upscaleWithinI53AndLoopCheck(min, max) {\n\t return function (engine) {\n\t var ret = 0;\n\t do {\n\t var high = engine() | 0;\n\t var low = engine() >>> 0;\n\t ret = ((high & 0x1fffff) * 0x100000000) + low + (high & 0x200000 ? -0x20000000000000 : 0);\n\t } while (ret < min || ret > max);\n\t return ret;\n\t };\n\t }\n\t\n\t return function (min, max) {\n\t min = Math.floor(min);\n\t max = Math.floor(max);\n\t if (min < -0x20000000000000 || !isFinite(min)) {\n\t throw new RangeError(\"Expected min to be at least \" + (-0x20000000000000));\n\t } else if (max > 0x20000000000000 || !isFinite(max)) {\n\t throw new RangeError(\"Expected max to be at most \" + 0x20000000000000);\n\t }\n\t\n\t var range = max - min;\n\t if (range <= 0 || !isFinite(range)) {\n\t return returnValue(min);\n\t } else if (range === 0xffffffff) {\n\t if (min === 0) {\n\t return Random.uint32;\n\t } else {\n\t return add(Random.int32, min + 0x80000000);\n\t }\n\t } else if (range < 0xffffffff) {\n\t return add(downscaleToRange(range), min);\n\t } else if (range === 0x1fffffffffffff) {\n\t return add(Random.uint53, min);\n\t } else if (range < 0x1fffffffffffff) {\n\t return add(upscaleWithinU53(range), min);\n\t } else if (max - 1 - min === 0x1fffffffffffff) {\n\t return add(Random.uint53Full, min);\n\t } else if (min === -0x20000000000000 && max === 0x20000000000000) {\n\t return Random.int53Full;\n\t } else if (min === -0x20000000000000 && max === 0x1fffffffffffff) {\n\t return Random.int53;\n\t } else if (min === -0x1fffffffffffff && max === 0x20000000000000) {\n\t return add(Random.int53, 1);\n\t } else if (max === 0x20000000000000) {\n\t return add(upscaleWithinI53AndLoopCheck(min - 1, max - 1), 1);\n\t } else {\n\t return upscaleWithinI53AndLoopCheck(min, max);\n\t }\n\t };\n\t }());\n\t proto.integer = function (min, max) {\n\t return Random.integer(min, max)(this.engine);\n\t };\n\t\n\t // [0, 1] (floating point)\n\t Random.realZeroToOneInclusive = function (engine) {\n\t return Random.uint53Full(engine) / 0x20000000000000;\n\t };\n\t proto.realZeroToOneInclusive = function () {\n\t return Random.realZeroToOneInclusive(this.engine);\n\t };\n\t\n\t // [0, 1) (floating point)\n\t Random.realZeroToOneExclusive = function (engine) {\n\t return Random.uint53(engine) / 0x20000000000000;\n\t };\n\t proto.realZeroToOneExclusive = function () {\n\t return Random.realZeroToOneExclusive(this.engine);\n\t };\n\t\n\t Random.real = (function () {\n\t function multiply(generate, multiplier) {\n\t if (multiplier === 1) {\n\t return generate;\n\t } else if (multiplier === 0) {\n\t return function () {\n\t return 0;\n\t };\n\t } else {\n\t return function (engine) {\n\t return generate(engine) * multiplier;\n\t };\n\t }\n\t }\n\t\n\t return function (left, right, inclusive) {\n\t if (!isFinite(left)) {\n\t throw new RangeError(\"Expected left to be a finite number\");\n\t } else if (!isFinite(right)) {\n\t throw new RangeError(\"Expected right to be a finite number\");\n\t }\n\t return add(\n\t multiply(\n\t inclusive ? Random.realZeroToOneInclusive : Random.realZeroToOneExclusive,\n\t right - left),\n\t left);\n\t };\n\t }());\n\t proto.real = function (min, max, inclusive) {\n\t return Random.real(min, max, inclusive)(this.engine);\n\t };\n\t\n\t Random.bool = (function () {\n\t function isLeastBitTrue(engine) {\n\t return (engine() & 1) === 1;\n\t }\n\t\n\t function lessThan(generate, value) {\n\t return function (engine) {\n\t return generate(engine) < value;\n\t };\n\t }\n\t\n\t function probability(percentage) {\n\t if (percentage <= 0) {\n\t return returnValue(false);\n\t } else if (percentage >= 1) {\n\t return returnValue(true);\n\t } else {\n\t var scaled = percentage * 0x100000000;\n\t if (scaled % 1 === 0) {\n\t return lessThan(Random.int32, (scaled - 0x80000000) | 0);\n\t } else {\n\t return lessThan(Random.uint53, Math.round(percentage * 0x20000000000000));\n\t }\n\t }\n\t }\n\t\n\t return function (numerator, denominator) {\n\t if (denominator == null) {\n\t if (numerator == null) {\n\t return isLeastBitTrue;\n\t }\n\t return probability(numerator);\n\t } else {\n\t if (numerator <= 0) {\n\t return returnValue(false);\n\t } else if (numerator >= denominator) {\n\t return returnValue(true);\n\t }\n\t return lessThan(Random.integer(0, denominator - 1), numerator);\n\t }\n\t };\n\t }());\n\t proto.bool = function (numerator, denominator) {\n\t return Random.bool(numerator, denominator)(this.engine);\n\t };\n\t\n\t function toInteger(value) {\n\t var number = +value;\n\t if (number < 0) {\n\t return Math.ceil(number);\n\t } else {\n\t return Math.floor(number);\n\t }\n\t }\n\t\n\t function convertSliceArgument(value, length) {\n\t if (value < 0) {\n\t return Math.max(value + length, 0);\n\t } else {\n\t return Math.min(value, length);\n\t }\n\t }\n\t Random.pick = function (engine, array, begin, end) {\n\t var length = array.length;\n\t var start = begin == null ? 0 : convertSliceArgument(toInteger(begin), length);\n\t var finish = end === void 0 ? length : convertSliceArgument(toInteger(end), length);\n\t if (start >= finish) {\n\t return void 0;\n\t }\n\t var distribution = Random.integer(start, finish - 1);\n\t return array[distribution(engine)];\n\t };\n\t proto.pick = function (array, begin, end) {\n\t return Random.pick(this.engine, array, begin, end);\n\t };\n\t\n\t function returnUndefined() {\n\t return void 0;\n\t }\n\t var slice = Array.prototype.slice;\n\t Random.picker = function (array, begin, end) {\n\t var clone = slice.call(array, begin, end);\n\t if (!clone.length) {\n\t return returnUndefined;\n\t }\n\t var distribution = Random.integer(0, clone.length - 1);\n\t return function (engine) {\n\t return clone[distribution(engine)];\n\t };\n\t };\n\t\n\t Random.shuffle = function (engine, array, downTo) {\n\t var length = array.length;\n\t if (length) {\n\t if (downTo == null) {\n\t downTo = 0;\n\t }\n\t for (var i = (length - 1) >>> 0; i > downTo; --i) {\n\t var distribution = Random.integer(0, i);\n\t var j = distribution(engine);\n\t if (i !== j) {\n\t var tmp = array[i];\n\t array[i] = array[j];\n\t array[j] = tmp;\n\t }\n\t }\n\t }\n\t return array;\n\t };\n\t proto.shuffle = function (array) {\n\t return Random.shuffle(this.engine, array);\n\t };\n\t\n\t Random.sample = function (engine, population, sampleSize) {\n\t if (sampleSize < 0 || sampleSize > population.length || !isFinite(sampleSize)) {\n\t throw new RangeError(\"Expected sampleSize to be within 0 and the length of the population\");\n\t }\n\t\n\t if (sampleSize === 0) {\n\t return [];\n\t }\n\t\n\t var clone = slice.call(population);\n\t var length = clone.length;\n\t if (length === sampleSize) {\n\t return Random.shuffle(engine, clone, 0);\n\t }\n\t var tailLength = length - sampleSize;\n\t return Random.shuffle(engine, clone, tailLength - 1).slice(tailLength);\n\t };\n\t proto.sample = function (population, sampleSize) {\n\t return Random.sample(this.engine, population, sampleSize);\n\t };\n\t\n\t Random.die = function (sideCount) {\n\t return Random.integer(1, sideCount);\n\t };\n\t proto.die = function (sideCount) {\n\t return Random.die(sideCount)(this.engine);\n\t };\n\t\n\t Random.dice = function (sideCount, dieCount) {\n\t var distribution = Random.die(sideCount);\n\t return function (engine) {\n\t var result = [];\n\t result.length = dieCount;\n\t for (var i = 0; i < dieCount; ++i) {\n\t result[i] = distribution(engine);\n\t }\n\t return result;\n\t };\n\t };\n\t proto.dice = function (sideCount, dieCount) {\n\t return Random.dice(sideCount, dieCount)(this.engine);\n\t };\n\t\n\t // http://en.wikipedia.org/wiki/Universally_unique_identifier\n\t Random.uuid4 = (function () {\n\t function zeroPad(string, zeroCount) {\n\t return stringRepeat(\"0\", zeroCount - string.length) + string;\n\t }\n\t\n\t return function (engine) {\n\t var a = engine() >>> 0;\n\t var b = engine() | 0;\n\t var c = engine() | 0;\n\t var d = engine() >>> 0;\n\t\n\t return (\n\t zeroPad(a.toString(16), 8) +\n\t \"-\" +\n\t zeroPad((b & 0xffff).toString(16), 4) +\n\t \"-\" +\n\t zeroPad((((b >> 4) & 0x0fff) | 0x4000).toString(16), 4) +\n\t \"-\" +\n\t zeroPad(((c & 0x3fff) | 0x8000).toString(16), 4) +\n\t \"-\" +\n\t zeroPad(((c >> 4) & 0xffff).toString(16), 4) +\n\t zeroPad(d.toString(16), 8));\n\t };\n\t }());\n\t proto.uuid4 = function () {\n\t return Random.uuid4(this.engine);\n\t };\n\t\n\t Random.string = (function () {\n\t // has 2**x chars, for faster uniform distribution\n\t var DEFAULT_STRING_POOL = \"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_-\";\n\t\n\t return function (pool) {\n\t if (pool == null) {\n\t pool = DEFAULT_STRING_POOL;\n\t }\n\t\n\t var length = pool.length;\n\t if (!length) {\n\t throw new Error(\"Expected pool not to be an empty string\");\n\t }\n\t\n\t var distribution = Random.integer(0, length - 1);\n\t return function (engine, length) {\n\t var result = \"\";\n\t for (var i = 0; i < length; ++i) {\n\t var j = distribution(engine);\n\t result += pool.charAt(j);\n\t }\n\t return result;\n\t };\n\t };\n\t }());\n\t proto.string = function (length, pool) {\n\t return Random.string(pool)(this.engine, length);\n\t };\n\t\n\t Random.hex = (function () {\n\t var LOWER_HEX_POOL = \"0123456789abcdef\";\n\t var lowerHex = Random.string(LOWER_HEX_POOL);\n\t var upperHex = Random.string(LOWER_HEX_POOL.toUpperCase());\n\t\n\t return function (upper) {\n\t if (upper) {\n\t return upperHex;\n\t } else {\n\t return lowerHex;\n\t }\n\t };\n\t }());\n\t proto.hex = function (length, upper) {\n\t return Random.hex(upper)(this.engine, length);\n\t };\n\t\n\t Random.date = function (start, end) {\n\t if (!(start instanceof Date)) {\n\t throw new TypeError(\"Expected start to be a Date, got \" + typeof start);\n\t } else if (!(end instanceof Date)) {\n\t throw new TypeError(\"Expected end to be a Date, got \" + typeof end);\n\t }\n\t var distribution = Random.integer(start.getTime(), end.getTime());\n\t return function (engine) {\n\t return new Date(distribution(engine));\n\t };\n\t };\n\t proto.date = function (start, end) {\n\t return Random.date(start, end)(this.engine);\n\t };\n\t\n\t if (true) {\n\t !(__WEBPACK_AMD_DEFINE_RESULT__ = function () {\n\t return Random;\n\t }.call(exports, __webpack_require__, exports, module), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\n\t } else if (typeof module !== \"undefined\" && typeof require === \"function\") {\n\t module.exports = Random;\n\t } else {\n\t (function () {\n\t var oldGlobal = root[GLOBAL_KEY];\n\t Random.noConflict = function () {\n\t root[GLOBAL_KEY] = oldGlobal;\n\t return this;\n\t };\n\t }());\n\t root[GLOBAL_KEY] = Random;\n\t }\n\t}(this));\n\n/***/ },\n/* 20 */\n/***/ function(module, exports) {\n\n\t'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tvar DataGUI = function () {\n\t function DataGUI(data) {\n\t _classCallCheck(this, DataGUI);\n\t\n\t var gui = new dat.GUI();\n\t\n\t this.gui = gui;\n\t this.data = data;\n\t\n\t this.addSlider(data.camera.position, 'CameraPosition', 200, 10);\n\t this.addSlider(data.lights.position, 'Lights', 1000, 50);\n\t this.addSlider(data.blocks.rotation, 'BlocksRotation', 5, 1);\n\t this.addSlider(data.sphere.rotation, 'SphereRotation', 1, 0.05);\n\t this.addSlider(data.innerSphere.rotation, 'InnerSphereRotation', 1, 0.05);\n\t }\n\t\n\t _createClass(DataGUI, [{\n\t key: 'addSlider',\n\t value: function addSlider(selectedData, title, delta, step) {\n\t var isOpen = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : true;\n\t\n\t var data = this;\n\t var folder = this.gui.addFolder(title);\n\t\n\t Object.keys(selectedData).forEach(function (param) {\n\t folder.add(selectedData, param).name(param).min(selectedData[param] - delta).max(selectedData[param] + delta).step(step);\n\t });\n\t\n\t isOpen && folder.open();\n\t }\n\t }]);\n\t\n\t return DataGUI;\n\t}();\n\t\n\texports.default = DataGUI;\n\n/***/ },\n/* 21 */\n/***/ function(module, exports) {\n\n\t\"use strict\";\n\t\n\tmodule.exports = {\n\t camera: {\n\t position: {\n\t x: 0,\n\t y: 70,\n\t z: 420\n\t }\n\t },\n\t block: {\n\t position: {\n\t x: 0, y: 5, z: 10\n\t }\n\t },\n\t ball: {\n\t position: {\n\t x: 0, y: 6, z: 130\n\t },\n\t positionOriginal: {\n\t x: 0, y: 6, z: 130\n\t }\n\t },\n\t lights: {\n\t position: {\n\t x: 0, y: 350, z: 500\n\t }\n\t },\n\t blocks: {\n\t rotation: {\n\t x: 0, y: 0, z: 0\n\t }\n\t },\n\t sphere: {\n\t rotation: {\n\t x: 0, y: 0, z: 0\n\t }\n\t },\n\t innerSphere: {\n\t rotation: {\n\t x: 0, y: 0, z: 0\n\t }\n\t }\n\t};\n\n/***/ },\n/* 22 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\t\n\tvar _LogoScene = __webpack_require__(24);\n\t\n\tvar _LogoScene2 = _interopRequireDefault(_LogoScene);\n\t\n\tvar _GameScene = __webpack_require__(23);\n\t\n\tvar _GameScene2 = _interopRequireDefault(_GameScene);\n\t\n\tvar _SecretSymbols = __webpack_require__(26);\n\t\n\tvar _SecretSymbols2 = _interopRequireDefault(_SecretSymbols);\n\t\n\tvar _AssetsLoader = __webpack_require__(25);\n\t\n\tvar _AssetsLoader2 = _interopRequireDefault(_AssetsLoader);\n\t\n\tvar _names = __webpack_require__(11);\n\t\n\tvar names = _interopRequireWildcard(_names);\n\t\n\tfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\tfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tvar App = function () {\n\t function App() {\n\t var _sounds,\n\t _images,\n\t _this = this;\n\t\n\t _classCallCheck(this, App);\n\t\n\t var assets = new _AssetsLoader2.default({\n\t sounds: (_sounds = {}, _defineProperty(_sounds, names.SOUND_GAME_MUSIC, 'Gamesoundtrack.mp3'), _defineProperty(_sounds, names.SOUND_INTERSECT_CUBE_1, 'Bounce11.mp3'), _defineProperty(_sounds, names.SOUND_INTERSECT_CUBE_2, 'Bounce22.mp3'), _defineProperty(_sounds, names.SOUND_INTERSECT_CUBE_3, 'Bounce33.mp3'), _defineProperty(_sounds, names.SOUND_INTERSECT_PADDLE, 'Platee.mp3'), _defineProperty(_sounds, names.SOUND_BOOM, 'Boom.mp3'), _defineProperty(_sounds, names.SOUND_VICTORY_VOICE, 'Meetup.mp3'), _defineProperty(_sounds, names.SOUND_LOSE_VOICE_1, 'Missu.mp3'), _defineProperty(_sounds, names.SOUND_LOSE_VOICE_2, 'Missu2.mp3'), _defineProperty(_sounds, names.SOUND_START_VOICE, 'Try.mp3'), _sounds),\n\t images: (_images = {}, _defineProperty(_images, names.IMG_INTERACTOPUS_BG_BLACK, 'interactopus-black-bg.png'), _defineProperty(_images, names.IMG_INTERACTOPUS_BG_TRANS, 'interactopus.png'), _images)\n\t });\n\t\n\t this.assets = assets;\n\t this.wasGameRun = false;\n\t\n\t assets.load().then(function () {\n\t _this.init();\n\t _this.afterInit();\n\t });\n\t\n\t //\n\t // const menuScene = new GlitchScene({\n\t // containerEl: menuEl,\n\t // containerWidth: 500,\n\t // containerHeight: 500,\n\t // imgWidth: 1920,\n\t // imgHeight: 1080,\n\t // imgUrl: 'assets/images/1.png',\n\t // });\n\t //\n\t // const menuScene2 = new GlitchScene({\n\t // containerEl: menu2El,\n\t // containerWidth: 200,\n\t // containerHeight: 200,\n\t // imgWidth: 1920,\n\t // imgHeight: 1080,\n\t // imgUrl: 'assets/images/test.jpg',\n\t // });\n\t }\n\t\n\t _createClass(App, [{\n\t key: 'init',\n\t value: function init() {\n\t var eventLogoEl = document.getElementById('eventLogoGlitch');\n\t var menu2El = document.getElementById('menu2');\n\t var contentEl = document.getElementById('content');\n\t var locationValueEl = document.getElementById('locationValue');\n\t var dateValueEl = document.getElementById('dateValue');\n\t var timeValueEl = document.getElementById('timeValue');\n\t\n\t this.secretSymbolsLocation = new _SecretSymbols2.default({\n\t rootEl: locationValueEl,\n\t word: 'БВШД',\n\t symbols: '!@#$%^&*()qwertyuiopljhgfрарцуисчязшфцу'\n\t });\n\t this.secretSymbolsDate = new _SecretSymbols2.default({\n\t rootEl: dateValueEl,\n\t word: '20.11.2016',\n\t symbols: '1234567890.',\n\t renderType: 'date'\n\t });\n\t this.secretSymbolsTime = new _SecretSymbols2.default({\n\t rootEl: timeValueEl,\n\t word: '19:00',\n\t symbols: '!@#1234567890:',\n\t renderType: 'time'\n\t });\n\t //\n\t // setTimeout(() => {\n\t // secretSymbolsLocation.reveal();\n\t // secretSymbolsDate.reveal();\n\t // secretSymbolsTime.reveal();\n\t // }, 2000);\n\t\n\t //\n\t this.logoScene = new _LogoScene2.default({\n\t rootEl: eventLogoEl\n\t });\n\t }\n\t }, {\n\t key: 'afterInit',\n\t value: function afterInit() {\n\t var _this2 = this;\n\t\n\t this.assets.getSound(names.SOUND_GAME_MUSIC).loop = true;\n\t this.assets.getSound(names.SOUND_GAME_MUSIC).play();\n\t setTimeout(function () {\n\t document.body.classList.remove('is-loading');\n\t document.body.classList.add('is-loaded');\n\t\n\t var logoEl = document.getElementById('eventLogo');\n\t logoEl.addEventListener('click', function () {\n\t if (_this2.wasGameRun) {\n\t window.location.reload();\n\t } else {\n\t _this2.goGame();\n\t }\n\t }, false);\n\t }, 1500);\n\t }\n\t }, {\n\t key: 'goGame',\n\t value: function goGame() {\n\t var _this3 = this;\n\t\n\t this.wasGameRun = true;\n\t var gameEl = document.getElementById('game');\n\t var game = new _GameScene2.default({\n\t rootEl: gameEl,\n\t assets: this.assets\n\t });\n\t game.emitter.on(names.EVENT_FINAL_BLOCK_KILLED, function () {\n\t _this3.goVictory();\n\t });\n\t game.emitter.on(names.EVENT_NO_LIVES, function () {\n\t _this3.goLose();\n\t });\n\t document.body.classList.add('is-game');\n\t this.logoScene.disable();\n\t this.game = game;\n\t }\n\t }, {\n\t key: 'goVictory',\n\t value: function goVictory() {\n\t this.game.disable();\n\t document.body.classList.add('is-victory');\n\t document.body.classList.remove('is-game');\n\t this.logoScene.enable();\n\t this.secretSymbolsLocation.reveal();\n\t this.secretSymbolsTime.reveal();\n\t this.secretSymbolsDate.reveal();\n\t }\n\t }, {\n\t key: 'goLose',\n\t value: function goLose() {\n\t this.game.disable();\n\t document.body.classList.add('is-lose');\n\t document.body.classList.remove('is-game');\n\t this.logoScene.enable();\n\t }\n\t }]);\n\t\n\t return App;\n\t}();\n\t\n\tnew App();\n\n/***/ },\n/* 23 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\t\n\tvar _events = __webpack_require__(3);\n\t\n\tvar _events2 = _interopRequireDefault(_events);\n\t\n\tvar _DataGUI = __webpack_require__(20);\n\t\n\tvar _DataGUI2 = _interopRequireDefault(_DataGUI);\n\t\n\tvar _data = __webpack_require__(21);\n\t\n\tvar _data2 = _interopRequireDefault(_data);\n\t\n\tvar _keyboardjs = __webpack_require__(36);\n\t\n\tvar _keyboardjs2 = _interopRequireDefault(_keyboardjs);\n\t\n\tvar _tween = __webpack_require__(49);\n\t\n\tvar _tween2 = _interopRequireDefault(_tween);\n\t\n\tvar _randomJs = __webpack_require__(19);\n\t\n\tvar _randomJs2 = _interopRequireDefault(_randomJs);\n\t\n\tvar _leapjs = __webpack_require__(42);\n\t\n\tvar _leapjs2 = _interopRequireDefault(_leapjs);\n\t\n\tvar _names = __webpack_require__(11);\n\t\n\tvar names = _interopRequireWildcard(_names);\n\t\n\tfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tvar random = (0, _randomJs2.default)();\n\t\n\tvar FIELD_WIDTH = 200;\n\tvar FIELD_HEIGHT = 350;\n\t\n\tvar BLOCK_SIZE = 20;\n\t\n\tvar SPEED = 4;\n\t\n\tvar GameScene = function () {\n\t function GameScene(options) {\n\t var _this = this;\n\t\n\t _classCallCheck(this, GameScene);\n\t\n\t this.sounds = {};\n\t this.soundsSources = {};\n\t this.pyramidLevels = {};\n\t\n\t this.render = function () {\n\t if (_this.paused) {\n\t return;\n\t }\n\t // console.log(\n\t // (this.innerSphere.rotation.y* 180/Math.PI) % 360,\n\t // this.innerSphere.rotation.y* Math.PI / 180,\n\t // Math.atan(this.innerSphere.rotation.y) * 180/Math.PI,\n\t // );\n\t var render = _this.render,\n\t renderer = _this.renderer,\n\t scene = _this.scene,\n\t camera = _this.camera,\n\t onRenderFnArr = _this.onRenderFnArr;\n\t\n\t onRenderFnArr.forEach(function (fn) {\n\t return fn();\n\t });\n\t\n\t // Render the current frame\n\t renderer.render(scene, camera);\n\t\n\t requestAnimationFrame(render);\n\t _tween2.default.update();\n\t };\n\t\n\t var rootEl = options.rootEl,\n\t assets = options.assets;\n\t\n\t this.rootEl = rootEl;\n\t this.assets = assets;\n\t this.emitter = new _events2.default();\n\t this.isBallEnabled = false;\n\t this.run();\n\t this.initUi();\n\t }\n\t\n\t _createClass(GameScene, [{\n\t key: 'initUi',\n\t value: function initUi() {\n\t this.livesAtBegin = 5;\n\t this.currLives = this.livesAtBegin;\n\t this.renderLives();\n\t }\n\t }, {\n\t key: 'renderLives',\n\t value: function renderLives() {\n\t var ui = document.getElementById('gameUi');\n\t var lives = ui.querySelector('.gameUi__lives');\n\t var html = '';\n\t for (var i = 0, len = this.currLives; i < len; i += 1) {\n\t html += '
';\n\t }\n\t lives.innerHTML = html;\n\t }\n\t }, {\n\t key: 'deathZone',\n\t value: function deathZone() {\n\t this.playAudio(names.SOUND_BOOM);\n\t this.currLives -= 1;\n\t this.renderLives();\n\t if (this.currLives === 0) {\n\t this.isBallEnabled = false;\n\t this.playAudio(random.pick([names.SOUND_LOSE_VOICE_1, names.SOUND_LOSE_VOICE_2]));\n\t this.disable();\n\t this.emitter.emit(names.EVENT_NO_LIVES);\n\t } else {\n\t this.ballDx = random.integer(-2, 2);\n\t this.ballDz = -SPEED;\n\t this.data.ball.position.x = this.data.ball.positionOriginal.x;\n\t this.data.ball.position.z = this.data.ball.positionOriginal.z;\n\t this.isBallEnabled = false;\n\t }\n\t }\n\t }, {\n\t key: 'victory',\n\t value: function victory() {\n\t this.playAudio(names.SOUND_VICTORY_VOICE);\n\t this.disable();\n\t this.emitter.emit(names.EVENT_FINAL_BLOCK_KILLED);\n\t }\n\t }, {\n\t key: 'run',\n\t value: function run() {\n\t var _this2 = this;\n\t\n\t this.data = _data2.default;\n\t // this.dataGUI = new DataGUI(data);\n\t this.onRenderFnArr = [];\n\t this.init();\n\t this.initSkyAndBoard();\n\t this.initBlocks();\n\t this.initBall();\n\t this.initAudio();\n\t this.render();\n\t\n\t var rotationValue = 0.08;\n\t var tween = void 0;\n\t var from = { y1: 0, y2: 0 };\n\t\n\t this.paddleTweenData = {\n\t delta: 0.4,\n\t duration: 200,\n\t minY: this.degToRad(-40),\n\t maxY: this.degToRad(40)\n\t };\n\t var leapPointBase = void 0;\n\t var leapPoint = void 0;\n\t _leapjs2.default.loop({ background: true }, function (frame) {\n\t if (frame.pointables.length === 0) {\n\t if (leapPointBase) {\n\t _this2.data.sphere.rotation.y = 0;\n\t _this2.data.innerSphere.rotation.y = 0;\n\t leapPointBase = null;\n\t }\n\t return;\n\t }\n\t var _paddleTweenData = _this2.paddleTweenData,\n\t minY = _paddleTweenData.minY,\n\t maxY = _paddleTweenData.maxY;\n\t\n\t var appWidth = 2;\n\t\n\t var iBox = frame.interactionBox;\n\t var pointable = frame.pointables[0];\n\t\n\t var leapPoint = pointable.stabilizedTipPosition;\n\t if (!leapPointBase) {\n\t leapPointBase = leapPoint;\n\t }\n\t var normalizedPoint = iBox.normalizePoint(leapPoint, true);\n\t var normalizedPointBase = iBox.normalizePoint(leapPointBase, true);\n\t\n\t // var appX = normalizedPoint[0] * appWidth;\n\t\n\t var deltaY = (normalizedPoint[0] - normalizedPointBase[0]) * 2.5;\n\t var finalDeltaY = function () {\n\t if (deltaY > maxY) {\n\t return maxY;\n\t } else if (deltaY < minY) {\n\t return minY;\n\t }\n\t return deltaY;\n\t }();\n\t _this2.data.sphere.rotation.y = -finalDeltaY;\n\t _this2.data.innerSphere.rotation.y = finalDeltaY;\n\t\n\t // console.log(normalizedPoint[1], normalizedPoint[1] == 0);\n\t if (normalizedPoint[1] == 0) {\n\t if (_this2.currLives > 0) {\n\t _this2.isBallEnabled = true;\n\t }\n\t }\n\t }).connect();\n\t //\n\t // this.isRightPressed = true;\n\t // this.moveRight();\n\t\n\t _keyboardjs2.default.bind('up', function (e) {\n\t if (_this2.currLives > 0) {\n\t _this2.isBallEnabled = true;\n\t }\n\t });\n\t\n\t _keyboardjs2.default.bind('left', function (e) {\n\t e.preventRepeat();\n\t _this2.isLeftPressed = true;\n\t _this2.moveLeft();\n\t // this.data.block.position.x -= 30;\n\t // this.data.sphere.rotation.y += rotationValue;\n\t // this.data.innerSphere.rotation.y -= rotationValue;\n\t\n\t }, function () {\n\t _this2.isLeftPressed = false;\n\t _this2.paddleTween.stop();\n\t // tween.stop();\n\t });\n\t\n\t _keyboardjs2.default.bind('left + right', function (e) {\n\t e.preventRepeat();\n\t _this2.isLeftPressed = false;\n\t _this2.isRightPressed = false;\n\t });\n\t\n\t _keyboardjs2.default.bind('right', function (e) {\n\t e.preventRepeat();\n\t _this2.isRightPressed = true;\n\t _this2.moveRight();\n\t // this.data.block.position.x += 30;\n\t // this.data.sphere.rotation.y -= rotationValue;\n\t // this.data.innerSphere.rotation.y += rotationValue;\n\t\n\t }, function () {\n\t _this2.isRightPressed = false;\n\t _this2.paddleTween.stop();\n\t // tween.stop();\n\t });\n\t\n\t _keyboardjs2.default.bind('space', function () {\n\t // this.blocksGroupRotationY += Math.PI / 12;\n\t // this.blocksGroupRotationY += Math.PI / 3;\n\t _this2.rotatePyramid();\n\t });\n\t }\n\t }, {\n\t key: 'moveLeft',\n\t value: function moveLeft() {\n\t var _this3 = this;\n\t\n\t var _paddleTweenData2 = this.paddleTweenData,\n\t delta = _paddleTweenData2.delta,\n\t duration = _paddleTweenData2.duration,\n\t minY = _paddleTweenData2.minY,\n\t maxY = _paddleTweenData2.maxY;\n\t\n\t var tween = this.paddleTween;\n\t if (tween) {\n\t // tween.stop();\n\t }\n\t var from = {};\n\t\n\t from.y1 = this.data.sphere.rotation.y;\n\t from.y2 = this.data.innerSphere.rotation.y;\n\t\n\t var newY1 = this.data.sphere.rotation.y + delta;\n\t // newY1 = newY1 > maxY ? maxY : newY1;\n\t var newY2 = this.data.innerSphere.rotation.y - delta;\n\t // newY2 = newY2 < minY ? minY : newY2;\n\t tween = new _tween2.default.Tween(from).to({\n\t y1: newY1,\n\t y2: newY2\n\t }, duration);\n\t // tween.easing(TWEEN.Easing.Quadratic.In);\n\t\n\t tween.onUpdate(function () {\n\t _this3.data.sphere.rotation.y = from.y1 > maxY ? maxY : from.y1;\n\t _this3.data.innerSphere.rotation.y = from.y2 < minY ? minY : from.y2;\n\t });\n\t tween.onComplete(function () {\n\t if (_this3.isLeftPressed) {\n\t _this3.moveLeft();\n\t }\n\t });\n\t tween.start();\n\t this.paddleTween = tween;\n\t }\n\t }, {\n\t key: 'moveRight',\n\t value: function moveRight() {\n\t var _this4 = this;\n\t\n\t var _paddleTweenData3 = this.paddleTweenData,\n\t delta = _paddleTweenData3.delta,\n\t duration = _paddleTweenData3.duration,\n\t minY = _paddleTweenData3.minY,\n\t maxY = _paddleTweenData3.maxY;\n\t\n\t var tween = this.paddleTween;\n\t if (tween) {\n\t // tween.stop();\n\t }\n\t var from = {};\n\t\n\t from.y1 = this.data.sphere.rotation.y;\n\t from.y2 = this.data.innerSphere.rotation.y;\n\t\n\t var newY1 = this.data.sphere.rotation.y - delta;\n\t // newY1 = newY1 < minY ? minY : newY1;\n\t var newY2 = this.data.innerSphere.rotation.y + delta;\n\t // newY2 = newY2 > maxY ? maxY : newY2;\n\t tween = new _tween2.default.Tween(from).to({\n\t y1: newY1,\n\t y2: newY2\n\t }, duration);\n\t\n\t tween.onUpdate(function () {\n\t _this4.data.sphere.rotation.y = from.y1 < minY ? minY : from.y1;\n\t _this4.data.innerSphere.rotation.y = from.y2 > maxY ? maxY : from.y2;\n\t });\n\t\n\t tween.onComplete(function () {\n\t if (_this4.isRightPressed) {\n\t _this4.moveRight();\n\t }\n\t });\n\t tween.start();\n\t this.paddleTween = tween;\n\t }\n\t }, {\n\t key: 'rotatePyramid',\n\t value: function rotatePyramid() {\n\t var _this5 = this;\n\t\n\t var rad2deg = 180 / Math.PI;\n\t\n\t if (this.pyramidTween) {\n\t this.pyramidTween.stop();\n\t }\n\t var from = {\n\t y: this.blocksGroupRotationY\n\t };\n\t var tween = new _tween2.default.Tween(from).to({\n\t y: this.getRadForPyramid()\n\t }, 300);\n\t\n\t tween.onUpdate(function () {\n\t _this5.blocksGroupRotationY = from.y;\n\t });\n\t tween.start();\n\t }\n\t }, {\n\t key: 'getRadForPyramid',\n\t value: function getRadForPyramid() {\n\t var rad = this.blocksGroupRotationY;\n\t var deg = rad * 180 / Math.PI;\n\t var inc = (Math.random() > 0.5 ? 1 : -1) * 90;\n\t var newDeg = parseInt((deg + inc) / 90) * 90;\n\t var newRad = newDeg * Math.PI / 180;;\n\t // console.log(rad, deg, newDeg, newRad)\n\t return newRad;\n\t }\n\t }, {\n\t key: 'degToRad',\n\t value: function degToRad(deg) {\n\t return deg * Math.PI / 180;\n\t }\n\t }, {\n\t key: 'radToDeg',\n\t value: function radToDeg(rad) {\n\t return rad * 180 / Math.PI;\n\t }\n\t }, {\n\t key: 'initAudio',\n\t value: function initAudio() {\n\t // this.playAudio(SOUND_GAME_MUSIC, true);\n\t }\n\t }, {\n\t key: 'playAudio',\n\t value: function playAudio(soundName) {\n\t var isLoop = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n\t\n\t this.assets.getSound(soundName).loop = isLoop;\n\t this.assets.getSound(soundName).play();\n\t }\n\t }, {\n\t key: 'init',\n\t value: function init() {\n\t var _this6 = this;\n\t\n\t var scene = new THREE.Scene();\n\t\n\t var camera = new THREE.PerspectiveCamera(45, window.innerWidth / window.innerHeight, 0.1, 10000);\n\t camera.position.y = this.data.camera.position.y;\n\t camera.position.z = this.data.camera.position.z;\n\t camera.position.x = this.data.camera.position.x;\n\t this.onRenderFnArr.push(function () {\n\t camera.position.y = _this6.data.camera.position.y;\n\t camera.position.z = _this6.data.camera.position.z;\n\t camera.position.x = _this6.data.camera.position.x;\n\t });\n\t scene.add(camera);\n\t\n\t var renderer = new THREE.WebGLRenderer({ antialias: true }); // Initialize renderer + anti-alias\n\t renderer.shadowMapEnabled = renderer.shadowMapSoft = true; // Enable shadows and make them smoother\n\t renderer.setSize(window.innerWidth, window.innerHeight); // Set the size to the whole window\n\t renderer.sortObjects = false; // Improves performance\n\t\n\t\n\t this.rootEl.appendChild(renderer.domElement); // Put the canvas onto the page\n\t\n\t this.scene = scene;\n\t this.camera = camera;\n\t this.renderer = renderer;\n\t }\n\t }, {\n\t key: 'initSkyAndBoard',\n\t value: function initSkyAndBoard() {\n\t var _this7 = this;\n\t\n\t var scene = this.scene,\n\t renderer = this.renderer,\n\t camera = this.camera;\n\t // Lights\n\t\n\t [-200, 200].forEach(function (distance) {\n\t return;\n\t var light = new THREE.DirectionalLight(0xffffff, 1);\n\t light.position.set(distance, 200, 500);\n\t scene.add(light);\n\t });\n\t\n\t var light = new THREE.SpotLight(0xffffff, 1);\n\t light.position.set(0, 350, 500);\n\t light.shadowCameraNear = 0.01;\n\t light.castShadow = true;\n\t light.shadowDarkness = 0.3;\n\t light.shadowMapWidth = light.shadowMapHeight = 2048; // Larger shadow map improves shadow quality\n\t scene.add(light);\n\t\n\t // Sky\n\t var geometry = new THREE.PlaneGeometry(3500, 1500);\n\t var material = new THREE.MeshBasicMaterial();\n\t var sky = new THREE.Mesh(geometry, material);\n\t\n\t sky.position.set(0, -500, -800);\n\t sky.rotation.set(-900, 0, 0);\n\t // scene.add(sky);\n\t\n\t\n\t // Board\n\t geometry = new THREE.CubeGeometry(FIELD_WIDTH, 3, FIELD_HEIGHT);\n\t material = new THREE.MeshBasicMaterial();\n\t var board = new THREE.Mesh(geometry, material);\n\t\n\t board.matrixAutoUpdate = false; // The board will be static, so no need to update it\n\t board.receiveShadow = true; // It can receive shadows\n\t // scene.add(board);\n\t // camera.lookAt(board.position);\n\t\n\t // geometry\n\t var radius = 5;\n\t geometry = new THREE.SphereGeometry(radius, 16, 8);\n\t\n\t // material\n\t material = new THREE.MeshBasicMaterial({\n\t color: 0xffffff,\n\t wireframe: true\n\t });\n\t\n\t // mesh\n\t // let mesh = new THREE.Mesh( geometry, material );\n\t var mesh = new THREE.Object3D();\n\t scene.add(mesh);\n\t mesh.add(board);\n\t\n\t this.sphere = mesh;\n\t\n\t var innerSphere = new THREE.Object3D();\n\t this.sphere.add(innerSphere);\n\t this.innerSphere = innerSphere;\n\t\n\t this.onRenderFnArr.push(function () {\n\t _this7.sphere.rotation.x = _this7.data.sphere.rotation.x;\n\t _this7.sphere.rotation.y = _this7.data.sphere.rotation.y;\n\t\n\t _this7.innerSphere.rotation.x = _this7.data.innerSphere.rotation.x;\n\t _this7.innerSphere.rotation.y = _this7.data.innerSphere.rotation.y;\n\t });\n\t }\n\t }, {\n\t key: 'initBlocksPaddle',\n\t value: function initBlocksPaddle() {\n\t var _this8 = this;\n\t\n\t var size = 15;\n\t var geometry = void 0;\n\t geometry = new THREE.CubeGeometry(size * 4, size * 0.5, size);\n\t var material = new THREE.MeshLambertMaterial({ color: 0x949ba1 });\n\t var mesh = new THREE.Mesh(geometry, material);\n\t var bBox = new THREE.BoundingBoxHelper(mesh, 0x00ff00);\n\t bBox.update();\n\t bBox.visible = false;\n\t mesh.isPaddle = true;\n\t this.innerSphere.add(mesh);\n\t this.onRenderFnArr.push(function () {\n\t mesh.position.set(_this8.data.block.position.x, _this8.data.block.position.y, FIELD_HEIGHT / 2);\n\t bBox.update();\n\t\n\t if (bBox.box.intersectsBox(_this8.ballBox.box)) {\n\t\n\t var x1 = _this8.data.ball.position.x;\n\t var z1 = _this8.data.ball.position.z;\n\t\n\t var x2 = x1 + _this8.ballDx;\n\t var z2 = z1 + _this8.ballDz;\n\t\n\t var deg2rad = Math.PI / 180;\n\t var rad2deg = 180 / Math.PI;\n\t\n\t var tan = (x2 - x1) / (z2 - z1);\n\t var ballAngle = Math.atan(tan * rad2deg);\n\t var paddleAngle = Math.atan(_this8.innerSphere.rotation.y * rad2deg);\n\t\n\t var newBallAngle = ballAngle;\n\t\n\t _this8.playAudio(names.SOUND_INTERSECT_PADDLE);\n\t // console.log(this.ball.position.x, this.ball.position.z, bBox.position.x, bBox.position.z, this.innerSphere.rotation.y);\n\t // this.ballDz = -this.ballDz;\n\t _this8.ballDz = _this8.ballDz < 0 ? random.integer(SPEED, SPEED + 3) : -random.integer(SPEED, SPEED + 3);\n\t if (random.bool(0.1)) {\n\t _this8.ballDz = _this8.ballDz < 0 ? _this8.ballDz - 1 : _this8.ballDz + 1;\n\t }\n\t // this.ballDx = -this.ballDx;\n\t // this.ballDx = -1*2*(mesh.position.x-this.ball.position.x)/10;\n\t\n\t var prevDx = _this8.ballDx;\n\t var prevDz = _this8.ballDz;\n\t var newDx = -random.integer(SPEED, SPEED + 4) * Math.cos(newBallAngle + random.pick([0, -Math.PI / 8]));\n\t // const newDz = -random.integer(SPEED, SPEED + 4) * Math.sin(newBallAngle);\n\t _this8.ballDx = newDx;\n\t // this.ballDz = newDz;\n\t\n\t // console.log('boom',\n\t // [prevDx.toFixed(2), prevDz.toFixed(2)],\n\t // [newDx.toFixed(2), newDz.toFixed(2)],\n\t // paddleAngle.toFixed(2),\n\t // ballAngle.toFixed(2),\n\t // newBallAngle.toFixed(2),\n\t // );\n\t\n\t // this.paused = true;\n\t }\n\t });\n\t\n\t this.paddle = {\n\t mesh: mesh,\n\t box: bBox\n\t };\n\t }\n\t }, {\n\t key: 'changePyramidBlocksYPositionIfNeeded',\n\t value: function changePyramidBlocksYPositionIfNeeded() {\n\t var _this9 = this;\n\t\n\t var pyramidLevels = this.pyramidLevels;\n\t\n\t Object.keys(pyramidLevels).forEach(function (levelNum) {\n\t var level = pyramidLevels[levelNum];\n\t var isCompleted = level.isCompleted,\n\t blocks = level.blocks;\n\t\n\t if (!isCompleted) {\n\t var atLeastOneVisible = false;\n\t for (var i = 0, len = blocks.length; i < len; i += 1) {\n\t if (blocks[i].visible) {\n\t atLeastOneVisible = true;\n\t break;\n\t }\n\t }\n\t if (!atLeastOneVisible) {\n\t level.isCompleted = true;\n\t _this9.changePyramidBlocksYPosition();\n\t }\n\t }\n\t });\n\t }\n\t }, {\n\t key: 'changePyramidBlocksYPosition',\n\t value: function changePyramidBlocksYPosition() {\n\t var _this10 = this;\n\t\n\t var pyramidLevels = this.pyramidLevels;\n\t\n\t Object.keys(pyramidLevels).forEach(function (levelNum) {\n\t var level = pyramidLevels[levelNum];\n\t var isCompleted = level.isCompleted,\n\t blocks = level.blocks,\n\t currLevel = level.currLevel;\n\t\n\t blocks.forEach(function (mesh) {\n\t var from = {\n\t y: _this10.getBlockOffset(currLevel)\n\t };\n\t var tween = new _tween2.default.Tween(from).to({\n\t y: _this10.getBlockOffset(currLevel - 1)\n\t }, 300);\n\t\n\t // console.log(from);\n\t\n\t tween.onUpdate(function () {\n\t mesh.position.y = from.y;\n\t });\n\t tween.start();\n\t level.currLevel -= 1;\n\t });\n\t });\n\t }\n\t }, {\n\t key: 'initBlocksBlocks',\n\t value: function initBlocksBlocks() {\n\t var _this11 = this;\n\t\n\t var size = BLOCK_SIZE;\n\t var blocksGroup = new THREE.Object3D();\n\t var blocksGroupPivot = new THREE.Object3D();\n\t blocksGroupPivot.position.z = -FIELD_HEIGHT / 2 + 100;\n\t blocksGroupPivot.add(blocksGroup);\n\t\n\t this.sphere.add(blocksGroupPivot);\n\t this.blocksGroupRotationY = 0;\n\t this.onRenderFnArr.push(function () {\n\t blocksGroupPivot.rotation.y = _this11.blocksGroupRotationY;\n\t });\n\t\n\t var createBlock = function createBlock(x, y, z, level, isEdge, isFinalBlock) {\n\t var geometry = new THREE.CubeGeometry(size, size, size);\n\t var material = new THREE.MeshLambertMaterial({\n\t color: isFinalBlock ? 0xeeeeee : isEdge ? 0xffffff : 0x949ba1\n\t });\n\t var mesh = new THREE.Mesh(geometry, material);\n\t var bBox = new THREE.BoundingBoxHelper(mesh, 0x00ff00);\n\t if (!_this11.pyramidLevels[level]) {\n\t _this11.pyramidLevels[level] = {\n\t isCompleted: false,\n\t blocks: [],\n\t currLevel: level,\n\t isEdge: true\n\t };\n\t }\n\t _this11.pyramidLevels[level].blocks.push(mesh);\n\t bBox.update();\n\t bBox.visible = false;\n\t blocksGroup.add(mesh);\n\t mesh.position.set(x, y, z);\n\t _this11.onRenderFnArr.push(function () {\n\t bBox.update();\n\t\n\t if (bBox.box.intersectsBox(_this11.ballBox.box)) {\n\t if (mesh.visible) {\n\t _this11.data.ball.position.x += _this11.ballDx;\n\t _this11.data.ball.position.z += _this11.ballDz;\n\t\n\t _this11.ballDz = -_this11.ballDz;\n\t _this11.ballDx = -_this11.ballDx;\n\t mesh.visible = false;\n\t _this11.playAudio(random.pick([names.SOUND_INTERSECT_CUBE_1, names.SOUND_INTERSECT_CUBE_2, names.SOUND_INTERSECT_CUBE_3]));\n\t // Math.random() > 0.5 && this.rotatePyramid();\n\t if (isEdge) {\n\t _this11.rotatePyramid();\n\t }\n\t _this11.changePyramidBlocksYPositionIfNeeded();\n\t if (isFinalBlock) {\n\t _this11.victory();\n\t }\n\t }\n\t }\n\t });\n\t\n\t return { mesh: mesh, bBox: bBox };\n\t };\n\t\n\t /**\n\t *\n\t * x->\n\t * a a a a a a a\n\t * a B B B B B a\n\t * a B c c c B a\n\t * a B c D c B a\n\t * a B c c c B a\n\t * a B B B B B a\n\t * a a a a a a a\n\t *\n\t * z V\n\t */\n\t\n\t var offset = size / 3;\n\t var length = 5;\n\t\n\t blocksGroup.position.x -= size * length / 2 + size / 2;\n\t blocksGroup.position.z -= size * length / 2 + size / 2;\n\t\n\t for (var yIndex = 0; yIndex <= parseInt(length / 2); yIndex += 1) {\n\t var y = size / 2 + yIndex * (size + offset);\n\t\n\t for (var zIndex = yIndex; zIndex < length - yIndex; zIndex += 1) {\n\t var z = zIndex * (size + offset);\n\t\n\t for (var xIndex = yIndex; xIndex < length - yIndex; xIndex += 1) {\n\t var x = xIndex * (size + offset);\n\t\n\t var isEdge = xIndex === yIndex && zIndex === yIndex || xIndex === length - yIndex - 1 && zIndex === yIndex || xIndex === yIndex && zIndex === length - yIndex - 1 || xIndex === length - yIndex - 1 && zIndex === length - yIndex - 1;\n\t var isFinal = yIndex === parseInt(length / 2);\n\t createBlock(x, y, z, yIndex, isEdge ? isEdge : random.bool(0.2), isFinal);\n\t }\n\t }\n\t }\n\t }\n\t }, {\n\t key: 'getBlockOffset',\n\t value: function getBlockOffset(yIndex) {\n\t var size = BLOCK_SIZE;\n\t var offset = size / 3;\n\t return size / 2 + yIndex * (size + offset);\n\t }\n\t }, {\n\t key: 'initBlocks',\n\t value: function initBlocks() {\n\t this.initBlocksPaddle();\n\t this.initBlocksBlocks();\n\t }\n\t }, {\n\t key: 'initBall',\n\t value: function initBall() {\n\t var _this12 = this;\n\t\n\t var size = 10;\n\t var geometry = new THREE.SphereGeometry(size / 2);\n\t var material = new THREE.MeshLambertMaterial({ color: 0x949ba1 });\n\t var mesh = new THREE.Mesh(geometry, material);\n\t var bBox = new THREE.BoundingBoxHelper(mesh, 0x00ff00);\n\t bBox.update();\n\t bBox.visible = false;\n\t\n\t mesh.position.set(this.data.ball.position.x, this.data.ball.position.y, this.data.ball.position.z);\n\t bBox.update();\n\t this.sphere.add(mesh);\n\t this.ballDx = random.integer(-2, 2);\n\t this.ballDz = -SPEED;\n\t this.onRenderFnArr.push(function () {\n\t if (_this12.isBallEnabled) {\n\t _this12.data.ball.position.x += _this12.ballDx;\n\t _this12.data.ball.position.z += _this12.ballDz;\n\t if (_this12.data.ball.position.x > FIELD_WIDTH / 2) {\n\t _this12.ballDx = -Math.abs(_this12.ballDx);\n\t }\n\t if (_this12.data.ball.position.x < -FIELD_WIDTH / 2) {\n\t _this12.ballDx = Math.abs(_this12.ballDx);\n\t }\n\t if (_this12.data.ball.position.z > FIELD_HEIGHT / 2) {\n\t _this12.deathZone();\n\t _this12.ballDz = -Math.abs(_this12.ballDz);\n\t }\n\t if (_this12.data.ball.position.z < -FIELD_HEIGHT / 2) {\n\t _this12.ballDz = Math.abs(_this12.ballDz);\n\t }\n\t mesh.position.set(_this12.data.ball.position.x, _this12.data.ball.position.y, _this12.data.ball.position.z);\n\t bBox.update();\n\t }\n\t });\n\t\n\t setTimeout(function () {\n\t if (!_this12.isBallEnabled && _this12.currLives === _this12.livesAtBegin) {\n\t _this12.isBallEnabled = true;\n\t }\n\t }, 8000);\n\t\n\t this.ball = mesh;\n\t this.ballBox = bBox;\n\t }\n\t }, {\n\t key: 'enable',\n\t value: function enable() {\n\t this.paused = false;\n\t this.render();\n\t }\n\t }, {\n\t key: 'disable',\n\t value: function disable() {\n\t this.paused = true;\n\t }\n\t }]);\n\t\n\t return GameScene;\n\t}();\n\t\n\texports.default = GameScene;\n\n/***/ },\n/* 24 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\t\n\tvar _EffectComposer = __webpack_require__(27);\n\t\n\tvar _EffectComposer2 = _interopRequireDefault(_EffectComposer);\n\t\n\tvar _RenderPass = __webpack_require__(29);\n\t\n\tvar _RenderPass2 = _interopRequireDefault(_RenderPass);\n\t\n\tvar _ShaderPass = __webpack_require__(30);\n\t\n\tvar _ShaderPass2 = _interopRequireDefault(_ShaderPass);\n\t\n\tvar _MaskPass = __webpack_require__(28);\n\t\n\tvar _MaskPass2 = _interopRequireDefault(_MaskPass);\n\t\n\tvar _CopyShader = __webpack_require__(32);\n\t\n\tvar _CopyShader2 = _interopRequireDefault(_CopyShader);\n\t\n\tvar _FilmShader = __webpack_require__(33);\n\t\n\tvar _FilmShader2 = _interopRequireDefault(_FilmShader);\n\t\n\tvar _RGBShiftShader = __webpack_require__(34);\n\t\n\tvar _RGBShiftShader2 = _interopRequireDefault(_RGBShiftShader);\n\t\n\tvar _BadTVShader = __webpack_require__(31);\n\t\n\tvar _BadTVShader2 = _interopRequireDefault(_BadTVShader);\n\t\n\tvar _StaticShader = __webpack_require__(35);\n\t\n\tvar _StaticShader2 = _interopRequireDefault(_StaticShader);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tvar LOGO_WIDTH = 188;\n\tvar LOGO_HEIGHT = 241;\n\t\n\tvar LogoScene = function () {\n\t function LogoScene(options) {\n\t var _this = this;\n\t\n\t _classCallCheck(this, LogoScene);\n\t\n\t this.onParamsChange = function () {\n\t var badTVPass = _this.badTVPass,\n\t staticPass = _this.staticPass,\n\t rgbPass = _this.rgbPass,\n\t filmPass = _this.filmPass,\n\t badTVParams = _this.badTVParams,\n\t rgbParams = _this.rgbParams,\n\t staticParams = _this.staticParams,\n\t filmParams = _this.filmParams;\n\t //copy gui params into shader uniforms\n\t\n\t badTVPass.uniforms[\"distortion\"].value = badTVParams.distortion;\n\t badTVPass.uniforms[\"distortion2\"].value = badTVParams.distortion2;\n\t badTVPass.uniforms[\"speed\"].value = badTVParams.speed;\n\t badTVPass.uniforms[\"rollSpeed\"].value = badTVParams.rollSpeed;\n\t\n\t staticPass.uniforms[\"amount\"].value = staticParams.amount;\n\t staticPass.uniforms[\"size\"].value = staticParams.size2;\n\t\n\t rgbPass.uniforms[\"angle\"].value = rgbParams.angle * Math.PI;\n\t rgbPass.uniforms[\"amount\"].value = rgbParams.amount;\n\t\n\t filmPass.uniforms[\"sCount\"].value = filmParams.count;\n\t filmPass.uniforms[\"sIntensity\"].value = filmParams.sIntensity;\n\t filmPass.uniforms[\"nIntensity\"].value = filmParams.nIntensity;\n\t };\n\t\n\t this.onToggleShaders = function () {\n\t var renderer = _this.renderer,\n\t badTVPass = _this.badTVPass,\n\t staticPass = _this.staticPass,\n\t rgbPass = _this.rgbPass,\n\t filmPass = _this.filmPass,\n\t renderPass = _this.renderPass,\n\t copyPass = _this.copyPass,\n\t badTVParams = _this.badTVParams,\n\t rgbParams = _this.rgbParams,\n\t staticParams = _this.staticParams,\n\t filmParams = _this.filmParams;\n\t //Add Shader Passes to Composer\n\t //order is important\n\t\n\t var composer = new THREE.EffectComposer(renderer);\n\t composer.addPass(renderPass);\n\t\n\t if (filmParams.show) {\n\t composer.addPass(filmPass);\n\t }\n\t\n\t if (badTVParams.show) {\n\t composer.addPass(badTVPass);\n\t }\n\t\n\t if (rgbParams.show) {\n\t composer.addPass(rgbPass);\n\t }\n\t\n\t if (staticParams.show) {\n\t composer.addPass(staticPass);\n\t }\n\t\n\t composer.addPass(copyPass);\n\t copyPass.renderToScreen = true;\n\t\n\t _this.composer = composer;\n\t };\n\t\n\t this.animate = function () {\n\t if (!_this.isEnabled) {\n\t return;\n\t }\n\t var badTVPass = _this.badTVPass,\n\t staticPass = _this.staticPass,\n\t rgbPass = _this.rgbPass,\n\t filmPass = _this.filmPass,\n\t renderPass = _this.renderPass,\n\t copyPass = _this.copyPass,\n\t animate = _this.animate,\n\t composer = _this.composer,\n\t renderer = _this.renderer,\n\t scene = _this.scene,\n\t camera = _this.camera;\n\t\n\t _this.shaderTime += 0.1;\n\t var shaderTime = _this.shaderTime;\n\t badTVPass.uniforms['time'].value = shaderTime;\n\t filmPass.uniforms['time'].value = shaderTime;\n\t staticPass.uniforms['time'].value = shaderTime;\n\t\n\t // if ( video.readyState === video.HAVE_ENOUGH_DATA ) {\n\t // if ( videoTexture ) videoTexture.needsUpdate = true;\n\t // }\n\t\n\t requestAnimationFrame(animate);\n\t // renderer.render(scene, camera);\n\t composer.render(0.1);\n\t // composer2.render( 0.1);\n\t };\n\t\n\t this.onResize = function () {\n\t _this.renderer.setSize(window.innerWidth, window.innerHeight);\n\t _this.camera.aspect = window.innerWidth / window.innerHeight;\n\t _this.camera.updateProjectionMatrix();\n\t };\n\t\n\t var rootEl = options.rootEl;\n\t\n\t\n\t this.rootEl = rootEl;\n\t this.shaderTime = 0;\n\t this.isEnabled = true;\n\t\n\t this.init();\n\t // this.initGui();\n\t this.animate();\n\t }\n\t\n\t _createClass(LogoScene, [{\n\t key: 'init',\n\t value: function init() {\n\t var camera = new THREE.PerspectiveCamera(45, LOGO_WIDTH / LOGO_HEIGHT, 20, 3000);\n\t camera.position.z = 450;\n\t var scene = new THREE.Scene();\n\t this.camera = camera;\n\t this.scene = scene;\n\t //init video texture\n\t var videoTexture = new THREE.TextureLoader().load('assets/images/interactopus-black-bg.png');\n\t videoTexture.minFilter = THREE.LinearFilter;\n\t videoTexture.magFilter = THREE.LinearFilter;\n\t\n\t var videoMaterial = new THREE.MeshBasicMaterial({\n\t map: videoTexture\n\t });\n\t\n\t //Add video plane\n\t var planeGeometry = new THREE.PlaneGeometry(LOGO_WIDTH, LOGO_HEIGHT, 1, 1);\n\t var plane = new THREE.Mesh(planeGeometry, videoMaterial);\n\t scene.add(plane);\n\t plane.z = 0;\n\t plane.scale.x = plane.scale.y = 1.45;\n\t\n\t //init renderer\n\t var renderer = new THREE.WebGLRenderer();\n\t renderer.setSize(LOGO_WIDTH, LOGO_HEIGHT);\n\t this.rootEl.appendChild(renderer.domElement);\n\t this.renderer = renderer;\n\t\n\t //POST PROCESSING\n\t //Create Shader Passes\n\t this.renderPass = new THREE.RenderPass(scene, camera);\n\t this.badTVPass = new THREE.ShaderPass(THREE.BadTVShader);\n\t this.rgbPass = new THREE.ShaderPass(THREE.RGBShiftShader);\n\t this.filmPass = new THREE.ShaderPass(THREE.FilmShader);\n\t this.staticPass = new THREE.ShaderPass(THREE.StaticShader);\n\t this.copyPass = new THREE.ShaderPass(THREE.CopyShader);\n\t\n\t //set shader uniforms\n\t this.filmPass.uniforms[\"grayscale\"].value = 0;\n\t\n\t //Init DAT GUI control panel\n\t this.badTVParams = {\n\t mute: true,\n\t show: true,\n\t distortion: 3.3,\n\t distortion2: 5.5,\n\t speed: 0.04,\n\t rollSpeed: 0.0\n\t };\n\t\n\t this.staticParams = {\n\t show: false,\n\t amount: 0.5,\n\t size2: 4.0\n\t };\n\t\n\t this.rgbParams = {\n\t show: true,\n\t amount: 0.005,\n\t angle: 0.0\n\t };\n\t\n\t this.filmParams = {\n\t show: true,\n\t count: 222,\n\t sIntensity: 0.2,\n\t nIntensity: 1.6\n\t };\n\t\n\t this.onToggleShaders();\n\t // onToggleMute();\n\t this.onParamsChange();\n\t\n\t // window.addEventListener('resize', this.onResize, false);\n\t // this.onResize();\n\t }\n\t }, {\n\t key: 'initGui',\n\t value: function initGui() {\n\t var gui = new dat.GUI();\n\t var badTVParams = this.badTVParams,\n\t rgbParams = this.rgbParams,\n\t staticParams = this.staticParams,\n\t filmParams = this.filmParams,\n\t renderPass = this.renderPass,\n\t onToggleShaders = this.onToggleShaders,\n\t onParamsChange = this.onParamsChange;\n\t\n\t // gui.add(badTVParams, 'mute').onChange(onToggleMute);\n\t\n\t var f1 = gui.addFolder('Bad TV');\n\t f1.add(badTVParams, 'show').onChange(onToggleShaders);\n\t f1.add(badTVParams, 'distortion', 0.1, 20).step(0.1).listen().name(\"Thick Distort\").onChange(onParamsChange);\n\t f1.add(badTVParams, 'distortion2', 0.1, 20).step(0.1).listen().name(\"Fine Distort\").onChange(onParamsChange);\n\t f1.add(badTVParams, 'speed', 0.0, 1.0).step(0.01).listen().name(\"Distort Speed\").onChange(onParamsChange);\n\t f1.add(badTVParams, 'rollSpeed', 0.0, 1.0).step(0.01).listen().name(\"Roll Speed\").onChange(onParamsChange);\n\t f1.open();\n\t\n\t var f2 = gui.addFolder('RGB Shift');\n\t f2.add(rgbParams, 'show').onChange(onToggleShaders);\n\t f2.add(rgbParams, 'amount', 0.0, 0.1).listen().onChange(onParamsChange);\n\t f2.add(rgbParams, 'angle', 0.0, 2.0).listen().onChange(onParamsChange);\n\t f2.open();\n\t\n\t var f4 = gui.addFolder('Static');\n\t f4.add(staticParams, 'show').onChange(onToggleShaders);\n\t f4.add(staticParams, 'amount', 0.0, 1.0).step(0.01).listen().onChange(onParamsChange);\n\t f4.add(staticParams, 'size2', 1.0, 100.0).step(1.0).onChange(onParamsChange);\n\t f4.open();\n\t\n\t var f3 = gui.addFolder('Scanlines');\n\t f3.add(filmParams, 'show').onChange(onToggleShaders);\n\t f3.add(filmParams, 'count', 50, 1000).onChange(onParamsChange);\n\t f3.add(filmParams, 'sIntensity', 0.0, 2.0).step(0.1).onChange(onParamsChange);\n\t f3.add(filmParams, 'nIntensity', 0.0, 2.0).step(0.1).onChange(onParamsChange);\n\t f3.open();\n\t\n\t gui.close();\n\t }\n\t }, {\n\t key: 'disable',\n\t value: function disable() {\n\t this.isEnabled = false;\n\t }\n\t }, {\n\t key: 'enable',\n\t value: function enable() {\n\t this.isEnabled = true;\n\t this.animate();\n\t }\n\t }]);\n\t\n\t return LogoScene;\n\t}();\n\t\n\texports.default = LogoScene;\n\n/***/ },\n/* 25 */\n/***/ function(module, exports) {\n\n\t'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tvar AssetsLoader = function () {\n\t function AssetsLoader(options) {\n\t _classCallCheck(this, AssetsLoader);\n\t\n\t var sounds = options.sounds,\n\t images = options.images;\n\t\n\t\n\t this.sounds = sounds;\n\t this.images = images;\n\t this.imgSources = {};\n\t this.soundsSources = {};\n\t }\n\t\n\t _createClass(AssetsLoader, [{\n\t key: 'getImage',\n\t value: function getImage(imgName) {\n\t return this.imgSources[imgName];\n\t }\n\t }, {\n\t key: 'getSound',\n\t value: function getSound(audioName) {\n\t return this.soundsSources[audioName];\n\t }\n\t }, {\n\t key: 'load',\n\t value: function load() {\n\t var _this = this;\n\t\n\t var sounds = this.sounds,\n\t images = this.images;\n\t\n\t\n\t return new Promise(function (resolve) {\n\t var audioPromises = Object.keys(sounds).map(function (soundName) {\n\t var filename = sounds[soundName];\n\t var soundUrl = 'assets/Sounds/' + filename;\n\t var audioPromise = _this.loadAudio(soundUrl);\n\t audioPromise.then(function (buffer) {\n\t _this.sounds[soundName] = buffer;\n\t\n\t var audioEl = document.createElement('audio');\n\t var sourceEl = document.createElement('source');\n\t sourceEl.src = soundUrl;\n\t audioEl.appendChild(sourceEl);\n\t _this.soundsSources[soundName] = audioEl;\n\t });\n\t return audioPromise;\n\t });\n\t\n\t var imagePromises = Object.keys(images).map(function (imgName) {\n\t var filename = images[imgName];\n\t var imgUrl = 'assets/images/' + filename;\n\t var imagePromise = _this.loadImage(imgUrl);\n\t imagePromise.then(function (img) {\n\t _this.imgSources[imgName] = img;\n\t });\n\t return imagePromise;\n\t });\n\t Promise.all(audioPromises.concat(imagePromises)).then(function () {\n\t resolve();\n\t });\n\t });\n\t }\n\t }, {\n\t key: 'loadImage',\n\t value: function loadImage(imgUrl) {\n\t return new Promise(function (resolve) {\n\t var loader = new THREE.ImageLoader();\n\t\n\t // load a image resource\n\t loader.load(imgUrl, function (image) {\n\t resolve(image);\n\t },\n\t // Function called when download progresses\n\t function (xhr) {\n\t // console.log( (xhr.loaded / xhr.total * 100) + '% loaded' );\n\t },\n\t // Function called when download errors\n\t function (xhr) {\n\t // console.log( 'An error happened' );\n\t });\n\t });\n\t }\n\t }, {\n\t key: 'loadAudio',\n\t value: function loadAudio(url) {\n\t return new Promise(function (resolve) {\n\t var audioLoader = new THREE.AudioLoader();\n\t audioLoader.load(url, function (buffer) {\n\t resolve(buffer);\n\t });\n\t });\n\t }\n\t }]);\n\t\n\t return AssetsLoader;\n\t}();\n\t\n\texports.default = AssetsLoader;\n\n/***/ },\n/* 26 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\t\n\tvar _randomJs = __webpack_require__(19);\n\t\n\tvar _randomJs2 = _interopRequireDefault(_randomJs);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tvar random = (0, _randomJs2.default)();\n\t\n\tvar MIN_SYMBOLS_LENGTH = 8;\n\t\n\tvar SecretSymbols = function () {\n\t function SecretSymbols(options) {\n\t var _this = this;\n\t\n\t _classCallCheck(this, SecretSymbols);\n\t\n\t this.render = function () {\n\t if (_this.isRevealed) {\n\t _this.renderReveleadSymbols();\n\t return;\n\t }\n\t setTimeout(function () {\n\t if (random.bool(0.8)) {\n\t if (_this.renderType === 'date') {\n\t _this.renderSymbolsDate();\n\t } else if (_this.renderType === 'time') {\n\t _this.renderSymbolsTime();\n\t } else {\n\t _this.renderSymbols();\n\t }\n\t } else {\n\t _this.renderSymbols();\n\t }\n\t\n\t _this.render();\n\t }, random.integer(100, 500));\n\t };\n\t\n\t var rootEl = options.rootEl,\n\t word = options.word,\n\t symbols = options.symbols,\n\t duration = options.duration,\n\t renderType = options.renderType;\n\t\n\t\n\t this.rootEl = rootEl;\n\t this.word = word;\n\t this.symbols = this.symbolsStrToArr(symbols);\n\t this.duration = duration || 50;\n\t this.renderType = renderType;\n\t this.isRevealed = false;\n\t\n\t this.render();\n\t }\n\t\n\t _createClass(SecretSymbols, [{\n\t key: 'symbolsStrToArr',\n\t value: function symbolsStrToArr(symbolsStr) {\n\t var arr = [];\n\t for (var i = 0, len = symbolsStr.length; i < len; i += 1) {\n\t arr.push(symbolsStr[i]);\n\t }\n\t return arr;\n\t }\n\t }, {\n\t key: 'renderSymbols',\n\t value: function renderSymbols() {\n\t var rootEl = this.rootEl,\n\t symbols = this.symbols,\n\t word = this.word;\n\t\n\t var secret = '';\n\t var len = Math.max(word.length, MIN_SYMBOLS_LENGTH);\n\t for (var i = 0; i < len; i += 1) {\n\t secret += random.pick(symbols);\n\t }\n\t rootEl.innerText = secret;\n\t }\n\t }, {\n\t key: 'renderSymbolsDate',\n\t value: function renderSymbolsDate() {\n\t var rootEl = this.rootEl,\n\t symbols = this.symbols,\n\t word = this.word;\n\t\n\t var secret = '';\n\t\n\t var day = '' + random.pick([1, 2]) + random.pick([1, 2, 3, 4, 5, 6, 7, 8, 9, 0]);\n\t var month = random.pick(['01', '02', '03', '04', '05', '06', '07', '08', '09', 10, 11, 12]);\n\t var year = '20' + random.pick([1, 2]) + random.pick([6, 7, 8, 9]);\n\t secret = day + '.' + month + '.' + year;\n\t\n\t rootEl.innerText = secret;\n\t }\n\t }, {\n\t key: 'renderSymbolsTime',\n\t value: function renderSymbolsTime() {\n\t var rootEl = this.rootEl,\n\t symbols = this.symbols,\n\t word = this.word;\n\t\n\t var secret = '';\n\t\n\t var h1 = random.integer(0, 2);\n\t var h2 = void 0;\n\t if (h1 < 2) {\n\t h2 = random.integer(0, 9);\n\t } else {\n\t h2 = random.integer(0, 3);\n\t }\n\t var m1 = random.integer(0, 5);\n\t var m2 = random.integer(0, 9);\n\t secret = '' + h1 + h2 + ':' + m1 + m2;\n\t\n\t rootEl.innerText = secret;\n\t }\n\t }, {\n\t key: 'renderReveleadSymbols',\n\t value: function renderReveleadSymbols() {\n\t var rootEl = this.rootEl,\n\t word = this.word;\n\t\n\t rootEl.innerText = word;\n\t }\n\t }, {\n\t key: 'reveal',\n\t value: function reveal() {\n\t this.isRevealed = true;\n\t }\n\t }]);\n\t\n\t return SecretSymbols;\n\t}();\n\t\n\texports.default = SecretSymbols;\n\n/***/ },\n/* 27 */\n/***/ function(module, exports) {\n\n\t\"use strict\";\n\t\n\t/**\n\t * @author alteredq / http://alteredqualia.com/\n\t */\n\t\n\tTHREE.EffectComposer = function (renderer, renderTarget) {\n\t\n\t this.renderer = renderer;\n\t\n\t if (renderTarget === undefined) {\n\t\n\t var width = window.innerWidth || 1;\n\t var height = window.innerHeight || 1;\n\t var parameters = { minFilter: THREE.LinearFilter, magFilter: THREE.LinearFilter, format: THREE.RGBFormat, stencilBuffer: false };\n\t\n\t renderTarget = new THREE.WebGLRenderTarget(width, height, parameters);\n\t }\n\t\n\t this.renderTarget1 = renderTarget;\n\t this.renderTarget2 = renderTarget.clone();\n\t\n\t this.writeBuffer = this.renderTarget1;\n\t this.readBuffer = this.renderTarget2;\n\t\n\t this.passes = [];\n\t\n\t if (THREE.CopyShader === undefined) console.error(\"THREE.EffectComposer relies on THREE.CopyShader\");\n\t\n\t this.copyPass = new THREE.ShaderPass(THREE.CopyShader);\n\t};\n\t\n\tTHREE.EffectComposer.prototype = {\n\t\n\t swapBuffers: function swapBuffers() {\n\t\n\t var tmp = this.readBuffer;\n\t this.readBuffer = this.writeBuffer;\n\t this.writeBuffer = tmp;\n\t },\n\t\n\t addPass: function addPass(pass) {\n\t\n\t this.passes.push(pass);\n\t },\n\t\n\t insertPass: function insertPass(pass, index) {\n\t\n\t this.passes.splice(index, 0, pass);\n\t },\n\t\n\t render: function render(delta) {\n\t\n\t this.writeBuffer = this.renderTarget1;\n\t this.readBuffer = this.renderTarget2;\n\t\n\t var maskActive = false;\n\t\n\t var pass,\n\t i,\n\t il = this.passes.length;\n\t\n\t for (i = 0; i < il; i++) {\n\t\n\t pass = this.passes[i];\n\t\n\t if (!pass.enabled) continue;\n\t\n\t pass.render(this.renderer, this.writeBuffer, this.readBuffer, delta, maskActive);\n\t\n\t if (pass.needsSwap) {\n\t\n\t if (maskActive) {\n\t\n\t var context = this.renderer.context;\n\t\n\t context.stencilFunc(context.NOTEQUAL, 1, 0xffffffff);\n\t\n\t this.copyPass.render(this.renderer, this.writeBuffer, this.readBuffer, delta);\n\t\n\t context.stencilFunc(context.EQUAL, 1, 0xffffffff);\n\t }\n\t\n\t this.swapBuffers();\n\t }\n\t\n\t if (pass instanceof THREE.MaskPass) {\n\t\n\t maskActive = true;\n\t } else if (pass instanceof THREE.ClearMaskPass) {\n\t\n\t maskActive = false;\n\t }\n\t }\n\t },\n\t\n\t reset: function reset(renderTarget) {\n\t\n\t if (renderTarget === undefined) {\n\t\n\t renderTarget = this.renderTarget1.clone();\n\t\n\t renderTarget.width = window.innerWidth;\n\t renderTarget.height = window.innerHeight;\n\t }\n\t\n\t this.renderTarget1 = renderTarget;\n\t this.renderTarget2 = renderTarget.clone();\n\t\n\t this.writeBuffer = this.renderTarget1;\n\t this.readBuffer = this.renderTarget2;\n\t },\n\t\n\t setSize: function setSize(width, height) {\n\t\n\t var renderTarget = this.renderTarget1.clone();\n\t\n\t renderTarget.width = width;\n\t renderTarget.height = height;\n\t\n\t this.reset(renderTarget);\n\t }\n\t\n\t};\n\n/***/ },\n/* 28 */\n/***/ function(module, exports) {\n\n\t\"use strict\";\n\t\n\t/**\n\t * @author alteredq / http://alteredqualia.com/\n\t */\n\t\n\tTHREE.MaskPass = function (scene, camera) {\n\t\n\t this.scene = scene;\n\t this.camera = camera;\n\t\n\t this.enabled = true;\n\t this.clear = true;\n\t this.needsSwap = false;\n\t\n\t this.inverse = false;\n\t};\n\t\n\tTHREE.MaskPass.prototype = {\n\t\n\t render: function render(renderer, writeBuffer, readBuffer, delta) {\n\t\n\t var context = renderer.context;\n\t\n\t // don't update color or depth\n\t\n\t context.colorMask(false, false, false, false);\n\t context.depthMask(false);\n\t\n\t // set up stencil\n\t\n\t var writeValue, clearValue;\n\t\n\t if (this.inverse) {\n\t\n\t writeValue = 0;\n\t clearValue = 1;\n\t } else {\n\t\n\t writeValue = 1;\n\t clearValue = 0;\n\t }\n\t\n\t context.enable(context.STENCIL_TEST);\n\t context.stencilOp(context.REPLACE, context.REPLACE, context.REPLACE);\n\t context.stencilFunc(context.ALWAYS, writeValue, 0xffffffff);\n\t context.clearStencil(clearValue);\n\t\n\t // draw into the stencil buffer\n\t\n\t renderer.render(this.scene, this.camera, readBuffer, this.clear);\n\t renderer.render(this.scene, this.camera, writeBuffer, this.clear);\n\t\n\t // re-enable update of color and depth\n\t\n\t context.colorMask(true, true, true, true);\n\t context.depthMask(true);\n\t\n\t // only render where stencil is set to 1\n\t\n\t context.stencilFunc(context.EQUAL, 1, 0xffffffff); // draw if == 1\n\t context.stencilOp(context.KEEP, context.KEEP, context.KEEP);\n\t }\n\t\n\t};\n\t\n\tTHREE.ClearMaskPass = function () {\n\t\n\t this.enabled = true;\n\t};\n\t\n\tTHREE.ClearMaskPass.prototype = {\n\t\n\t render: function render(renderer, writeBuffer, readBuffer, delta) {\n\t\n\t var context = renderer.context;\n\t\n\t context.disable(context.STENCIL_TEST);\n\t }\n\t\n\t};\n\n/***/ },\n/* 29 */\n/***/ function(module, exports) {\n\n\t\"use strict\";\n\t\n\t/**\n\t * @author alteredq / http://alteredqualia.com/\n\t */\n\t\n\tTHREE.RenderPass = function (scene, camera, overrideMaterial, clearColor, clearAlpha) {\n\t\n\t this.scene = scene;\n\t this.camera = camera;\n\t\n\t this.overrideMaterial = overrideMaterial;\n\t\n\t this.clearColor = clearColor;\n\t this.clearAlpha = clearAlpha !== undefined ? clearAlpha : 1;\n\t\n\t this.oldClearColor = new THREE.Color();\n\t this.oldClearAlpha = 1;\n\t\n\t this.enabled = true;\n\t this.clear = true;\n\t this.needsSwap = false;\n\t};\n\t\n\tTHREE.RenderPass.prototype = {\n\t\n\t render: function render(renderer, writeBuffer, readBuffer, delta) {\n\t\n\t this.scene.overrideMaterial = this.overrideMaterial;\n\t\n\t if (this.clearColor) {\n\t\n\t this.oldClearColor.copy(renderer.getClearColor());\n\t this.oldClearAlpha = renderer.getClearAlpha();\n\t\n\t renderer.setClearColor(this.clearColor, this.clearAlpha);\n\t }\n\t\n\t renderer.render(this.scene, this.camera, readBuffer, this.clear);\n\t\n\t if (this.clearColor) {\n\t\n\t renderer.setClearColor(this.oldClearColor, this.oldClearAlpha);\n\t }\n\t\n\t this.scene.overrideMaterial = null;\n\t }\n\t\n\t};\n\n/***/ },\n/* 30 */\n/***/ function(module, exports) {\n\n\t\"use strict\";\n\t\n\t/**\n\t * @author alteredq / http://alteredqualia.com/\n\t */\n\t\n\tTHREE.ShaderPass = function (shader, textureID) {\n\t\n\t this.textureID = textureID !== undefined ? textureID : \"tDiffuse\";\n\t\n\t this.uniforms = THREE.UniformsUtils.clone(shader.uniforms);\n\t\n\t this.material = new THREE.ShaderMaterial({\n\t\n\t uniforms: this.uniforms,\n\t vertexShader: shader.vertexShader,\n\t fragmentShader: shader.fragmentShader\n\t\n\t });\n\t\n\t this.renderToScreen = false;\n\t\n\t this.enabled = true;\n\t this.needsSwap = true;\n\t this.clear = false;\n\t\n\t this.camera = new THREE.OrthographicCamera(-1, 1, 1, -1, 0, 1);\n\t this.scene = new THREE.Scene();\n\t\n\t this.quad = new THREE.Mesh(new THREE.PlaneGeometry(2, 2), null);\n\t this.scene.add(this.quad);\n\t};\n\t\n\tTHREE.ShaderPass.prototype = {\n\t\n\t render: function render(renderer, writeBuffer, readBuffer, delta) {\n\t\n\t if (this.uniforms[this.textureID]) {\n\t\n\t this.uniforms[this.textureID].value = readBuffer;\n\t }\n\t\n\t this.quad.material = this.material;\n\t\n\t if (this.renderToScreen) {\n\t\n\t renderer.render(this.scene, this.camera);\n\t } else {\n\t\n\t renderer.render(this.scene, this.camera, writeBuffer, this.clear);\n\t }\n\t }\n\t\n\t};\n\n/***/ },\n/* 31 */\n/***/ function(module, exports) {\n\n\t\"use strict\";\n\t\n\t/**\n\t * @author Felix Turner / www.airtight.cc / @felixturner\n\t *\n\t * Bad TV Shader\n\t * Simulates a bad TV via horizontal distortion and vertical roll\n\t * Uses Ashima WebGl Noise: https://github.com/ashima/webgl-noise\n\t *\n\t * time: steadily increasing float passed in\n\t * distortion: amount of thick distortion\n\t * distortion2: amount of fine grain distortion\n\t * speed: distortion vertical travel speed\n\t * rollSpeed: vertical roll speed\n\t *\n\t * The MIT License\n\t *\n\t * Copyright (c) Felix Turner\n\t *\n\t * Permission is hereby granted, free of charge, to any person obtaining a copy\n\t * of this software and associated documentation files (the \"Software\"), to deal\n\t * in the Software without restriction, including without limitation the rights\n\t * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n\t * copies of the Software, and to permit persons to whom the Software is\n\t * furnished to do so, subject to the following conditions:\n\t *\n\t * The above copyright notice and this permission notice shall be included in\n\t * all copies or substantial portions of the Software.\n\t *\n\t * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n\t * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n\t * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n\t * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n\t * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n\t * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n\t * THE SOFTWARE.\n\t *\n\t */\n\t\n\tTHREE.BadTVShader = {\n\t uniforms: {\n\t \"tDiffuse\": { type: \"t\", value: null },\n\t \"time\": { type: \"f\", value: 0.0 },\n\t \"distortion\": { type: \"f\", value: 3.0 },\n\t \"distortion2\": { type: \"f\", value: 5.0 },\n\t \"speed\": { type: \"f\", value: 0.2 },\n\t \"rollSpeed\": { type: \"f\", value: 0.1 }\n\t },\n\t\n\t vertexShader: [\"varying vec2 vUv;\", \"void main() {\", \"vUv = uv;\", \"gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\", \"}\"].join(\"\\n\"),\n\t\n\t fragmentShader: [\"uniform sampler2D tDiffuse;\", \"uniform float time;\", \"uniform float distortion;\", \"uniform float distortion2;\", \"uniform float speed;\", \"uniform float rollSpeed;\", \"varying vec2 vUv;\",\n\t\n\t // Start Ashima 2D Simplex Noise\n\t\n\t \"vec3 mod289(vec3 x) {\", \" return x - floor(x * (1.0 / 289.0)) * 289.0;\", \"}\", \"vec2 mod289(vec2 x) {\", \" return x - floor(x * (1.0 / 289.0)) * 289.0;\", \"}\", \"vec3 permute(vec3 x) {\", \" return mod289(((x*34.0)+1.0)*x);\", \"}\", \"float snoise(vec2 v)\", \" {\", \" const vec4 C = vec4(0.211324865405187, // (3.0-sqrt(3.0))/6.0\", \" 0.366025403784439, // 0.5*(sqrt(3.0)-1.0)\", \" -0.577350269189626, // -1.0 + 2.0 * C.x\", \" 0.024390243902439); // 1.0 / 41.0\", \" vec2 i = floor(v + dot(v, C.yy) );\", \" vec2 x0 = v - i + dot(i, C.xx);\", \" vec2 i1;\", \" i1 = (x0.x > x0.y) ? vec2(1.0, 0.0) : vec2(0.0, 1.0);\", \" vec4 x12 = x0.xyxy + C.xxzz;\", \" x12.xy -= i1;\", \" i = mod289(i); // Avoid truncation effects in permutation\", \" vec3 p = permute( permute( i.y + vec3(0.0, i1.y, 1.0 ))\", \"\t\t+ i.x + vec3(0.0, i1.x, 1.0 ));\", \" vec3 m = max(0.5 - vec3(dot(x0,x0), dot(x12.xy,x12.xy), dot(x12.zw,x12.zw)), 0.0);\", \" m = m*m ;\", \" m = m*m ;\", \" vec3 x = 2.0 * fract(p * C.www) - 1.0;\", \" vec3 h = abs(x) - 0.5;\", \" vec3 ox = floor(x + 0.5);\", \" vec3 a0 = x - ox;\", \" m *= 1.79284291400159 - 0.85373472095314 * ( a0*a0 + h*h );\", \" vec3 g;\", \" g.x = a0.x * x0.x + h.x * x0.y;\", \" g.yz = a0.yz * x12.xz + h.yz * x12.yw;\", \" return 130.0 * dot(m, g);\", \"}\",\n\t\n\t // End Ashima 2D Simplex Noise\n\t\n\t \"void main() {\", \"vec2 p = vUv;\", \"float ty = time*speed;\", \"float yt = p.y - ty;\",\n\t\n\t //smooth distortion\n\t \"float offset = snoise(vec2(yt*3.0,0.0))*0.2;\",\n\t // boost distortion\n\t \"offset = offset*distortion * offset*distortion * offset;\",\n\t //add fine grain distortion\n\t \"offset += snoise(vec2(yt*50.0,0.0))*distortion2*0.001;\",\n\t //combine distortion on X with roll on Y\n\t \"gl_FragColor = texture2D(tDiffuse, vec2(fract(p.x + offset),fract(p.y-time*rollSpeed) ));\", \"}\"].join(\"\\n\")\n\t\n\t};\n\n/***/ },\n/* 32 */\n/***/ function(module, exports) {\n\n\t\"use strict\";\n\t\n\t/**\n\t * @author alteredq / http://alteredqualia.com/\n\t *\n\t * Full-screen textured quad shader\n\t */\n\t\n\tTHREE.CopyShader = {\n\t\n\t uniforms: {\n\t\n\t \"tDiffuse\": { type: \"t\", value: null },\n\t \"opacity\": { type: \"f\", value: 1.0 }\n\t\n\t },\n\t\n\t vertexShader: [\"varying vec2 vUv;\", \"void main() {\", \"vUv = uv;\", \"gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\", \"}\"].join(\"\\n\"),\n\t\n\t fragmentShader: [\"uniform float opacity;\", \"uniform sampler2D tDiffuse;\", \"varying vec2 vUv;\", \"void main() {\", \"vec4 texel = texture2D( tDiffuse, vUv );\", \"gl_FragColor = opacity * texel;\", \"}\"].join(\"\\n\")\n\t\n\t};\n\n/***/ },\n/* 33 */\n/***/ function(module, exports) {\n\n\t\"use strict\";\n\t\n\t/**\n\t * @author alteredq / http://alteredqualia.com/\n\t *\n\t * Film grain & scanlines shader\n\t *\n\t * - ported from HLSL to WebGL / GLSL\n\t * http://www.truevision3d.com/forums/showcase/staticnoise_colorblackwhite_scanline_shaders-t18698.0.html\n\t *\n\t * Screen Space Static Postprocessor\n\t *\n\t * Produces an analogue noise overlay similar to a film grain / TV static\n\t *\n\t * Original implementation and noise algorithm\n\t * Pat 'Hawthorne' Shearon\n\t *\n\t * Optimized scanlines + noise version with intensity scaling\n\t * Georg 'Leviathan' Steinrohder\n\t *\n\t * This version is provided under a Creative Commons Attribution 3.0 License\n\t * http://creativecommons.org/licenses/by/3.0/\n\t */\n\t\n\tTHREE.FilmShader = {\n\t\n\t uniforms: {\n\t\n\t \"tDiffuse\": { type: \"t\", value: null },\n\t \"time\": { type: \"f\", value: 0.0 },\n\t \"nIntensity\": { type: \"f\", value: 0.5 },\n\t \"sIntensity\": { type: \"f\", value: 0.05 },\n\t \"sCount\": { type: \"f\", value: 4096 },\n\t \"grayscale\": { type: \"i\", value: 1 }\n\t\n\t },\n\t\n\t vertexShader: [\"varying vec2 vUv;\", \"void main() {\", \"vUv = uv;\", \"gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\", \"}\"].join(\"\\n\"),\n\t\n\t fragmentShader: [\n\t\n\t // control parameter\n\t \"uniform float time;\", \"uniform bool grayscale;\",\n\t\n\t // noise effect intensity value (0 = no effect, 1 = full effect)\n\t \"uniform float nIntensity;\",\n\t\n\t // scanlines effect intensity value (0 = no effect, 1 = full effect)\n\t \"uniform float sIntensity;\",\n\t\n\t // scanlines effect count value (0 = no effect, 4096 = full effect)\n\t \"uniform float sCount;\", \"uniform sampler2D tDiffuse;\", \"varying vec2 vUv;\", \"void main() {\",\n\t\n\t // sample the source\n\t \"vec4 cTextureScreen = texture2D( tDiffuse, vUv );\",\n\t\n\t // make some noise\n\t \"float x = vUv.x * vUv.y * time * 1000.0;\", \"x = mod( x, 13.0 ) * mod( x, 123.0 );\", \"float dx = mod( x, 0.01 );\",\n\t\n\t // add noise\n\t \"vec3 cResult = cTextureScreen.rgb + cTextureScreen.rgb * clamp( 0.1 + dx * 100.0, 0.0, 1.0 );\",\n\t\n\t // get us a sine and cosine\n\t \"vec2 sc = vec2( sin( vUv.y * sCount ), cos( vUv.y * sCount ) );\",\n\t\n\t // add scanlines\n\t \"cResult += cTextureScreen.rgb * vec3( sc.x, sc.y, sc.x ) * sIntensity;\",\n\t\n\t // interpolate between source and result by intensity\n\t \"cResult = cTextureScreen.rgb + clamp( nIntensity, 0.0,1.0 ) * ( cResult - cTextureScreen.rgb );\",\n\t\n\t // convert to grayscale if desired\n\t \"if( grayscale ) {\", \"cResult = vec3( cResult.r * 0.3 + cResult.g * 0.59 + cResult.b * 0.11 );\", \"}\", \"gl_FragColor = vec4( cResult, cTextureScreen.a );\", \"}\"].join(\"\\n\")\n\t\n\t};\n\n/***/ },\n/* 34 */\n/***/ function(module, exports) {\n\n\t\"use strict\";\n\t\n\t/**\n\t * @author felixturner / http://airtight.cc/\n\t *\n\t * RGB Shift Shader\n\t * Shifts red and blue channels from center in opposite directions\n\t * Ported from http://kriss.cx/tom/2009/05/rgb-shift/\n\t * by Tom Butterworth / http://kriss.cx/tom/\n\t *\n\t * amount: shift distance (1 is width of input)\n\t * angle: shift angle in radians\n\t */\n\t\n\tTHREE.RGBShiftShader = {\n\t\n\t uniforms: {\n\t\n\t \"tDiffuse\": { type: \"t\", value: null },\n\t \"amount\": { type: \"f\", value: 0.005 },\n\t \"angle\": { type: \"f\", value: 0.0 }\n\t\n\t },\n\t\n\t vertexShader: [\"varying vec2 vUv;\", \"void main() {\", \"vUv = uv;\", \"gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\", \"}\"].join(\"\\n\"),\n\t\n\t fragmentShader: [\"uniform sampler2D tDiffuse;\", \"uniform float amount;\", \"uniform float angle;\", \"varying vec2 vUv;\", \"void main() {\", \"vec2 offset = amount * vec2( cos(angle), sin(angle));\", \"vec4 cr = texture2D(tDiffuse, vUv + offset);\", \"vec4 cga = texture2D(tDiffuse, vUv);\", \"vec4 cb = texture2D(tDiffuse, vUv - offset);\", \"gl_FragColor = vec4(cr.r, cga.g, cb.b, cga.a);\", \"}\"].join(\"\\n\")\n\t\n\t};\n\n/***/ },\n/* 35 */\n/***/ function(module, exports) {\n\n\t\"use strict\";\n\t\n\t/**\n\t * @author Felix Turner / www.airtight.cc / @felixturner\n\t *\n\t * Static effect. Additively blended digital noise.\n\t *\n\t * amount - amount of noise to add (0 - 1)\n\t * size - size of noise grains (pixels)\n\t *\n\t * The MIT License\n\t *\n\t * Copyright (c) 2014 Felix Turner\n\t *\n\t * Permission is hereby granted, free of charge, to any person obtaining a copy\n\t * of this software and associated documentation files (the \"Software\"), to deal\n\t * in the Software without restriction, including without limitation the rights\n\t * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n\t * copies of the Software, and to permit persons to whom the Software is\n\t * furnished to do so, subject to the following conditions:\n\t *\n\t * The above copyright notice and this permission notice shall be included in\n\t * all copies or substantial portions of the Software.\n\t *\n\t * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n\t * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n\t * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n\t * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n\t * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n\t * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n\t * THE SOFTWARE.\n\t *\n\t */\n\t\n\tTHREE.StaticShader = {\n\t\n\t uniforms: {\n\t\n\t \"tDiffuse\": { type: \"t\", value: null },\n\t \"time\": { type: \"f\", value: 0.0 },\n\t \"amount\": { type: \"f\", value: 0.5 },\n\t \"size\": { type: \"f\", value: 4.0 }\n\t },\n\t\n\t vertexShader: [\"varying vec2 vUv;\", \"void main() {\", \"vUv = uv;\", \"gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\", \"}\"].join(\"\\n\"),\n\t\n\t fragmentShader: [\"uniform sampler2D tDiffuse;\", \"uniform float time;\", \"uniform float amount;\", \"uniform float size;\", \"varying vec2 vUv;\", \"float rand(vec2 co){\", \"return fract(sin(dot(co.xy ,vec2(12.9898,78.233))) * 43758.5453);\", \"}\", \"void main() {\", \"vec2 p = vUv;\", \"vec4 color = texture2D(tDiffuse, p);\", \"float xs = floor(gl_FragCoord.x / size);\", \"float ys = floor(gl_FragCoord.y / size);\", \"vec4 snow = vec4(rand(vec2(xs * time,ys * time))*amount);\",\n\t\n\t //\"gl_FragColor = color + amount * ( snow - color );\", //interpolate\n\t\n\t \"gl_FragColor = color+ snow;\", //additive\n\t\n\t \"}\"].join(\"\\n\")\n\t\n\t};\n\n/***/ },\n/* 36 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\n\tvar Keyboard = __webpack_require__(37);\n\tvar Locale = __webpack_require__(12);\n\tvar KeyCombo = __webpack_require__(7);\n\t\n\tvar keyboard = new Keyboard();\n\t\n\tkeyboard.setLocale('us', __webpack_require__(38));\n\t\n\texports = module.exports = keyboard;\n\texports.Keyboard = Keyboard;\n\texports.Locale = Locale;\n\texports.KeyCombo = KeyCombo;\n\n\n/***/ },\n/* 37 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t/* WEBPACK VAR INJECTION */(function(global) {\n\tvar Locale = __webpack_require__(12);\n\tvar KeyCombo = __webpack_require__(7);\n\t\n\t\n\tfunction Keyboard(targetWindow, targetElement, platform, userAgent) {\n\t this._locale = null;\n\t this._currentContext = null;\n\t this._contexts = {};\n\t this._listeners = [];\n\t this._appliedListeners = [];\n\t this._locales = {};\n\t this._targetElement = null;\n\t this._targetWindow = null;\n\t this._targetPlatform = '';\n\t this._targetUserAgent = '';\n\t this._isModernBrowser = false;\n\t this._targetKeyDownBinding = null;\n\t this._targetKeyUpBinding = null;\n\t this._targetResetBinding = null;\n\t this._paused = false;\n\t\n\t this.setContext('global');\n\t this.watch(targetWindow, targetElement, platform, userAgent);\n\t}\n\t\n\tKeyboard.prototype.setLocale = function(localeName, localeBuilder) {\n\t var locale = null;\n\t if (typeof localeName === 'string') {\n\t\n\t if (localeBuilder) {\n\t locale = new Locale(localeName);\n\t localeBuilder(locale, this._targetPlatform, this._targetUserAgent);\n\t } else {\n\t locale = this._locales[localeName] || null;\n\t }\n\t } else {\n\t locale = localeName;\n\t localeName = locale._localeName;\n\t }\n\t\n\t this._locale = locale;\n\t this._locales[localeName] = locale;\n\t if (locale) {\n\t this._locale.pressedKeys = locale.pressedKeys;\n\t }\n\t};\n\t\n\tKeyboard.prototype.getLocale = function(localName) {\n\t localName || (localName = this._locale.localeName);\n\t return this._locales[localName] || null;\n\t};\n\t\n\tKeyboard.prototype.bind = function(keyComboStr, pressHandler, releaseHandler, preventRepeatByDefault) {\n\t if (keyComboStr === null || typeof keyComboStr === 'function') {\n\t preventRepeatByDefault = releaseHandler;\n\t releaseHandler = pressHandler;\n\t pressHandler = keyComboStr;\n\t keyComboStr = null;\n\t }\n\t\n\t if (\n\t keyComboStr &&\n\t typeof keyComboStr === 'object' &&\n\t typeof keyComboStr.length === 'number'\n\t ) {\n\t for (var i = 0; i < keyComboStr.length; i += 1) {\n\t this.bind(keyComboStr[i], pressHandler, releaseHandler);\n\t }\n\t return;\n\t }\n\t\n\t this._listeners.push({\n\t keyCombo : keyComboStr ? new KeyCombo(keyComboStr) : null,\n\t pressHandler : pressHandler || null,\n\t releaseHandler : releaseHandler || null,\n\t preventRepeat : preventRepeatByDefault || false,\n\t preventRepeatByDefault : preventRepeatByDefault || false\n\t });\n\t};\n\tKeyboard.prototype.addListener = Keyboard.prototype.bind;\n\tKeyboard.prototype.on = Keyboard.prototype.bind;\n\t\n\tKeyboard.prototype.unbind = function(keyComboStr, pressHandler, releaseHandler) {\n\t if (keyComboStr === null || typeof keyComboStr === 'function') {\n\t releaseHandler = pressHandler;\n\t pressHandler = keyComboStr;\n\t keyComboStr = null;\n\t }\n\t\n\t if (\n\t keyComboStr &&\n\t typeof keyComboStr === 'object' &&\n\t typeof keyComboStr.length === 'number'\n\t ) {\n\t for (var i = 0; i < keyComboStr.length; i += 1) {\n\t this.unbind(keyComboStr[i], pressHandler, releaseHandler);\n\t }\n\t return;\n\t }\n\t\n\t for (var i = 0; i < this._listeners.length; i += 1) {\n\t var listener = this._listeners[i];\n\t\n\t var comboMatches = !keyComboStr && !listener.keyCombo ||\n\t listener.keyCombo && listener.keyCombo.isEqual(keyComboStr);\n\t var pressHandlerMatches = !pressHandler && !releaseHandler ||\n\t !pressHandler && !listener.pressHandler ||\n\t pressHandler === listener.pressHandler;\n\t var releaseHandlerMatches = !pressHandler && !releaseHandler ||\n\t !releaseHandler && !listener.releaseHandler ||\n\t releaseHandler === listener.releaseHandler;\n\t\n\t if (comboMatches && pressHandlerMatches && releaseHandlerMatches) {\n\t this._listeners.splice(i, 1);\n\t i -= 1;\n\t }\n\t }\n\t};\n\tKeyboard.prototype.removeListener = Keyboard.prototype.unbind;\n\tKeyboard.prototype.off = Keyboard.prototype.unbind;\n\t\n\tKeyboard.prototype.setContext = function(contextName) {\n\t if(this._locale) { this.releaseAllKeys(); }\n\t\n\t if (!this._contexts[contextName]) {\n\t this._contexts[contextName] = [];\n\t }\n\t this._listeners = this._contexts[contextName];\n\t this._currentContext = contextName;\n\t};\n\t\n\tKeyboard.prototype.getContext = function() {\n\t return this._currentContext;\n\t};\n\t\n\tKeyboard.prototype.withContext = function(contextName, callback) {\n\t var previousContextName = this.getContext();\n\t this.setContext(contextName);\n\t\n\t callback();\n\t\n\t this.setContext(previousContextName);\n\t};\n\t\n\tKeyboard.prototype.watch = function(targetWindow, targetElement, targetPlatform, targetUserAgent) {\n\t var _this = this;\n\t\n\t this.stop();\n\t\n\t if (!targetWindow) {\n\t if (!global.addEventListener && !global.attachEvent) {\n\t throw new Error('Cannot find global functions addEventListener or attachEvent.');\n\t }\n\t targetWindow = global;\n\t }\n\t\n\t if (typeof targetWindow.nodeType === 'number') {\n\t targetUserAgent = targetPlatform;\n\t targetPlatform = targetElement;\n\t targetElement = targetWindow;\n\t targetWindow = global;\n\t }\n\t\n\t if (!targetWindow.addEventListener && !targetWindow.attachEvent) {\n\t throw new Error('Cannot find addEventListener or attachEvent methods on targetWindow.');\n\t }\n\t\n\t this._isModernBrowser = !!targetWindow.addEventListener;\n\t\n\t var userAgent = targetWindow.navigator && targetWindow.navigator.userAgent || '';\n\t var platform = targetWindow.navigator && targetWindow.navigator.platform || '';\n\t\n\t targetElement && targetElement !== null || (targetElement = targetWindow.document);\n\t targetPlatform && targetPlatform !== null || (targetPlatform = platform);\n\t targetUserAgent && targetUserAgent !== null || (targetUserAgent = userAgent);\n\t\n\t this._targetKeyDownBinding = function(event) {\n\t _this.pressKey(event.keyCode, event);\n\t };\n\t this._targetKeyUpBinding = function(event) {\n\t _this.releaseKey(event.keyCode, event);\n\t };\n\t this._targetResetBinding = function(event) {\n\t _this.releaseAllKeys(event)\n\t };\n\t\n\t this._bindEvent(targetElement, 'keydown', this._targetKeyDownBinding);\n\t this._bindEvent(targetElement, 'keyup', this._targetKeyUpBinding);\n\t this._bindEvent(targetWindow, 'focus', this._targetResetBinding);\n\t this._bindEvent(targetWindow, 'blur', this._targetResetBinding);\n\t\n\t this._targetElement = targetElement;\n\t this._targetWindow = targetWindow;\n\t this._targetPlatform = targetPlatform;\n\t this._targetUserAgent = targetUserAgent;\n\t};\n\t\n\tKeyboard.prototype.stop = function() {\n\t var _this = this;\n\t\n\t if (!this._targetElement || !this._targetWindow) { return; }\n\t\n\t this._unbindEvent(this._targetElement, 'keydown', this._targetKeyDownBinding);\n\t this._unbindEvent(this._targetElement, 'keyup', this._targetKeyUpBinding);\n\t this._unbindEvent(this._targetWindow, 'focus', this._targetResetBinding);\n\t this._unbindEvent(this._targetWindow, 'blur', this._targetResetBinding);\n\t\n\t this._targetWindow = null;\n\t this._targetElement = null;\n\t};\n\t\n\tKeyboard.prototype.pressKey = function(keyCode, event) {\n\t if (this._paused) { return; }\n\t if (!this._locale) { throw new Error('Locale not set'); }\n\t\n\t this._locale.pressKey(keyCode);\n\t this._applyBindings(event);\n\t};\n\t\n\tKeyboard.prototype.releaseKey = function(keyCode, event) {\n\t if (this._paused) { return; }\n\t if (!this._locale) { throw new Error('Locale not set'); }\n\t\n\t this._locale.releaseKey(keyCode);\n\t this._clearBindings(event);\n\t};\n\t\n\tKeyboard.prototype.releaseAllKeys = function(event) {\n\t if (this._paused) { return; }\n\t if (!this._locale) { throw new Error('Locale not set'); }\n\t\n\t this._locale.pressedKeys.length = 0;\n\t this._clearBindings(event);\n\t};\n\t\n\tKeyboard.prototype.pause = function() {\n\t if (this._paused) { return; }\n\t if (this._locale) { this.releaseAllKeys(); }\n\t this._paused = true;\n\t};\n\t\n\tKeyboard.prototype.resume = function() {\n\t this._paused = false;\n\t};\n\t\n\tKeyboard.prototype.reset = function() {\n\t this.releaseAllKeys();\n\t this._listeners.length = 0;\n\t};\n\t\n\tKeyboard.prototype._bindEvent = function(targetElement, eventName, handler) {\n\t return this._isModernBrowser ?\n\t targetElement.addEventListener(eventName, handler, false) :\n\t targetElement.attachEvent('on' + eventName, handler);\n\t};\n\t\n\tKeyboard.prototype._unbindEvent = function(targetElement, eventName, handler) {\n\t return this._isModernBrowser ?\n\t targetElement.removeEventListener(eventName, handler, false) :\n\t targetElement.detachEvent('on' + eventName, handler);\n\t};\n\t\n\tKeyboard.prototype._getGroupedListeners = function() {\n\t var listenerGroups = [];\n\t var listenerGroupMap = [];\n\t\n\t var listeners = this._listeners;\n\t if (this._currentContext !== 'global') {\n\t listeners = [].concat(listeners, this._contexts.global);\n\t }\n\t\n\t listeners.sort(function(a, b) {\n\t return (b.keyCombo ? b.keyCombo.keyNames.length : 0) - (a.keyCombo ? a.keyCombo.keyNames.length : 0);\n\t }).forEach(function(l) {\n\t var mapIndex = -1;\n\t for (var i = 0; i < listenerGroupMap.length; i += 1) {\n\t if (listenerGroupMap[i] === null && l.keyCombo === null ||\n\t listenerGroupMap[i] !== null && listenerGroupMap[i].isEqual(l.keyCombo)) {\n\t mapIndex = i;\n\t }\n\t }\n\t if (mapIndex === -1) {\n\t mapIndex = listenerGroupMap.length;\n\t listenerGroupMap.push(l.keyCombo);\n\t }\n\t if (!listenerGroups[mapIndex]) {\n\t listenerGroups[mapIndex] = [];\n\t }\n\t listenerGroups[mapIndex].push(l);\n\t });\n\t return listenerGroups;\n\t};\n\t\n\tKeyboard.prototype._applyBindings = function(event) {\n\t var preventRepeat = false;\n\t\n\t event || (event = {});\n\t event.preventRepeat = function() { preventRepeat = true; };\n\t event.pressedKeys = this._locale.pressedKeys.slice(0);\n\t\n\t var pressedKeys = this._locale.pressedKeys.slice(0);\n\t var listenerGroups = this._getGroupedListeners();\n\t\n\t\n\t for (var i = 0; i < listenerGroups.length; i += 1) {\n\t var listeners = listenerGroups[i];\n\t var keyCombo = listeners[0].keyCombo;\n\t\n\t if (keyCombo === null || keyCombo.check(pressedKeys)) {\n\t for (var j = 0; j < listeners.length; j += 1) {\n\t var listener = listeners[j];\n\t\n\t if (keyCombo === null) {\n\t listener = {\n\t keyCombo : new KeyCombo(pressedKeys.join('+')),\n\t pressHandler : listener.pressHandler,\n\t releaseHandler : listener.releaseHandler,\n\t preventRepeat : listener.preventRepeat,\n\t preventRepeatByDefault : listener.preventRepeatByDefault\n\t };\n\t }\n\t\n\t if (listener.pressHandler && !listener.preventRepeat) {\n\t listener.pressHandler.call(this, event);\n\t if (preventRepeat) {\n\t listener.preventRepeat = preventRepeat;\n\t preventRepeat = false;\n\t }\n\t }\n\t\n\t if (listener.releaseHandler && this._appliedListeners.indexOf(listener) === -1) {\n\t this._appliedListeners.push(listener);\n\t }\n\t }\n\t\n\t if (keyCombo) {\n\t for (var j = 0; j < keyCombo.keyNames.length; j += 1) {\n\t var index = pressedKeys.indexOf(keyCombo.keyNames[j]);\n\t if (index !== -1) {\n\t pressedKeys.splice(index, 1);\n\t j -= 1;\n\t }\n\t }\n\t }\n\t }\n\t }\n\t};\n\t\n\tKeyboard.prototype._clearBindings = function(event) {\n\t event || (event = {});\n\t\n\t for (var i = 0; i < this._appliedListeners.length; i += 1) {\n\t var listener = this._appliedListeners[i];\n\t var keyCombo = listener.keyCombo;\n\t if (keyCombo === null || !keyCombo.check(this._locale.pressedKeys)) {\n\t listener.preventRepeat = listener.preventRepeatByDefault;\n\t listener.releaseHandler.call(this, event);\n\t this._appliedListeners.splice(i, 1);\n\t i -= 1;\n\t }\n\t }\n\t};\n\t\n\tmodule.exports = Keyboard;\n\t\n\t/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))\n\n/***/ },\n/* 38 */\n/***/ function(module, exports) {\n\n\t\n\tmodule.exports = function(locale, platform, userAgent) {\n\t\n\t // general\n\t locale.bindKeyCode(3, ['cancel']);\n\t locale.bindKeyCode(8, ['backspace']);\n\t locale.bindKeyCode(9, ['tab']);\n\t locale.bindKeyCode(12, ['clear']);\n\t locale.bindKeyCode(13, ['enter']);\n\t locale.bindKeyCode(16, ['shift']);\n\t locale.bindKeyCode(17, ['ctrl']);\n\t locale.bindKeyCode(18, ['alt', 'menu']);\n\t locale.bindKeyCode(19, ['pause', 'break']);\n\t locale.bindKeyCode(20, ['capslock']);\n\t locale.bindKeyCode(27, ['escape', 'esc']);\n\t locale.bindKeyCode(32, ['space', 'spacebar']);\n\t locale.bindKeyCode(33, ['pageup']);\n\t locale.bindKeyCode(34, ['pagedown']);\n\t locale.bindKeyCode(35, ['end']);\n\t locale.bindKeyCode(36, ['home']);\n\t locale.bindKeyCode(37, ['left']);\n\t locale.bindKeyCode(38, ['up']);\n\t locale.bindKeyCode(39, ['right']);\n\t locale.bindKeyCode(40, ['down']);\n\t locale.bindKeyCode(41, ['select']);\n\t locale.bindKeyCode(42, ['printscreen']);\n\t locale.bindKeyCode(43, ['execute']);\n\t locale.bindKeyCode(44, ['snapshot']);\n\t locale.bindKeyCode(45, ['insert', 'ins']);\n\t locale.bindKeyCode(46, ['delete', 'del']);\n\t locale.bindKeyCode(47, ['help']);\n\t locale.bindKeyCode(145, ['scrolllock', 'scroll']);\n\t locale.bindKeyCode(187, ['equal', 'equalsign', '=']);\n\t locale.bindKeyCode(188, ['comma', ',']);\n\t locale.bindKeyCode(190, ['period', '.']);\n\t locale.bindKeyCode(191, ['slash', 'forwardslash', '/']);\n\t locale.bindKeyCode(192, ['graveaccent', '`']);\n\t locale.bindKeyCode(219, ['openbracket', '[']);\n\t locale.bindKeyCode(220, ['backslash', '\\\\']);\n\t locale.bindKeyCode(221, ['closebracket', ']']);\n\t locale.bindKeyCode(222, ['apostrophe', '\\'']);\n\t\n\t // 0-9\n\t locale.bindKeyCode(48, ['zero', '0']);\n\t locale.bindKeyCode(49, ['one', '1']);\n\t locale.bindKeyCode(50, ['two', '2']);\n\t locale.bindKeyCode(51, ['three', '3']);\n\t locale.bindKeyCode(52, ['four', '4']);\n\t locale.bindKeyCode(53, ['five', '5']);\n\t locale.bindKeyCode(54, ['six', '6']);\n\t locale.bindKeyCode(55, ['seven', '7']);\n\t locale.bindKeyCode(56, ['eight', '8']);\n\t locale.bindKeyCode(57, ['nine', '9']);\n\t\n\t // numpad\n\t locale.bindKeyCode(96, ['numzero', 'num0']);\n\t locale.bindKeyCode(97, ['numone', 'num1']);\n\t locale.bindKeyCode(98, ['numtwo', 'num2']);\n\t locale.bindKeyCode(99, ['numthree', 'num3']);\n\t locale.bindKeyCode(100, ['numfour', 'num4']);\n\t locale.bindKeyCode(101, ['numfive', 'num5']);\n\t locale.bindKeyCode(102, ['numsix', 'num6']);\n\t locale.bindKeyCode(103, ['numseven', 'num7']);\n\t locale.bindKeyCode(104, ['numeight', 'num8']);\n\t locale.bindKeyCode(105, ['numnine', 'num9']);\n\t locale.bindKeyCode(106, ['nummultiply', 'num*']);\n\t locale.bindKeyCode(107, ['numadd', 'num+']);\n\t locale.bindKeyCode(108, ['numenter']);\n\t locale.bindKeyCode(109, ['numsubtract', 'num-']);\n\t locale.bindKeyCode(110, ['numdecimal', 'num.']);\n\t locale.bindKeyCode(111, ['numdivide', 'num/']);\n\t locale.bindKeyCode(144, ['numlock', 'num']);\n\t\n\t // function keys\n\t locale.bindKeyCode(112, ['f1']);\n\t locale.bindKeyCode(113, ['f2']);\n\t locale.bindKeyCode(114, ['f3']);\n\t locale.bindKeyCode(115, ['f4']);\n\t locale.bindKeyCode(116, ['f5']);\n\t locale.bindKeyCode(117, ['f6']);\n\t locale.bindKeyCode(118, ['f7']);\n\t locale.bindKeyCode(119, ['f8']);\n\t locale.bindKeyCode(120, ['f9']);\n\t locale.bindKeyCode(121, ['f10']);\n\t locale.bindKeyCode(122, ['f11']);\n\t locale.bindKeyCode(123, ['f12']);\n\t\n\t // secondary key symbols\n\t locale.bindMacro('shift + `', ['tilde', '~']);\n\t locale.bindMacro('shift + 1', ['exclamation', 'exclamationpoint', '!']);\n\t locale.bindMacro('shift + 2', ['at', '@']);\n\t locale.bindMacro('shift + 3', ['number', '#']);\n\t locale.bindMacro('shift + 4', ['dollar', 'dollars', 'dollarsign', '$']);\n\t locale.bindMacro('shift + 5', ['percent', '%']);\n\t locale.bindMacro('shift + 6', ['caret', '^']);\n\t locale.bindMacro('shift + 7', ['ampersand', 'and', '&']);\n\t locale.bindMacro('shift + 8', ['asterisk', '*']);\n\t locale.bindMacro('shift + 9', ['openparen', '(']);\n\t locale.bindMacro('shift + 0', ['closeparen', ')']);\n\t locale.bindMacro('shift + -', ['underscore', '_']);\n\t locale.bindMacro('shift + =', ['plus', '+']);\n\t locale.bindMacro('shift + [', ['opencurlybrace', 'opencurlybracket', '{']);\n\t locale.bindMacro('shift + ]', ['closecurlybrace', 'closecurlybracket', '}']);\n\t locale.bindMacro('shift + \\\\', ['verticalbar', '|']);\n\t locale.bindMacro('shift + ;', ['colon', ':']);\n\t locale.bindMacro('shift + \\'', ['quotationmark', '\\'']);\n\t locale.bindMacro('shift + !,', ['openanglebracket', '<']);\n\t locale.bindMacro('shift + .', ['closeanglebracket', '>']);\n\t locale.bindMacro('shift + /', ['questionmark', '?']);\n\t\n\t //a-z and A-Z\n\t for (var keyCode = 65; keyCode <= 90; keyCode += 1) {\n\t var keyName = String.fromCharCode(keyCode + 32);\n\t var capitalKeyName = String.fromCharCode(keyCode);\n\t \tlocale.bindKeyCode(keyCode, keyName);\n\t \tlocale.bindMacro('shift + ' + keyName, capitalKeyName);\n\t \tlocale.bindMacro('capslock + ' + keyName, capitalKeyName);\n\t }\n\t\n\t // browser caveats\n\t var semicolonKeyCode = userAgent.match('Firefox') ? 59 : 186;\n\t var dashKeyCode = userAgent.match('Firefox') ? 173 : 189;\n\t var leftCommandKeyCode;\n\t var rightCommandKeyCode;\n\t if (platform.match('Mac') && (userAgent.match('Safari') || userAgent.match('Chrome'))) {\n\t leftCommandKeyCode = 91;\n\t rightCommandKeyCode = 93;\n\t } else if(platform.match('Mac') && userAgent.match('Opera')) {\n\t leftCommandKeyCode = 17;\n\t rightCommandKeyCode = 17;\n\t } else if(platform.match('Mac') && userAgent.match('Firefox')) {\n\t leftCommandKeyCode = 224;\n\t rightCommandKeyCode = 224;\n\t }\n\t locale.bindKeyCode(semicolonKeyCode, ['semicolon', ';']);\n\t locale.bindKeyCode(dashKeyCode, ['dash', '-']);\n\t locale.bindKeyCode(leftCommandKeyCode, ['command', 'windows', 'win', 'super', 'leftcommand', 'leftwindows', 'leftwin', 'leftsuper']);\n\t locale.bindKeyCode(rightCommandKeyCode, ['command', 'windows', 'win', 'super', 'rightcommand', 'rightwindows', 'rightwin', 'rightsuper']);\n\t\n\t // kill keys\n\t locale.setKillKey('command');\n\t};\n\n\n/***/ },\n/* 39 */\n/***/ function(module, exports, __webpack_require__) {\n\n\tvar BaseConnection = module.exports = __webpack_require__(15)\n\t , _ = __webpack_require__(1);\n\t\n\t\n\tvar BrowserConnection = module.exports = function(opts) {\n\t BaseConnection.call(this, opts);\n\t var connection = this;\n\t this.on('ready', function() { connection.startFocusLoop(); })\n\t this.on('disconnect', function() { connection.stopFocusLoop(); })\n\t}\n\t\n\t_.extend(BrowserConnection.prototype, BaseConnection.prototype);\n\t\n\tBrowserConnection.__proto__ = BaseConnection;\n\t\n\tBrowserConnection.prototype.useSecure = function(){\n\t return location.protocol === 'https:'\n\t}\n\t\n\tBrowserConnection.prototype.getScheme = function(){\n\t return this.useSecure() ? 'wss:' : 'ws:'\n\t}\n\t\n\tBrowserConnection.prototype.getPort = function(){\n\t return this.useSecure() ? 6436 : 6437\n\t}\n\t\n\tBrowserConnection.prototype.setupSocket = function() {\n\t var connection = this;\n\t var socket = new WebSocket(this.getUrl());\n\t socket.onopen = function() { connection.handleOpen(); };\n\t socket.onclose = function(data) { connection.handleClose(data['code'], data['reason']); };\n\t socket.onmessage = function(message) { connection.handleData(message.data) };\n\t socket.onerror = function(error) {\n\t\n\t // attempt to degrade to ws: after one failed attempt for older Leap Service installations.\n\t if (connection.useSecure() && connection.scheme === 'wss:'){\n\t connection.scheme = 'ws:';\n\t connection.port = 6437;\n\t connection.disconnect();\n\t connection.connect();\n\t }\n\t\n\t };\n\t return socket;\n\t}\n\t\n\tBrowserConnection.prototype.startFocusLoop = function() {\n\t if (this.focusDetectorTimer) return;\n\t var connection = this;\n\t var propertyName = null;\n\t if (typeof document.hidden !== \"undefined\") {\n\t propertyName = \"hidden\";\n\t } else if (typeof document.mozHidden !== \"undefined\") {\n\t propertyName = \"mozHidden\";\n\t } else if (typeof document.msHidden !== \"undefined\") {\n\t propertyName = \"msHidden\";\n\t } else if (typeof document.webkitHidden !== \"undefined\") {\n\t propertyName = \"webkitHidden\";\n\t } else {\n\t propertyName = undefined;\n\t }\n\t\n\t if (connection.windowVisible === undefined) {\n\t connection.windowVisible = propertyName === undefined ? true : document[propertyName] === false;\n\t }\n\t\n\t var focusListener = window.addEventListener('focus', function(e) {\n\t connection.windowVisible = true;\n\t updateFocusState();\n\t });\n\t\n\t var blurListener = window.addEventListener('blur', function(e) {\n\t connection.windowVisible = false;\n\t updateFocusState();\n\t });\n\t\n\t this.on('disconnect', function() {\n\t window.removeEventListener('focus', focusListener);\n\t window.removeEventListener('blur', blurListener);\n\t });\n\t\n\t var updateFocusState = function() {\n\t var isVisible = propertyName === undefined ? true : document[propertyName] === false;\n\t connection.reportFocus(isVisible && connection.windowVisible);\n\t }\n\t\n\t // save 100ms when resuming focus\n\t updateFocusState();\n\t\n\t this.focusDetectorTimer = setInterval(updateFocusState, 100);\n\t}\n\t\n\tBrowserConnection.prototype.stopFocusLoop = function() {\n\t if (!this.focusDetectorTimer) return;\n\t clearTimeout(this.focusDetectorTimer);\n\t delete this.focusDetectorTimer;\n\t}\n\n\n/***/ },\n/* 40 */\n/***/ function(module, exports, __webpack_require__) {\n\n\tvar WebSocket = __webpack_require__(48)\n\t , BaseConnection = __webpack_require__(15)\n\t , _ = __webpack_require__(1);\n\t\n\tvar NodeConnection = module.exports = function(opts) {\n\t BaseConnection.call(this, opts);\n\t var connection = this;\n\t this.on('ready', function() { connection.reportFocus(true); });\n\t}\n\t\n\t_.extend(NodeConnection.prototype, BaseConnection.prototype);\n\t\n\tNodeConnection.__proto__ = BaseConnection;\n\t\n\tNodeConnection.prototype.setupSocket = function() {\n\t var connection = this;\n\t var socket = new WebSocket(this.getUrl());\n\t socket.on('open', function() { connection.handleOpen(); });\n\t socket.on('message', function(m) { connection.handleData(m); });\n\t socket.on('close', function(code, reason) { connection.handleClose(code, reason); });\n\t socket.on('error', function() { connection.startReconnection(); });\n\t return socket;\n\t}\n\n\n/***/ },\n/* 41 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t/* WEBPACK VAR INJECTION */(function(process) {var Frame = __webpack_require__(8)\n\t , Hand = __webpack_require__(6)\n\t , Pointable = __webpack_require__(4)\n\t , Finger = __webpack_require__(5)\n\t , CircularBuffer = __webpack_require__(14)\n\t , Pipeline = __webpack_require__(43)\n\t , EventEmitter = __webpack_require__(3).EventEmitter\n\t , gestureListener = __webpack_require__(9).gestureListener\n\t , Dialog = __webpack_require__(16)\n\t , _ = __webpack_require__(1);\n\t\n\t/**\n\t * Constructs a Controller object.\n\t *\n\t * When creating a Controller object, you may optionally pass in options\n\t * to set the host , set the port, enable gestures, or select the frame event type.\n\t *\n\t * ```javascript\n\t * var controller = new Leap.Controller({\n\t * host: '127.0.0.1',\n\t * port: 6437,\n\t * enableGestures: true,\n\t * frameEventName: 'animationFrame'\n\t * });\n\t * ```\n\t *\n\t * @class Controller\n\t * @memberof Leap\n\t * @classdesc\n\t * The Controller class is your main interface to the Leap Motion Controller.\n\t *\n\t * Create an instance of this Controller class to access frames of tracking data\n\t * and configuration information. Frame data can be polled at any time using the\n\t * [Controller.frame]{@link Leap.Controller#frame}() function. Call frame() or frame(0) to get the most recent\n\t * frame. Set the history parameter to a positive integer to access previous frames.\n\t * A controller stores up to 60 frames in its frame history.\n\t *\n\t * Polling is an appropriate strategy for applications which already have an\n\t * intrinsic update loop, such as a game.\n\t *\n\t * loopWhileDisconnected defaults to true, and maintains a 60FPS frame rate even when Leap Motion is not streaming\n\t * data at that rate (such as no hands in frame). This is important for VR/WebGL apps which rely on rendering for\n\t * regular visual updates, including from other input devices. Flipping this to false should be considered an\n\t * optimization for very specific use-cases.\n\t *\n\t *\n\t */\n\t\n\t\n\tvar Controller = module.exports = function(opts) {\n\t var inNode = (typeof(process) !== 'undefined' && process.versions && process.versions.node),\n\t controller = this;\n\t\n\t opts = _.defaults(opts || {}, {\n\t inNode: inNode\n\t });\n\t\n\t this.inNode = opts.inNode;\n\t\n\t opts = _.defaults(opts || {}, {\n\t frameEventName: this.useAnimationLoop() ? 'animationFrame' : 'deviceFrame',\n\t suppressAnimationLoop: !this.useAnimationLoop(),\n\t loopWhileDisconnected: true,\n\t useAllPlugins: false,\n\t checkVersion: true\n\t });\n\t\n\t this.animationFrameRequested = false;\n\t this.onAnimationFrame = function(timestamp) {\n\t if (controller.lastConnectionFrame.valid){\n\t controller.emit('animationFrame', controller.lastConnectionFrame);\n\t }\n\t controller.emit('frameEnd', timestamp);\n\t if (\n\t controller.loopWhileDisconnected &&\n\t ( ( controller.connection.focusedState !== false ) // loop while undefined, pre-ready.\n\t || controller.connection.opts.background) ){\n\t window.requestAnimationFrame(controller.onAnimationFrame);\n\t }else{\n\t controller.animationFrameRequested = false;\n\t }\n\t };\n\t this.suppressAnimationLoop = opts.suppressAnimationLoop;\n\t this.loopWhileDisconnected = opts.loopWhileDisconnected;\n\t this.frameEventName = opts.frameEventName;\n\t this.useAllPlugins = opts.useAllPlugins;\n\t this.history = new CircularBuffer(200);\n\t this.lastFrame = Frame.Invalid;\n\t this.lastValidFrame = Frame.Invalid;\n\t this.lastConnectionFrame = Frame.Invalid;\n\t this.accumulatedGestures = [];\n\t this.checkVersion = opts.checkVersion;\n\t if (opts.connectionType === undefined) {\n\t this.connectionType = (this.inBrowser() ? __webpack_require__(39) : __webpack_require__(40));\n\t } else {\n\t this.connectionType = opts.connectionType;\n\t }\n\t this.connection = new this.connectionType(opts);\n\t this.streamingCount = 0;\n\t this.devices = {};\n\t this.plugins = {};\n\t this._pluginPipelineSteps = {};\n\t this._pluginExtendedMethods = {};\n\t if (opts.useAllPlugins) this.useRegisteredPlugins();\n\t this.setupFrameEvents(opts);\n\t this.setupConnectionEvents();\n\t \n\t this.startAnimationLoop(); // immediately when started\n\t}\n\t\n\tController.prototype.gesture = function(type, cb) {\n\t var creator = gestureListener(this, type);\n\t if (cb !== undefined) {\n\t creator.stop(cb);\n\t }\n\t return creator;\n\t}\n\t\n\t/*\n\t * @returns the controller\n\t */\n\tController.prototype.setBackground = function(state) {\n\t this.connection.setBackground(state);\n\t return this;\n\t}\n\t\n\tController.prototype.setOptimizeHMD = function(state) {\n\t this.connection.setOptimizeHMD(state);\n\t return this;\n\t}\n\t\n\tController.prototype.inBrowser = function() {\n\t return !this.inNode;\n\t}\n\t\n\tController.prototype.useAnimationLoop = function() {\n\t return this.inBrowser() && !this.inBackgroundPage();\n\t}\n\t\n\tController.prototype.inBackgroundPage = function(){\n\t // http://developer.chrome.com/extensions/extension#method-getBackgroundPage\n\t return (typeof(chrome) !== \"undefined\") &&\n\t chrome.extension &&\n\t chrome.extension.getBackgroundPage &&\n\t (chrome.extension.getBackgroundPage() === window)\n\t}\n\t\n\t/*\n\t * @returns the controller\n\t */\n\tController.prototype.connect = function() {\n\t this.connection.connect();\n\t return this;\n\t}\n\t\n\tController.prototype.streaming = function() {\n\t return this.streamingCount > 0;\n\t}\n\t\n\tController.prototype.connected = function() {\n\t return !!this.connection.connected;\n\t}\n\t\n\tController.prototype.startAnimationLoop = function(){\n\t if (!this.suppressAnimationLoop && !this.animationFrameRequested) {\n\t this.animationFrameRequested = true;\n\t window.requestAnimationFrame(this.onAnimationFrame);\n\t }\n\t}\n\t\n\t/*\n\t * @returns the controller\n\t */\n\tController.prototype.disconnect = function() {\n\t this.connection.disconnect();\n\t return this;\n\t}\n\t\n\t/**\n\t * Returns a frame of tracking data from the Leap.\n\t *\n\t * Use the optional history parameter to specify which frame to retrieve.\n\t * Call frame() or frame(0) to access the most recent frame; call frame(1) to\n\t * access the previous frame, and so on. If you use a history value greater\n\t * than the number of stored frames, then the controller returns an invalid frame.\n\t *\n\t * @method frame\n\t * @memberof Leap.Controller.prototype\n\t * @param {number} history The age of the frame to return, counting backwards from\n\t * the most recent frame (0) into the past and up to the maximum age (59).\n\t * @returns {Leap.Frame} The specified frame; or, if no history\n\t * parameter is specified, the newest frame. If a frame is not available at\n\t * the specified history position, an invalid Frame is returned.\n\t **/\n\tController.prototype.frame = function(num) {\n\t return this.history.get(num) || Frame.Invalid;\n\t}\n\t\n\tController.prototype.loop = function(callback) {\n\t if (callback) {\n\t if (typeof callback === 'function'){\n\t this.on(this.frameEventName, callback);\n\t }else{\n\t // callback is actually of the form: {eventName: callback}\n\t this.setupFrameEvents(callback);\n\t }\n\t }\n\t\n\t return this.connect();\n\t}\n\t\n\tController.prototype.addStep = function(step) {\n\t if (!this.pipeline) this.pipeline = new Pipeline(this);\n\t this.pipeline.addStep(step);\n\t}\n\t\n\t// this is run on every deviceFrame\n\tController.prototype.processFrame = function(frame) {\n\t if (frame.gestures) {\n\t this.accumulatedGestures = this.accumulatedGestures.concat(frame.gestures);\n\t }\n\t // lastConnectionFrame is used by the animation loop\n\t this.lastConnectionFrame = frame;\n\t this.startAnimationLoop(); // Only has effect if loopWhileDisconnected: false\n\t this.emit('deviceFrame', frame);\n\t}\n\t\n\t// on a this.deviceEventName (usually 'animationFrame' in browsers), this emits a 'frame'\n\tController.prototype.processFinishedFrame = function(frame) {\n\t this.lastFrame = frame;\n\t if (frame.valid) {\n\t this.lastValidFrame = frame;\n\t }\n\t frame.controller = this;\n\t frame.historyIdx = this.history.push(frame);\n\t if (frame.gestures) {\n\t frame.gestures = this.accumulatedGestures;\n\t this.accumulatedGestures = [];\n\t for (var gestureIdx = 0; gestureIdx != frame.gestures.length; gestureIdx++) {\n\t this.emit(\"gesture\", frame.gestures[gestureIdx], frame);\n\t }\n\t }\n\t if (this.pipeline) {\n\t frame = this.pipeline.run(frame);\n\t if (!frame) frame = Frame.Invalid;\n\t }\n\t this.emit('frame', frame);\n\t this.emitHandEvents(frame);\n\t}\n\t\n\t/**\n\t * The controller will emit 'hand' events for every hand on each frame. The hand in question will be passed\n\t * to the event callback.\n\t *\n\t * @param frame\n\t */\n\tController.prototype.emitHandEvents = function(frame){\n\t for (var i = 0; i < frame.hands.length; i++){\n\t this.emit('hand', frame.hands[i]);\n\t }\n\t}\n\t\n\tController.prototype.setupFrameEvents = function(opts){\n\t if (opts.frame){\n\t this.on('frame', opts.frame);\n\t }\n\t if (opts.hand){\n\t this.on('hand', opts.hand);\n\t }\n\t}\n\t\n\t/**\n\t Controller events. The old 'deviceConnected' and 'deviceDisconnected' have been depricated -\n\t use 'deviceStreaming' and 'deviceStopped' instead, except in the case of an unexpected disconnect.\n\t\n\t There are 4 pairs of device events recently added/changed:\n\t -deviceAttached/deviceRemoved - called when a device's physical connection to the computer changes\n\t -deviceStreaming/deviceStopped - called when a device is paused or resumed.\n\t -streamingStarted/streamingStopped - called when there is/is no longer at least 1 streaming device.\n\t\t\t\t\t\t\t\t\t\t Always comes after deviceStreaming.\n\t \n\t The first of all of the above event pairs is triggered as appropriate upon connection. All of\n\t these events receives an argument with the most recent info about the device that triggered it.\n\t These events will always be fired in the order they are listed here, with reverse ordering for the\n\t matching shutdown call. (ie, deviceStreaming always comes after deviceAttached, and deviceStopped \n\t will come before deviceRemoved).\n\t \n\t -deviceConnected/deviceDisconnected - These are considered deprecated and will be removed in\n\t the next revision. In contrast to the other events and in keeping with it's original behavior,\n\t it will only be fired when a device begins streaming AFTER a connection has been established.\n\t It is not paired, and receives no device info. Nearly identical functionality to\n\t streamingStarted/Stopped if you need to port.\n\t*/\n\tController.prototype.setupConnectionEvents = function() {\n\t var controller = this;\n\t this.connection.on('frame', function(frame) {\n\t controller.processFrame(frame);\n\t });\n\t // either deviceFrame or animationFrame:\n\t this.on(this.frameEventName, function(frame) {\n\t controller.processFinishedFrame(frame);\n\t });\n\t\n\t\n\t // here we backfill the 0.5.0 deviceEvents as best possible\n\t // backfill begin streaming events\n\t var backfillStreamingStartedEventsHandler = function(){\n\t if (controller.connection.opts.requestProtocolVersion < 5 && controller.streamingCount == 0){\n\t controller.streamingCount = 1;\n\t var info = {\n\t attached: true,\n\t streaming: true,\n\t type: 'unknown',\n\t id: \"Lx00000000000\"\n\t };\n\t controller.devices[info.id] = info;\n\t\n\t controller.emit('deviceAttached', info);\n\t controller.emit('deviceStreaming', info);\n\t controller.emit('streamingStarted', info);\n\t controller.connection.removeListener('frame', backfillStreamingStartedEventsHandler)\n\t }\n\t }\n\t\n\t var backfillStreamingStoppedEvents = function(){\n\t if (controller.streamingCount > 0) {\n\t for (var deviceId in controller.devices){\n\t controller.emit('deviceStopped', controller.devices[deviceId]);\n\t controller.emit('deviceRemoved', controller.devices[deviceId]);\n\t }\n\t // only emit streamingStopped once, with the last device\n\t controller.emit('streamingStopped', controller.devices[deviceId]);\n\t\n\t controller.streamingCount = 0;\n\t\n\t for (var deviceId in controller.devices){\n\t delete controller.devices[deviceId];\n\t }\n\t }\n\t }\n\t // Delegate connection events\n\t this.connection.on('focus', function() {\n\t\n\t if ( controller.loopWhileDisconnected ){\n\t\n\t controller.startAnimationLoop();\n\t\n\t }\n\t\n\t controller.emit('focus');\n\t\n\t });\n\t this.connection.on('blur', function() { controller.emit('blur') });\n\t this.connection.on('protocol', function(protocol) {\n\t\n\t protocol.on('beforeFrameCreated', function(frameData){\n\t controller.emit('beforeFrameCreated', frameData)\n\t });\n\t\n\t protocol.on('afterFrameCreated', function(frame, frameData){\n\t controller.emit('afterFrameCreated', frame, frameData)\n\t });\n\t\n\t controller.emit('protocol', protocol); \n\t });\n\t\n\t this.connection.on('ready', function() {\n\t\n\t if (controller.checkVersion && !controller.inNode){\n\t // show dialog only to web users\n\t controller.checkOutOfDate();\n\t }\n\t\n\t controller.emit('ready');\n\t });\n\t\n\t this.connection.on('connect', function() {\n\t controller.emit('connect');\n\t controller.connection.removeListener('frame', backfillStreamingStartedEventsHandler)\n\t controller.connection.on('frame', backfillStreamingStartedEventsHandler);\n\t });\n\t\n\t this.connection.on('disconnect', function() {\n\t controller.emit('disconnect');\n\t backfillStreamingStoppedEvents();\n\t });\n\t\n\t // this does not fire when the controller is manually disconnected\n\t // or for Leap Service v1.2.0+\n\t this.connection.on('deviceConnect', function(evt) {\n\t if (evt.state){\n\t controller.emit('deviceConnected');\n\t controller.connection.removeListener('frame', backfillStreamingStartedEventsHandler)\n\t controller.connection.on('frame', backfillStreamingStartedEventsHandler);\n\t }else{\n\t controller.emit('deviceDisconnected');\n\t backfillStreamingStoppedEvents();\n\t }\n\t });\n\t\n\t // Does not fire for Leap Service pre v1.2.0\n\t this.connection.on('deviceEvent', function(evt) {\n\t var info = evt.state,\n\t oldInfo = controller.devices[info.id];\n\t\n\t //Grab a list of changed properties in the device info\n\t var changed = {};\n\t for(var property in info) {\n\t //If a property i doesn't exist the cache, or has changed...\n\t if( !oldInfo || !oldInfo.hasOwnProperty(property) || oldInfo[property] != info[property] ) {\n\t changed[property] = true;\n\t }\n\t }\n\t\n\t //Update the device list\n\t controller.devices[info.id] = info;\n\t\n\t //Fire events based on change list\n\t if(changed.attached) {\n\t controller.emit(info.attached ? 'deviceAttached' : 'deviceRemoved', info);\n\t }\n\t\n\t if(!changed.streaming) return;\n\t\n\t if(info.streaming) {\n\t controller.streamingCount++;\n\t controller.emit('deviceStreaming', info);\n\t if( controller.streamingCount == 1 ) {\n\t controller.emit('streamingStarted', info);\n\t }\n\t //if attached & streaming both change to true at the same time, that device was streaming\n\t //already when we connected.\n\t if(!changed.attached) {\n\t controller.emit('deviceConnected');\n\t }\n\t }\n\t //Since when devices are attached all fields have changed, don't send events for streaming being false.\n\t else if(!(changed.attached && info.attached)) {\n\t controller.streamingCount--;\n\t controller.emit('deviceStopped', info);\n\t if(controller.streamingCount == 0){\n\t controller.emit('streamingStopped', info);\n\t }\n\t controller.emit('deviceDisconnected');\n\t }\n\t\n\t });\n\t\n\t\n\t this.on('newListener', function(event, listener) {\n\t if( event == 'deviceConnected' || event == 'deviceDisconnected' ) {\n\t console.warn(event + \" events are depricated. Consider using 'streamingStarted/streamingStopped' or 'deviceStreaming/deviceStopped' instead\");\n\t }\n\t });\n\t\n\t};\n\t\n\t\n\t\n\t\n\t// Checks if the protocol version is the latest, if if not, shows the dialog.\n\tController.prototype.checkOutOfDate = function(){\n\t console.assert(this.connection && this.connection.protocol);\n\t\n\t var serviceVersion = this.connection.protocol.serviceVersion;\n\t var protocolVersion = this.connection.protocol.version;\n\t var defaultProtocolVersion = this.connectionType.defaultProtocolVersion;\n\t\n\t if (defaultProtocolVersion > protocolVersion){\n\t\n\t console.warn(\"Your Protocol Version is v\" + protocolVersion +\n\t \", this app was designed for v\" + defaultProtocolVersion);\n\t\n\t Dialog.warnOutOfDate({\n\t sV: serviceVersion,\n\t pV: protocolVersion\n\t });\n\t return true\n\t }else{\n\t return false\n\t }\n\t\n\t};\n\t\n\t\n\t\n\tController._pluginFactories = {};\n\t\n\t/*\n\t * Registers a plugin, making is accessible to controller.use later on.\n\t *\n\t * @member plugin\n\t * @memberof Leap.Controller.prototype\n\t * @param {String} name The name of the plugin (usually camelCase).\n\t * @param {function} factory A factory method which will return an instance of a plugin.\n\t * The factory receives an optional hash of options, passed in via controller.use.\n\t *\n\t * Valid keys for the object include frame, hand, finger, tool, and pointable. The value\n\t * of each key can be either a function or an object. If given a function, that function\n\t * will be called once for every instance of the object, with that instance injected as an\n\t * argument. This allows decoration of objects with additional data:\n\t *\n\t * ```javascript\n\t * Leap.Controller.plugin('testPlugin', function(options){\n\t * return {\n\t * frame: function(frame){\n\t * frame.foo = 'bar';\n\t * }\n\t * }\n\t * });\n\t * ```\n\t *\n\t * When hand is used, the callback is called for every hand in `frame.hands`. Note that\n\t * hand objects are recreated with every new frame, so that data saved on the hand will not\n\t * persist.\n\t *\n\t * ```javascript\n\t * Leap.Controller.plugin('testPlugin', function(){\n\t * return {\n\t * hand: function(hand){\n\t * console.log('testPlugin running on hand ' + hand.id);\n\t * }\n\t * }\n\t * });\n\t * ```\n\t *\n\t * A factory can return an object to add custom functionality to Frames, Hands, or Pointables.\n\t * The methods are added directly to the object's prototype. Finger and Tool cannot be used here, Pointable\n\t * must be used instead.\n\t * This is encouraged for calculations which may not be necessary on every frame.\n\t * Memoization is also encouraged, for cases where the method may be called many times per frame by the application.\n\t *\n\t * ```javascript\n\t * // This plugin allows hand.usefulData() to be called later.\n\t * Leap.Controller.plugin('testPlugin', function(){\n\t * return {\n\t * hand: {\n\t * usefulData: function(){\n\t * console.log('usefulData on hand', this.id);\n\t * // memoize the results on to the hand, preventing repeat work:\n\t * this.x || this.x = someExpensiveCalculation();\n\t * return this.x;\n\t * }\n\t * }\n\t * }\n\t * });\n\t *\n\t * Note that the factory pattern allows encapsulation for every plugin instance.\n\t *\n\t * ```javascript\n\t * Leap.Controller.plugin('testPlugin', function(options){\n\t * options || options = {}\n\t * options.center || options.center = [0,0,0]\n\t *\n\t * privatePrintingMethod = function(){\n\t * console.log('privatePrintingMethod - options', options);\n\t * }\n\t *\n\t * return {\n\t * pointable: {\n\t * publicPrintingMethod: function(){\n\t * privatePrintingMethod();\n\t * }\n\t * }\n\t * }\n\t * });\n\t *\n\t */\n\tController.plugin = function(pluginName, factory) {\n\t if (this._pluginFactories[pluginName]) {\n\t console.warn(\"Plugin \\\"\" + pluginName + \"\\\" already registered\");\n\t }\n\t return this._pluginFactories[pluginName] = factory;\n\t};\n\t\n\t/*\n\t * Returns a list of registered plugins.\n\t * @returns {Array} Plugin Factories.\n\t */\n\tController.plugins = function() {\n\t return _.keys(this._pluginFactories);\n\t};\n\t\n\t\n\t\n\tvar setPluginCallbacks = function(pluginName, type, callback){\n\t \n\t if ( ['beforeFrameCreated', 'afterFrameCreated'].indexOf(type) != -1 ){\n\t \n\t // todo - not able to \"unuse\" a plugin currently\n\t this.on(type, callback);\n\t \n\t }else {\n\t \n\t if (!this.pipeline) this.pipeline = new Pipeline(this);\n\t \n\t if (!this._pluginPipelineSteps[pluginName]) this._pluginPipelineSteps[pluginName] = [];\n\t\n\t this._pluginPipelineSteps[pluginName].push(\n\t \n\t this.pipeline.addWrappedStep(type, callback)\n\t \n\t );\n\t \n\t }\n\t \n\t};\n\t\n\tvar setPluginMethods = function(pluginName, type, hash){\n\t var klass;\n\t \n\t if (!this._pluginExtendedMethods[pluginName]) this._pluginExtendedMethods[pluginName] = [];\n\t\n\t switch (type) {\n\t case 'frame':\n\t klass = Frame;\n\t break;\n\t case 'hand':\n\t klass = Hand;\n\t break;\n\t case 'pointable':\n\t klass = Pointable;\n\t _.extend(Finger.prototype, hash);\n\t _.extend(Finger.Invalid, hash);\n\t break;\n\t case 'finger':\n\t klass = Finger;\n\t break;\n\t default:\n\t throw pluginName + ' specifies invalid object type \"' + type + '\" for prototypical extension'\n\t }\n\t\n\t _.extend(klass.prototype, hash);\n\t _.extend(klass.Invalid, hash);\n\t this._pluginExtendedMethods[pluginName].push([klass, hash])\n\t \n\t}\n\t\n\t\n\t\n\t/*\n\t * Begin using a registered plugin. The plugin's functionality will be added to all frames\n\t * returned by the controller (and/or added to the objects within the frame).\n\t * - The order of plugin execution inside the loop will match the order in which use is called by the application.\n\t * - The plugin be run for both deviceFrames and animationFrames.\n\t *\n\t * If called a second time, the options will be merged with those of the already instantiated plugin.\n\t *\n\t * @method use\n\t * @memberOf Leap.Controller.prototype\n\t * @param pluginName\n\t * @param {Hash} Options to be passed to the plugin's factory.\n\t * @returns the controller\n\t */\n\tController.prototype.use = function(pluginName, options) {\n\t var functionOrHash, pluginFactory, key, pluginInstance;\n\t\n\t pluginFactory = (typeof pluginName == 'function') ? pluginName : Controller._pluginFactories[pluginName];\n\t\n\t if (!pluginFactory) {\n\t throw 'Leap Plugin ' + pluginName + ' not found.';\n\t }\n\t\n\t options || (options = {});\n\t\n\t if (this.plugins[pluginName]){\n\t _.extend(this.plugins[pluginName], options);\n\t return this;\n\t }\n\t\n\t this.plugins[pluginName] = options;\n\t\n\t pluginInstance = pluginFactory.call(this, options);\n\t\n\t for (key in pluginInstance) {\n\t\n\t functionOrHash = pluginInstance[key];\n\t\n\t if (typeof functionOrHash === 'function') {\n\t \n\t setPluginCallbacks.call(this, pluginName, key, functionOrHash);\n\t \n\t } else {\n\t \n\t setPluginMethods.call(this, pluginName, key, functionOrHash);\n\t \n\t }\n\t\n\t }\n\t\n\t return this;\n\t};\n\t\n\t\n\t\n\t\n\t/*\n\t * Stop using a used plugin. This will remove any of the plugin's pipeline methods (those called on every frame)\n\t * and remove any methods which extend frame-object prototypes.\n\t *\n\t * @method stopUsing\n\t * @memberOf Leap.Controller.prototype\n\t * @param pluginName\n\t * @returns the controller\n\t */\n\tController.prototype.stopUsing = function (pluginName) {\n\t var steps = this._pluginPipelineSteps[pluginName],\n\t extMethodHashes = this._pluginExtendedMethods[pluginName],\n\t i = 0, klass, extMethodHash;\n\t\n\t if (!this.plugins[pluginName]) return;\n\t\n\t if (steps) {\n\t for (i = 0; i < steps.length; i++) {\n\t this.pipeline.removeStep(steps[i]);\n\t }\n\t }\n\t\n\t if (extMethodHashes){\n\t for (i = 0; i < extMethodHashes.length; i++){\n\t klass = extMethodHashes[i][0];\n\t extMethodHash = extMethodHashes[i][1];\n\t for (var methodName in extMethodHash) {\n\t delete klass.prototype[methodName];\n\t delete klass.Invalid[methodName];\n\t }\n\t }\n\t }\n\t\n\t delete this.plugins[pluginName];\n\t\n\t return this;\n\t}\n\t\n\tController.prototype.useRegisteredPlugins = function(){\n\t for (var plugin in Controller._pluginFactories){\n\t this.use(plugin);\n\t }\n\t}\n\t\n\t\n\t_.extend(Controller.prototype, EventEmitter.prototype);\n\t\n\t/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(10)))\n\n/***/ },\n/* 42 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t/**\n\t * Leap is the global namespace of the Leap API.\n\t * @namespace Leap\n\t */\n\tmodule.exports = {\n\t Controller: __webpack_require__(41),\n\t Frame: __webpack_require__(8),\n\t Gesture: __webpack_require__(9),\n\t Hand: __webpack_require__(6),\n\t Pointable: __webpack_require__(4),\n\t Finger: __webpack_require__(5),\n\t InteractionBox: __webpack_require__(17),\n\t CircularBuffer: __webpack_require__(14),\n\t UI: __webpack_require__(44),\n\t JSONProtocol: __webpack_require__(18).JSONProtocol,\n\t glMatrix: __webpack_require__(2),\n\t mat3: __webpack_require__(2).mat3,\n\t vec3: __webpack_require__(2).vec3,\n\t loopController: undefined,\n\t version: __webpack_require__(47),\n\t\n\t /**\n\t * Expose utility libraries for convenience\n\t * Use carefully - they may be subject to upgrade or removal in different versions of LeapJS.\n\t *\n\t */\n\t _: __webpack_require__(1),\n\t EventEmitter: __webpack_require__(3).EventEmitter,\n\t\n\t /**\n\t * The Leap.loop() function passes a frame of Leap data to your\n\t * callback function and then calls window.requestAnimationFrame() after\n\t * executing your callback function.\n\t *\n\t * Leap.loop() sets up the Leap controller and WebSocket connection for you.\n\t * You do not need to create your own controller when using this method.\n\t *\n\t * Your callback function is called on an interval determined by the client\n\t * browser. Typically, this is on an interval of 60 frames/second. The most\n\t * recent frame of Leap data is passed to your callback function. If the Leap\n\t * is producing frames at a slower rate than the browser frame rate, the same\n\t * frame of Leap data can be passed to your function in successive animation\n\t * updates.\n\t *\n\t * As an alternative, you can create your own Controller object and use a\n\t * {@link Controller#onFrame onFrame} callback to process the data at\n\t * the frame rate of the Leap device. See {@link Controller} for an\n\t * example.\n\t *\n\t * @method Leap.loop\n\t * @param {function} callback A function called when the browser is ready to\n\t * draw to the screen. The most recent {@link Frame} object is passed to\n\t * your callback function.\n\t *\n\t * ```javascript\n\t * Leap.loop( function( frame ) {\n\t * // ... your code here\n\t * })\n\t * ```\n\t */\n\t loop: function(opts, callback) {\n\t if (opts && callback === undefined && ( ({}).toString.call(opts) === '[object Function]' ) ) {\n\t callback = opts;\n\t opts = {};\n\t }\n\t\n\t if (this.loopController) {\n\t if (opts){\n\t this.loopController.setupFrameEvents(opts);\n\t }\n\t }else{\n\t this.loopController = new this.Controller(opts);\n\t }\n\t\n\t this.loopController.loop(callback);\n\t return this.loopController;\n\t },\n\t\n\t /*\n\t * Convenience method for Leap.Controller.plugin\n\t */\n\t plugin: function(name, options){\n\t this.Controller.plugin(name, options)\n\t }\n\t}\n\n\n/***/ },\n/* 43 */\n/***/ function(module, exports) {\n\n\tvar Pipeline = module.exports = function (controller) {\n\t this.steps = [];\n\t this.controller = controller;\n\t}\n\t\n\tPipeline.prototype.addStep = function (step) {\n\t this.steps.push(step);\n\t}\n\t\n\tPipeline.prototype.run = function (frame) {\n\t var stepsLength = this.steps.length;\n\t for (var i = 0; i != stepsLength; i++) {\n\t if (!frame) break;\n\t frame = this.steps[i](frame);\n\t }\n\t return frame;\n\t}\n\t\n\tPipeline.prototype.removeStep = function(step){\n\t var index = this.steps.indexOf(step);\n\t if (index === -1) throw \"Step not found in pipeline\";\n\t this.steps.splice(index, 1);\n\t}\n\t\n\t/*\n\t * Wraps a plugin callback method in method which can be run inside the pipeline.\n\t * This wrapper method loops the callback over objects within the frame as is appropriate,\n\t * calling the callback for each in turn.\n\t *\n\t * @method createStepFunction\n\t * @memberOf Leap.Controller.prototype\n\t * @param {Controller} The controller on which the callback is called.\n\t * @param {String} type What frame object the callback is run for and receives.\n\t * Can be one of 'frame', 'finger', 'hand', 'pointable', 'tool'\n\t * @param {function} callback The method which will be run inside the pipeline loop. Receives one argument, such as a hand.\n\t * @private\n\t */\n\tPipeline.prototype.addWrappedStep = function (type, callback) {\n\t var controller = this.controller,\n\t step = function (frame) {\n\t var dependencies, i, len;\n\t dependencies = (type == 'frame') ? [frame] : (frame[type + 's'] || []);\n\t\n\t for (i = 0, len = dependencies.length; i < len; i++) {\n\t callback.call(controller, dependencies[i]);\n\t }\n\t\n\t return frame;\n\t };\n\t\n\t this.addStep(step);\n\t return step;\n\t};\n\n/***/ },\n/* 44 */\n/***/ function(module, exports, __webpack_require__) {\n\n\texports.UI = {\n\t Region: __webpack_require__(46),\n\t Cursor: __webpack_require__(45)\n\t};\n\n/***/ },\n/* 45 */\n/***/ function(module, exports) {\n\n\tvar Cursor = module.exports = function() {\n\t return function(frame) {\n\t var pointable = frame.pointables.sort(function(a, b) { return a.z - b.z })[0]\n\t if (pointable && pointable.valid) {\n\t frame.cursorPosition = pointable.tipPosition\n\t }\n\t return frame\n\t }\n\t}\n\n\n/***/ },\n/* 46 */\n/***/ function(module, exports, __webpack_require__) {\n\n\tvar EventEmitter = __webpack_require__(3).EventEmitter\n\t , _ = __webpack_require__(1)\n\t\n\tvar Region = module.exports = function(start, end) {\n\t this.start = new Vector(start)\n\t this.end = new Vector(end)\n\t this.enteredFrame = null\n\t}\n\t\n\tRegion.prototype.hasPointables = function(frame) {\n\t for (var i = 0; i != frame.pointables.length; i++) {\n\t var position = frame.pointables[i].tipPosition\n\t if (position.x >= this.start.x && position.x <= this.end.x && position.y >= this.start.y && position.y <= this.end.y && position.z >= this.start.z && position.z <= this.end.z) {\n\t return true\n\t }\n\t }\n\t return false\n\t}\n\t\n\tRegion.prototype.listener = function(opts) {\n\t var region = this\n\t if (opts && opts.nearThreshold) this.setupNearRegion(opts.nearThreshold)\n\t return function(frame) {\n\t return region.updatePosition(frame)\n\t }\n\t}\n\t\n\tRegion.prototype.clipper = function() {\n\t var region = this\n\t return function(frame) {\n\t region.updatePosition(frame)\n\t return region.enteredFrame ? frame : null\n\t }\n\t}\n\t\n\tRegion.prototype.setupNearRegion = function(distance) {\n\t var nearRegion = this.nearRegion = new Region(\n\t [this.start.x - distance, this.start.y - distance, this.start.z - distance],\n\t [this.end.x + distance, this.end.y + distance, this.end.z + distance]\n\t )\n\t var region = this\n\t nearRegion.on(\"enter\", function(frame) {\n\t region.emit(\"near\", frame)\n\t })\n\t nearRegion.on(\"exit\", function(frame) {\n\t region.emit(\"far\", frame)\n\t })\n\t region.on('exit', function(frame) {\n\t region.emit(\"near\", frame)\n\t })\n\t}\n\t\n\tRegion.prototype.updatePosition = function(frame) {\n\t if (this.nearRegion) this.nearRegion.updatePosition(frame)\n\t if (this.hasPointables(frame) && this.enteredFrame == null) {\n\t this.enteredFrame = frame\n\t this.emit(\"enter\", this.enteredFrame)\n\t } else if (!this.hasPointables(frame) && this.enteredFrame != null) {\n\t this.enteredFrame = null\n\t this.emit(\"exit\", this.enteredFrame)\n\t }\n\t return frame\n\t}\n\t\n\tRegion.prototype.normalize = function(position) {\n\t return new Vector([\n\t (position.x - this.start.x) / (this.end.x - this.start.x),\n\t (position.y - this.start.y) / (this.end.y - this.start.y),\n\t (position.z - this.start.z) / (this.end.z - this.start.z)\n\t ])\n\t}\n\t\n\tRegion.prototype.mapToXY = function(position, width, height) {\n\t var normalized = this.normalize(position)\n\t var x = normalized.x, y = normalized.y\n\t if (x > 1) x = 1\n\t else if (x < -1) x = -1\n\t if (y > 1) y = 1\n\t else if (y < -1) y = -1\n\t return [\n\t (x + 1) / 2 * width,\n\t (1 - y) / 2 * height,\n\t normalized.z\n\t ]\n\t}\n\t\n\t_.extend(Region.prototype, EventEmitter.prototype)\n\n/***/ },\n/* 47 */\n/***/ function(module, exports) {\n\n\t// This file is automatically updated from package.json by grunt.\n\tmodule.exports = {\n\t full: '0.6.4',\n\t major: 0,\n\t minor: 6,\n\t dot: 4\n\t}\n\n/***/ },\n/* 48 */\n/***/ function(module, exports) {\n\n\t/* WEBPACK VAR INJECTION */(function(global) {/// shim for browser packaging\n\t\n\tmodule.exports = function() {\n\t return global.WebSocket || global.MozWebSocket;\n\t}\n\t\n\t/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))\n\n/***/ },\n/* 49 */\n/***/ function(module, exports, __webpack_require__) {\n\n\tvar __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/* WEBPACK VAR INJECTION */(function(process) {/**\n\t * Tween.js - Licensed under the MIT license\n\t * https://github.com/tweenjs/tween.js\n\t * ----------------------------------------------\n\t *\n\t * See https://github.com/tweenjs/tween.js/graphs/contributors for the full list of contributors.\n\t * Thank you all, you're awesome!\n\t */\n\t\n\tvar TWEEN = TWEEN || (function () {\n\t\n\t\tvar _tweens = [];\n\t\n\t\treturn {\n\t\n\t\t\tgetAll: function () {\n\t\n\t\t\t\treturn _tweens;\n\t\n\t\t\t},\n\t\n\t\t\tremoveAll: function () {\n\t\n\t\t\t\t_tweens = [];\n\t\n\t\t\t},\n\t\n\t\t\tadd: function (tween) {\n\t\n\t\t\t\t_tweens.push(tween);\n\t\n\t\t\t},\n\t\n\t\t\tremove: function (tween) {\n\t\n\t\t\t\tvar i = _tweens.indexOf(tween);\n\t\n\t\t\t\tif (i !== -1) {\n\t\t\t\t\t_tweens.splice(i, 1);\n\t\t\t\t}\n\t\n\t\t\t},\n\t\n\t\t\tupdate: function (time, preserve) {\n\t\n\t\t\t\tif (_tweens.length === 0) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\n\t\t\t\tvar i = 0;\n\t\n\t\t\t\ttime = time !== undefined ? time : TWEEN.now();\n\t\n\t\t\t\twhile (i < _tweens.length) {\n\t\n\t\t\t\t\tif (_tweens[i].update(time) || preserve) {\n\t\t\t\t\t\ti++;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t_tweens.splice(i, 1);\n\t\t\t\t\t}\n\t\n\t\t\t\t}\n\t\n\t\t\t\treturn true;\n\t\n\t\t\t}\n\t\t};\n\t\n\t})();\n\t\n\t\n\t// Include a performance.now polyfill\n\t(function () {\n\t\t// In node.js, use process.hrtime.\n\t\tif (this.window === undefined && this.process !== undefined) {\n\t\t\tTWEEN.now = function () {\n\t\t\t\tvar time = process.hrtime();\n\t\n\t\t\t\t// Convert [seconds, microseconds] to milliseconds.\n\t\t\t\treturn time[0] * 1000 + time[1] / 1000;\n\t\t\t};\n\t\t}\n\t\t// In a browser, use window.performance.now if it is available.\n\t\telse if (this.window !== undefined &&\n\t\t window.performance !== undefined &&\n\t\t\t window.performance.now !== undefined) {\n\t\n\t\t\t// This must be bound, because directly assigning this function\n\t\t\t// leads to an invocation exception in Chrome.\n\t\t\tTWEEN.now = window.performance.now.bind(window.performance);\n\t\t}\n\t\t// Use Date.now if it is available.\n\t\telse if (Date.now !== undefined) {\n\t\t\tTWEEN.now = Date.now;\n\t\t}\n\t\t// Otherwise, use 'new Date().getTime()'.\n\t\telse {\n\t\t\tTWEEN.now = function () {\n\t\t\t\treturn new Date().getTime();\n\t\t\t};\n\t\t}\n\t})();\n\t\n\t\n\tTWEEN.Tween = function (object) {\n\t\n\t\tvar _object = object;\n\t\tvar _valuesStart = {};\n\t\tvar _valuesEnd = {};\n\t\tvar _valuesStartRepeat = {};\n\t\tvar _duration = 1000;\n\t\tvar _repeat = 0;\n\t\tvar _yoyo = false;\n\t\tvar _isPlaying = false;\n\t\tvar _reversed = false;\n\t\tvar _delayTime = 0;\n\t\tvar _startTime = null;\n\t\tvar _easingFunction = TWEEN.Easing.Linear.None;\n\t\tvar _interpolationFunction = TWEEN.Interpolation.Linear;\n\t\tvar _chainedTweens = [];\n\t\tvar _onStartCallback = null;\n\t\tvar _onStartCallbackFired = false;\n\t\tvar _onUpdateCallback = null;\n\t\tvar _onCompleteCallback = null;\n\t\tvar _onStopCallback = null;\n\t\n\t\t// Set all starting values present on the target object\n\t\tfor (var field in object) {\n\t\t\t_valuesStart[field] = parseFloat(object[field], 10);\n\t\t}\n\t\n\t\tthis.to = function (properties, duration) {\n\t\n\t\t\tif (duration !== undefined) {\n\t\t\t\t_duration = duration;\n\t\t\t}\n\t\n\t\t\t_valuesEnd = properties;\n\t\n\t\t\treturn this;\n\t\n\t\t};\n\t\n\t\tthis.start = function (time) {\n\t\n\t\t\tTWEEN.add(this);\n\t\n\t\t\t_isPlaying = true;\n\t\n\t\t\t_onStartCallbackFired = false;\n\t\n\t\t\t_startTime = time !== undefined ? time : TWEEN.now();\n\t\t\t_startTime += _delayTime;\n\t\n\t\t\tfor (var property in _valuesEnd) {\n\t\n\t\t\t\t// Check if an Array was provided as property value\n\t\t\t\tif (_valuesEnd[property] instanceof Array) {\n\t\n\t\t\t\t\tif (_valuesEnd[property].length === 0) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\n\t\t\t\t\t// Create a local copy of the Array with the start value at the front\n\t\t\t\t\t_valuesEnd[property] = [_object[property]].concat(_valuesEnd[property]);\n\t\n\t\t\t\t}\n\t\n\t\t\t\t// If `to()` specifies a property that doesn't exist in the source object,\n\t\t\t\t// we should not set that property in the object\n\t\t\t\tif (_valuesStart[property] === undefined) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\n\t\t\t\t_valuesStart[property] = _object[property];\n\t\n\t\t\t\tif ((_valuesStart[property] instanceof Array) === false) {\n\t\t\t\t\t_valuesStart[property] *= 1.0; // Ensures we're using numbers, not strings\n\t\t\t\t}\n\t\n\t\t\t\t_valuesStartRepeat[property] = _valuesStart[property] || 0;\n\t\n\t\t\t}\n\t\n\t\t\treturn this;\n\t\n\t\t};\n\t\n\t\tthis.stop = function () {\n\t\n\t\t\tif (!_isPlaying) {\n\t\t\t\treturn this;\n\t\t\t}\n\t\n\t\t\tTWEEN.remove(this);\n\t\t\t_isPlaying = false;\n\t\n\t\t\tif (_onStopCallback !== null) {\n\t\t\t\t_onStopCallback.call(_object);\n\t\t\t}\n\t\n\t\t\tthis.stopChainedTweens();\n\t\t\treturn this;\n\t\n\t\t};\n\t\n\t\tthis.stopChainedTweens = function () {\n\t\n\t\t\tfor (var i = 0, numChainedTweens = _chainedTweens.length; i < numChainedTweens; i++) {\n\t\t\t\t_chainedTweens[i].stop();\n\t\t\t}\n\t\n\t\t};\n\t\n\t\tthis.delay = function (amount) {\n\t\n\t\t\t_delayTime = amount;\n\t\t\treturn this;\n\t\n\t\t};\n\t\n\t\tthis.repeat = function (times) {\n\t\n\t\t\t_repeat = times;\n\t\t\treturn this;\n\t\n\t\t};\n\t\n\t\tthis.yoyo = function (yoyo) {\n\t\n\t\t\t_yoyo = yoyo;\n\t\t\treturn this;\n\t\n\t\t};\n\t\n\t\n\t\tthis.easing = function (easing) {\n\t\n\t\t\t_easingFunction = easing;\n\t\t\treturn this;\n\t\n\t\t};\n\t\n\t\tthis.interpolation = function (interpolation) {\n\t\n\t\t\t_interpolationFunction = interpolation;\n\t\t\treturn this;\n\t\n\t\t};\n\t\n\t\tthis.chain = function () {\n\t\n\t\t\t_chainedTweens = arguments;\n\t\t\treturn this;\n\t\n\t\t};\n\t\n\t\tthis.onStart = function (callback) {\n\t\n\t\t\t_onStartCallback = callback;\n\t\t\treturn this;\n\t\n\t\t};\n\t\n\t\tthis.onUpdate = function (callback) {\n\t\n\t\t\t_onUpdateCallback = callback;\n\t\t\treturn this;\n\t\n\t\t};\n\t\n\t\tthis.onComplete = function (callback) {\n\t\n\t\t\t_onCompleteCallback = callback;\n\t\t\treturn this;\n\t\n\t\t};\n\t\n\t\tthis.onStop = function (callback) {\n\t\n\t\t\t_onStopCallback = callback;\n\t\t\treturn this;\n\t\n\t\t};\n\t\n\t\tthis.update = function (time) {\n\t\n\t\t\tvar property;\n\t\t\tvar elapsed;\n\t\t\tvar value;\n\t\n\t\t\tif (time < _startTime) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\n\t\t\tif (_onStartCallbackFired === false) {\n\t\n\t\t\t\tif (_onStartCallback !== null) {\n\t\t\t\t\t_onStartCallback.call(_object);\n\t\t\t\t}\n\t\n\t\t\t\t_onStartCallbackFired = true;\n\t\n\t\t\t}\n\t\n\t\t\telapsed = (time - _startTime) / _duration;\n\t\t\telapsed = elapsed > 1 ? 1 : elapsed;\n\t\n\t\t\tvalue = _easingFunction(elapsed);\n\t\n\t\t\tfor (property in _valuesEnd) {\n\t\n\t\t\t\t// Don't update properties that do not exist in the source object\n\t\t\t\tif (_valuesStart[property] === undefined) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\n\t\t\t\tvar start = _valuesStart[property] || 0;\n\t\t\t\tvar end = _valuesEnd[property];\n\t\n\t\t\t\tif (end instanceof Array) {\n\t\n\t\t\t\t\t_object[property] = _interpolationFunction(end, value);\n\t\n\t\t\t\t} else {\n\t\n\t\t\t\t\t// Parses relative end values with start as base (e.g.: +10, -3)\n\t\t\t\t\tif (typeof (end) === 'string') {\n\t\n\t\t\t\t\t\tif (end.charAt(0) === '+' || end.charAt(0) === '-') {\n\t\t\t\t\t\t\tend = start + parseFloat(end, 10);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tend = parseFloat(end, 10);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\n\t\t\t\t\t// Protect against non numeric properties.\n\t\t\t\t\tif (typeof (end) === 'number') {\n\t\t\t\t\t\t_object[property] = start + (end - start) * value;\n\t\t\t\t\t}\n\t\n\t\t\t\t}\n\t\n\t\t\t}\n\t\n\t\t\tif (_onUpdateCallback !== null) {\n\t\t\t\t_onUpdateCallback.call(_object, value);\n\t\t\t}\n\t\n\t\t\tif (elapsed === 1) {\n\t\n\t\t\t\tif (_repeat > 0) {\n\t\n\t\t\t\t\tif (isFinite(_repeat)) {\n\t\t\t\t\t\t_repeat--;\n\t\t\t\t\t}\n\t\n\t\t\t\t\t// Reassign starting values, restart by making startTime = now\n\t\t\t\t\tfor (property in _valuesStartRepeat) {\n\t\n\t\t\t\t\t\tif (typeof (_valuesEnd[property]) === 'string') {\n\t\t\t\t\t\t\t_valuesStartRepeat[property] = _valuesStartRepeat[property] + parseFloat(_valuesEnd[property], 10);\n\t\t\t\t\t\t}\n\t\n\t\t\t\t\t\tif (_yoyo) {\n\t\t\t\t\t\t\tvar tmp = _valuesStartRepeat[property];\n\t\n\t\t\t\t\t\t\t_valuesStartRepeat[property] = _valuesEnd[property];\n\t\t\t\t\t\t\t_valuesEnd[property] = tmp;\n\t\t\t\t\t\t}\n\t\n\t\t\t\t\t\t_valuesStart[property] = _valuesStartRepeat[property];\n\t\n\t\t\t\t\t}\n\t\n\t\t\t\t\tif (_yoyo) {\n\t\t\t\t\t\t_reversed = !_reversed;\n\t\t\t\t\t}\n\t\n\t\t\t\t\t_startTime = time + _delayTime;\n\t\n\t\t\t\t\treturn true;\n\t\n\t\t\t\t} else {\n\t\n\t\t\t\t\tif (_onCompleteCallback !== null) {\n\t\t\t\t\t\t_onCompleteCallback.call(_object);\n\t\t\t\t\t}\n\t\n\t\t\t\t\tfor (var i = 0, numChainedTweens = _chainedTweens.length; i < numChainedTweens; i++) {\n\t\t\t\t\t\t// Make the chained tweens start exactly at the time they should,\n\t\t\t\t\t\t// even if the `update()` method was called way past the duration of the tween\n\t\t\t\t\t\t_chainedTweens[i].start(_startTime + _duration);\n\t\t\t\t\t}\n\t\n\t\t\t\t\treturn false;\n\t\n\t\t\t\t}\n\t\n\t\t\t}\n\t\n\t\t\treturn true;\n\t\n\t\t};\n\t\n\t};\n\t\n\t\n\tTWEEN.Easing = {\n\t\n\t\tLinear: {\n\t\n\t\t\tNone: function (k) {\n\t\n\t\t\t\treturn k;\n\t\n\t\t\t}\n\t\n\t\t},\n\t\n\t\tQuadratic: {\n\t\n\t\t\tIn: function (k) {\n\t\n\t\t\t\treturn k * k;\n\t\n\t\t\t},\n\t\n\t\t\tOut: function (k) {\n\t\n\t\t\t\treturn k * (2 - k);\n\t\n\t\t\t},\n\t\n\t\t\tInOut: function (k) {\n\t\n\t\t\t\tif ((k *= 2) < 1) {\n\t\t\t\t\treturn 0.5 * k * k;\n\t\t\t\t}\n\t\n\t\t\t\treturn - 0.5 * (--k * (k - 2) - 1);\n\t\n\t\t\t}\n\t\n\t\t},\n\t\n\t\tCubic: {\n\t\n\t\t\tIn: function (k) {\n\t\n\t\t\t\treturn k * k * k;\n\t\n\t\t\t},\n\t\n\t\t\tOut: function (k) {\n\t\n\t\t\t\treturn --k * k * k + 1;\n\t\n\t\t\t},\n\t\n\t\t\tInOut: function (k) {\n\t\n\t\t\t\tif ((k *= 2) < 1) {\n\t\t\t\t\treturn 0.5 * k * k * k;\n\t\t\t\t}\n\t\n\t\t\t\treturn 0.5 * ((k -= 2) * k * k + 2);\n\t\n\t\t\t}\n\t\n\t\t},\n\t\n\t\tQuartic: {\n\t\n\t\t\tIn: function (k) {\n\t\n\t\t\t\treturn k * k * k * k;\n\t\n\t\t\t},\n\t\n\t\t\tOut: function (k) {\n\t\n\t\t\t\treturn 1 - (--k * k * k * k);\n\t\n\t\t\t},\n\t\n\t\t\tInOut: function (k) {\n\t\n\t\t\t\tif ((k *= 2) < 1) {\n\t\t\t\t\treturn 0.5 * k * k * k * k;\n\t\t\t\t}\n\t\n\t\t\t\treturn - 0.5 * ((k -= 2) * k * k * k - 2);\n\t\n\t\t\t}\n\t\n\t\t},\n\t\n\t\tQuintic: {\n\t\n\t\t\tIn: function (k) {\n\t\n\t\t\t\treturn k * k * k * k * k;\n\t\n\t\t\t},\n\t\n\t\t\tOut: function (k) {\n\t\n\t\t\t\treturn --k * k * k * k * k + 1;\n\t\n\t\t\t},\n\t\n\t\t\tInOut: function (k) {\n\t\n\t\t\t\tif ((k *= 2) < 1) {\n\t\t\t\t\treturn 0.5 * k * k * k * k * k;\n\t\t\t\t}\n\t\n\t\t\t\treturn 0.5 * ((k -= 2) * k * k * k * k + 2);\n\t\n\t\t\t}\n\t\n\t\t},\n\t\n\t\tSinusoidal: {\n\t\n\t\t\tIn: function (k) {\n\t\n\t\t\t\treturn 1 - Math.cos(k * Math.PI / 2);\n\t\n\t\t\t},\n\t\n\t\t\tOut: function (k) {\n\t\n\t\t\t\treturn Math.sin(k * Math.PI / 2);\n\t\n\t\t\t},\n\t\n\t\t\tInOut: function (k) {\n\t\n\t\t\t\treturn 0.5 * (1 - Math.cos(Math.PI * k));\n\t\n\t\t\t}\n\t\n\t\t},\n\t\n\t\tExponential: {\n\t\n\t\t\tIn: function (k) {\n\t\n\t\t\t\treturn k === 0 ? 0 : Math.pow(1024, k - 1);\n\t\n\t\t\t},\n\t\n\t\t\tOut: function (k) {\n\t\n\t\t\t\treturn k === 1 ? 1 : 1 - Math.pow(2, - 10 * k);\n\t\n\t\t\t},\n\t\n\t\t\tInOut: function (k) {\n\t\n\t\t\t\tif (k === 0) {\n\t\t\t\t\treturn 0;\n\t\t\t\t}\n\t\n\t\t\t\tif (k === 1) {\n\t\t\t\t\treturn 1;\n\t\t\t\t}\n\t\n\t\t\t\tif ((k *= 2) < 1) {\n\t\t\t\t\treturn 0.5 * Math.pow(1024, k - 1);\n\t\t\t\t}\n\t\n\t\t\t\treturn 0.5 * (- Math.pow(2, - 10 * (k - 1)) + 2);\n\t\n\t\t\t}\n\t\n\t\t},\n\t\n\t\tCircular: {\n\t\n\t\t\tIn: function (k) {\n\t\n\t\t\t\treturn 1 - Math.sqrt(1 - k * k);\n\t\n\t\t\t},\n\t\n\t\t\tOut: function (k) {\n\t\n\t\t\t\treturn Math.sqrt(1 - (--k * k));\n\t\n\t\t\t},\n\t\n\t\t\tInOut: function (k) {\n\t\n\t\t\t\tif ((k *= 2) < 1) {\n\t\t\t\t\treturn - 0.5 * (Math.sqrt(1 - k * k) - 1);\n\t\t\t\t}\n\t\n\t\t\t\treturn 0.5 * (Math.sqrt(1 - (k -= 2) * k) + 1);\n\t\n\t\t\t}\n\t\n\t\t},\n\t\n\t\tElastic: {\n\t\n\t\t\tIn: function (k) {\n\t\n\t\t\t\tif (k === 0) {\n\t\t\t\t\treturn 0;\n\t\t\t\t}\n\t\n\t\t\t\tif (k === 1) {\n\t\t\t\t\treturn 1;\n\t\t\t\t}\n\t\n\t\t\t\treturn -Math.pow(2, 10 * (k - 1)) * Math.sin((k - 1.1) * 5 * Math.PI);\n\t\n\t\t\t},\n\t\n\t\t\tOut: function (k) {\n\t\n\t\t\t\tif (k === 0) {\n\t\t\t\t\treturn 0;\n\t\t\t\t}\n\t\n\t\t\t\tif (k === 1) {\n\t\t\t\t\treturn 1;\n\t\t\t\t}\n\t\n\t\t\t\treturn Math.pow(2, -10 * k) * Math.sin((k - 0.1) * 5 * Math.PI) + 1;\n\t\n\t\t\t},\n\t\n\t\t\tInOut: function (k) {\n\t\n\t\t\t\tif (k === 0) {\n\t\t\t\t\treturn 0;\n\t\t\t\t}\n\t\n\t\t\t\tif (k === 1) {\n\t\t\t\t\treturn 1;\n\t\t\t\t}\n\t\n\t\t\t\tk *= 2;\n\t\n\t\t\t\tif (k < 1) {\n\t\t\t\t\treturn -0.5 * Math.pow(2, 10 * (k - 1)) * Math.sin((k - 1.1) * 5 * Math.PI);\n\t\t\t\t}\n\t\n\t\t\t\treturn 0.5 * Math.pow(2, -10 * (k - 1)) * Math.sin((k - 1.1) * 5 * Math.PI) + 1;\n\t\n\t\t\t}\n\t\n\t\t},\n\t\n\t\tBack: {\n\t\n\t\t\tIn: function (k) {\n\t\n\t\t\t\tvar s = 1.70158;\n\t\n\t\t\t\treturn k * k * ((s + 1) * k - s);\n\t\n\t\t\t},\n\t\n\t\t\tOut: function (k) {\n\t\n\t\t\t\tvar s = 1.70158;\n\t\n\t\t\t\treturn --k * k * ((s + 1) * k + s) + 1;\n\t\n\t\t\t},\n\t\n\t\t\tInOut: function (k) {\n\t\n\t\t\t\tvar s = 1.70158 * 1.525;\n\t\n\t\t\t\tif ((k *= 2) < 1) {\n\t\t\t\t\treturn 0.5 * (k * k * ((s + 1) * k - s));\n\t\t\t\t}\n\t\n\t\t\t\treturn 0.5 * ((k -= 2) * k * ((s + 1) * k + s) + 2);\n\t\n\t\t\t}\n\t\n\t\t},\n\t\n\t\tBounce: {\n\t\n\t\t\tIn: function (k) {\n\t\n\t\t\t\treturn 1 - TWEEN.Easing.Bounce.Out(1 - k);\n\t\n\t\t\t},\n\t\n\t\t\tOut: function (k) {\n\t\n\t\t\t\tif (k < (1 / 2.75)) {\n\t\t\t\t\treturn 7.5625 * k * k;\n\t\t\t\t} else if (k < (2 / 2.75)) {\n\t\t\t\t\treturn 7.5625 * (k -= (1.5 / 2.75)) * k + 0.75;\n\t\t\t\t} else if (k < (2.5 / 2.75)) {\n\t\t\t\t\treturn 7.5625 * (k -= (2.25 / 2.75)) * k + 0.9375;\n\t\t\t\t} else {\n\t\t\t\t\treturn 7.5625 * (k -= (2.625 / 2.75)) * k + 0.984375;\n\t\t\t\t}\n\t\n\t\t\t},\n\t\n\t\t\tInOut: function (k) {\n\t\n\t\t\t\tif (k < 0.5) {\n\t\t\t\t\treturn TWEEN.Easing.Bounce.In(k * 2) * 0.5;\n\t\t\t\t}\n\t\n\t\t\t\treturn TWEEN.Easing.Bounce.Out(k * 2 - 1) * 0.5 + 0.5;\n\t\n\t\t\t}\n\t\n\t\t}\n\t\n\t};\n\t\n\tTWEEN.Interpolation = {\n\t\n\t\tLinear: function (v, k) {\n\t\n\t\t\tvar m = v.length - 1;\n\t\t\tvar f = m * k;\n\t\t\tvar i = Math.floor(f);\n\t\t\tvar fn = TWEEN.Interpolation.Utils.Linear;\n\t\n\t\t\tif (k < 0) {\n\t\t\t\treturn fn(v[0], v[1], f);\n\t\t\t}\n\t\n\t\t\tif (k > 1) {\n\t\t\t\treturn fn(v[m], v[m - 1], m - f);\n\t\t\t}\n\t\n\t\t\treturn fn(v[i], v[i + 1 > m ? m : i + 1], f - i);\n\t\n\t\t},\n\t\n\t\tBezier: function (v, k) {\n\t\n\t\t\tvar b = 0;\n\t\t\tvar n = v.length - 1;\n\t\t\tvar pw = Math.pow;\n\t\t\tvar bn = TWEEN.Interpolation.Utils.Bernstein;\n\t\n\t\t\tfor (var i = 0; i <= n; i++) {\n\t\t\t\tb += pw(1 - k, n - i) * pw(k, i) * v[i] * bn(n, i);\n\t\t\t}\n\t\n\t\t\treturn b;\n\t\n\t\t},\n\t\n\t\tCatmullRom: function (v, k) {\n\t\n\t\t\tvar m = v.length - 1;\n\t\t\tvar f = m * k;\n\t\t\tvar i = Math.floor(f);\n\t\t\tvar fn = TWEEN.Interpolation.Utils.CatmullRom;\n\t\n\t\t\tif (v[0] === v[m]) {\n\t\n\t\t\t\tif (k < 0) {\n\t\t\t\t\ti = Math.floor(f = m * (1 + k));\n\t\t\t\t}\n\t\n\t\t\t\treturn fn(v[(i - 1 + m) % m], v[i], v[(i + 1) % m], v[(i + 2) % m], f - i);\n\t\n\t\t\t} else {\n\t\n\t\t\t\tif (k < 0) {\n\t\t\t\t\treturn v[0] - (fn(v[0], v[0], v[1], v[1], -f) - v[0]);\n\t\t\t\t}\n\t\n\t\t\t\tif (k > 1) {\n\t\t\t\t\treturn v[m] - (fn(v[m], v[m], v[m - 1], v[m - 1], f - m) - v[m]);\n\t\t\t\t}\n\t\n\t\t\t\treturn fn(v[i ? i - 1 : 0], v[i], v[m < i + 1 ? m : i + 1], v[m < i + 2 ? m : i + 2], f - i);\n\t\n\t\t\t}\n\t\n\t\t},\n\t\n\t\tUtils: {\n\t\n\t\t\tLinear: function (p0, p1, t) {\n\t\n\t\t\t\treturn (p1 - p0) * t + p0;\n\t\n\t\t\t},\n\t\n\t\t\tBernstein: function (n, i) {\n\t\n\t\t\t\tvar fc = TWEEN.Interpolation.Utils.Factorial;\n\t\n\t\t\t\treturn fc(n) / fc(i) / fc(n - i);\n\t\n\t\t\t},\n\t\n\t\t\tFactorial: (function () {\n\t\n\t\t\t\tvar a = [1];\n\t\n\t\t\t\treturn function (n) {\n\t\n\t\t\t\t\tvar s = 1;\n\t\n\t\t\t\t\tif (a[n]) {\n\t\t\t\t\t\treturn a[n];\n\t\t\t\t\t}\n\t\n\t\t\t\t\tfor (var i = n; i > 1; i--) {\n\t\t\t\t\t\ts *= i;\n\t\t\t\t\t}\n\t\n\t\t\t\t\ta[n] = s;\n\t\t\t\t\treturn s;\n\t\n\t\t\t\t};\n\t\n\t\t\t})(),\n\t\n\t\t\tCatmullRom: function (p0, p1, p2, p3, t) {\n\t\n\t\t\t\tvar v0 = (p2 - p0) * 0.5;\n\t\t\t\tvar v1 = (p3 - p1) * 0.5;\n\t\t\t\tvar t2 = t * t;\n\t\t\t\tvar t3 = t * t2;\n\t\n\t\t\t\treturn (2 * p1 - 2 * p2 + v0 + v1) * t3 + (- 3 * p1 + 3 * p2 - 2 * v0 - v1) * t2 + v0 * t + p1;\n\t\n\t\t\t}\n\t\n\t\t}\n\t\n\t};\n\t\n\t// UMD (Universal Module Definition)\n\t(function (root) {\n\t\n\t\tif (true) {\n\t\n\t\t\t// AMD\n\t\t\t!(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = function () {\n\t\t\t\treturn TWEEN;\n\t\t\t}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\n\t\n\t\t} else if (typeof module !== 'undefined' && typeof exports === 'object') {\n\t\n\t\t\t// Node.js\n\t\t\tmodule.exports = TWEEN;\n\t\n\t\t} else if (root !== undefined) {\n\t\n\t\t\t// Global variable\n\t\t\troot.TWEEN = TWEEN;\n\t\n\t\t}\n\t\n\t})(this);\n\t\n\t/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(10)))\n\n/***/ }\n/******/ ]);\n\n\n/** WEBPACK FOOTER **\n ** build/bundle.js\n **/"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n/** WEBPACK FOOTER **\n ** webpack/bootstrap 110861404e1422b5c590\n **/","// Underscore.js 1.4.4\n// http://underscorejs.org\n// (c) 2009-2013 Jeremy Ashkenas, DocumentCloud Inc.\n// Underscore may be freely distributed under the MIT license.\n\n(function() {\n\n // Baseline setup\n // --------------\n\n // Establish the root object, `window` in the browser, or `global` on the server.\n var root = this;\n\n // Save the previous value of the `_` variable.\n var previousUnderscore = root._;\n\n // Establish the object that gets returned to break out of a loop iteration.\n var breaker = {};\n\n // Save bytes in the minified (but not gzipped) version:\n var ArrayProto = Array.prototype, ObjProto = Object.prototype, FuncProto = Function.prototype;\n\n // Create quick reference variables for speed access to core prototypes.\n var push = ArrayProto.push,\n slice = ArrayProto.slice,\n concat = ArrayProto.concat,\n toString = ObjProto.toString,\n hasOwnProperty = ObjProto.hasOwnProperty;\n\n // All **ECMAScript 5** native function implementations that we hope to use\n // are declared here.\n var\n nativeForEach = ArrayProto.forEach,\n nativeMap = ArrayProto.map,\n nativeReduce = ArrayProto.reduce,\n nativeReduceRight = ArrayProto.reduceRight,\n nativeFilter = ArrayProto.filter,\n nativeEvery = ArrayProto.every,\n nativeSome = ArrayProto.some,\n nativeIndexOf = ArrayProto.indexOf,\n nativeLastIndexOf = ArrayProto.lastIndexOf,\n nativeIsArray = Array.isArray,\n nativeKeys = Object.keys,\n nativeBind = FuncProto.bind;\n\n // Create a safe reference to the Underscore object for use below.\n var _ = function(obj) {\n if (obj instanceof _) return obj;\n if (!(this instanceof _)) return new _(obj);\n this._wrapped = obj;\n };\n\n // Export the Underscore object for **Node.js**, with\n // backwards-compatibility for the old `require()` API. If we're in\n // the browser, add `_` as a global object via a string identifier,\n // for Closure Compiler \"advanced\" mode.\n if (typeof exports !== 'undefined') {\n if (typeof module !== 'undefined' && module.exports) {\n exports = module.exports = _;\n }\n exports._ = _;\n } else {\n root._ = _;\n }\n\n // Current version.\n _.VERSION = '1.4.4';\n\n // Collection Functions\n // --------------------\n\n // The cornerstone, an `each` implementation, aka `forEach`.\n // Handles objects with the built-in `forEach`, arrays, and raw objects.\n // Delegates to **ECMAScript 5**'s native `forEach` if available.\n var each = _.each = _.forEach = function(obj, iterator, context) {\n if (obj == null) return;\n if (nativeForEach && obj.forEach === nativeForEach) {\n obj.forEach(iterator, context);\n } else if (obj.length === +obj.length) {\n for (var i = 0, l = obj.length; i < l; i++) {\n if (iterator.call(context, obj[i], i, obj) === breaker) return;\n }\n } else {\n for (var key in obj) {\n if (_.has(obj, key)) {\n if (iterator.call(context, obj[key], key, obj) === breaker) return;\n }\n }\n }\n };\n\n // Return the results of applying the iterator to each element.\n // Delegates to **ECMAScript 5**'s native `map` if available.\n _.map = _.collect = function(obj, iterator, context) {\n var results = [];\n if (obj == null) return results;\n if (nativeMap && obj.map === nativeMap) return obj.map(iterator, context);\n each(obj, function(value, index, list) {\n results[results.length] = iterator.call(context, value, index, list);\n });\n return results;\n };\n\n var reduceError = 'Reduce of empty array with no initial value';\n\n // **Reduce** builds up a single result from a list of values, aka `inject`,\n // or `foldl`. Delegates to **ECMAScript 5**'s native `reduce` if available.\n _.reduce = _.foldl = _.inject = function(obj, iterator, memo, context) {\n var initial = arguments.length > 2;\n if (obj == null) obj = [];\n if (nativeReduce && obj.reduce === nativeReduce) {\n if (context) iterator = _.bind(iterator, context);\n return initial ? obj.reduce(iterator, memo) : obj.reduce(iterator);\n }\n each(obj, function(value, index, list) {\n if (!initial) {\n memo = value;\n initial = true;\n } else {\n memo = iterator.call(context, memo, value, index, list);\n }\n });\n if (!initial) throw new TypeError(reduceError);\n return memo;\n };\n\n // The right-associative version of reduce, also known as `foldr`.\n // Delegates to **ECMAScript 5**'s native `reduceRight` if available.\n _.reduceRight = _.foldr = function(obj, iterator, memo, context) {\n var initial = arguments.length > 2;\n if (obj == null) obj = [];\n if (nativeReduceRight && obj.reduceRight === nativeReduceRight) {\n if (context) iterator = _.bind(iterator, context);\n return initial ? obj.reduceRight(iterator, memo) : obj.reduceRight(iterator);\n }\n var length = obj.length;\n if (length !== +length) {\n var keys = _.keys(obj);\n length = keys.length;\n }\n each(obj, function(value, index, list) {\n index = keys ? keys[--length] : --length;\n if (!initial) {\n memo = obj[index];\n initial = true;\n } else {\n memo = iterator.call(context, memo, obj[index], index, list);\n }\n });\n if (!initial) throw new TypeError(reduceError);\n return memo;\n };\n\n // Return the first value which passes a truth test. Aliased as `detect`.\n _.find = _.detect = function(obj, iterator, context) {\n var result;\n any(obj, function(value, index, list) {\n if (iterator.call(context, value, index, list)) {\n result = value;\n return true;\n }\n });\n return result;\n };\n\n // Return all the elements that pass a truth test.\n // Delegates to **ECMAScript 5**'s native `filter` if available.\n // Aliased as `select`.\n _.filter = _.select = function(obj, iterator, context) {\n var results = [];\n if (obj == null) return results;\n if (nativeFilter && obj.filter === nativeFilter) return obj.filter(iterator, context);\n each(obj, function(value, index, list) {\n if (iterator.call(context, value, index, list)) results[results.length] = value;\n });\n return results;\n };\n\n // Return all the elements for which a truth test fails.\n _.reject = function(obj, iterator, context) {\n return _.filter(obj, function(value, index, list) {\n return !iterator.call(context, value, index, list);\n }, context);\n };\n\n // Determine whether all of the elements match a truth test.\n // Delegates to **ECMAScript 5**'s native `every` if available.\n // Aliased as `all`.\n _.every = _.all = function(obj, iterator, context) {\n iterator || (iterator = _.identity);\n var result = true;\n if (obj == null) return result;\n if (nativeEvery && obj.every === nativeEvery) return obj.every(iterator, context);\n each(obj, function(value, index, list) {\n if (!(result = result && iterator.call(context, value, index, list))) return breaker;\n });\n return !!result;\n };\n\n // Determine if at least one element in the object matches a truth test.\n // Delegates to **ECMAScript 5**'s native `some` if available.\n // Aliased as `any`.\n var any = _.some = _.any = function(obj, iterator, context) {\n iterator || (iterator = _.identity);\n var result = false;\n if (obj == null) return result;\n if (nativeSome && obj.some === nativeSome) return obj.some(iterator, context);\n each(obj, function(value, index, list) {\n if (result || (result = iterator.call(context, value, index, list))) return breaker;\n });\n return !!result;\n };\n\n // Determine if the array or object contains a given value (using `===`).\n // Aliased as `include`.\n _.contains = _.include = function(obj, target) {\n if (obj == null) return false;\n if (nativeIndexOf && obj.indexOf === nativeIndexOf) return obj.indexOf(target) != -1;\n return any(obj, function(value) {\n return value === target;\n });\n };\n\n // Invoke a method (with arguments) on every item in a collection.\n _.invoke = function(obj, method) {\n var args = slice.call(arguments, 2);\n var isFunc = _.isFunction(method);\n return _.map(obj, function(value) {\n return (isFunc ? method : value[method]).apply(value, args);\n });\n };\n\n // Convenience version of a common use case of `map`: fetching a property.\n _.pluck = function(obj, key) {\n return _.map(obj, function(value){ return value[key]; });\n };\n\n // Convenience version of a common use case of `filter`: selecting only objects\n // containing specific `key:value` pairs.\n _.where = function(obj, attrs, first) {\n if (_.isEmpty(attrs)) return first ? null : [];\n return _[first ? 'find' : 'filter'](obj, function(value) {\n for (var key in attrs) {\n if (attrs[key] !== value[key]) return false;\n }\n return true;\n });\n };\n\n // Convenience version of a common use case of `find`: getting the first object\n // containing specific `key:value` pairs.\n _.findWhere = function(obj, attrs) {\n return _.where(obj, attrs, true);\n };\n\n // Return the maximum element or (element-based computation).\n // Can't optimize arrays of integers longer than 65,535 elements.\n // See: https://bugs.webkit.org/show_bug.cgi?id=80797\n _.max = function(obj, iterator, context) {\n if (!iterator && _.isArray(obj) && obj[0] === +obj[0] && obj.length < 65535) {\n return Math.max.apply(Math, obj);\n }\n if (!iterator && _.isEmpty(obj)) return -Infinity;\n var result = {computed : -Infinity, value: -Infinity};\n each(obj, function(value, index, list) {\n var computed = iterator ? iterator.call(context, value, index, list) : value;\n computed >= result.computed && (result = {value : value, computed : computed});\n });\n return result.value;\n };\n\n // Return the minimum element (or element-based computation).\n _.min = function(obj, iterator, context) {\n if (!iterator && _.isArray(obj) && obj[0] === +obj[0] && obj.length < 65535) {\n return Math.min.apply(Math, obj);\n }\n if (!iterator && _.isEmpty(obj)) return Infinity;\n var result = {computed : Infinity, value: Infinity};\n each(obj, function(value, index, list) {\n var computed = iterator ? iterator.call(context, value, index, list) : value;\n computed < result.computed && (result = {value : value, computed : computed});\n });\n return result.value;\n };\n\n // Shuffle an array.\n _.shuffle = function(obj) {\n var rand;\n var index = 0;\n var shuffled = [];\n each(obj, function(value) {\n rand = _.random(index++);\n shuffled[index - 1] = shuffled[rand];\n shuffled[rand] = value;\n });\n return shuffled;\n };\n\n // An internal function to generate lookup iterators.\n var lookupIterator = function(value) {\n return _.isFunction(value) ? value : function(obj){ return obj[value]; };\n };\n\n // Sort the object's values by a criterion produced by an iterator.\n _.sortBy = function(obj, value, context) {\n var iterator = lookupIterator(value);\n return _.pluck(_.map(obj, function(value, index, list) {\n return {\n value : value,\n index : index,\n criteria : iterator.call(context, value, index, list)\n };\n }).sort(function(left, right) {\n var a = left.criteria;\n var b = right.criteria;\n if (a !== b) {\n if (a > b || a === void 0) return 1;\n if (a < b || b === void 0) return -1;\n }\n return left.index < right.index ? -1 : 1;\n }), 'value');\n };\n\n // An internal function used for aggregate \"group by\" operations.\n var group = function(obj, value, context, behavior) {\n var result = {};\n var iterator = lookupIterator(value || _.identity);\n each(obj, function(value, index) {\n var key = iterator.call(context, value, index, obj);\n behavior(result, key, value);\n });\n return result;\n };\n\n // Groups the object's values by a criterion. Pass either a string attribute\n // to group by, or a function that returns the criterion.\n _.groupBy = function(obj, value, context) {\n return group(obj, value, context, function(result, key, value) {\n (_.has(result, key) ? result[key] : (result[key] = [])).push(value);\n });\n };\n\n // Counts instances of an object that group by a certain criterion. Pass\n // either a string attribute to count by, or a function that returns the\n // criterion.\n _.countBy = function(obj, value, context) {\n return group(obj, value, context, function(result, key) {\n if (!_.has(result, key)) result[key] = 0;\n result[key]++;\n });\n };\n\n // Use a comparator function to figure out the smallest index at which\n // an object should be inserted so as to maintain order. Uses binary search.\n _.sortedIndex = function(array, obj, iterator, context) {\n iterator = iterator == null ? _.identity : lookupIterator(iterator);\n var value = iterator.call(context, obj);\n var low = 0, high = array.length;\n while (low < high) {\n var mid = (low + high) >>> 1;\n iterator.call(context, array[mid]) < value ? low = mid + 1 : high = mid;\n }\n return low;\n };\n\n // Safely convert anything iterable into a real, live array.\n _.toArray = function(obj) {\n if (!obj) return [];\n if (_.isArray(obj)) return slice.call(obj);\n if (obj.length === +obj.length) return _.map(obj, _.identity);\n return _.values(obj);\n };\n\n // Return the number of elements in an object.\n _.size = function(obj) {\n if (obj == null) return 0;\n return (obj.length === +obj.length) ? obj.length : _.keys(obj).length;\n };\n\n // Array Functions\n // ---------------\n\n // Get the first element of an array. Passing **n** will return the first N\n // values in the array. Aliased as `head` and `take`. The **guard** check\n // allows it to work with `_.map`.\n _.first = _.head = _.take = function(array, n, guard) {\n if (array == null) return void 0;\n return (n != null) && !guard ? slice.call(array, 0, n) : array[0];\n };\n\n // Returns everything but the last entry of the array. Especially useful on\n // the arguments object. Passing **n** will return all the values in\n // the array, excluding the last N. The **guard** check allows it to work with\n // `_.map`.\n _.initial = function(array, n, guard) {\n return slice.call(array, 0, array.length - ((n == null) || guard ? 1 : n));\n };\n\n // Get the last element of an array. Passing **n** will return the last N\n // values in the array. The **guard** check allows it to work with `_.map`.\n _.last = function(array, n, guard) {\n if (array == null) return void 0;\n if ((n != null) && !guard) {\n return slice.call(array, Math.max(array.length - n, 0));\n } else {\n return array[array.length - 1];\n }\n };\n\n // Returns everything but the first entry of the array. Aliased as `tail` and `drop`.\n // Especially useful on the arguments object. Passing an **n** will return\n // the rest N values in the array. The **guard**\n // check allows it to work with `_.map`.\n _.rest = _.tail = _.drop = function(array, n, guard) {\n return slice.call(array, (n == null) || guard ? 1 : n);\n };\n\n // Trim out all falsy values from an array.\n _.compact = function(array) {\n return _.filter(array, _.identity);\n };\n\n // Internal implementation of a recursive `flatten` function.\n var flatten = function(input, shallow, output) {\n each(input, function(value) {\n if (_.isArray(value)) {\n shallow ? push.apply(output, value) : flatten(value, shallow, output);\n } else {\n output.push(value);\n }\n });\n return output;\n };\n\n // Return a completely flattened version of an array.\n _.flatten = function(array, shallow) {\n return flatten(array, shallow, []);\n };\n\n // Return a version of the array that does not contain the specified value(s).\n _.without = function(array) {\n return _.difference(array, slice.call(arguments, 1));\n };\n\n // Produce a duplicate-free version of the array. If the array has already\n // been sorted, you have the option of using a faster algorithm.\n // Aliased as `unique`.\n _.uniq = _.unique = function(array, isSorted, iterator, context) {\n if (_.isFunction(isSorted)) {\n context = iterator;\n iterator = isSorted;\n isSorted = false;\n }\n var initial = iterator ? _.map(array, iterator, context) : array;\n var results = [];\n var seen = [];\n each(initial, function(value, index) {\n if (isSorted ? (!index || seen[seen.length - 1] !== value) : !_.contains(seen, value)) {\n seen.push(value);\n results.push(array[index]);\n }\n });\n return results;\n };\n\n // Produce an array that contains the union: each distinct element from all of\n // the passed-in arrays.\n _.union = function() {\n return _.uniq(concat.apply(ArrayProto, arguments));\n };\n\n // Produce an array that contains every item shared between all the\n // passed-in arrays.\n _.intersection = function(array) {\n var rest = slice.call(arguments, 1);\n return _.filter(_.uniq(array), function(item) {\n return _.every(rest, function(other) {\n return _.indexOf(other, item) >= 0;\n });\n });\n };\n\n // Take the difference between one array and a number of other arrays.\n // Only the elements present in just the first array will remain.\n _.difference = function(array) {\n var rest = concat.apply(ArrayProto, slice.call(arguments, 1));\n return _.filter(array, function(value){ return !_.contains(rest, value); });\n };\n\n // Zip together multiple lists into a single array -- elements that share\n // an index go together.\n _.zip = function() {\n var args = slice.call(arguments);\n var length = _.max(_.pluck(args, 'length'));\n var results = new Array(length);\n for (var i = 0; i < length; i++) {\n results[i] = _.pluck(args, \"\" + i);\n }\n return results;\n };\n\n // Converts lists into objects. Pass either a single array of `[key, value]`\n // pairs, or two parallel arrays of the same length -- one of keys, and one of\n // the corresponding values.\n _.object = function(list, values) {\n if (list == null) return {};\n var result = {};\n for (var i = 0, l = list.length; i < l; i++) {\n if (values) {\n result[list[i]] = values[i];\n } else {\n result[list[i][0]] = list[i][1];\n }\n }\n return result;\n };\n\n // If the browser doesn't supply us with indexOf (I'm looking at you, **MSIE**),\n // we need this function. Return the position of the first occurrence of an\n // item in an array, or -1 if the item is not included in the array.\n // Delegates to **ECMAScript 5**'s native `indexOf` if available.\n // If the array is large and already in sort order, pass `true`\n // for **isSorted** to use binary search.\n _.indexOf = function(array, item, isSorted) {\n if (array == null) return -1;\n var i = 0, l = array.length;\n if (isSorted) {\n if (typeof isSorted == 'number') {\n i = (isSorted < 0 ? Math.max(0, l + isSorted) : isSorted);\n } else {\n i = _.sortedIndex(array, item);\n return array[i] === item ? i : -1;\n }\n }\n if (nativeIndexOf && array.indexOf === nativeIndexOf) return array.indexOf(item, isSorted);\n for (; i < l; i++) if (array[i] === item) return i;\n return -1;\n };\n\n // Delegates to **ECMAScript 5**'s native `lastIndexOf` if available.\n _.lastIndexOf = function(array, item, from) {\n if (array == null) return -1;\n var hasIndex = from != null;\n if (nativeLastIndexOf && array.lastIndexOf === nativeLastIndexOf) {\n return hasIndex ? array.lastIndexOf(item, from) : array.lastIndexOf(item);\n }\n var i = (hasIndex ? from : array.length);\n while (i--) if (array[i] === item) return i;\n return -1;\n };\n\n // Generate an integer Array containing an arithmetic progression. A port of\n // the native Python `range()` function. See\n // [the Python documentation](http://docs.python.org/library/functions.html#range).\n _.range = function(start, stop, step) {\n if (arguments.length <= 1) {\n stop = start || 0;\n start = 0;\n }\n step = arguments[2] || 1;\n\n var len = Math.max(Math.ceil((stop - start) / step), 0);\n var idx = 0;\n var range = new Array(len);\n\n while(idx < len) {\n range[idx++] = start;\n start += step;\n }\n\n return range;\n };\n\n // Function (ahem) Functions\n // ------------------\n\n // Create a function bound to a given object (assigning `this`, and arguments,\n // optionally). Delegates to **ECMAScript 5**'s native `Function.bind` if\n // available.\n _.bind = function(func, context) {\n if (func.bind === nativeBind && nativeBind) return nativeBind.apply(func, slice.call(arguments, 1));\n var args = slice.call(arguments, 2);\n return function() {\n return func.apply(context, args.concat(slice.call(arguments)));\n };\n };\n\n // Partially apply a function by creating a version that has had some of its\n // arguments pre-filled, without changing its dynamic `this` context.\n _.partial = function(func) {\n var args = slice.call(arguments, 1);\n return function() {\n return func.apply(this, args.concat(slice.call(arguments)));\n };\n };\n\n // Bind all of an object's methods to that object. Useful for ensuring that\n // all callbacks defined on an object belong to it.\n _.bindAll = function(obj) {\n var funcs = slice.call(arguments, 1);\n if (funcs.length === 0) funcs = _.functions(obj);\n each(funcs, function(f) { obj[f] = _.bind(obj[f], obj); });\n return obj;\n };\n\n // Memoize an expensive function by storing its results.\n _.memoize = function(func, hasher) {\n var memo = {};\n hasher || (hasher = _.identity);\n return function() {\n var key = hasher.apply(this, arguments);\n return _.has(memo, key) ? memo[key] : (memo[key] = func.apply(this, arguments));\n };\n };\n\n // Delays a function for the given number of milliseconds, and then calls\n // it with the arguments supplied.\n _.delay = function(func, wait) {\n var args = slice.call(arguments, 2);\n return setTimeout(function(){ return func.apply(null, args); }, wait);\n };\n\n // Defers a function, scheduling it to run after the current call stack has\n // cleared.\n _.defer = function(func) {\n return _.delay.apply(_, [func, 1].concat(slice.call(arguments, 1)));\n };\n\n // Returns a function, that, when invoked, will only be triggered at most once\n // during a given window of time.\n _.throttle = function(func, wait) {\n var context, args, timeout, result;\n var previous = 0;\n var later = function() {\n previous = new Date;\n timeout = null;\n result = func.apply(context, args);\n };\n return function() {\n var now = new Date;\n var remaining = wait - (now - previous);\n context = this;\n args = arguments;\n if (remaining <= 0) {\n clearTimeout(timeout);\n timeout = null;\n previous = now;\n result = func.apply(context, args);\n } else if (!timeout) {\n timeout = setTimeout(later, remaining);\n }\n return result;\n };\n };\n\n // Returns a function, that, as long as it continues to be invoked, will not\n // be triggered. The function will be called after it stops being called for\n // N milliseconds. If `immediate` is passed, trigger the function on the\n // leading edge, instead of the trailing.\n _.debounce = function(func, wait, immediate) {\n var timeout, result;\n return function() {\n var context = this, args = arguments;\n var later = function() {\n timeout = null;\n if (!immediate) result = func.apply(context, args);\n };\n var callNow = immediate && !timeout;\n clearTimeout(timeout);\n timeout = setTimeout(later, wait);\n if (callNow) result = func.apply(context, args);\n return result;\n };\n };\n\n // Returns a function that will be executed at most one time, no matter how\n // often you call it. Useful for lazy initialization.\n _.once = function(func) {\n var ran = false, memo;\n return function() {\n if (ran) return memo;\n ran = true;\n memo = func.apply(this, arguments);\n func = null;\n return memo;\n };\n };\n\n // Returns the first function passed as an argument to the second,\n // allowing you to adjust arguments, run code before and after, and\n // conditionally execute the original function.\n _.wrap = function(func, wrapper) {\n return function() {\n var args = [func];\n push.apply(args, arguments);\n return wrapper.apply(this, args);\n };\n };\n\n // Returns a function that is the composition of a list of functions, each\n // consuming the return value of the function that follows.\n _.compose = function() {\n var funcs = arguments;\n return function() {\n var args = arguments;\n for (var i = funcs.length - 1; i >= 0; i--) {\n args = [funcs[i].apply(this, args)];\n }\n return args[0];\n };\n };\n\n // Returns a function that will only be executed after being called N times.\n _.after = function(times, func) {\n if (times <= 0) return func();\n return function() {\n if (--times < 1) {\n return func.apply(this, arguments);\n }\n };\n };\n\n // Object Functions\n // ----------------\n\n // Retrieve the names of an object's properties.\n // Delegates to **ECMAScript 5**'s native `Object.keys`\n _.keys = nativeKeys || function(obj) {\n if (obj !== Object(obj)) throw new TypeError('Invalid object');\n var keys = [];\n for (var key in obj) if (_.has(obj, key)) keys[keys.length] = key;\n return keys;\n };\n\n // Retrieve the values of an object's properties.\n _.values = function(obj) {\n var values = [];\n for (var key in obj) if (_.has(obj, key)) values.push(obj[key]);\n return values;\n };\n\n // Convert an object into a list of `[key, value]` pairs.\n _.pairs = function(obj) {\n var pairs = [];\n for (var key in obj) if (_.has(obj, key)) pairs.push([key, obj[key]]);\n return pairs;\n };\n\n // Invert the keys and values of an object. The values must be serializable.\n _.invert = function(obj) {\n var result = {};\n for (var key in obj) if (_.has(obj, key)) result[obj[key]] = key;\n return result;\n };\n\n // Return a sorted list of the function names available on the object.\n // Aliased as `methods`\n _.functions = _.methods = function(obj) {\n var names = [];\n for (var key in obj) {\n if (_.isFunction(obj[key])) names.push(key);\n }\n return names.sort();\n };\n\n // Extend a given object with all the properties in passed-in object(s).\n _.extend = function(obj) {\n each(slice.call(arguments, 1), function(source) {\n if (source) {\n for (var prop in source) {\n obj[prop] = source[prop];\n }\n }\n });\n return obj;\n };\n\n // Return a copy of the object only containing the whitelisted properties.\n _.pick = function(obj) {\n var copy = {};\n var keys = concat.apply(ArrayProto, slice.call(arguments, 1));\n each(keys, function(key) {\n if (key in obj) copy[key] = obj[key];\n });\n return copy;\n };\n\n // Return a copy of the object without the blacklisted properties.\n _.omit = function(obj) {\n var copy = {};\n var keys = concat.apply(ArrayProto, slice.call(arguments, 1));\n for (var key in obj) {\n if (!_.contains(keys, key)) copy[key] = obj[key];\n }\n return copy;\n };\n\n // Fill in a given object with default properties.\n _.defaults = function(obj) {\n each(slice.call(arguments, 1), function(source) {\n if (source) {\n for (var prop in source) {\n if (obj[prop] == null) obj[prop] = source[prop];\n }\n }\n });\n return obj;\n };\n\n // Create a (shallow-cloned) duplicate of an object.\n _.clone = function(obj) {\n if (!_.isObject(obj)) return obj;\n return _.isArray(obj) ? obj.slice() : _.extend({}, obj);\n };\n\n // Invokes interceptor with the obj, and then returns obj.\n // The primary purpose of this method is to \"tap into\" a method chain, in\n // order to perform operations on intermediate results within the chain.\n _.tap = function(obj, interceptor) {\n interceptor(obj);\n return obj;\n };\n\n // Internal recursive comparison function for `isEqual`.\n var eq = function(a, b, aStack, bStack) {\n // Identical objects are equal. `0 === -0`, but they aren't identical.\n // See the Harmony `egal` proposal: http://wiki.ecmascript.org/doku.php?id=harmony:egal.\n if (a === b) return a !== 0 || 1 / a == 1 / b;\n // A strict comparison is necessary because `null == undefined`.\n if (a == null || b == null) return a === b;\n // Unwrap any wrapped objects.\n if (a instanceof _) a = a._wrapped;\n if (b instanceof _) b = b._wrapped;\n // Compare `[[Class]]` names.\n var className = toString.call(a);\n if (className != toString.call(b)) return false;\n switch (className) {\n // Strings, numbers, dates, and booleans are compared by value.\n case '[object String]':\n // Primitives and their corresponding object wrappers are equivalent; thus, `\"5\"` is\n // equivalent to `new String(\"5\")`.\n return a == String(b);\n case '[object Number]':\n // `NaN`s are equivalent, but non-reflexive. An `egal` comparison is performed for\n // other numeric values.\n return a != +a ? b != +b : (a == 0 ? 1 / a == 1 / b : a == +b);\n case '[object Date]':\n case '[object Boolean]':\n // Coerce dates and booleans to numeric primitive values. Dates are compared by their\n // millisecond representations. Note that invalid dates with millisecond representations\n // of `NaN` are not equivalent.\n return +a == +b;\n // RegExps are compared by their source patterns and flags.\n case '[object RegExp]':\n return a.source == b.source &&\n a.global == b.global &&\n a.multiline == b.multiline &&\n a.ignoreCase == b.ignoreCase;\n }\n if (typeof a != 'object' || typeof b != 'object') return false;\n // Assume equality for cyclic structures. The algorithm for detecting cyclic\n // structures is adapted from ES 5.1 section 15.12.3, abstract operation `JO`.\n var length = aStack.length;\n while (length--) {\n // Linear search. Performance is inversely proportional to the number of\n // unique nested structures.\n if (aStack[length] == a) return bStack[length] == b;\n }\n // Add the first object to the stack of traversed objects.\n aStack.push(a);\n bStack.push(b);\n var size = 0, result = true;\n // Recursively compare objects and arrays.\n if (className == '[object Array]') {\n // Compare array lengths to determine if a deep comparison is necessary.\n size = a.length;\n result = size == b.length;\n if (result) {\n // Deep compare the contents, ignoring non-numeric properties.\n while (size--) {\n if (!(result = eq(a[size], b[size], aStack, bStack))) break;\n }\n }\n } else {\n // Objects with different constructors are not equivalent, but `Object`s\n // from different frames are.\n var aCtor = a.constructor, bCtor = b.constructor;\n if (aCtor !== bCtor && !(_.isFunction(aCtor) && (aCtor instanceof aCtor) &&\n _.isFunction(bCtor) && (bCtor instanceof bCtor))) {\n return false;\n }\n // Deep compare objects.\n for (var key in a) {\n if (_.has(a, key)) {\n // Count the expected number of properties.\n size++;\n // Deep compare each member.\n if (!(result = _.has(b, key) && eq(a[key], b[key], aStack, bStack))) break;\n }\n }\n // Ensure that both objects contain the same number of properties.\n if (result) {\n for (key in b) {\n if (_.has(b, key) && !(size--)) break;\n }\n result = !size;\n }\n }\n // Remove the first object from the stack of traversed objects.\n aStack.pop();\n bStack.pop();\n return result;\n };\n\n // Perform a deep comparison to check if two objects are equal.\n _.isEqual = function(a, b) {\n return eq(a, b, [], []);\n };\n\n // Is a given array, string, or object empty?\n // An \"empty\" object has no enumerable own-properties.\n _.isEmpty = function(obj) {\n if (obj == null) return true;\n if (_.isArray(obj) || _.isString(obj)) return obj.length === 0;\n for (var key in obj) if (_.has(obj, key)) return false;\n return true;\n };\n\n // Is a given value a DOM element?\n _.isElement = function(obj) {\n return !!(obj && obj.nodeType === 1);\n };\n\n // Is a given value an array?\n // Delegates to ECMA5's native Array.isArray\n _.isArray = nativeIsArray || function(obj) {\n return toString.call(obj) == '[object Array]';\n };\n\n // Is a given variable an object?\n _.isObject = function(obj) {\n return obj === Object(obj);\n };\n\n // Add some isType methods: isArguments, isFunction, isString, isNumber, isDate, isRegExp.\n each(['Arguments', 'Function', 'String', 'Number', 'Date', 'RegExp'], function(name) {\n _['is' + name] = function(obj) {\n return toString.call(obj) == '[object ' + name + ']';\n };\n });\n\n // Define a fallback version of the method in browsers (ahem, IE), where\n // there isn't any inspectable \"Arguments\" type.\n if (!_.isArguments(arguments)) {\n _.isArguments = function(obj) {\n return !!(obj && _.has(obj, 'callee'));\n };\n }\n\n // Optimize `isFunction` if appropriate.\n if (typeof (/./) !== 'function') {\n _.isFunction = function(obj) {\n return typeof obj === 'function';\n };\n }\n\n // Is a given object a finite number?\n _.isFinite = function(obj) {\n return isFinite(obj) && !isNaN(parseFloat(obj));\n };\n\n // Is the given value `NaN`? (NaN is the only number which does not equal itself).\n _.isNaN = function(obj) {\n return _.isNumber(obj) && obj != +obj;\n };\n\n // Is a given value a boolean?\n _.isBoolean = function(obj) {\n return obj === true || obj === false || toString.call(obj) == '[object Boolean]';\n };\n\n // Is a given value equal to null?\n _.isNull = function(obj) {\n return obj === null;\n };\n\n // Is a given variable undefined?\n _.isUndefined = function(obj) {\n return obj === void 0;\n };\n\n // Shortcut function for checking if an object has a given property directly\n // on itself (in other words, not on a prototype).\n _.has = function(obj, key) {\n return hasOwnProperty.call(obj, key);\n };\n\n // Utility Functions\n // -----------------\n\n // Run Underscore.js in *noConflict* mode, returning the `_` variable to its\n // previous owner. Returns a reference to the Underscore object.\n _.noConflict = function() {\n root._ = previousUnderscore;\n return this;\n };\n\n // Keep the identity function around for default iterators.\n _.identity = function(value) {\n return value;\n };\n\n // Run a function **n** times.\n _.times = function(n, iterator, context) {\n var accum = Array(n);\n for (var i = 0; i < n; i++) accum[i] = iterator.call(context, i);\n return accum;\n };\n\n // Return a random integer between min and max (inclusive).\n _.random = function(min, max) {\n if (max == null) {\n max = min;\n min = 0;\n }\n return min + Math.floor(Math.random() * (max - min + 1));\n };\n\n // List of HTML entities for escaping.\n var entityMap = {\n escape: {\n '&': '&',\n '<': '<',\n '>': '>',\n '\"': '"',\n \"'\": ''',\n '/': '/'\n }\n };\n entityMap.unescape = _.invert(entityMap.escape);\n\n // Regexes containing the keys and values listed immediately above.\n var entityRegexes = {\n escape: new RegExp('[' + _.keys(entityMap.escape).join('') + ']', 'g'),\n unescape: new RegExp('(' + _.keys(entityMap.unescape).join('|') + ')', 'g')\n };\n\n // Functions for escaping and unescaping strings to/from HTML interpolation.\n _.each(['escape', 'unescape'], function(method) {\n _[method] = function(string) {\n if (string == null) return '';\n return ('' + string).replace(entityRegexes[method], function(match) {\n return entityMap[method][match];\n });\n };\n });\n\n // If the value of the named property is a function then invoke it;\n // otherwise, return it.\n _.result = function(object, property) {\n if (object == null) return null;\n var value = object[property];\n return _.isFunction(value) ? value.call(object) : value;\n };\n\n // Add your own custom functions to the Underscore object.\n _.mixin = function(obj) {\n each(_.functions(obj), function(name){\n var func = _[name] = obj[name];\n _.prototype[name] = function() {\n var args = [this._wrapped];\n push.apply(args, arguments);\n return result.call(this, func.apply(_, args));\n };\n });\n };\n\n // Generate a unique integer id (unique within the entire client session).\n // Useful for temporary DOM ids.\n var idCounter = 0;\n _.uniqueId = function(prefix) {\n var id = ++idCounter + '';\n return prefix ? prefix + id : id;\n };\n\n // By default, Underscore uses ERB-style template delimiters, change the\n // following template settings to use alternative delimiters.\n _.templateSettings = {\n evaluate : /<%([\\s\\S]+?)%>/g,\n interpolate : /<%=([\\s\\S]+?)%>/g,\n escape : /<%-([\\s\\S]+?)%>/g\n };\n\n // When customizing `templateSettings`, if you don't want to define an\n // interpolation, evaluation or escaping regex, we need one that is\n // guaranteed not to match.\n var noMatch = /(.)^/;\n\n // Certain characters need to be escaped so that they can be put into a\n // string literal.\n var escapes = {\n \"'\": \"'\",\n '\\\\': '\\\\',\n '\\r': 'r',\n '\\n': 'n',\n '\\t': 't',\n '\\u2028': 'u2028',\n '\\u2029': 'u2029'\n };\n\n var escaper = /\\\\|'|\\r|\\n|\\t|\\u2028|\\u2029/g;\n\n // JavaScript micro-templating, similar to John Resig's implementation.\n // Underscore templating handles arbitrary delimiters, preserves whitespace,\n // and correctly escapes quotes within interpolated code.\n _.template = function(text, data, settings) {\n var render;\n settings = _.defaults({}, settings, _.templateSettings);\n\n // Combine delimiters into one regular expression via alternation.\n var matcher = new RegExp([\n (settings.escape || noMatch).source,\n (settings.interpolate || noMatch).source,\n (settings.evaluate || noMatch).source\n ].join('|') + '|$', 'g');\n\n // Compile the template source, escaping string literals appropriately.\n var index = 0;\n var source = \"__p+='\";\n text.replace(matcher, function(match, escape, interpolate, evaluate, offset) {\n source += text.slice(index, offset)\n .replace(escaper, function(match) { return '\\\\' + escapes[match]; });\n\n if (escape) {\n source += \"'+\\n((__t=(\" + escape + \"))==null?'':_.escape(__t))+\\n'\";\n }\n if (interpolate) {\n source += \"'+\\n((__t=(\" + interpolate + \"))==null?'':__t)+\\n'\";\n }\n if (evaluate) {\n source += \"';\\n\" + evaluate + \"\\n__p+='\";\n }\n index = offset + match.length;\n return match;\n });\n source += \"';\\n\";\n\n // If a variable is not specified, place data values in local scope.\n if (!settings.variable) source = 'with(obj||{}){\\n' + source + '}\\n';\n\n source = \"var __t,__p='',__j=Array.prototype.join,\" +\n \"print=function(){__p+=__j.call(arguments,'');};\\n\" +\n source + \"return __p;\\n\";\n\n try {\n render = new Function(settings.variable || 'obj', '_', source);\n } catch (e) {\n e.source = source;\n throw e;\n }\n\n if (data) return render(data, _);\n var template = function(data) {\n return render.call(this, data, _);\n };\n\n // Provide the compiled function source as a convenience for precompilation.\n template.source = 'function(' + (settings.variable || 'obj') + '){\\n' + source + '}';\n\n return template;\n };\n\n // Add a \"chain\" function, which will delegate to the wrapper.\n _.chain = function(obj) {\n return _(obj).chain();\n };\n\n // OOP\n // ---------------\n // If Underscore is called as a function, it returns a wrapped object that\n // can be used OO-style. This wrapper holds altered versions of all the\n // underscore functions. Wrapped objects may be chained.\n\n // Helper function to continue chaining intermediate results.\n var result = function(obj) {\n return this._chain ? _(obj).chain() : obj;\n };\n\n // Add all of the Underscore functions to the wrapper object.\n _.mixin(_);\n\n // Add all mutator Array functions to the wrapper.\n each(['pop', 'push', 'reverse', 'shift', 'sort', 'splice', 'unshift'], function(name) {\n var method = ArrayProto[name];\n _.prototype[name] = function() {\n var obj = this._wrapped;\n method.apply(obj, arguments);\n if ((name == 'shift' || name == 'splice') && obj.length === 0) delete obj[0];\n return result.call(this, obj);\n };\n });\n\n // Add all accessor Array functions to the wrapper.\n each(['concat', 'join', 'slice'], function(name) {\n var method = ArrayProto[name];\n _.prototype[name] = function() {\n return result.call(this, method.apply(this._wrapped, arguments));\n };\n });\n\n _.extend(_.prototype, {\n\n // Start chaining a wrapped Underscore object.\n chain: function() {\n this._chain = true;\n return this;\n },\n\n // Extracts the result from a wrapped and chained object.\n value: function() {\n return this._wrapped;\n }\n\n });\n\n}).call(this);\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/leapjs/~/underscore/underscore.js\n ** module id = 1\n ** module chunks = 0\n **/","/**\n * @fileoverview gl-matrix - High performance matrix and vector operations\n * @author Brandon Jones\n * @author Colin MacKenzie IV\n * @version 2.2.1\n */\n\n/* Copyright (c) 2013, Brandon Jones, Colin MacKenzie IV. All rights reserved.\n\nRedistribution and use in source and binary forms, with or without modification,\nare permitted provided that the following conditions are met:\n\n * Redistributions of source code must retain the above copyright notice, this\n list of conditions and the following disclaimer.\n * Redistributions in binary form must reproduce the above copyright notice,\n this list of conditions and the following disclaimer in the documentation\n and/or other materials provided with the distribution.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\nANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\nWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR\nANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\nLOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON\nANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\nSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */\n\n\n(function(_global) {\n \"use strict\";\n\n var shim = {};\n if (typeof(exports) === 'undefined') {\n if(typeof define == 'function' && typeof define.amd == 'object' && define.amd) {\n shim.exports = {};\n define(function() {\n return shim.exports;\n });\n } else {\n // gl-matrix lives in a browser, define its namespaces in global\n shim.exports = typeof(window) !== 'undefined' ? window : _global;\n }\n }\n else {\n // gl-matrix lives in commonjs, define its namespaces in exports\n shim.exports = exports;\n }\n\n (function(exports) {\n /* Copyright (c) 2013, Brandon Jones, Colin MacKenzie IV. All rights reserved.\n\nRedistribution and use in source and binary forms, with or without modification,\nare permitted provided that the following conditions are met:\n\n * Redistributions of source code must retain the above copyright notice, this\n list of conditions and the following disclaimer.\n * Redistributions in binary form must reproduce the above copyright notice,\n this list of conditions and the following disclaimer in the documentation \n and/or other materials provided with the distribution.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\nANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\nWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE \nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR\nANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\nLOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON\nANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\nSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */\n\n\nif(!GLMAT_EPSILON) {\n var GLMAT_EPSILON = 0.000001;\n}\n\nif(!GLMAT_ARRAY_TYPE) {\n var GLMAT_ARRAY_TYPE = (typeof Float32Array !== 'undefined') ? Float32Array : Array;\n}\n\nif(!GLMAT_RANDOM) {\n var GLMAT_RANDOM = Math.random;\n}\n\n/**\n * @class Common utilities\n * @name glMatrix\n */\nvar glMatrix = {};\n\n/**\n * Sets the type of array used when creating new vectors and matricies\n *\n * @param {Type} type Array type, such as Float32Array or Array\n */\nglMatrix.setMatrixArrayType = function(type) {\n GLMAT_ARRAY_TYPE = type;\n}\n\nif(typeof(exports) !== 'undefined') {\n exports.glMatrix = glMatrix;\n}\n\nvar degree = Math.PI / 180;\n\n/**\n* Convert Degree To Radian\n*\n* @param {Number} Angle in Degrees\n*/\nglMatrix.toRadian = function(a){\n return a * degree;\n}\n;\n/* Copyright (c) 2013, Brandon Jones, Colin MacKenzie IV. All rights reserved.\n\nRedistribution and use in source and binary forms, with or without modification,\nare permitted provided that the following conditions are met:\n\n * Redistributions of source code must retain the above copyright notice, this\n list of conditions and the following disclaimer.\n * Redistributions in binary form must reproduce the above copyright notice,\n this list of conditions and the following disclaimer in the documentation \n and/or other materials provided with the distribution.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\nANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\nWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE \nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR\nANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\nLOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON\nANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\nSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */\n\n/**\n * @class 2 Dimensional Vector\n * @name vec2\n */\n\nvar vec2 = {};\n\n/**\n * Creates a new, empty vec2\n *\n * @returns {vec2} a new 2D vector\n */\nvec2.create = function() {\n var out = new GLMAT_ARRAY_TYPE(2);\n out[0] = 0;\n out[1] = 0;\n return out;\n};\n\n/**\n * Creates a new vec2 initialized with values from an existing vector\n *\n * @param {vec2} a vector to clone\n * @returns {vec2} a new 2D vector\n */\nvec2.clone = function(a) {\n var out = new GLMAT_ARRAY_TYPE(2);\n out[0] = a[0];\n out[1] = a[1];\n return out;\n};\n\n/**\n * Creates a new vec2 initialized with the given values\n *\n * @param {Number} x X component\n * @param {Number} y Y component\n * @returns {vec2} a new 2D vector\n */\nvec2.fromValues = function(x, y) {\n var out = new GLMAT_ARRAY_TYPE(2);\n out[0] = x;\n out[1] = y;\n return out;\n};\n\n/**\n * Copy the values from one vec2 to another\n *\n * @param {vec2} out the receiving vector\n * @param {vec2} a the source vector\n * @returns {vec2} out\n */\nvec2.copy = function(out, a) {\n out[0] = a[0];\n out[1] = a[1];\n return out;\n};\n\n/**\n * Set the components of a vec2 to the given values\n *\n * @param {vec2} out the receiving vector\n * @param {Number} x X component\n * @param {Number} y Y component\n * @returns {vec2} out\n */\nvec2.set = function(out, x, y) {\n out[0] = x;\n out[1] = y;\n return out;\n};\n\n/**\n * Adds two vec2's\n *\n * @param {vec2} out the receiving vector\n * @param {vec2} a the first operand\n * @param {vec2} b the second operand\n * @returns {vec2} out\n */\nvec2.add = function(out, a, b) {\n out[0] = a[0] + b[0];\n out[1] = a[1] + b[1];\n return out;\n};\n\n/**\n * Subtracts vector b from vector a\n *\n * @param {vec2} out the receiving vector\n * @param {vec2} a the first operand\n * @param {vec2} b the second operand\n * @returns {vec2} out\n */\nvec2.subtract = function(out, a, b) {\n out[0] = a[0] - b[0];\n out[1] = a[1] - b[1];\n return out;\n};\n\n/**\n * Alias for {@link vec2.subtract}\n * @function\n */\nvec2.sub = vec2.subtract;\n\n/**\n * Multiplies two vec2's\n *\n * @param {vec2} out the receiving vector\n * @param {vec2} a the first operand\n * @param {vec2} b the second operand\n * @returns {vec2} out\n */\nvec2.multiply = function(out, a, b) {\n out[0] = a[0] * b[0];\n out[1] = a[1] * b[1];\n return out;\n};\n\n/**\n * Alias for {@link vec2.multiply}\n * @function\n */\nvec2.mul = vec2.multiply;\n\n/**\n * Divides two vec2's\n *\n * @param {vec2} out the receiving vector\n * @param {vec2} a the first operand\n * @param {vec2} b the second operand\n * @returns {vec2} out\n */\nvec2.divide = function(out, a, b) {\n out[0] = a[0] / b[0];\n out[1] = a[1] / b[1];\n return out;\n};\n\n/**\n * Alias for {@link vec2.divide}\n * @function\n */\nvec2.div = vec2.divide;\n\n/**\n * Returns the minimum of two vec2's\n *\n * @param {vec2} out the receiving vector\n * @param {vec2} a the first operand\n * @param {vec2} b the second operand\n * @returns {vec2} out\n */\nvec2.min = function(out, a, b) {\n out[0] = Math.min(a[0], b[0]);\n out[1] = Math.min(a[1], b[1]);\n return out;\n};\n\n/**\n * Returns the maximum of two vec2's\n *\n * @param {vec2} out the receiving vector\n * @param {vec2} a the first operand\n * @param {vec2} b the second operand\n * @returns {vec2} out\n */\nvec2.max = function(out, a, b) {\n out[0] = Math.max(a[0], b[0]);\n out[1] = Math.max(a[1], b[1]);\n return out;\n};\n\n/**\n * Scales a vec2 by a scalar number\n *\n * @param {vec2} out the receiving vector\n * @param {vec2} a the vector to scale\n * @param {Number} b amount to scale the vector by\n * @returns {vec2} out\n */\nvec2.scale = function(out, a, b) {\n out[0] = a[0] * b;\n out[1] = a[1] * b;\n return out;\n};\n\n/**\n * Adds two vec2's after scaling the second operand by a scalar value\n *\n * @param {vec2} out the receiving vector\n * @param {vec2} a the first operand\n * @param {vec2} b the second operand\n * @param {Number} scale the amount to scale b by before adding\n * @returns {vec2} out\n */\nvec2.scaleAndAdd = function(out, a, b, scale) {\n out[0] = a[0] + (b[0] * scale);\n out[1] = a[1] + (b[1] * scale);\n return out;\n};\n\n/**\n * Calculates the euclidian distance between two vec2's\n *\n * @param {vec2} a the first operand\n * @param {vec2} b the second operand\n * @returns {Number} distance between a and b\n */\nvec2.distance = function(a, b) {\n var x = b[0] - a[0],\n y = b[1] - a[1];\n return Math.sqrt(x*x + y*y);\n};\n\n/**\n * Alias for {@link vec2.distance}\n * @function\n */\nvec2.dist = vec2.distance;\n\n/**\n * Calculates the squared euclidian distance between two vec2's\n *\n * @param {vec2} a the first operand\n * @param {vec2} b the second operand\n * @returns {Number} squared distance between a and b\n */\nvec2.squaredDistance = function(a, b) {\n var x = b[0] - a[0],\n y = b[1] - a[1];\n return x*x + y*y;\n};\n\n/**\n * Alias for {@link vec2.squaredDistance}\n * @function\n */\nvec2.sqrDist = vec2.squaredDistance;\n\n/**\n * Calculates the length of a vec2\n *\n * @param {vec2} a vector to calculate length of\n * @returns {Number} length of a\n */\nvec2.length = function (a) {\n var x = a[0],\n y = a[1];\n return Math.sqrt(x*x + y*y);\n};\n\n/**\n * Alias for {@link vec2.length}\n * @function\n */\nvec2.len = vec2.length;\n\n/**\n * Calculates the squared length of a vec2\n *\n * @param {vec2} a vector to calculate squared length of\n * @returns {Number} squared length of a\n */\nvec2.squaredLength = function (a) {\n var x = a[0],\n y = a[1];\n return x*x + y*y;\n};\n\n/**\n * Alias for {@link vec2.squaredLength}\n * @function\n */\nvec2.sqrLen = vec2.squaredLength;\n\n/**\n * Negates the components of a vec2\n *\n * @param {vec2} out the receiving vector\n * @param {vec2} a vector to negate\n * @returns {vec2} out\n */\nvec2.negate = function(out, a) {\n out[0] = -a[0];\n out[1] = -a[1];\n return out;\n};\n\n/**\n * Normalize a vec2\n *\n * @param {vec2} out the receiving vector\n * @param {vec2} a vector to normalize\n * @returns {vec2} out\n */\nvec2.normalize = function(out, a) {\n var x = a[0],\n y = a[1];\n var len = x*x + y*y;\n if (len > 0) {\n //TODO: evaluate use of glm_invsqrt here?\n len = 1 / Math.sqrt(len);\n out[0] = a[0] * len;\n out[1] = a[1] * len;\n }\n return out;\n};\n\n/**\n * Calculates the dot product of two vec2's\n *\n * @param {vec2} a the first operand\n * @param {vec2} b the second operand\n * @returns {Number} dot product of a and b\n */\nvec2.dot = function (a, b) {\n return a[0] * b[0] + a[1] * b[1];\n};\n\n/**\n * Computes the cross product of two vec2's\n * Note that the cross product must by definition produce a 3D vector\n *\n * @param {vec3} out the receiving vector\n * @param {vec2} a the first operand\n * @param {vec2} b the second operand\n * @returns {vec3} out\n */\nvec2.cross = function(out, a, b) {\n var z = a[0] * b[1] - a[1] * b[0];\n out[0] = out[1] = 0;\n out[2] = z;\n return out;\n};\n\n/**\n * Performs a linear interpolation between two vec2's\n *\n * @param {vec2} out the receiving vector\n * @param {vec2} a the first operand\n * @param {vec2} b the second operand\n * @param {Number} t interpolation amount between the two inputs\n * @returns {vec2} out\n */\nvec2.lerp = function (out, a, b, t) {\n var ax = a[0],\n ay = a[1];\n out[0] = ax + t * (b[0] - ax);\n out[1] = ay + t * (b[1] - ay);\n return out;\n};\n\n/**\n * Generates a random vector with the given scale\n *\n * @param {vec2} out the receiving vector\n * @param {Number} [scale] Length of the resulting vector. If ommitted, a unit vector will be returned\n * @returns {vec2} out\n */\nvec2.random = function (out, scale) {\n scale = scale || 1.0;\n var r = GLMAT_RANDOM() * 2.0 * Math.PI;\n out[0] = Math.cos(r) * scale;\n out[1] = Math.sin(r) * scale;\n return out;\n};\n\n/**\n * Transforms the vec2 with a mat2\n *\n * @param {vec2} out the receiving vector\n * @param {vec2} a the vector to transform\n * @param {mat2} m matrix to transform with\n * @returns {vec2} out\n */\nvec2.transformMat2 = function(out, a, m) {\n var x = a[0],\n y = a[1];\n out[0] = m[0] * x + m[2] * y;\n out[1] = m[1] * x + m[3] * y;\n return out;\n};\n\n/**\n * Transforms the vec2 with a mat2d\n *\n * @param {vec2} out the receiving vector\n * @param {vec2} a the vector to transform\n * @param {mat2d} m matrix to transform with\n * @returns {vec2} out\n */\nvec2.transformMat2d = function(out, a, m) {\n var x = a[0],\n y = a[1];\n out[0] = m[0] * x + m[2] * y + m[4];\n out[1] = m[1] * x + m[3] * y + m[5];\n return out;\n};\n\n/**\n * Transforms the vec2 with a mat3\n * 3rd vector component is implicitly '1'\n *\n * @param {vec2} out the receiving vector\n * @param {vec2} a the vector to transform\n * @param {mat3} m matrix to transform with\n * @returns {vec2} out\n */\nvec2.transformMat3 = function(out, a, m) {\n var x = a[0],\n y = a[1];\n out[0] = m[0] * x + m[3] * y + m[6];\n out[1] = m[1] * x + m[4] * y + m[7];\n return out;\n};\n\n/**\n * Transforms the vec2 with a mat4\n * 3rd vector component is implicitly '0'\n * 4th vector component is implicitly '1'\n *\n * @param {vec2} out the receiving vector\n * @param {vec2} a the vector to transform\n * @param {mat4} m matrix to transform with\n * @returns {vec2} out\n */\nvec2.transformMat4 = function(out, a, m) {\n var x = a[0], \n y = a[1];\n out[0] = m[0] * x + m[4] * y + m[12];\n out[1] = m[1] * x + m[5] * y + m[13];\n return out;\n};\n\n/**\n * Perform some operation over an array of vec2s.\n *\n * @param {Array} a the array of vectors to iterate over\n * @param {Number} stride Number of elements between the start of each vec2. If 0 assumes tightly packed\n * @param {Number} offset Number of elements to skip at the beginning of the array\n * @param {Number} count Number of vec2s to iterate over. If 0 iterates over entire array\n * @param {Function} fn Function to call for each vector in the array\n * @param {Object} [arg] additional argument to pass to fn\n * @returns {Array} a\n * @function\n */\nvec2.forEach = (function() {\n var vec = vec2.create();\n\n return function(a, stride, offset, count, fn, arg) {\n var i, l;\n if(!stride) {\n stride = 2;\n }\n\n if(!offset) {\n offset = 0;\n }\n \n if(count) {\n l = Math.min((count * stride) + offset, a.length);\n } else {\n l = a.length;\n }\n\n for(i = offset; i < l; i += stride) {\n vec[0] = a[i]; vec[1] = a[i+1];\n fn(vec, vec, arg);\n a[i] = vec[0]; a[i+1] = vec[1];\n }\n \n return a;\n };\n})();\n\n/**\n * Returns a string representation of a vector\n *\n * @param {vec2} vec vector to represent as a string\n * @returns {String} string representation of the vector\n */\nvec2.str = function (a) {\n return 'vec2(' + a[0] + ', ' + a[1] + ')';\n};\n\nif(typeof(exports) !== 'undefined') {\n exports.vec2 = vec2;\n}\n;\n/* Copyright (c) 2013, Brandon Jones, Colin MacKenzie IV. All rights reserved.\n\nRedistribution and use in source and binary forms, with or without modification,\nare permitted provided that the following conditions are met:\n\n * Redistributions of source code must retain the above copyright notice, this\n list of conditions and the following disclaimer.\n * Redistributions in binary form must reproduce the above copyright notice,\n this list of conditions and the following disclaimer in the documentation \n and/or other materials provided with the distribution.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\nANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\nWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE \nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR\nANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\nLOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON\nANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\nSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */\n\n/**\n * @class 3 Dimensional Vector\n * @name vec3\n */\n\nvar vec3 = {};\n\n/**\n * Creates a new, empty vec3\n *\n * @returns {vec3} a new 3D vector\n */\nvec3.create = function() {\n var out = new GLMAT_ARRAY_TYPE(3);\n out[0] = 0;\n out[1] = 0;\n out[2] = 0;\n return out;\n};\n\n/**\n * Creates a new vec3 initialized with values from an existing vector\n *\n * @param {vec3} a vector to clone\n * @returns {vec3} a new 3D vector\n */\nvec3.clone = function(a) {\n var out = new GLMAT_ARRAY_TYPE(3);\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n return out;\n};\n\n/**\n * Creates a new vec3 initialized with the given values\n *\n * @param {Number} x X component\n * @param {Number} y Y component\n * @param {Number} z Z component\n * @returns {vec3} a new 3D vector\n */\nvec3.fromValues = function(x, y, z) {\n var out = new GLMAT_ARRAY_TYPE(3);\n out[0] = x;\n out[1] = y;\n out[2] = z;\n return out;\n};\n\n/**\n * Copy the values from one vec3 to another\n *\n * @param {vec3} out the receiving vector\n * @param {vec3} a the source vector\n * @returns {vec3} out\n */\nvec3.copy = function(out, a) {\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n return out;\n};\n\n/**\n * Set the components of a vec3 to the given values\n *\n * @param {vec3} out the receiving vector\n * @param {Number} x X component\n * @param {Number} y Y component\n * @param {Number} z Z component\n * @returns {vec3} out\n */\nvec3.set = function(out, x, y, z) {\n out[0] = x;\n out[1] = y;\n out[2] = z;\n return out;\n};\n\n/**\n * Adds two vec3's\n *\n * @param {vec3} out the receiving vector\n * @param {vec3} a the first operand\n * @param {vec3} b the second operand\n * @returns {vec3} out\n */\nvec3.add = function(out, a, b) {\n out[0] = a[0] + b[0];\n out[1] = a[1] + b[1];\n out[2] = a[2] + b[2];\n return out;\n};\n\n/**\n * Subtracts vector b from vector a\n *\n * @param {vec3} out the receiving vector\n * @param {vec3} a the first operand\n * @param {vec3} b the second operand\n * @returns {vec3} out\n */\nvec3.subtract = function(out, a, b) {\n out[0] = a[0] - b[0];\n out[1] = a[1] - b[1];\n out[2] = a[2] - b[2];\n return out;\n};\n\n/**\n * Alias for {@link vec3.subtract}\n * @function\n */\nvec3.sub = vec3.subtract;\n\n/**\n * Multiplies two vec3's\n *\n * @param {vec3} out the receiving vector\n * @param {vec3} a the first operand\n * @param {vec3} b the second operand\n * @returns {vec3} out\n */\nvec3.multiply = function(out, a, b) {\n out[0] = a[0] * b[0];\n out[1] = a[1] * b[1];\n out[2] = a[2] * b[2];\n return out;\n};\n\n/**\n * Alias for {@link vec3.multiply}\n * @function\n */\nvec3.mul = vec3.multiply;\n\n/**\n * Divides two vec3's\n *\n * @param {vec3} out the receiving vector\n * @param {vec3} a the first operand\n * @param {vec3} b the second operand\n * @returns {vec3} out\n */\nvec3.divide = function(out, a, b) {\n out[0] = a[0] / b[0];\n out[1] = a[1] / b[1];\n out[2] = a[2] / b[2];\n return out;\n};\n\n/**\n * Alias for {@link vec3.divide}\n * @function\n */\nvec3.div = vec3.divide;\n\n/**\n * Returns the minimum of two vec3's\n *\n * @param {vec3} out the receiving vector\n * @param {vec3} a the first operand\n * @param {vec3} b the second operand\n * @returns {vec3} out\n */\nvec3.min = function(out, a, b) {\n out[0] = Math.min(a[0], b[0]);\n out[1] = Math.min(a[1], b[1]);\n out[2] = Math.min(a[2], b[2]);\n return out;\n};\n\n/**\n * Returns the maximum of two vec3's\n *\n * @param {vec3} out the receiving vector\n * @param {vec3} a the first operand\n * @param {vec3} b the second operand\n * @returns {vec3} out\n */\nvec3.max = function(out, a, b) {\n out[0] = Math.max(a[0], b[0]);\n out[1] = Math.max(a[1], b[1]);\n out[2] = Math.max(a[2], b[2]);\n return out;\n};\n\n/**\n * Scales a vec3 by a scalar number\n *\n * @param {vec3} out the receiving vector\n * @param {vec3} a the vector to scale\n * @param {Number} b amount to scale the vector by\n * @returns {vec3} out\n */\nvec3.scale = function(out, a, b) {\n out[0] = a[0] * b;\n out[1] = a[1] * b;\n out[2] = a[2] * b;\n return out;\n};\n\n/**\n * Adds two vec3's after scaling the second operand by a scalar value\n *\n * @param {vec3} out the receiving vector\n * @param {vec3} a the first operand\n * @param {vec3} b the second operand\n * @param {Number} scale the amount to scale b by before adding\n * @returns {vec3} out\n */\nvec3.scaleAndAdd = function(out, a, b, scale) {\n out[0] = a[0] + (b[0] * scale);\n out[1] = a[1] + (b[1] * scale);\n out[2] = a[2] + (b[2] * scale);\n return out;\n};\n\n/**\n * Calculates the euclidian distance between two vec3's\n *\n * @param {vec3} a the first operand\n * @param {vec3} b the second operand\n * @returns {Number} distance between a and b\n */\nvec3.distance = function(a, b) {\n var x = b[0] - a[0],\n y = b[1] - a[1],\n z = b[2] - a[2];\n return Math.sqrt(x*x + y*y + z*z);\n};\n\n/**\n * Alias for {@link vec3.distance}\n * @function\n */\nvec3.dist = vec3.distance;\n\n/**\n * Calculates the squared euclidian distance between two vec3's\n *\n * @param {vec3} a the first operand\n * @param {vec3} b the second operand\n * @returns {Number} squared distance between a and b\n */\nvec3.squaredDistance = function(a, b) {\n var x = b[0] - a[0],\n y = b[1] - a[1],\n z = b[2] - a[2];\n return x*x + y*y + z*z;\n};\n\n/**\n * Alias for {@link vec3.squaredDistance}\n * @function\n */\nvec3.sqrDist = vec3.squaredDistance;\n\n/**\n * Calculates the length of a vec3\n *\n * @param {vec3} a vector to calculate length of\n * @returns {Number} length of a\n */\nvec3.length = function (a) {\n var x = a[0],\n y = a[1],\n z = a[2];\n return Math.sqrt(x*x + y*y + z*z);\n};\n\n/**\n * Alias for {@link vec3.length}\n * @function\n */\nvec3.len = vec3.length;\n\n/**\n * Calculates the squared length of a vec3\n *\n * @param {vec3} a vector to calculate squared length of\n * @returns {Number} squared length of a\n */\nvec3.squaredLength = function (a) {\n var x = a[0],\n y = a[1],\n z = a[2];\n return x*x + y*y + z*z;\n};\n\n/**\n * Alias for {@link vec3.squaredLength}\n * @function\n */\nvec3.sqrLen = vec3.squaredLength;\n\n/**\n * Negates the components of a vec3\n *\n * @param {vec3} out the receiving vector\n * @param {vec3} a vector to negate\n * @returns {vec3} out\n */\nvec3.negate = function(out, a) {\n out[0] = -a[0];\n out[1] = -a[1];\n out[2] = -a[2];\n return out;\n};\n\n/**\n * Normalize a vec3\n *\n * @param {vec3} out the receiving vector\n * @param {vec3} a vector to normalize\n * @returns {vec3} out\n */\nvec3.normalize = function(out, a) {\n var x = a[0],\n y = a[1],\n z = a[2];\n var len = x*x + y*y + z*z;\n if (len > 0) {\n //TODO: evaluate use of glm_invsqrt here?\n len = 1 / Math.sqrt(len);\n out[0] = a[0] * len;\n out[1] = a[1] * len;\n out[2] = a[2] * len;\n }\n return out;\n};\n\n/**\n * Calculates the dot product of two vec3's\n *\n * @param {vec3} a the first operand\n * @param {vec3} b the second operand\n * @returns {Number} dot product of a and b\n */\nvec3.dot = function (a, b) {\n return a[0] * b[0] + a[1] * b[1] + a[2] * b[2];\n};\n\n/**\n * Computes the cross product of two vec3's\n *\n * @param {vec3} out the receiving vector\n * @param {vec3} a the first operand\n * @param {vec3} b the second operand\n * @returns {vec3} out\n */\nvec3.cross = function(out, a, b) {\n var ax = a[0], ay = a[1], az = a[2],\n bx = b[0], by = b[1], bz = b[2];\n\n out[0] = ay * bz - az * by;\n out[1] = az * bx - ax * bz;\n out[2] = ax * by - ay * bx;\n return out;\n};\n\n/**\n * Performs a linear interpolation between two vec3's\n *\n * @param {vec3} out the receiving vector\n * @param {vec3} a the first operand\n * @param {vec3} b the second operand\n * @param {Number} t interpolation amount between the two inputs\n * @returns {vec3} out\n */\nvec3.lerp = function (out, a, b, t) {\n var ax = a[0],\n ay = a[1],\n az = a[2];\n out[0] = ax + t * (b[0] - ax);\n out[1] = ay + t * (b[1] - ay);\n out[2] = az + t * (b[2] - az);\n return out;\n};\n\n/**\n * Generates a random vector with the given scale\n *\n * @param {vec3} out the receiving vector\n * @param {Number} [scale] Length of the resulting vector. If ommitted, a unit vector will be returned\n * @returns {vec3} out\n */\nvec3.random = function (out, scale) {\n scale = scale || 1.0;\n\n var r = GLMAT_RANDOM() * 2.0 * Math.PI;\n var z = (GLMAT_RANDOM() * 2.0) - 1.0;\n var zScale = Math.sqrt(1.0-z*z) * scale;\n\n out[0] = Math.cos(r) * zScale;\n out[1] = Math.sin(r) * zScale;\n out[2] = z * scale;\n return out;\n};\n\n/**\n * Transforms the vec3 with a mat4.\n * 4th vector component is implicitly '1'\n *\n * @param {vec3} out the receiving vector\n * @param {vec3} a the vector to transform\n * @param {mat4} m matrix to transform with\n * @returns {vec3} out\n */\nvec3.transformMat4 = function(out, a, m) {\n var x = a[0], y = a[1], z = a[2];\n out[0] = m[0] * x + m[4] * y + m[8] * z + m[12];\n out[1] = m[1] * x + m[5] * y + m[9] * z + m[13];\n out[2] = m[2] * x + m[6] * y + m[10] * z + m[14];\n return out;\n};\n\n/**\n * Transforms the vec3 with a mat3.\n *\n * @param {vec3} out the receiving vector\n * @param {vec3} a the vector to transform\n * @param {mat4} m the 3x3 matrix to transform with\n * @returns {vec3} out\n */\nvec3.transformMat3 = function(out, a, m) {\n var x = a[0], y = a[1], z = a[2];\n out[0] = x * m[0] + y * m[3] + z * m[6];\n out[1] = x * m[1] + y * m[4] + z * m[7];\n out[2] = x * m[2] + y * m[5] + z * m[8];\n return out;\n};\n\n/**\n * Transforms the vec3 with a quat\n *\n * @param {vec3} out the receiving vector\n * @param {vec3} a the vector to transform\n * @param {quat} q quaternion to transform with\n * @returns {vec3} out\n */\nvec3.transformQuat = function(out, a, q) {\n // benchmarks: http://jsperf.com/quaternion-transform-vec3-implementations\n\n var x = a[0], y = a[1], z = a[2],\n qx = q[0], qy = q[1], qz = q[2], qw = q[3],\n\n // calculate quat * vec\n ix = qw * x + qy * z - qz * y,\n iy = qw * y + qz * x - qx * z,\n iz = qw * z + qx * y - qy * x,\n iw = -qx * x - qy * y - qz * z;\n\n // calculate result * inverse quat\n out[0] = ix * qw + iw * -qx + iy * -qz - iz * -qy;\n out[1] = iy * qw + iw * -qy + iz * -qx - ix * -qz;\n out[2] = iz * qw + iw * -qz + ix * -qy - iy * -qx;\n return out;\n};\n\n/*\n* Rotate a 3D vector around the x-axis\n* @param {vec3} out The receiving vec3\n* @param {vec3} a The vec3 point to rotate\n* @param {vec3} b The origin of the rotation\n* @param {Number} c The angle of rotation\n* @returns {vec3} out\n*/\nvec3.rotateX = function(out, a, b, c){\n var p = [], r=[];\n\t //Translate point to the origin\n\t p[0] = a[0] - b[0];\n\t p[1] = a[1] - b[1];\n \tp[2] = a[2] - b[2];\n\n\t //perform rotation\n\t r[0] = p[0];\n\t r[1] = p[1]*Math.cos(c) - p[2]*Math.sin(c);\n\t r[2] = p[1]*Math.sin(c) + p[2]*Math.cos(c);\n\n\t //translate to correct position\n\t out[0] = r[0] + b[0];\n\t out[1] = r[1] + b[1];\n\t out[2] = r[2] + b[2];\n\n \treturn out;\n};\n\n/*\n* Rotate a 3D vector around the y-axis\n* @param {vec3} out The receiving vec3\n* @param {vec3} a The vec3 point to rotate\n* @param {vec3} b The origin of the rotation\n* @param {Number} c The angle of rotation\n* @returns {vec3} out\n*/\nvec3.rotateY = function(out, a, b, c){\n \tvar p = [], r=[];\n \t//Translate point to the origin\n \tp[0] = a[0] - b[0];\n \tp[1] = a[1] - b[1];\n \tp[2] = a[2] - b[2];\n \n \t//perform rotation\n \tr[0] = p[2]*Math.sin(c) + p[0]*Math.cos(c);\n \tr[1] = p[1];\n \tr[2] = p[2]*Math.cos(c) - p[0]*Math.sin(c);\n \n \t//translate to correct position\n \tout[0] = r[0] + b[0];\n \tout[1] = r[1] + b[1];\n \tout[2] = r[2] + b[2];\n \n \treturn out;\n};\n\n/*\n* Rotate a 3D vector around the z-axis\n* @param {vec3} out The receiving vec3\n* @param {vec3} a The vec3 point to rotate\n* @param {vec3} b The origin of the rotation\n* @param {Number} c The angle of rotation\n* @returns {vec3} out\n*/\nvec3.rotateZ = function(out, a, b, c){\n \tvar p = [], r=[];\n \t//Translate point to the origin\n \tp[0] = a[0] - b[0];\n \tp[1] = a[1] - b[1];\n \tp[2] = a[2] - b[2];\n \n \t//perform rotation\n \tr[0] = p[0]*Math.cos(c) - p[1]*Math.sin(c);\n \tr[1] = p[0]*Math.sin(c) + p[1]*Math.cos(c);\n \tr[2] = p[2];\n \n \t//translate to correct position\n \tout[0] = r[0] + b[0];\n \tout[1] = r[1] + b[1];\n \tout[2] = r[2] + b[2];\n \n \treturn out;\n};\n\n/**\n * Perform some operation over an array of vec3s.\n *\n * @param {Array} a the array of vectors to iterate over\n * @param {Number} stride Number of elements between the start of each vec3. If 0 assumes tightly packed\n * @param {Number} offset Number of elements to skip at the beginning of the array\n * @param {Number} count Number of vec3s to iterate over. If 0 iterates over entire array\n * @param {Function} fn Function to call for each vector in the array\n * @param {Object} [arg] additional argument to pass to fn\n * @returns {Array} a\n * @function\n */\nvec3.forEach = (function() {\n var vec = vec3.create();\n\n return function(a, stride, offset, count, fn, arg) {\n var i, l;\n if(!stride) {\n stride = 3;\n }\n\n if(!offset) {\n offset = 0;\n }\n \n if(count) {\n l = Math.min((count * stride) + offset, a.length);\n } else {\n l = a.length;\n }\n\n for(i = offset; i < l; i += stride) {\n vec[0] = a[i]; vec[1] = a[i+1]; vec[2] = a[i+2];\n fn(vec, vec, arg);\n a[i] = vec[0]; a[i+1] = vec[1]; a[i+2] = vec[2];\n }\n \n return a;\n };\n})();\n\n/**\n * Returns a string representation of a vector\n *\n * @param {vec3} vec vector to represent as a string\n * @returns {String} string representation of the vector\n */\nvec3.str = function (a) {\n return 'vec3(' + a[0] + ', ' + a[1] + ', ' + a[2] + ')';\n};\n\nif(typeof(exports) !== 'undefined') {\n exports.vec3 = vec3;\n}\n;\n/* Copyright (c) 2013, Brandon Jones, Colin MacKenzie IV. All rights reserved.\n\nRedistribution and use in source and binary forms, with or without modification,\nare permitted provided that the following conditions are met:\n\n * Redistributions of source code must retain the above copyright notice, this\n list of conditions and the following disclaimer.\n * Redistributions in binary form must reproduce the above copyright notice,\n this list of conditions and the following disclaimer in the documentation \n and/or other materials provided with the distribution.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\nANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\nWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE \nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR\nANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\nLOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON\nANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\nSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */\n\n/**\n * @class 4 Dimensional Vector\n * @name vec4\n */\n\nvar vec4 = {};\n\n/**\n * Creates a new, empty vec4\n *\n * @returns {vec4} a new 4D vector\n */\nvec4.create = function() {\n var out = new GLMAT_ARRAY_TYPE(4);\n out[0] = 0;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n return out;\n};\n\n/**\n * Creates a new vec4 initialized with values from an existing vector\n *\n * @param {vec4} a vector to clone\n * @returns {vec4} a new 4D vector\n */\nvec4.clone = function(a) {\n var out = new GLMAT_ARRAY_TYPE(4);\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n return out;\n};\n\n/**\n * Creates a new vec4 initialized with the given values\n *\n * @param {Number} x X component\n * @param {Number} y Y component\n * @param {Number} z Z component\n * @param {Number} w W component\n * @returns {vec4} a new 4D vector\n */\nvec4.fromValues = function(x, y, z, w) {\n var out = new GLMAT_ARRAY_TYPE(4);\n out[0] = x;\n out[1] = y;\n out[2] = z;\n out[3] = w;\n return out;\n};\n\n/**\n * Copy the values from one vec4 to another\n *\n * @param {vec4} out the receiving vector\n * @param {vec4} a the source vector\n * @returns {vec4} out\n */\nvec4.copy = function(out, a) {\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n return out;\n};\n\n/**\n * Set the components of a vec4 to the given values\n *\n * @param {vec4} out the receiving vector\n * @param {Number} x X component\n * @param {Number} y Y component\n * @param {Number} z Z component\n * @param {Number} w W component\n * @returns {vec4} out\n */\nvec4.set = function(out, x, y, z, w) {\n out[0] = x;\n out[1] = y;\n out[2] = z;\n out[3] = w;\n return out;\n};\n\n/**\n * Adds two vec4's\n *\n * @param {vec4} out the receiving vector\n * @param {vec4} a the first operand\n * @param {vec4} b the second operand\n * @returns {vec4} out\n */\nvec4.add = function(out, a, b) {\n out[0] = a[0] + b[0];\n out[1] = a[1] + b[1];\n out[2] = a[2] + b[2];\n out[3] = a[3] + b[3];\n return out;\n};\n\n/**\n * Subtracts vector b from vector a\n *\n * @param {vec4} out the receiving vector\n * @param {vec4} a the first operand\n * @param {vec4} b the second operand\n * @returns {vec4} out\n */\nvec4.subtract = function(out, a, b) {\n out[0] = a[0] - b[0];\n out[1] = a[1] - b[1];\n out[2] = a[2] - b[2];\n out[3] = a[3] - b[3];\n return out;\n};\n\n/**\n * Alias for {@link vec4.subtract}\n * @function\n */\nvec4.sub = vec4.subtract;\n\n/**\n * Multiplies two vec4's\n *\n * @param {vec4} out the receiving vector\n * @param {vec4} a the first operand\n * @param {vec4} b the second operand\n * @returns {vec4} out\n */\nvec4.multiply = function(out, a, b) {\n out[0] = a[0] * b[0];\n out[1] = a[1] * b[1];\n out[2] = a[2] * b[2];\n out[3] = a[3] * b[3];\n return out;\n};\n\n/**\n * Alias for {@link vec4.multiply}\n * @function\n */\nvec4.mul = vec4.multiply;\n\n/**\n * Divides two vec4's\n *\n * @param {vec4} out the receiving vector\n * @param {vec4} a the first operand\n * @param {vec4} b the second operand\n * @returns {vec4} out\n */\nvec4.divide = function(out, a, b) {\n out[0] = a[0] / b[0];\n out[1] = a[1] / b[1];\n out[2] = a[2] / b[2];\n out[3] = a[3] / b[3];\n return out;\n};\n\n/**\n * Alias for {@link vec4.divide}\n * @function\n */\nvec4.div = vec4.divide;\n\n/**\n * Returns the minimum of two vec4's\n *\n * @param {vec4} out the receiving vector\n * @param {vec4} a the first operand\n * @param {vec4} b the second operand\n * @returns {vec4} out\n */\nvec4.min = function(out, a, b) {\n out[0] = Math.min(a[0], b[0]);\n out[1] = Math.min(a[1], b[1]);\n out[2] = Math.min(a[2], b[2]);\n out[3] = Math.min(a[3], b[3]);\n return out;\n};\n\n/**\n * Returns the maximum of two vec4's\n *\n * @param {vec4} out the receiving vector\n * @param {vec4} a the first operand\n * @param {vec4} b the second operand\n * @returns {vec4} out\n */\nvec4.max = function(out, a, b) {\n out[0] = Math.max(a[0], b[0]);\n out[1] = Math.max(a[1], b[1]);\n out[2] = Math.max(a[2], b[2]);\n out[3] = Math.max(a[3], b[3]);\n return out;\n};\n\n/**\n * Scales a vec4 by a scalar number\n *\n * @param {vec4} out the receiving vector\n * @param {vec4} a the vector to scale\n * @param {Number} b amount to scale the vector by\n * @returns {vec4} out\n */\nvec4.scale = function(out, a, b) {\n out[0] = a[0] * b;\n out[1] = a[1] * b;\n out[2] = a[2] * b;\n out[3] = a[3] * b;\n return out;\n};\n\n/**\n * Adds two vec4's after scaling the second operand by a scalar value\n *\n * @param {vec4} out the receiving vector\n * @param {vec4} a the first operand\n * @param {vec4} b the second operand\n * @param {Number} scale the amount to scale b by before adding\n * @returns {vec4} out\n */\nvec4.scaleAndAdd = function(out, a, b, scale) {\n out[0] = a[0] + (b[0] * scale);\n out[1] = a[1] + (b[1] * scale);\n out[2] = a[2] + (b[2] * scale);\n out[3] = a[3] + (b[3] * scale);\n return out;\n};\n\n/**\n * Calculates the euclidian distance between two vec4's\n *\n * @param {vec4} a the first operand\n * @param {vec4} b the second operand\n * @returns {Number} distance between a and b\n */\nvec4.distance = function(a, b) {\n var x = b[0] - a[0],\n y = b[1] - a[1],\n z = b[2] - a[2],\n w = b[3] - a[3];\n return Math.sqrt(x*x + y*y + z*z + w*w);\n};\n\n/**\n * Alias for {@link vec4.distance}\n * @function\n */\nvec4.dist = vec4.distance;\n\n/**\n * Calculates the squared euclidian distance between two vec4's\n *\n * @param {vec4} a the first operand\n * @param {vec4} b the second operand\n * @returns {Number} squared distance between a and b\n */\nvec4.squaredDistance = function(a, b) {\n var x = b[0] - a[0],\n y = b[1] - a[1],\n z = b[2] - a[2],\n w = b[3] - a[3];\n return x*x + y*y + z*z + w*w;\n};\n\n/**\n * Alias for {@link vec4.squaredDistance}\n * @function\n */\nvec4.sqrDist = vec4.squaredDistance;\n\n/**\n * Calculates the length of a vec4\n *\n * @param {vec4} a vector to calculate length of\n * @returns {Number} length of a\n */\nvec4.length = function (a) {\n var x = a[0],\n y = a[1],\n z = a[2],\n w = a[3];\n return Math.sqrt(x*x + y*y + z*z + w*w);\n};\n\n/**\n * Alias for {@link vec4.length}\n * @function\n */\nvec4.len = vec4.length;\n\n/**\n * Calculates the squared length of a vec4\n *\n * @param {vec4} a vector to calculate squared length of\n * @returns {Number} squared length of a\n */\nvec4.squaredLength = function (a) {\n var x = a[0],\n y = a[1],\n z = a[2],\n w = a[3];\n return x*x + y*y + z*z + w*w;\n};\n\n/**\n * Alias for {@link vec4.squaredLength}\n * @function\n */\nvec4.sqrLen = vec4.squaredLength;\n\n/**\n * Negates the components of a vec4\n *\n * @param {vec4} out the receiving vector\n * @param {vec4} a vector to negate\n * @returns {vec4} out\n */\nvec4.negate = function(out, a) {\n out[0] = -a[0];\n out[1] = -a[1];\n out[2] = -a[2];\n out[3] = -a[3];\n return out;\n};\n\n/**\n * Normalize a vec4\n *\n * @param {vec4} out the receiving vector\n * @param {vec4} a vector to normalize\n * @returns {vec4} out\n */\nvec4.normalize = function(out, a) {\n var x = a[0],\n y = a[1],\n z = a[2],\n w = a[3];\n var len = x*x + y*y + z*z + w*w;\n if (len > 0) {\n len = 1 / Math.sqrt(len);\n out[0] = a[0] * len;\n out[1] = a[1] * len;\n out[2] = a[2] * len;\n out[3] = a[3] * len;\n }\n return out;\n};\n\n/**\n * Calculates the dot product of two vec4's\n *\n * @param {vec4} a the first operand\n * @param {vec4} b the second operand\n * @returns {Number} dot product of a and b\n */\nvec4.dot = function (a, b) {\n return a[0] * b[0] + a[1] * b[1] + a[2] * b[2] + a[3] * b[3];\n};\n\n/**\n * Performs a linear interpolation between two vec4's\n *\n * @param {vec4} out the receiving vector\n * @param {vec4} a the first operand\n * @param {vec4} b the second operand\n * @param {Number} t interpolation amount between the two inputs\n * @returns {vec4} out\n */\nvec4.lerp = function (out, a, b, t) {\n var ax = a[0],\n ay = a[1],\n az = a[2],\n aw = a[3];\n out[0] = ax + t * (b[0] - ax);\n out[1] = ay + t * (b[1] - ay);\n out[2] = az + t * (b[2] - az);\n out[3] = aw + t * (b[3] - aw);\n return out;\n};\n\n/**\n * Generates a random vector with the given scale\n *\n * @param {vec4} out the receiving vector\n * @param {Number} [scale] Length of the resulting vector. If ommitted, a unit vector will be returned\n * @returns {vec4} out\n */\nvec4.random = function (out, scale) {\n scale = scale || 1.0;\n\n //TODO: This is a pretty awful way of doing this. Find something better.\n out[0] = GLMAT_RANDOM();\n out[1] = GLMAT_RANDOM();\n out[2] = GLMAT_RANDOM();\n out[3] = GLMAT_RANDOM();\n vec4.normalize(out, out);\n vec4.scale(out, out, scale);\n return out;\n};\n\n/**\n * Transforms the vec4 with a mat4.\n *\n * @param {vec4} out the receiving vector\n * @param {vec4} a the vector to transform\n * @param {mat4} m matrix to transform with\n * @returns {vec4} out\n */\nvec4.transformMat4 = function(out, a, m) {\n var x = a[0], y = a[1], z = a[2], w = a[3];\n out[0] = m[0] * x + m[4] * y + m[8] * z + m[12] * w;\n out[1] = m[1] * x + m[5] * y + m[9] * z + m[13] * w;\n out[2] = m[2] * x + m[6] * y + m[10] * z + m[14] * w;\n out[3] = m[3] * x + m[7] * y + m[11] * z + m[15] * w;\n return out;\n};\n\n/**\n * Transforms the vec4 with a quat\n *\n * @param {vec4} out the receiving vector\n * @param {vec4} a the vector to transform\n * @param {quat} q quaternion to transform with\n * @returns {vec4} out\n */\nvec4.transformQuat = function(out, a, q) {\n var x = a[0], y = a[1], z = a[2],\n qx = q[0], qy = q[1], qz = q[2], qw = q[3],\n\n // calculate quat * vec\n ix = qw * x + qy * z - qz * y,\n iy = qw * y + qz * x - qx * z,\n iz = qw * z + qx * y - qy * x,\n iw = -qx * x - qy * y - qz * z;\n\n // calculate result * inverse quat\n out[0] = ix * qw + iw * -qx + iy * -qz - iz * -qy;\n out[1] = iy * qw + iw * -qy + iz * -qx - ix * -qz;\n out[2] = iz * qw + iw * -qz + ix * -qy - iy * -qx;\n return out;\n};\n\n/**\n * Perform some operation over an array of vec4s.\n *\n * @param {Array} a the array of vectors to iterate over\n * @param {Number} stride Number of elements between the start of each vec4. If 0 assumes tightly packed\n * @param {Number} offset Number of elements to skip at the beginning of the array\n * @param {Number} count Number of vec2s to iterate over. If 0 iterates over entire array\n * @param {Function} fn Function to call for each vector in the array\n * @param {Object} [arg] additional argument to pass to fn\n * @returns {Array} a\n * @function\n */\nvec4.forEach = (function() {\n var vec = vec4.create();\n\n return function(a, stride, offset, count, fn, arg) {\n var i, l;\n if(!stride) {\n stride = 4;\n }\n\n if(!offset) {\n offset = 0;\n }\n \n if(count) {\n l = Math.min((count * stride) + offset, a.length);\n } else {\n l = a.length;\n }\n\n for(i = offset; i < l; i += stride) {\n vec[0] = a[i]; vec[1] = a[i+1]; vec[2] = a[i+2]; vec[3] = a[i+3];\n fn(vec, vec, arg);\n a[i] = vec[0]; a[i+1] = vec[1]; a[i+2] = vec[2]; a[i+3] = vec[3];\n }\n \n return a;\n };\n})();\n\n/**\n * Returns a string representation of a vector\n *\n * @param {vec4} vec vector to represent as a string\n * @returns {String} string representation of the vector\n */\nvec4.str = function (a) {\n return 'vec4(' + a[0] + ', ' + a[1] + ', ' + a[2] + ', ' + a[3] + ')';\n};\n\nif(typeof(exports) !== 'undefined') {\n exports.vec4 = vec4;\n}\n;\n/* Copyright (c) 2013, Brandon Jones, Colin MacKenzie IV. All rights reserved.\n\nRedistribution and use in source and binary forms, with or without modification,\nare permitted provided that the following conditions are met:\n\n * Redistributions of source code must retain the above copyright notice, this\n list of conditions and the following disclaimer.\n * Redistributions in binary form must reproduce the above copyright notice,\n this list of conditions and the following disclaimer in the documentation \n and/or other materials provided with the distribution.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\nANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\nWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE \nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR\nANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\nLOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON\nANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\nSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */\n\n/**\n * @class 2x2 Matrix\n * @name mat2\n */\n\nvar mat2 = {};\n\n/**\n * Creates a new identity mat2\n *\n * @returns {mat2} a new 2x2 matrix\n */\nmat2.create = function() {\n var out = new GLMAT_ARRAY_TYPE(4);\n out[0] = 1;\n out[1] = 0;\n out[2] = 0;\n out[3] = 1;\n return out;\n};\n\n/**\n * Creates a new mat2 initialized with values from an existing matrix\n *\n * @param {mat2} a matrix to clone\n * @returns {mat2} a new 2x2 matrix\n */\nmat2.clone = function(a) {\n var out = new GLMAT_ARRAY_TYPE(4);\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n return out;\n};\n\n/**\n * Copy the values from one mat2 to another\n *\n * @param {mat2} out the receiving matrix\n * @param {mat2} a the source matrix\n * @returns {mat2} out\n */\nmat2.copy = function(out, a) {\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n return out;\n};\n\n/**\n * Set a mat2 to the identity matrix\n *\n * @param {mat2} out the receiving matrix\n * @returns {mat2} out\n */\nmat2.identity = function(out) {\n out[0] = 1;\n out[1] = 0;\n out[2] = 0;\n out[3] = 1;\n return out;\n};\n\n/**\n * Transpose the values of a mat2\n *\n * @param {mat2} out the receiving matrix\n * @param {mat2} a the source matrix\n * @returns {mat2} out\n */\nmat2.transpose = function(out, a) {\n // If we are transposing ourselves we can skip a few steps but have to cache some values\n if (out === a) {\n var a1 = a[1];\n out[1] = a[2];\n out[2] = a1;\n } else {\n out[0] = a[0];\n out[1] = a[2];\n out[2] = a[1];\n out[3] = a[3];\n }\n \n return out;\n};\n\n/**\n * Inverts a mat2\n *\n * @param {mat2} out the receiving matrix\n * @param {mat2} a the source matrix\n * @returns {mat2} out\n */\nmat2.invert = function(out, a) {\n var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3],\n\n // Calculate the determinant\n det = a0 * a3 - a2 * a1;\n\n if (!det) {\n return null;\n }\n det = 1.0 / det;\n \n out[0] = a3 * det;\n out[1] = -a1 * det;\n out[2] = -a2 * det;\n out[3] = a0 * det;\n\n return out;\n};\n\n/**\n * Calculates the adjugate of a mat2\n *\n * @param {mat2} out the receiving matrix\n * @param {mat2} a the source matrix\n * @returns {mat2} out\n */\nmat2.adjoint = function(out, a) {\n // Caching this value is nessecary if out == a\n var a0 = a[0];\n out[0] = a[3];\n out[1] = -a[1];\n out[2] = -a[2];\n out[3] = a0;\n\n return out;\n};\n\n/**\n * Calculates the determinant of a mat2\n *\n * @param {mat2} a the source matrix\n * @returns {Number} determinant of a\n */\nmat2.determinant = function (a) {\n return a[0] * a[3] - a[2] * a[1];\n};\n\n/**\n * Multiplies two mat2's\n *\n * @param {mat2} out the receiving matrix\n * @param {mat2} a the first operand\n * @param {mat2} b the second operand\n * @returns {mat2} out\n */\nmat2.multiply = function (out, a, b) {\n var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3];\n var b0 = b[0], b1 = b[1], b2 = b[2], b3 = b[3];\n out[0] = a0 * b0 + a2 * b1;\n out[1] = a1 * b0 + a3 * b1;\n out[2] = a0 * b2 + a2 * b3;\n out[3] = a1 * b2 + a3 * b3;\n return out;\n};\n\n/**\n * Alias for {@link mat2.multiply}\n * @function\n */\nmat2.mul = mat2.multiply;\n\n/**\n * Rotates a mat2 by the given angle\n *\n * @param {mat2} out the receiving matrix\n * @param {mat2} a the matrix to rotate\n * @param {Number} rad the angle to rotate the matrix by\n * @returns {mat2} out\n */\nmat2.rotate = function (out, a, rad) {\n var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3],\n s = Math.sin(rad),\n c = Math.cos(rad);\n out[0] = a0 * c + a2 * s;\n out[1] = a1 * c + a3 * s;\n out[2] = a0 * -s + a2 * c;\n out[3] = a1 * -s + a3 * c;\n return out;\n};\n\n/**\n * Scales the mat2 by the dimensions in the given vec2\n *\n * @param {mat2} out the receiving matrix\n * @param {mat2} a the matrix to rotate\n * @param {vec2} v the vec2 to scale the matrix by\n * @returns {mat2} out\n **/\nmat2.scale = function(out, a, v) {\n var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3],\n v0 = v[0], v1 = v[1];\n out[0] = a0 * v0;\n out[1] = a1 * v0;\n out[2] = a2 * v1;\n out[3] = a3 * v1;\n return out;\n};\n\n/**\n * Returns a string representation of a mat2\n *\n * @param {mat2} mat matrix to represent as a string\n * @returns {String} string representation of the matrix\n */\nmat2.str = function (a) {\n return 'mat2(' + a[0] + ', ' + a[1] + ', ' + a[2] + ', ' + a[3] + ')';\n};\n\n/**\n * Returns Frobenius norm of a mat2\n *\n * @param {mat2} a the matrix to calculate Frobenius norm of\n * @returns {Number} Frobenius norm\n */\nmat2.frob = function (a) {\n return(Math.sqrt(Math.pow(a[0], 2) + Math.pow(a[1], 2) + Math.pow(a[2], 2) + Math.pow(a[3], 2)))\n};\n\n/**\n * Returns L, D and U matrices (Lower triangular, Diagonal and Upper triangular) by factorizing the input matrix\n * @param {mat2} L the lower triangular matrix \n * @param {mat2} D the diagonal matrix \n * @param {mat2} U the upper triangular matrix \n * @param {mat2} a the input matrix to factorize\n */\n\nmat2.LDU = function (L, D, U, a) { \n L[2] = a[2]/a[0]; \n U[0] = a[0]; \n U[1] = a[1]; \n U[3] = a[3] - L[2] * U[1]; \n return [L, D, U]; \n}; \n\nif(typeof(exports) !== 'undefined') {\n exports.mat2 = mat2;\n}\n;\n/* Copyright (c) 2013, Brandon Jones, Colin MacKenzie IV. All rights reserved.\n\nRedistribution and use in source and binary forms, with or without modification,\nare permitted provided that the following conditions are met:\n\n * Redistributions of source code must retain the above copyright notice, this\n list of conditions and the following disclaimer.\n * Redistributions in binary form must reproduce the above copyright notice,\n this list of conditions and the following disclaimer in the documentation \n and/or other materials provided with the distribution.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\nANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\nWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE \nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR\nANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\nLOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON\nANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\nSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */\n\n/**\n * @class 2x3 Matrix\n * @name mat2d\n * \n * @description \n * A mat2d contains six elements defined as:\n *
\n * [a, c, tx,\n *  b, d, ty]\n * 
\n * This is a short form for the 3x3 matrix:\n *
\n * [a, c, tx,\n *  b, d, ty,\n *  0, 0, 1]\n * 
\n * The last row is ignored so the array is shorter and operations are faster.\n */\n\nvar mat2d = {};\n\n/**\n * Creates a new identity mat2d\n *\n * @returns {mat2d} a new 2x3 matrix\n */\nmat2d.create = function() {\n var out = new GLMAT_ARRAY_TYPE(6);\n out[0] = 1;\n out[1] = 0;\n out[2] = 0;\n out[3] = 1;\n out[4] = 0;\n out[5] = 0;\n return out;\n};\n\n/**\n * Creates a new mat2d initialized with values from an existing matrix\n *\n * @param {mat2d} a matrix to clone\n * @returns {mat2d} a new 2x3 matrix\n */\nmat2d.clone = function(a) {\n var out = new GLMAT_ARRAY_TYPE(6);\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n out[4] = a[4];\n out[5] = a[5];\n return out;\n};\n\n/**\n * Copy the values from one mat2d to another\n *\n * @param {mat2d} out the receiving matrix\n * @param {mat2d} a the source matrix\n * @returns {mat2d} out\n */\nmat2d.copy = function(out, a) {\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n out[4] = a[4];\n out[5] = a[5];\n return out;\n};\n\n/**\n * Set a mat2d to the identity matrix\n *\n * @param {mat2d} out the receiving matrix\n * @returns {mat2d} out\n */\nmat2d.identity = function(out) {\n out[0] = 1;\n out[1] = 0;\n out[2] = 0;\n out[3] = 1;\n out[4] = 0;\n out[5] = 0;\n return out;\n};\n\n/**\n * Inverts a mat2d\n *\n * @param {mat2d} out the receiving matrix\n * @param {mat2d} a the source matrix\n * @returns {mat2d} out\n */\nmat2d.invert = function(out, a) {\n var aa = a[0], ab = a[1], ac = a[2], ad = a[3],\n atx = a[4], aty = a[5];\n\n var det = aa * ad - ab * ac;\n if(!det){\n return null;\n }\n det = 1.0 / det;\n\n out[0] = ad * det;\n out[1] = -ab * det;\n out[2] = -ac * det;\n out[3] = aa * det;\n out[4] = (ac * aty - ad * atx) * det;\n out[5] = (ab * atx - aa * aty) * det;\n return out;\n};\n\n/**\n * Calculates the determinant of a mat2d\n *\n * @param {mat2d} a the source matrix\n * @returns {Number} determinant of a\n */\nmat2d.determinant = function (a) {\n return a[0] * a[3] - a[1] * a[2];\n};\n\n/**\n * Multiplies two mat2d's\n *\n * @param {mat2d} out the receiving matrix\n * @param {mat2d} a the first operand\n * @param {mat2d} b the second operand\n * @returns {mat2d} out\n */\nmat2d.multiply = function (out, a, b) {\n var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3], a4 = a[4], a5 = a[5],\n b0 = b[0], b1 = b[1], b2 = b[2], b3 = b[3], b4 = b[4], b5 = b[5];\n out[0] = a0 * b0 + a2 * b1;\n out[1] = a1 * b0 + a3 * b1;\n out[2] = a0 * b2 + a2 * b3;\n out[3] = a1 * b2 + a3 * b3;\n out[4] = a0 * b4 + a2 * b5 + a4;\n out[5] = a1 * b4 + a3 * b5 + a5;\n return out;\n};\n\n/**\n * Alias for {@link mat2d.multiply}\n * @function\n */\nmat2d.mul = mat2d.multiply;\n\n\n/**\n * Rotates a mat2d by the given angle\n *\n * @param {mat2d} out the receiving matrix\n * @param {mat2d} a the matrix to rotate\n * @param {Number} rad the angle to rotate the matrix by\n * @returns {mat2d} out\n */\nmat2d.rotate = function (out, a, rad) {\n var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3], a4 = a[4], a5 = a[5],\n s = Math.sin(rad),\n c = Math.cos(rad);\n out[0] = a0 * c + a2 * s;\n out[1] = a1 * c + a3 * s;\n out[2] = a0 * -s + a2 * c;\n out[3] = a1 * -s + a3 * c;\n out[4] = a4;\n out[5] = a5;\n return out;\n};\n\n/**\n * Scales the mat2d by the dimensions in the given vec2\n *\n * @param {mat2d} out the receiving matrix\n * @param {mat2d} a the matrix to translate\n * @param {vec2} v the vec2 to scale the matrix by\n * @returns {mat2d} out\n **/\nmat2d.scale = function(out, a, v) {\n var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3], a4 = a[4], a5 = a[5],\n v0 = v[0], v1 = v[1];\n out[0] = a0 * v0;\n out[1] = a1 * v0;\n out[2] = a2 * v1;\n out[3] = a3 * v1;\n out[4] = a4;\n out[5] = a5;\n return out;\n};\n\n/**\n * Translates the mat2d by the dimensions in the given vec2\n *\n * @param {mat2d} out the receiving matrix\n * @param {mat2d} a the matrix to translate\n * @param {vec2} v the vec2 to translate the matrix by\n * @returns {mat2d} out\n **/\nmat2d.translate = function(out, a, v) {\n var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3], a4 = a[4], a5 = a[5],\n v0 = v[0], v1 = v[1];\n out[0] = a0;\n out[1] = a1;\n out[2] = a2;\n out[3] = a3;\n out[4] = a0 * v0 + a2 * v1 + a4;\n out[5] = a1 * v0 + a3 * v1 + a5;\n return out;\n};\n\n/**\n * Returns a string representation of a mat2d\n *\n * @param {mat2d} a matrix to represent as a string\n * @returns {String} string representation of the matrix\n */\nmat2d.str = function (a) {\n return 'mat2d(' + a[0] + ', ' + a[1] + ', ' + a[2] + ', ' + \n a[3] + ', ' + a[4] + ', ' + a[5] + ')';\n};\n\n/**\n * Returns Frobenius norm of a mat2d\n *\n * @param {mat2d} a the matrix to calculate Frobenius norm of\n * @returns {Number} Frobenius norm\n */\nmat2d.frob = function (a) { \n return(Math.sqrt(Math.pow(a[0], 2) + Math.pow(a[1], 2) + Math.pow(a[2], 2) + Math.pow(a[3], 2) + Math.pow(a[4], 2) + Math.pow(a[5], 2) + 1))\n}; \n\nif(typeof(exports) !== 'undefined') {\n exports.mat2d = mat2d;\n}\n;\n/* Copyright (c) 2013, Brandon Jones, Colin MacKenzie IV. All rights reserved.\n\nRedistribution and use in source and binary forms, with or without modification,\nare permitted provided that the following conditions are met:\n\n * Redistributions of source code must retain the above copyright notice, this\n list of conditions and the following disclaimer.\n * Redistributions in binary form must reproduce the above copyright notice,\n this list of conditions and the following disclaimer in the documentation \n and/or other materials provided with the distribution.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\nANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\nWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE \nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR\nANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\nLOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON\nANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\nSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */\n\n/**\n * @class 3x3 Matrix\n * @name mat3\n */\n\nvar mat3 = {};\n\n/**\n * Creates a new identity mat3\n *\n * @returns {mat3} a new 3x3 matrix\n */\nmat3.create = function() {\n var out = new GLMAT_ARRAY_TYPE(9);\n out[0] = 1;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 1;\n out[5] = 0;\n out[6] = 0;\n out[7] = 0;\n out[8] = 1;\n return out;\n};\n\n/**\n * Copies the upper-left 3x3 values into the given mat3.\n *\n * @param {mat3} out the receiving 3x3 matrix\n * @param {mat4} a the source 4x4 matrix\n * @returns {mat3} out\n */\nmat3.fromMat4 = function(out, a) {\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[4];\n out[4] = a[5];\n out[5] = a[6];\n out[6] = a[8];\n out[7] = a[9];\n out[8] = a[10];\n return out;\n};\n\n/**\n * Creates a new mat3 initialized with values from an existing matrix\n *\n * @param {mat3} a matrix to clone\n * @returns {mat3} a new 3x3 matrix\n */\nmat3.clone = function(a) {\n var out = new GLMAT_ARRAY_TYPE(9);\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n out[4] = a[4];\n out[5] = a[5];\n out[6] = a[6];\n out[7] = a[7];\n out[8] = a[8];\n return out;\n};\n\n/**\n * Copy the values from one mat3 to another\n *\n * @param {mat3} out the receiving matrix\n * @param {mat3} a the source matrix\n * @returns {mat3} out\n */\nmat3.copy = function(out, a) {\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n out[4] = a[4];\n out[5] = a[5];\n out[6] = a[6];\n out[7] = a[7];\n out[8] = a[8];\n return out;\n};\n\n/**\n * Set a mat3 to the identity matrix\n *\n * @param {mat3} out the receiving matrix\n * @returns {mat3} out\n */\nmat3.identity = function(out) {\n out[0] = 1;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 1;\n out[5] = 0;\n out[6] = 0;\n out[7] = 0;\n out[8] = 1;\n return out;\n};\n\n/**\n * Transpose the values of a mat3\n *\n * @param {mat3} out the receiving matrix\n * @param {mat3} a the source matrix\n * @returns {mat3} out\n */\nmat3.transpose = function(out, a) {\n // If we are transposing ourselves we can skip a few steps but have to cache some values\n if (out === a) {\n var a01 = a[1], a02 = a[2], a12 = a[5];\n out[1] = a[3];\n out[2] = a[6];\n out[3] = a01;\n out[5] = a[7];\n out[6] = a02;\n out[7] = a12;\n } else {\n out[0] = a[0];\n out[1] = a[3];\n out[2] = a[6];\n out[3] = a[1];\n out[4] = a[4];\n out[5] = a[7];\n out[6] = a[2];\n out[7] = a[5];\n out[8] = a[8];\n }\n \n return out;\n};\n\n/**\n * Inverts a mat3\n *\n * @param {mat3} out the receiving matrix\n * @param {mat3} a the source matrix\n * @returns {mat3} out\n */\nmat3.invert = function(out, a) {\n var a00 = a[0], a01 = a[1], a02 = a[2],\n a10 = a[3], a11 = a[4], a12 = a[5],\n a20 = a[6], a21 = a[7], a22 = a[8],\n\n b01 = a22 * a11 - a12 * a21,\n b11 = -a22 * a10 + a12 * a20,\n b21 = a21 * a10 - a11 * a20,\n\n // Calculate the determinant\n det = a00 * b01 + a01 * b11 + a02 * b21;\n\n if (!det) { \n return null; \n }\n det = 1.0 / det;\n\n out[0] = b01 * det;\n out[1] = (-a22 * a01 + a02 * a21) * det;\n out[2] = (a12 * a01 - a02 * a11) * det;\n out[3] = b11 * det;\n out[4] = (a22 * a00 - a02 * a20) * det;\n out[5] = (-a12 * a00 + a02 * a10) * det;\n out[6] = b21 * det;\n out[7] = (-a21 * a00 + a01 * a20) * det;\n out[8] = (a11 * a00 - a01 * a10) * det;\n return out;\n};\n\n/**\n * Calculates the adjugate of a mat3\n *\n * @param {mat3} out the receiving matrix\n * @param {mat3} a the source matrix\n * @returns {mat3} out\n */\nmat3.adjoint = function(out, a) {\n var a00 = a[0], a01 = a[1], a02 = a[2],\n a10 = a[3], a11 = a[4], a12 = a[5],\n a20 = a[6], a21 = a[7], a22 = a[8];\n\n out[0] = (a11 * a22 - a12 * a21);\n out[1] = (a02 * a21 - a01 * a22);\n out[2] = (a01 * a12 - a02 * a11);\n out[3] = (a12 * a20 - a10 * a22);\n out[4] = (a00 * a22 - a02 * a20);\n out[5] = (a02 * a10 - a00 * a12);\n out[6] = (a10 * a21 - a11 * a20);\n out[7] = (a01 * a20 - a00 * a21);\n out[8] = (a00 * a11 - a01 * a10);\n return out;\n};\n\n/**\n * Calculates the determinant of a mat3\n *\n * @param {mat3} a the source matrix\n * @returns {Number} determinant of a\n */\nmat3.determinant = function (a) {\n var a00 = a[0], a01 = a[1], a02 = a[2],\n a10 = a[3], a11 = a[4], a12 = a[5],\n a20 = a[6], a21 = a[7], a22 = a[8];\n\n return a00 * (a22 * a11 - a12 * a21) + a01 * (-a22 * a10 + a12 * a20) + a02 * (a21 * a10 - a11 * a20);\n};\n\n/**\n * Multiplies two mat3's\n *\n * @param {mat3} out the receiving matrix\n * @param {mat3} a the first operand\n * @param {mat3} b the second operand\n * @returns {mat3} out\n */\nmat3.multiply = function (out, a, b) {\n var a00 = a[0], a01 = a[1], a02 = a[2],\n a10 = a[3], a11 = a[4], a12 = a[5],\n a20 = a[6], a21 = a[7], a22 = a[8],\n\n b00 = b[0], b01 = b[1], b02 = b[2],\n b10 = b[3], b11 = b[4], b12 = b[5],\n b20 = b[6], b21 = b[7], b22 = b[8];\n\n out[0] = b00 * a00 + b01 * a10 + b02 * a20;\n out[1] = b00 * a01 + b01 * a11 + b02 * a21;\n out[2] = b00 * a02 + b01 * a12 + b02 * a22;\n\n out[3] = b10 * a00 + b11 * a10 + b12 * a20;\n out[4] = b10 * a01 + b11 * a11 + b12 * a21;\n out[5] = b10 * a02 + b11 * a12 + b12 * a22;\n\n out[6] = b20 * a00 + b21 * a10 + b22 * a20;\n out[7] = b20 * a01 + b21 * a11 + b22 * a21;\n out[8] = b20 * a02 + b21 * a12 + b22 * a22;\n return out;\n};\n\n/**\n * Alias for {@link mat3.multiply}\n * @function\n */\nmat3.mul = mat3.multiply;\n\n/**\n * Translate a mat3 by the given vector\n *\n * @param {mat3} out the receiving matrix\n * @param {mat3} a the matrix to translate\n * @param {vec2} v vector to translate by\n * @returns {mat3} out\n */\nmat3.translate = function(out, a, v) {\n var a00 = a[0], a01 = a[1], a02 = a[2],\n a10 = a[3], a11 = a[4], a12 = a[5],\n a20 = a[6], a21 = a[7], a22 = a[8],\n x = v[0], y = v[1];\n\n out[0] = a00;\n out[1] = a01;\n out[2] = a02;\n\n out[3] = a10;\n out[4] = a11;\n out[5] = a12;\n\n out[6] = x * a00 + y * a10 + a20;\n out[7] = x * a01 + y * a11 + a21;\n out[8] = x * a02 + y * a12 + a22;\n return out;\n};\n\n/**\n * Rotates a mat3 by the given angle\n *\n * @param {mat3} out the receiving matrix\n * @param {mat3} a the matrix to rotate\n * @param {Number} rad the angle to rotate the matrix by\n * @returns {mat3} out\n */\nmat3.rotate = function (out, a, rad) {\n var a00 = a[0], a01 = a[1], a02 = a[2],\n a10 = a[3], a11 = a[4], a12 = a[5],\n a20 = a[6], a21 = a[7], a22 = a[8],\n\n s = Math.sin(rad),\n c = Math.cos(rad);\n\n out[0] = c * a00 + s * a10;\n out[1] = c * a01 + s * a11;\n out[2] = c * a02 + s * a12;\n\n out[3] = c * a10 - s * a00;\n out[4] = c * a11 - s * a01;\n out[5] = c * a12 - s * a02;\n\n out[6] = a20;\n out[7] = a21;\n out[8] = a22;\n return out;\n};\n\n/**\n * Scales the mat3 by the dimensions in the given vec2\n *\n * @param {mat3} out the receiving matrix\n * @param {mat3} a the matrix to rotate\n * @param {vec2} v the vec2 to scale the matrix by\n * @returns {mat3} out\n **/\nmat3.scale = function(out, a, v) {\n var x = v[0], y = v[1];\n\n out[0] = x * a[0];\n out[1] = x * a[1];\n out[2] = x * a[2];\n\n out[3] = y * a[3];\n out[4] = y * a[4];\n out[5] = y * a[5];\n\n out[6] = a[6];\n out[7] = a[7];\n out[8] = a[8];\n return out;\n};\n\n/**\n * Copies the values from a mat2d into a mat3\n *\n * @param {mat3} out the receiving matrix\n * @param {mat2d} a the matrix to copy\n * @returns {mat3} out\n **/\nmat3.fromMat2d = function(out, a) {\n out[0] = a[0];\n out[1] = a[1];\n out[2] = 0;\n\n out[3] = a[2];\n out[4] = a[3];\n out[5] = 0;\n\n out[6] = a[4];\n out[7] = a[5];\n out[8] = 1;\n return out;\n};\n\n/**\n* Calculates a 3x3 matrix from the given quaternion\n*\n* @param {mat3} out mat3 receiving operation result\n* @param {quat} q Quaternion to create matrix from\n*\n* @returns {mat3} out\n*/\nmat3.fromQuat = function (out, q) {\n var x = q[0], y = q[1], z = q[2], w = q[3],\n x2 = x + x,\n y2 = y + y,\n z2 = z + z,\n\n xx = x * x2,\n yx = y * x2,\n yy = y * y2,\n zx = z * x2,\n zy = z * y2,\n zz = z * z2,\n wx = w * x2,\n wy = w * y2,\n wz = w * z2;\n\n out[0] = 1 - yy - zz;\n out[3] = yx - wz;\n out[6] = zx + wy;\n\n out[1] = yx + wz;\n out[4] = 1 - xx - zz;\n out[7] = zy - wx;\n\n out[2] = zx - wy;\n out[5] = zy + wx;\n out[8] = 1 - xx - yy;\n\n return out;\n};\n\n/**\n* Calculates a 3x3 normal matrix (transpose inverse) from the 4x4 matrix\n*\n* @param {mat3} out mat3 receiving operation result\n* @param {mat4} a Mat4 to derive the normal matrix from\n*\n* @returns {mat3} out\n*/\nmat3.normalFromMat4 = function (out, a) {\n var a00 = a[0], a01 = a[1], a02 = a[2], a03 = a[3],\n a10 = a[4], a11 = a[5], a12 = a[6], a13 = a[7],\n a20 = a[8], a21 = a[9], a22 = a[10], a23 = a[11],\n a30 = a[12], a31 = a[13], a32 = a[14], a33 = a[15],\n\n b00 = a00 * a11 - a01 * a10,\n b01 = a00 * a12 - a02 * a10,\n b02 = a00 * a13 - a03 * a10,\n b03 = a01 * a12 - a02 * a11,\n b04 = a01 * a13 - a03 * a11,\n b05 = a02 * a13 - a03 * a12,\n b06 = a20 * a31 - a21 * a30,\n b07 = a20 * a32 - a22 * a30,\n b08 = a20 * a33 - a23 * a30,\n b09 = a21 * a32 - a22 * a31,\n b10 = a21 * a33 - a23 * a31,\n b11 = a22 * a33 - a23 * a32,\n\n // Calculate the determinant\n det = b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;\n\n if (!det) { \n return null; \n }\n det = 1.0 / det;\n\n out[0] = (a11 * b11 - a12 * b10 + a13 * b09) * det;\n out[1] = (a12 * b08 - a10 * b11 - a13 * b07) * det;\n out[2] = (a10 * b10 - a11 * b08 + a13 * b06) * det;\n\n out[3] = (a02 * b10 - a01 * b11 - a03 * b09) * det;\n out[4] = (a00 * b11 - a02 * b08 + a03 * b07) * det;\n out[5] = (a01 * b08 - a00 * b10 - a03 * b06) * det;\n\n out[6] = (a31 * b05 - a32 * b04 + a33 * b03) * det;\n out[7] = (a32 * b02 - a30 * b05 - a33 * b01) * det;\n out[8] = (a30 * b04 - a31 * b02 + a33 * b00) * det;\n\n return out;\n};\n\n/**\n * Returns a string representation of a mat3\n *\n * @param {mat3} mat matrix to represent as a string\n * @returns {String} string representation of the matrix\n */\nmat3.str = function (a) {\n return 'mat3(' + a[0] + ', ' + a[1] + ', ' + a[2] + ', ' + \n a[3] + ', ' + a[4] + ', ' + a[5] + ', ' + \n a[6] + ', ' + a[7] + ', ' + a[8] + ')';\n};\n\n/**\n * Returns Frobenius norm of a mat3\n *\n * @param {mat3} a the matrix to calculate Frobenius norm of\n * @returns {Number} Frobenius norm\n */\nmat3.frob = function (a) {\n return(Math.sqrt(Math.pow(a[0], 2) + Math.pow(a[1], 2) + Math.pow(a[2], 2) + Math.pow(a[3], 2) + Math.pow(a[4], 2) + Math.pow(a[5], 2) + Math.pow(a[6], 2) + Math.pow(a[7], 2) + Math.pow(a[8], 2)))\n};\n\n\nif(typeof(exports) !== 'undefined') {\n exports.mat3 = mat3;\n}\n;\n/* Copyright (c) 2013, Brandon Jones, Colin MacKenzie IV. All rights reserved.\n\nRedistribution and use in source and binary forms, with or without modification,\nare permitted provided that the following conditions are met:\n\n * Redistributions of source code must retain the above copyright notice, this\n list of conditions and the following disclaimer.\n * Redistributions in binary form must reproduce the above copyright notice,\n this list of conditions and the following disclaimer in the documentation \n and/or other materials provided with the distribution.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\nANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\nWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE \nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR\nANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\nLOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON\nANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\nSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */\n\n/**\n * @class 4x4 Matrix\n * @name mat4\n */\n\nvar mat4 = {};\n\n/**\n * Creates a new identity mat4\n *\n * @returns {mat4} a new 4x4 matrix\n */\nmat4.create = function() {\n var out = new GLMAT_ARRAY_TYPE(16);\n out[0] = 1;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[5] = 1;\n out[6] = 0;\n out[7] = 0;\n out[8] = 0;\n out[9] = 0;\n out[10] = 1;\n out[11] = 0;\n out[12] = 0;\n out[13] = 0;\n out[14] = 0;\n out[15] = 1;\n return out;\n};\n\n/**\n * Creates a new mat4 initialized with values from an existing matrix\n *\n * @param {mat4} a matrix to clone\n * @returns {mat4} a new 4x4 matrix\n */\nmat4.clone = function(a) {\n var out = new GLMAT_ARRAY_TYPE(16);\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n out[4] = a[4];\n out[5] = a[5];\n out[6] = a[6];\n out[7] = a[7];\n out[8] = a[8];\n out[9] = a[9];\n out[10] = a[10];\n out[11] = a[11];\n out[12] = a[12];\n out[13] = a[13];\n out[14] = a[14];\n out[15] = a[15];\n return out;\n};\n\n/**\n * Copy the values from one mat4 to another\n *\n * @param {mat4} out the receiving matrix\n * @param {mat4} a the source matrix\n * @returns {mat4} out\n */\nmat4.copy = function(out, a) {\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n out[4] = a[4];\n out[5] = a[5];\n out[6] = a[6];\n out[7] = a[7];\n out[8] = a[8];\n out[9] = a[9];\n out[10] = a[10];\n out[11] = a[11];\n out[12] = a[12];\n out[13] = a[13];\n out[14] = a[14];\n out[15] = a[15];\n return out;\n};\n\n/**\n * Set a mat4 to the identity matrix\n *\n * @param {mat4} out the receiving matrix\n * @returns {mat4} out\n */\nmat4.identity = function(out) {\n out[0] = 1;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[5] = 1;\n out[6] = 0;\n out[7] = 0;\n out[8] = 0;\n out[9] = 0;\n out[10] = 1;\n out[11] = 0;\n out[12] = 0;\n out[13] = 0;\n out[14] = 0;\n out[15] = 1;\n return out;\n};\n\n/**\n * Transpose the values of a mat4\n *\n * @param {mat4} out the receiving matrix\n * @param {mat4} a the source matrix\n * @returns {mat4} out\n */\nmat4.transpose = function(out, a) {\n // If we are transposing ourselves we can skip a few steps but have to cache some values\n if (out === a) {\n var a01 = a[1], a02 = a[2], a03 = a[3],\n a12 = a[6], a13 = a[7],\n a23 = a[11];\n\n out[1] = a[4];\n out[2] = a[8];\n out[3] = a[12];\n out[4] = a01;\n out[6] = a[9];\n out[7] = a[13];\n out[8] = a02;\n out[9] = a12;\n out[11] = a[14];\n out[12] = a03;\n out[13] = a13;\n out[14] = a23;\n } else {\n out[0] = a[0];\n out[1] = a[4];\n out[2] = a[8];\n out[3] = a[12];\n out[4] = a[1];\n out[5] = a[5];\n out[6] = a[9];\n out[7] = a[13];\n out[8] = a[2];\n out[9] = a[6];\n out[10] = a[10];\n out[11] = a[14];\n out[12] = a[3];\n out[13] = a[7];\n out[14] = a[11];\n out[15] = a[15];\n }\n \n return out;\n};\n\n/**\n * Inverts a mat4\n *\n * @param {mat4} out the receiving matrix\n * @param {mat4} a the source matrix\n * @returns {mat4} out\n */\nmat4.invert = function(out, a) {\n var a00 = a[0], a01 = a[1], a02 = a[2], a03 = a[3],\n a10 = a[4], a11 = a[5], a12 = a[6], a13 = a[7],\n a20 = a[8], a21 = a[9], a22 = a[10], a23 = a[11],\n a30 = a[12], a31 = a[13], a32 = a[14], a33 = a[15],\n\n b00 = a00 * a11 - a01 * a10,\n b01 = a00 * a12 - a02 * a10,\n b02 = a00 * a13 - a03 * a10,\n b03 = a01 * a12 - a02 * a11,\n b04 = a01 * a13 - a03 * a11,\n b05 = a02 * a13 - a03 * a12,\n b06 = a20 * a31 - a21 * a30,\n b07 = a20 * a32 - a22 * a30,\n b08 = a20 * a33 - a23 * a30,\n b09 = a21 * a32 - a22 * a31,\n b10 = a21 * a33 - a23 * a31,\n b11 = a22 * a33 - a23 * a32,\n\n // Calculate the determinant\n det = b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;\n\n if (!det) { \n return null; \n }\n det = 1.0 / det;\n\n out[0] = (a11 * b11 - a12 * b10 + a13 * b09) * det;\n out[1] = (a02 * b10 - a01 * b11 - a03 * b09) * det;\n out[2] = (a31 * b05 - a32 * b04 + a33 * b03) * det;\n out[3] = (a22 * b04 - a21 * b05 - a23 * b03) * det;\n out[4] = (a12 * b08 - a10 * b11 - a13 * b07) * det;\n out[5] = (a00 * b11 - a02 * b08 + a03 * b07) * det;\n out[6] = (a32 * b02 - a30 * b05 - a33 * b01) * det;\n out[7] = (a20 * b05 - a22 * b02 + a23 * b01) * det;\n out[8] = (a10 * b10 - a11 * b08 + a13 * b06) * det;\n out[9] = (a01 * b08 - a00 * b10 - a03 * b06) * det;\n out[10] = (a30 * b04 - a31 * b02 + a33 * b00) * det;\n out[11] = (a21 * b02 - a20 * b04 - a23 * b00) * det;\n out[12] = (a11 * b07 - a10 * b09 - a12 * b06) * det;\n out[13] = (a00 * b09 - a01 * b07 + a02 * b06) * det;\n out[14] = (a31 * b01 - a30 * b03 - a32 * b00) * det;\n out[15] = (a20 * b03 - a21 * b01 + a22 * b00) * det;\n\n return out;\n};\n\n/**\n * Calculates the adjugate of a mat4\n *\n * @param {mat4} out the receiving matrix\n * @param {mat4} a the source matrix\n * @returns {mat4} out\n */\nmat4.adjoint = function(out, a) {\n var a00 = a[0], a01 = a[1], a02 = a[2], a03 = a[3],\n a10 = a[4], a11 = a[5], a12 = a[6], a13 = a[7],\n a20 = a[8], a21 = a[9], a22 = a[10], a23 = a[11],\n a30 = a[12], a31 = a[13], a32 = a[14], a33 = a[15];\n\n out[0] = (a11 * (a22 * a33 - a23 * a32) - a21 * (a12 * a33 - a13 * a32) + a31 * (a12 * a23 - a13 * a22));\n out[1] = -(a01 * (a22 * a33 - a23 * a32) - a21 * (a02 * a33 - a03 * a32) + a31 * (a02 * a23 - a03 * a22));\n out[2] = (a01 * (a12 * a33 - a13 * a32) - a11 * (a02 * a33 - a03 * a32) + a31 * (a02 * a13 - a03 * a12));\n out[3] = -(a01 * (a12 * a23 - a13 * a22) - a11 * (a02 * a23 - a03 * a22) + a21 * (a02 * a13 - a03 * a12));\n out[4] = -(a10 * (a22 * a33 - a23 * a32) - a20 * (a12 * a33 - a13 * a32) + a30 * (a12 * a23 - a13 * a22));\n out[5] = (a00 * (a22 * a33 - a23 * a32) - a20 * (a02 * a33 - a03 * a32) + a30 * (a02 * a23 - a03 * a22));\n out[6] = -(a00 * (a12 * a33 - a13 * a32) - a10 * (a02 * a33 - a03 * a32) + a30 * (a02 * a13 - a03 * a12));\n out[7] = (a00 * (a12 * a23 - a13 * a22) - a10 * (a02 * a23 - a03 * a22) + a20 * (a02 * a13 - a03 * a12));\n out[8] = (a10 * (a21 * a33 - a23 * a31) - a20 * (a11 * a33 - a13 * a31) + a30 * (a11 * a23 - a13 * a21));\n out[9] = -(a00 * (a21 * a33 - a23 * a31) - a20 * (a01 * a33 - a03 * a31) + a30 * (a01 * a23 - a03 * a21));\n out[10] = (a00 * (a11 * a33 - a13 * a31) - a10 * (a01 * a33 - a03 * a31) + a30 * (a01 * a13 - a03 * a11));\n out[11] = -(a00 * (a11 * a23 - a13 * a21) - a10 * (a01 * a23 - a03 * a21) + a20 * (a01 * a13 - a03 * a11));\n out[12] = -(a10 * (a21 * a32 - a22 * a31) - a20 * (a11 * a32 - a12 * a31) + a30 * (a11 * a22 - a12 * a21));\n out[13] = (a00 * (a21 * a32 - a22 * a31) - a20 * (a01 * a32 - a02 * a31) + a30 * (a01 * a22 - a02 * a21));\n out[14] = -(a00 * (a11 * a32 - a12 * a31) - a10 * (a01 * a32 - a02 * a31) + a30 * (a01 * a12 - a02 * a11));\n out[15] = (a00 * (a11 * a22 - a12 * a21) - a10 * (a01 * a22 - a02 * a21) + a20 * (a01 * a12 - a02 * a11));\n return out;\n};\n\n/**\n * Calculates the determinant of a mat4\n *\n * @param {mat4} a the source matrix\n * @returns {Number} determinant of a\n */\nmat4.determinant = function (a) {\n var a00 = a[0], a01 = a[1], a02 = a[2], a03 = a[3],\n a10 = a[4], a11 = a[5], a12 = a[6], a13 = a[7],\n a20 = a[8], a21 = a[9], a22 = a[10], a23 = a[11],\n a30 = a[12], a31 = a[13], a32 = a[14], a33 = a[15],\n\n b00 = a00 * a11 - a01 * a10,\n b01 = a00 * a12 - a02 * a10,\n b02 = a00 * a13 - a03 * a10,\n b03 = a01 * a12 - a02 * a11,\n b04 = a01 * a13 - a03 * a11,\n b05 = a02 * a13 - a03 * a12,\n b06 = a20 * a31 - a21 * a30,\n b07 = a20 * a32 - a22 * a30,\n b08 = a20 * a33 - a23 * a30,\n b09 = a21 * a32 - a22 * a31,\n b10 = a21 * a33 - a23 * a31,\n b11 = a22 * a33 - a23 * a32;\n\n // Calculate the determinant\n return b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;\n};\n\n/**\n * Multiplies two mat4's\n *\n * @param {mat4} out the receiving matrix\n * @param {mat4} a the first operand\n * @param {mat4} b the second operand\n * @returns {mat4} out\n */\nmat4.multiply = function (out, a, b) {\n var a00 = a[0], a01 = a[1], a02 = a[2], a03 = a[3],\n a10 = a[4], a11 = a[5], a12 = a[6], a13 = a[7],\n a20 = a[8], a21 = a[9], a22 = a[10], a23 = a[11],\n a30 = a[12], a31 = a[13], a32 = a[14], a33 = a[15];\n\n // Cache only the current line of the second matrix\n var b0 = b[0], b1 = b[1], b2 = b[2], b3 = b[3]; \n out[0] = b0*a00 + b1*a10 + b2*a20 + b3*a30;\n out[1] = b0*a01 + b1*a11 + b2*a21 + b3*a31;\n out[2] = b0*a02 + b1*a12 + b2*a22 + b3*a32;\n out[3] = b0*a03 + b1*a13 + b2*a23 + b3*a33;\n\n b0 = b[4]; b1 = b[5]; b2 = b[6]; b3 = b[7];\n out[4] = b0*a00 + b1*a10 + b2*a20 + b3*a30;\n out[5] = b0*a01 + b1*a11 + b2*a21 + b3*a31;\n out[6] = b0*a02 + b1*a12 + b2*a22 + b3*a32;\n out[7] = b0*a03 + b1*a13 + b2*a23 + b3*a33;\n\n b0 = b[8]; b1 = b[9]; b2 = b[10]; b3 = b[11];\n out[8] = b0*a00 + b1*a10 + b2*a20 + b3*a30;\n out[9] = b0*a01 + b1*a11 + b2*a21 + b3*a31;\n out[10] = b0*a02 + b1*a12 + b2*a22 + b3*a32;\n out[11] = b0*a03 + b1*a13 + b2*a23 + b3*a33;\n\n b0 = b[12]; b1 = b[13]; b2 = b[14]; b3 = b[15];\n out[12] = b0*a00 + b1*a10 + b2*a20 + b3*a30;\n out[13] = b0*a01 + b1*a11 + b2*a21 + b3*a31;\n out[14] = b0*a02 + b1*a12 + b2*a22 + b3*a32;\n out[15] = b0*a03 + b1*a13 + b2*a23 + b3*a33;\n return out;\n};\n\n/**\n * Alias for {@link mat4.multiply}\n * @function\n */\nmat4.mul = mat4.multiply;\n\n/**\n * Translate a mat4 by the given vector\n *\n * @param {mat4} out the receiving matrix\n * @param {mat4} a the matrix to translate\n * @param {vec3} v vector to translate by\n * @returns {mat4} out\n */\nmat4.translate = function (out, a, v) {\n var x = v[0], y = v[1], z = v[2],\n a00, a01, a02, a03,\n a10, a11, a12, a13,\n a20, a21, a22, a23;\n\n if (a === out) {\n out[12] = a[0] * x + a[4] * y + a[8] * z + a[12];\n out[13] = a[1] * x + a[5] * y + a[9] * z + a[13];\n out[14] = a[2] * x + a[6] * y + a[10] * z + a[14];\n out[15] = a[3] * x + a[7] * y + a[11] * z + a[15];\n } else {\n a00 = a[0]; a01 = a[1]; a02 = a[2]; a03 = a[3];\n a10 = a[4]; a11 = a[5]; a12 = a[6]; a13 = a[7];\n a20 = a[8]; a21 = a[9]; a22 = a[10]; a23 = a[11];\n\n out[0] = a00; out[1] = a01; out[2] = a02; out[3] = a03;\n out[4] = a10; out[5] = a11; out[6] = a12; out[7] = a13;\n out[8] = a20; out[9] = a21; out[10] = a22; out[11] = a23;\n\n out[12] = a00 * x + a10 * y + a20 * z + a[12];\n out[13] = a01 * x + a11 * y + a21 * z + a[13];\n out[14] = a02 * x + a12 * y + a22 * z + a[14];\n out[15] = a03 * x + a13 * y + a23 * z + a[15];\n }\n\n return out;\n};\n\n/**\n * Scales the mat4 by the dimensions in the given vec3\n *\n * @param {mat4} out the receiving matrix\n * @param {mat4} a the matrix to scale\n * @param {vec3} v the vec3 to scale the matrix by\n * @returns {mat4} out\n **/\nmat4.scale = function(out, a, v) {\n var x = v[0], y = v[1], z = v[2];\n\n out[0] = a[0] * x;\n out[1] = a[1] * x;\n out[2] = a[2] * x;\n out[3] = a[3] * x;\n out[4] = a[4] * y;\n out[5] = a[5] * y;\n out[6] = a[6] * y;\n out[7] = a[7] * y;\n out[8] = a[8] * z;\n out[9] = a[9] * z;\n out[10] = a[10] * z;\n out[11] = a[11] * z;\n out[12] = a[12];\n out[13] = a[13];\n out[14] = a[14];\n out[15] = a[15];\n return out;\n};\n\n/**\n * Rotates a mat4 by the given angle\n *\n * @param {mat4} out the receiving matrix\n * @param {mat4} a the matrix to rotate\n * @param {Number} rad the angle to rotate the matrix by\n * @param {vec3} axis the axis to rotate around\n * @returns {mat4} out\n */\nmat4.rotate = function (out, a, rad, axis) {\n var x = axis[0], y = axis[1], z = axis[2],\n len = Math.sqrt(x * x + y * y + z * z),\n s, c, t,\n a00, a01, a02, a03,\n a10, a11, a12, a13,\n a20, a21, a22, a23,\n b00, b01, b02,\n b10, b11, b12,\n b20, b21, b22;\n\n if (Math.abs(len) < GLMAT_EPSILON) { return null; }\n \n len = 1 / len;\n x *= len;\n y *= len;\n z *= len;\n\n s = Math.sin(rad);\n c = Math.cos(rad);\n t = 1 - c;\n\n a00 = a[0]; a01 = a[1]; a02 = a[2]; a03 = a[3];\n a10 = a[4]; a11 = a[5]; a12 = a[6]; a13 = a[7];\n a20 = a[8]; a21 = a[9]; a22 = a[10]; a23 = a[11];\n\n // Construct the elements of the rotation matrix\n b00 = x * x * t + c; b01 = y * x * t + z * s; b02 = z * x * t - y * s;\n b10 = x * y * t - z * s; b11 = y * y * t + c; b12 = z * y * t + x * s;\n b20 = x * z * t + y * s; b21 = y * z * t - x * s; b22 = z * z * t + c;\n\n // Perform rotation-specific matrix multiplication\n out[0] = a00 * b00 + a10 * b01 + a20 * b02;\n out[1] = a01 * b00 + a11 * b01 + a21 * b02;\n out[2] = a02 * b00 + a12 * b01 + a22 * b02;\n out[3] = a03 * b00 + a13 * b01 + a23 * b02;\n out[4] = a00 * b10 + a10 * b11 + a20 * b12;\n out[5] = a01 * b10 + a11 * b11 + a21 * b12;\n out[6] = a02 * b10 + a12 * b11 + a22 * b12;\n out[7] = a03 * b10 + a13 * b11 + a23 * b12;\n out[8] = a00 * b20 + a10 * b21 + a20 * b22;\n out[9] = a01 * b20 + a11 * b21 + a21 * b22;\n out[10] = a02 * b20 + a12 * b21 + a22 * b22;\n out[11] = a03 * b20 + a13 * b21 + a23 * b22;\n\n if (a !== out) { // If the source and destination differ, copy the unchanged last row\n out[12] = a[12];\n out[13] = a[13];\n out[14] = a[14];\n out[15] = a[15];\n }\n return out;\n};\n\n/**\n * Rotates a matrix by the given angle around the X axis\n *\n * @param {mat4} out the receiving matrix\n * @param {mat4} a the matrix to rotate\n * @param {Number} rad the angle to rotate the matrix by\n * @returns {mat4} out\n */\nmat4.rotateX = function (out, a, rad) {\n var s = Math.sin(rad),\n c = Math.cos(rad),\n a10 = a[4],\n a11 = a[5],\n a12 = a[6],\n a13 = a[7],\n a20 = a[8],\n a21 = a[9],\n a22 = a[10],\n a23 = a[11];\n\n if (a !== out) { // If the source and destination differ, copy the unchanged rows\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n out[12] = a[12];\n out[13] = a[13];\n out[14] = a[14];\n out[15] = a[15];\n }\n\n // Perform axis-specific matrix multiplication\n out[4] = a10 * c + a20 * s;\n out[5] = a11 * c + a21 * s;\n out[6] = a12 * c + a22 * s;\n out[7] = a13 * c + a23 * s;\n out[8] = a20 * c - a10 * s;\n out[9] = a21 * c - a11 * s;\n out[10] = a22 * c - a12 * s;\n out[11] = a23 * c - a13 * s;\n return out;\n};\n\n/**\n * Rotates a matrix by the given angle around the Y axis\n *\n * @param {mat4} out the receiving matrix\n * @param {mat4} a the matrix to rotate\n * @param {Number} rad the angle to rotate the matrix by\n * @returns {mat4} out\n */\nmat4.rotateY = function (out, a, rad) {\n var s = Math.sin(rad),\n c = Math.cos(rad),\n a00 = a[0],\n a01 = a[1],\n a02 = a[2],\n a03 = a[3],\n a20 = a[8],\n a21 = a[9],\n a22 = a[10],\n a23 = a[11];\n\n if (a !== out) { // If the source and destination differ, copy the unchanged rows\n out[4] = a[4];\n out[5] = a[5];\n out[6] = a[6];\n out[7] = a[7];\n out[12] = a[12];\n out[13] = a[13];\n out[14] = a[14];\n out[15] = a[15];\n }\n\n // Perform axis-specific matrix multiplication\n out[0] = a00 * c - a20 * s;\n out[1] = a01 * c - a21 * s;\n out[2] = a02 * c - a22 * s;\n out[3] = a03 * c - a23 * s;\n out[8] = a00 * s + a20 * c;\n out[9] = a01 * s + a21 * c;\n out[10] = a02 * s + a22 * c;\n out[11] = a03 * s + a23 * c;\n return out;\n};\n\n/**\n * Rotates a matrix by the given angle around the Z axis\n *\n * @param {mat4} out the receiving matrix\n * @param {mat4} a the matrix to rotate\n * @param {Number} rad the angle to rotate the matrix by\n * @returns {mat4} out\n */\nmat4.rotateZ = function (out, a, rad) {\n var s = Math.sin(rad),\n c = Math.cos(rad),\n a00 = a[0],\n a01 = a[1],\n a02 = a[2],\n a03 = a[3],\n a10 = a[4],\n a11 = a[5],\n a12 = a[6],\n a13 = a[7];\n\n if (a !== out) { // If the source and destination differ, copy the unchanged last row\n out[8] = a[8];\n out[9] = a[9];\n out[10] = a[10];\n out[11] = a[11];\n out[12] = a[12];\n out[13] = a[13];\n out[14] = a[14];\n out[15] = a[15];\n }\n\n // Perform axis-specific matrix multiplication\n out[0] = a00 * c + a10 * s;\n out[1] = a01 * c + a11 * s;\n out[2] = a02 * c + a12 * s;\n out[3] = a03 * c + a13 * s;\n out[4] = a10 * c - a00 * s;\n out[5] = a11 * c - a01 * s;\n out[6] = a12 * c - a02 * s;\n out[7] = a13 * c - a03 * s;\n return out;\n};\n\n/**\n * Creates a matrix from a quaternion rotation and vector translation\n * This is equivalent to (but much faster than):\n *\n * mat4.identity(dest);\n * mat4.translate(dest, vec);\n * var quatMat = mat4.create();\n * quat4.toMat4(quat, quatMat);\n * mat4.multiply(dest, quatMat);\n *\n * @param {mat4} out mat4 receiving operation result\n * @param {quat4} q Rotation quaternion\n * @param {vec3} v Translation vector\n * @returns {mat4} out\n */\nmat4.fromRotationTranslation = function (out, q, v) {\n // Quaternion math\n var x = q[0], y = q[1], z = q[2], w = q[3],\n x2 = x + x,\n y2 = y + y,\n z2 = z + z,\n\n xx = x * x2,\n xy = x * y2,\n xz = x * z2,\n yy = y * y2,\n yz = y * z2,\n zz = z * z2,\n wx = w * x2,\n wy = w * y2,\n wz = w * z2;\n\n out[0] = 1 - (yy + zz);\n out[1] = xy + wz;\n out[2] = xz - wy;\n out[3] = 0;\n out[4] = xy - wz;\n out[5] = 1 - (xx + zz);\n out[6] = yz + wx;\n out[7] = 0;\n out[8] = xz + wy;\n out[9] = yz - wx;\n out[10] = 1 - (xx + yy);\n out[11] = 0;\n out[12] = v[0];\n out[13] = v[1];\n out[14] = v[2];\n out[15] = 1;\n \n return out;\n};\n\nmat4.fromQuat = function (out, q) {\n var x = q[0], y = q[1], z = q[2], w = q[3],\n x2 = x + x,\n y2 = y + y,\n z2 = z + z,\n\n xx = x * x2,\n yx = y * x2,\n yy = y * y2,\n zx = z * x2,\n zy = z * y2,\n zz = z * z2,\n wx = w * x2,\n wy = w * y2,\n wz = w * z2;\n\n out[0] = 1 - yy - zz;\n out[1] = yx + wz;\n out[2] = zx - wy;\n out[3] = 0;\n\n out[4] = yx - wz;\n out[5] = 1 - xx - zz;\n out[6] = zy + wx;\n out[7] = 0;\n\n out[8] = zx + wy;\n out[9] = zy - wx;\n out[10] = 1 - xx - yy;\n out[11] = 0;\n\n out[12] = 0;\n out[13] = 0;\n out[14] = 0;\n out[15] = 1;\n\n return out;\n};\n\n/**\n * Generates a frustum matrix with the given bounds\n *\n * @param {mat4} out mat4 frustum matrix will be written into\n * @param {Number} left Left bound of the frustum\n * @param {Number} right Right bound of the frustum\n * @param {Number} bottom Bottom bound of the frustum\n * @param {Number} top Top bound of the frustum\n * @param {Number} near Near bound of the frustum\n * @param {Number} far Far bound of the frustum\n * @returns {mat4} out\n */\nmat4.frustum = function (out, left, right, bottom, top, near, far) {\n var rl = 1 / (right - left),\n tb = 1 / (top - bottom),\n nf = 1 / (near - far);\n out[0] = (near * 2) * rl;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[5] = (near * 2) * tb;\n out[6] = 0;\n out[7] = 0;\n out[8] = (right + left) * rl;\n out[9] = (top + bottom) * tb;\n out[10] = (far + near) * nf;\n out[11] = -1;\n out[12] = 0;\n out[13] = 0;\n out[14] = (far * near * 2) * nf;\n out[15] = 0;\n return out;\n};\n\n/**\n * Generates a perspective projection matrix with the given bounds\n *\n * @param {mat4} out mat4 frustum matrix will be written into\n * @param {number} fovy Vertical field of view in radians\n * @param {number} aspect Aspect ratio. typically viewport width/height\n * @param {number} near Near bound of the frustum\n * @param {number} far Far bound of the frustum\n * @returns {mat4} out\n */\nmat4.perspective = function (out, fovy, aspect, near, far) {\n var f = 1.0 / Math.tan(fovy / 2),\n nf = 1 / (near - far);\n out[0] = f / aspect;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[5] = f;\n out[6] = 0;\n out[7] = 0;\n out[8] = 0;\n out[9] = 0;\n out[10] = (far + near) * nf;\n out[11] = -1;\n out[12] = 0;\n out[13] = 0;\n out[14] = (2 * far * near) * nf;\n out[15] = 0;\n return out;\n};\n\n/**\n * Generates a orthogonal projection matrix with the given bounds\n *\n * @param {mat4} out mat4 frustum matrix will be written into\n * @param {number} left Left bound of the frustum\n * @param {number} right Right bound of the frustum\n * @param {number} bottom Bottom bound of the frustum\n * @param {number} top Top bound of the frustum\n * @param {number} near Near bound of the frustum\n * @param {number} far Far bound of the frustum\n * @returns {mat4} out\n */\nmat4.ortho = function (out, left, right, bottom, top, near, far) {\n var lr = 1 / (left - right),\n bt = 1 / (bottom - top),\n nf = 1 / (near - far);\n out[0] = -2 * lr;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[5] = -2 * bt;\n out[6] = 0;\n out[7] = 0;\n out[8] = 0;\n out[9] = 0;\n out[10] = 2 * nf;\n out[11] = 0;\n out[12] = (left + right) * lr;\n out[13] = (top + bottom) * bt;\n out[14] = (far + near) * nf;\n out[15] = 1;\n return out;\n};\n\n/**\n * Generates a look-at matrix with the given eye position, focal point, and up axis\n *\n * @param {mat4} out mat4 frustum matrix will be written into\n * @param {vec3} eye Position of the viewer\n * @param {vec3} center Point the viewer is looking at\n * @param {vec3} up vec3 pointing up\n * @returns {mat4} out\n */\nmat4.lookAt = function (out, eye, center, up) {\n var x0, x1, x2, y0, y1, y2, z0, z1, z2, len,\n eyex = eye[0],\n eyey = eye[1],\n eyez = eye[2],\n upx = up[0],\n upy = up[1],\n upz = up[2],\n centerx = center[0],\n centery = center[1],\n centerz = center[2];\n\n if (Math.abs(eyex - centerx) < GLMAT_EPSILON &&\n Math.abs(eyey - centery) < GLMAT_EPSILON &&\n Math.abs(eyez - centerz) < GLMAT_EPSILON) {\n return mat4.identity(out);\n }\n\n z0 = eyex - centerx;\n z1 = eyey - centery;\n z2 = eyez - centerz;\n\n len = 1 / Math.sqrt(z0 * z0 + z1 * z1 + z2 * z2);\n z0 *= len;\n z1 *= len;\n z2 *= len;\n\n x0 = upy * z2 - upz * z1;\n x1 = upz * z0 - upx * z2;\n x2 = upx * z1 - upy * z0;\n len = Math.sqrt(x0 * x0 + x1 * x1 + x2 * x2);\n if (!len) {\n x0 = 0;\n x1 = 0;\n x2 = 0;\n } else {\n len = 1 / len;\n x0 *= len;\n x1 *= len;\n x2 *= len;\n }\n\n y0 = z1 * x2 - z2 * x1;\n y1 = z2 * x0 - z0 * x2;\n y2 = z0 * x1 - z1 * x0;\n\n len = Math.sqrt(y0 * y0 + y1 * y1 + y2 * y2);\n if (!len) {\n y0 = 0;\n y1 = 0;\n y2 = 0;\n } else {\n len = 1 / len;\n y0 *= len;\n y1 *= len;\n y2 *= len;\n }\n\n out[0] = x0;\n out[1] = y0;\n out[2] = z0;\n out[3] = 0;\n out[4] = x1;\n out[5] = y1;\n out[6] = z1;\n out[7] = 0;\n out[8] = x2;\n out[9] = y2;\n out[10] = z2;\n out[11] = 0;\n out[12] = -(x0 * eyex + x1 * eyey + x2 * eyez);\n out[13] = -(y0 * eyex + y1 * eyey + y2 * eyez);\n out[14] = -(z0 * eyex + z1 * eyey + z2 * eyez);\n out[15] = 1;\n\n return out;\n};\n\n/**\n * Returns a string representation of a mat4\n *\n * @param {mat4} mat matrix to represent as a string\n * @returns {String} string representation of the matrix\n */\nmat4.str = function (a) {\n return 'mat4(' + a[0] + ', ' + a[1] + ', ' + a[2] + ', ' + a[3] + ', ' +\n a[4] + ', ' + a[5] + ', ' + a[6] + ', ' + a[7] + ', ' +\n a[8] + ', ' + a[9] + ', ' + a[10] + ', ' + a[11] + ', ' + \n a[12] + ', ' + a[13] + ', ' + a[14] + ', ' + a[15] + ')';\n};\n\n/**\n * Returns Frobenius norm of a mat4\n *\n * @param {mat4} a the matrix to calculate Frobenius norm of\n * @returns {Number} Frobenius norm\n */\nmat4.frob = function (a) {\n return(Math.sqrt(Math.pow(a[0], 2) + Math.pow(a[1], 2) + Math.pow(a[2], 2) + Math.pow(a[3], 2) + Math.pow(a[4], 2) + Math.pow(a[5], 2) + Math.pow(a[6], 2) + Math.pow(a[6], 2) + Math.pow(a[7], 2) + Math.pow(a[8], 2) + Math.pow(a[9], 2) + Math.pow(a[10], 2) + Math.pow(a[11], 2) + Math.pow(a[12], 2) + Math.pow(a[13], 2) + Math.pow(a[14], 2) + Math.pow(a[15], 2) ))\n};\n\n\nif(typeof(exports) !== 'undefined') {\n exports.mat4 = mat4;\n}\n;\n/* Copyright (c) 2013, Brandon Jones, Colin MacKenzie IV. All rights reserved.\n\nRedistribution and use in source and binary forms, with or without modification,\nare permitted provided that the following conditions are met:\n\n * Redistributions of source code must retain the above copyright notice, this\n list of conditions and the following disclaimer.\n * Redistributions in binary form must reproduce the above copyright notice,\n this list of conditions and the following disclaimer in the documentation \n and/or other materials provided with the distribution.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\nANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\nWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE \nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR\nANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\nLOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON\nANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\nSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */\n\n/**\n * @class Quaternion\n * @name quat\n */\n\nvar quat = {};\n\n/**\n * Creates a new identity quat\n *\n * @returns {quat} a new quaternion\n */\nquat.create = function() {\n var out = new GLMAT_ARRAY_TYPE(4);\n out[0] = 0;\n out[1] = 0;\n out[2] = 0;\n out[3] = 1;\n return out;\n};\n\n/**\n * Sets a quaternion to represent the shortest rotation from one\n * vector to another.\n *\n * Both vectors are assumed to be unit length.\n *\n * @param {quat} out the receiving quaternion.\n * @param {vec3} a the initial vector\n * @param {vec3} b the destination vector\n * @returns {quat} out\n */\nquat.rotationTo = (function() {\n var tmpvec3 = vec3.create();\n var xUnitVec3 = vec3.fromValues(1,0,0);\n var yUnitVec3 = vec3.fromValues(0,1,0);\n\n return function(out, a, b) {\n var dot = vec3.dot(a, b);\n if (dot < -0.999999) {\n vec3.cross(tmpvec3, xUnitVec3, a);\n if (vec3.length(tmpvec3) < 0.000001)\n vec3.cross(tmpvec3, yUnitVec3, a);\n vec3.normalize(tmpvec3, tmpvec3);\n quat.setAxisAngle(out, tmpvec3, Math.PI);\n return out;\n } else if (dot > 0.999999) {\n out[0] = 0;\n out[1] = 0;\n out[2] = 0;\n out[3] = 1;\n return out;\n } else {\n vec3.cross(tmpvec3, a, b);\n out[0] = tmpvec3[0];\n out[1] = tmpvec3[1];\n out[2] = tmpvec3[2];\n out[3] = 1 + dot;\n return quat.normalize(out, out);\n }\n };\n})();\n\n/**\n * Sets the specified quaternion with values corresponding to the given\n * axes. Each axis is a vec3 and is expected to be unit length and\n * perpendicular to all other specified axes.\n *\n * @param {vec3} view the vector representing the viewing direction\n * @param {vec3} right the vector representing the local \"right\" direction\n * @param {vec3} up the vector representing the local \"up\" direction\n * @returns {quat} out\n */\nquat.setAxes = (function() {\n var matr = mat3.create();\n\n return function(out, view, right, up) {\n matr[0] = right[0];\n matr[3] = right[1];\n matr[6] = right[2];\n\n matr[1] = up[0];\n matr[4] = up[1];\n matr[7] = up[2];\n\n matr[2] = -view[0];\n matr[5] = -view[1];\n matr[8] = -view[2];\n\n return quat.normalize(out, quat.fromMat3(out, matr));\n };\n})();\n\n/**\n * Creates a new quat initialized with values from an existing quaternion\n *\n * @param {quat} a quaternion to clone\n * @returns {quat} a new quaternion\n * @function\n */\nquat.clone = vec4.clone;\n\n/**\n * Creates a new quat initialized with the given values\n *\n * @param {Number} x X component\n * @param {Number} y Y component\n * @param {Number} z Z component\n * @param {Number} w W component\n * @returns {quat} a new quaternion\n * @function\n */\nquat.fromValues = vec4.fromValues;\n\n/**\n * Copy the values from one quat to another\n *\n * @param {quat} out the receiving quaternion\n * @param {quat} a the source quaternion\n * @returns {quat} out\n * @function\n */\nquat.copy = vec4.copy;\n\n/**\n * Set the components of a quat to the given values\n *\n * @param {quat} out the receiving quaternion\n * @param {Number} x X component\n * @param {Number} y Y component\n * @param {Number} z Z component\n * @param {Number} w W component\n * @returns {quat} out\n * @function\n */\nquat.set = vec4.set;\n\n/**\n * Set a quat to the identity quaternion\n *\n * @param {quat} out the receiving quaternion\n * @returns {quat} out\n */\nquat.identity = function(out) {\n out[0] = 0;\n out[1] = 0;\n out[2] = 0;\n out[3] = 1;\n return out;\n};\n\n/**\n * Sets a quat from the given angle and rotation axis,\n * then returns it.\n *\n * @param {quat} out the receiving quaternion\n * @param {vec3} axis the axis around which to rotate\n * @param {Number} rad the angle in radians\n * @returns {quat} out\n **/\nquat.setAxisAngle = function(out, axis, rad) {\n rad = rad * 0.5;\n var s = Math.sin(rad);\n out[0] = s * axis[0];\n out[1] = s * axis[1];\n out[2] = s * axis[2];\n out[3] = Math.cos(rad);\n return out;\n};\n\n/**\n * Adds two quat's\n *\n * @param {quat} out the receiving quaternion\n * @param {quat} a the first operand\n * @param {quat} b the second operand\n * @returns {quat} out\n * @function\n */\nquat.add = vec4.add;\n\n/**\n * Multiplies two quat's\n *\n * @param {quat} out the receiving quaternion\n * @param {quat} a the first operand\n * @param {quat} b the second operand\n * @returns {quat} out\n */\nquat.multiply = function(out, a, b) {\n var ax = a[0], ay = a[1], az = a[2], aw = a[3],\n bx = b[0], by = b[1], bz = b[2], bw = b[3];\n\n out[0] = ax * bw + aw * bx + ay * bz - az * by;\n out[1] = ay * bw + aw * by + az * bx - ax * bz;\n out[2] = az * bw + aw * bz + ax * by - ay * bx;\n out[3] = aw * bw - ax * bx - ay * by - az * bz;\n return out;\n};\n\n/**\n * Alias for {@link quat.multiply}\n * @function\n */\nquat.mul = quat.multiply;\n\n/**\n * Scales a quat by a scalar number\n *\n * @param {quat} out the receiving vector\n * @param {quat} a the vector to scale\n * @param {Number} b amount to scale the vector by\n * @returns {quat} out\n * @function\n */\nquat.scale = vec4.scale;\n\n/**\n * Rotates a quaternion by the given angle about the X axis\n *\n * @param {quat} out quat receiving operation result\n * @param {quat} a quat to rotate\n * @param {number} rad angle (in radians) to rotate\n * @returns {quat} out\n */\nquat.rotateX = function (out, a, rad) {\n rad *= 0.5; \n\n var ax = a[0], ay = a[1], az = a[2], aw = a[3],\n bx = Math.sin(rad), bw = Math.cos(rad);\n\n out[0] = ax * bw + aw * bx;\n out[1] = ay * bw + az * bx;\n out[2] = az * bw - ay * bx;\n out[3] = aw * bw - ax * bx;\n return out;\n};\n\n/**\n * Rotates a quaternion by the given angle about the Y axis\n *\n * @param {quat} out quat receiving operation result\n * @param {quat} a quat to rotate\n * @param {number} rad angle (in radians) to rotate\n * @returns {quat} out\n */\nquat.rotateY = function (out, a, rad) {\n rad *= 0.5; \n\n var ax = a[0], ay = a[1], az = a[2], aw = a[3],\n by = Math.sin(rad), bw = Math.cos(rad);\n\n out[0] = ax * bw - az * by;\n out[1] = ay * bw + aw * by;\n out[2] = az * bw + ax * by;\n out[3] = aw * bw - ay * by;\n return out;\n};\n\n/**\n * Rotates a quaternion by the given angle about the Z axis\n *\n * @param {quat} out quat receiving operation result\n * @param {quat} a quat to rotate\n * @param {number} rad angle (in radians) to rotate\n * @returns {quat} out\n */\nquat.rotateZ = function (out, a, rad) {\n rad *= 0.5; \n\n var ax = a[0], ay = a[1], az = a[2], aw = a[3],\n bz = Math.sin(rad), bw = Math.cos(rad);\n\n out[0] = ax * bw + ay * bz;\n out[1] = ay * bw - ax * bz;\n out[2] = az * bw + aw * bz;\n out[3] = aw * bw - az * bz;\n return out;\n};\n\n/**\n * Calculates the W component of a quat from the X, Y, and Z components.\n * Assumes that quaternion is 1 unit in length.\n * Any existing W component will be ignored.\n *\n * @param {quat} out the receiving quaternion\n * @param {quat} a quat to calculate W component of\n * @returns {quat} out\n */\nquat.calculateW = function (out, a) {\n var x = a[0], y = a[1], z = a[2];\n\n out[0] = x;\n out[1] = y;\n out[2] = z;\n out[3] = -Math.sqrt(Math.abs(1.0 - x * x - y * y - z * z));\n return out;\n};\n\n/**\n * Calculates the dot product of two quat's\n *\n * @param {quat} a the first operand\n * @param {quat} b the second operand\n * @returns {Number} dot product of a and b\n * @function\n */\nquat.dot = vec4.dot;\n\n/**\n * Performs a linear interpolation between two quat's\n *\n * @param {quat} out the receiving quaternion\n * @param {quat} a the first operand\n * @param {quat} b the second operand\n * @param {Number} t interpolation amount between the two inputs\n * @returns {quat} out\n * @function\n */\nquat.lerp = vec4.lerp;\n\n/**\n * Performs a spherical linear interpolation between two quat\n *\n * @param {quat} out the receiving quaternion\n * @param {quat} a the first operand\n * @param {quat} b the second operand\n * @param {Number} t interpolation amount between the two inputs\n * @returns {quat} out\n */\nquat.slerp = function (out, a, b, t) {\n // benchmarks:\n // http://jsperf.com/quaternion-slerp-implementations\n\n var ax = a[0], ay = a[1], az = a[2], aw = a[3],\n bx = b[0], by = b[1], bz = b[2], bw = b[3];\n\n var omega, cosom, sinom, scale0, scale1;\n\n // calc cosine\n cosom = ax * bx + ay * by + az * bz + aw * bw;\n // adjust signs (if necessary)\n if ( cosom < 0.0 ) {\n cosom = -cosom;\n bx = - bx;\n by = - by;\n bz = - bz;\n bw = - bw;\n }\n // calculate coefficients\n if ( (1.0 - cosom) > 0.000001 ) {\n // standard case (slerp)\n omega = Math.acos(cosom);\n sinom = Math.sin(omega);\n scale0 = Math.sin((1.0 - t) * omega) / sinom;\n scale1 = Math.sin(t * omega) / sinom;\n } else { \n // \"from\" and \"to\" quaternions are very close \n // ... so we can do a linear interpolation\n scale0 = 1.0 - t;\n scale1 = t;\n }\n // calculate final values\n out[0] = scale0 * ax + scale1 * bx;\n out[1] = scale0 * ay + scale1 * by;\n out[2] = scale0 * az + scale1 * bz;\n out[3] = scale0 * aw + scale1 * bw;\n \n return out;\n};\n\n/**\n * Calculates the inverse of a quat\n *\n * @param {quat} out the receiving quaternion\n * @param {quat} a quat to calculate inverse of\n * @returns {quat} out\n */\nquat.invert = function(out, a) {\n var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3],\n dot = a0*a0 + a1*a1 + a2*a2 + a3*a3,\n invDot = dot ? 1.0/dot : 0;\n \n // TODO: Would be faster to return [0,0,0,0] immediately if dot == 0\n\n out[0] = -a0*invDot;\n out[1] = -a1*invDot;\n out[2] = -a2*invDot;\n out[3] = a3*invDot;\n return out;\n};\n\n/**\n * Calculates the conjugate of a quat\n * If the quaternion is normalized, this function is faster than quat.inverse and produces the same result.\n *\n * @param {quat} out the receiving quaternion\n * @param {quat} a quat to calculate conjugate of\n * @returns {quat} out\n */\nquat.conjugate = function (out, a) {\n out[0] = -a[0];\n out[1] = -a[1];\n out[2] = -a[2];\n out[3] = a[3];\n return out;\n};\n\n/**\n * Calculates the length of a quat\n *\n * @param {quat} a vector to calculate length of\n * @returns {Number} length of a\n * @function\n */\nquat.length = vec4.length;\n\n/**\n * Alias for {@link quat.length}\n * @function\n */\nquat.len = quat.length;\n\n/**\n * Calculates the squared length of a quat\n *\n * @param {quat} a vector to calculate squared length of\n * @returns {Number} squared length of a\n * @function\n */\nquat.squaredLength = vec4.squaredLength;\n\n/**\n * Alias for {@link quat.squaredLength}\n * @function\n */\nquat.sqrLen = quat.squaredLength;\n\n/**\n * Normalize a quat\n *\n * @param {quat} out the receiving quaternion\n * @param {quat} a quaternion to normalize\n * @returns {quat} out\n * @function\n */\nquat.normalize = vec4.normalize;\n\n/**\n * Creates a quaternion from the given 3x3 rotation matrix.\n *\n * NOTE: The resultant quaternion is not normalized, so you should be sure\n * to renormalize the quaternion yourself where necessary.\n *\n * @param {quat} out the receiving quaternion\n * @param {mat3} m rotation matrix\n * @returns {quat} out\n * @function\n */\nquat.fromMat3 = function(out, m) {\n // Algorithm in Ken Shoemake's article in 1987 SIGGRAPH course notes\n // article \"Quaternion Calculus and Fast Animation\".\n var fTrace = m[0] + m[4] + m[8];\n var fRoot;\n\n if ( fTrace > 0.0 ) {\n // |w| > 1/2, may as well choose w > 1/2\n fRoot = Math.sqrt(fTrace + 1.0); // 2w\n out[3] = 0.5 * fRoot;\n fRoot = 0.5/fRoot; // 1/(4w)\n out[0] = (m[7]-m[5])*fRoot;\n out[1] = (m[2]-m[6])*fRoot;\n out[2] = (m[3]-m[1])*fRoot;\n } else {\n // |w| <= 1/2\n var i = 0;\n if ( m[4] > m[0] )\n i = 1;\n if ( m[8] > m[i*3+i] )\n i = 2;\n var j = (i+1)%3;\n var k = (i+2)%3;\n \n fRoot = Math.sqrt(m[i*3+i]-m[j*3+j]-m[k*3+k] + 1.0);\n out[i] = 0.5 * fRoot;\n fRoot = 0.5 / fRoot;\n out[3] = (m[k*3+j] - m[j*3+k]) * fRoot;\n out[j] = (m[j*3+i] + m[i*3+j]) * fRoot;\n out[k] = (m[k*3+i] + m[i*3+k]) * fRoot;\n }\n \n return out;\n};\n\n/**\n * Returns a string representation of a quatenion\n *\n * @param {quat} vec vector to represent as a string\n * @returns {String} string representation of the vector\n */\nquat.str = function (a) {\n return 'quat(' + a[0] + ', ' + a[1] + ', ' + a[2] + ', ' + a[3] + ')';\n};\n\nif(typeof(exports) !== 'undefined') {\n exports.quat = quat;\n}\n;\n\n\n\n\n\n\n\n\n\n\n\n\n\n })(shim.exports);\n})(this);\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/gl-matrix/dist/gl-matrix.js\n ** module id = 2\n ** module chunks = 0\n **/","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\nfunction EventEmitter() {\n this._events = this._events || {};\n this._maxListeners = this._maxListeners || undefined;\n}\nmodule.exports = EventEmitter;\n\n// Backwards-compat with node 0.10.x\nEventEmitter.EventEmitter = EventEmitter;\n\nEventEmitter.prototype._events = undefined;\nEventEmitter.prototype._maxListeners = undefined;\n\n// By default EventEmitters will print a warning if more than 10 listeners are\n// added to it. This is a useful default which helps finding memory leaks.\nEventEmitter.defaultMaxListeners = 10;\n\n// Obviously not all Emitters should be limited to 10. This function allows\n// that to be increased. Set to zero for unlimited.\nEventEmitter.prototype.setMaxListeners = function(n) {\n if (!isNumber(n) || n < 0 || isNaN(n))\n throw TypeError('n must be a positive number');\n this._maxListeners = n;\n return this;\n};\n\nEventEmitter.prototype.emit = function(type) {\n var er, handler, len, args, i, listeners;\n\n if (!this._events)\n this._events = {};\n\n // If there is no 'error' event listener then throw.\n if (type === 'error') {\n if (!this._events.error ||\n (isObject(this._events.error) && !this._events.error.length)) {\n er = arguments[1];\n if (er instanceof Error) {\n throw er; // Unhandled 'error' event\n } else {\n // At least give some kind of context to the user\n var err = new Error('Uncaught, unspecified \"error\" event. (' + er + ')');\n err.context = er;\n throw err;\n }\n }\n }\n\n handler = this._events[type];\n\n if (isUndefined(handler))\n return false;\n\n if (isFunction(handler)) {\n switch (arguments.length) {\n // fast cases\n case 1:\n handler.call(this);\n break;\n case 2:\n handler.call(this, arguments[1]);\n break;\n case 3:\n handler.call(this, arguments[1], arguments[2]);\n break;\n // slower\n default:\n args = Array.prototype.slice.call(arguments, 1);\n handler.apply(this, args);\n }\n } else if (isObject(handler)) {\n args = Array.prototype.slice.call(arguments, 1);\n listeners = handler.slice();\n len = listeners.length;\n for (i = 0; i < len; i++)\n listeners[i].apply(this, args);\n }\n\n return true;\n};\n\nEventEmitter.prototype.addListener = function(type, listener) {\n var m;\n\n if (!isFunction(listener))\n throw TypeError('listener must be a function');\n\n if (!this._events)\n this._events = {};\n\n // To avoid recursion in the case that type === \"newListener\"! Before\n // adding it to the listeners, first emit \"newListener\".\n if (this._events.newListener)\n this.emit('newListener', type,\n isFunction(listener.listener) ?\n listener.listener : listener);\n\n if (!this._events[type])\n // Optimize the case of one listener. Don't need the extra array object.\n this._events[type] = listener;\n else if (isObject(this._events[type]))\n // If we've already got an array, just append.\n this._events[type].push(listener);\n else\n // Adding the second element, need to change to array.\n this._events[type] = [this._events[type], listener];\n\n // Check for listener leak\n if (isObject(this._events[type]) && !this._events[type].warned) {\n if (!isUndefined(this._maxListeners)) {\n m = this._maxListeners;\n } else {\n m = EventEmitter.defaultMaxListeners;\n }\n\n if (m && m > 0 && this._events[type].length > m) {\n this._events[type].warned = true;\n console.error('(node) warning: possible EventEmitter memory ' +\n 'leak detected. %d listeners added. ' +\n 'Use emitter.setMaxListeners() to increase limit.',\n this._events[type].length);\n if (typeof console.trace === 'function') {\n // not supported in IE 10\n console.trace();\n }\n }\n }\n\n return this;\n};\n\nEventEmitter.prototype.on = EventEmitter.prototype.addListener;\n\nEventEmitter.prototype.once = function(type, listener) {\n if (!isFunction(listener))\n throw TypeError('listener must be a function');\n\n var fired = false;\n\n function g() {\n this.removeListener(type, g);\n\n if (!fired) {\n fired = true;\n listener.apply(this, arguments);\n }\n }\n\n g.listener = listener;\n this.on(type, g);\n\n return this;\n};\n\n// emits a 'removeListener' event iff the listener was removed\nEventEmitter.prototype.removeListener = function(type, listener) {\n var list, position, length, i;\n\n if (!isFunction(listener))\n throw TypeError('listener must be a function');\n\n if (!this._events || !this._events[type])\n return this;\n\n list = this._events[type];\n length = list.length;\n position = -1;\n\n if (list === listener ||\n (isFunction(list.listener) && list.listener === listener)) {\n delete this._events[type];\n if (this._events.removeListener)\n this.emit('removeListener', type, listener);\n\n } else if (isObject(list)) {\n for (i = length; i-- > 0;) {\n if (list[i] === listener ||\n (list[i].listener && list[i].listener === listener)) {\n position = i;\n break;\n }\n }\n\n if (position < 0)\n return this;\n\n if (list.length === 1) {\n list.length = 0;\n delete this._events[type];\n } else {\n list.splice(position, 1);\n }\n\n if (this._events.removeListener)\n this.emit('removeListener', type, listener);\n }\n\n return this;\n};\n\nEventEmitter.prototype.removeAllListeners = function(type) {\n var key, listeners;\n\n if (!this._events)\n return this;\n\n // not listening for removeListener, no need to emit\n if (!this._events.removeListener) {\n if (arguments.length === 0)\n this._events = {};\n else if (this._events[type])\n delete this._events[type];\n return this;\n }\n\n // emit removeListener for all listeners on all events\n if (arguments.length === 0) {\n for (key in this._events) {\n if (key === 'removeListener') continue;\n this.removeAllListeners(key);\n }\n this.removeAllListeners('removeListener');\n this._events = {};\n return this;\n }\n\n listeners = this._events[type];\n\n if (isFunction(listeners)) {\n this.removeListener(type, listeners);\n } else if (listeners) {\n // LIFO order\n while (listeners.length)\n this.removeListener(type, listeners[listeners.length - 1]);\n }\n delete this._events[type];\n\n return this;\n};\n\nEventEmitter.prototype.listeners = function(type) {\n var ret;\n if (!this._events || !this._events[type])\n ret = [];\n else if (isFunction(this._events[type]))\n ret = [this._events[type]];\n else\n ret = this._events[type].slice();\n return ret;\n};\n\nEventEmitter.prototype.listenerCount = function(type) {\n if (this._events) {\n var evlistener = this._events[type];\n\n if (isFunction(evlistener))\n return 1;\n else if (evlistener)\n return evlistener.length;\n }\n return 0;\n};\n\nEventEmitter.listenerCount = function(emitter, type) {\n return emitter.listenerCount(type);\n};\n\nfunction isFunction(arg) {\n return typeof arg === 'function';\n}\n\nfunction isNumber(arg) {\n return typeof arg === 'number';\n}\n\nfunction isObject(arg) {\n return typeof arg === 'object' && arg !== null;\n}\n\nfunction isUndefined(arg) {\n return arg === void 0;\n}\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/events/events.js\n ** module id = 3\n ** module chunks = 0\n **/","var glMatrix = require(\"gl-matrix\")\n , vec3 = glMatrix.vec3;\n\n/**\n * Constructs a Pointable object.\n *\n * An uninitialized pointable is considered invalid.\n * Get valid Pointable objects from a Frame or a Hand object.\n *\n * @class Pointable\n * @memberof Leap\n * @classdesc\n * The Pointable class reports the physical characteristics of a detected\n * finger or tool.\n *\n * Both fingers and tools are classified as Pointable objects. Use the\n * Pointable.tool property to determine whether a Pointable object represents a\n * tool or finger. The Leap classifies a detected entity as a tool when it is\n * thinner, straighter, and longer than a typical finger.\n *\n * Note that Pointable objects can be invalid, which means that they do not\n * contain valid tracking data and do not correspond to a physical entity.\n * Invalid Pointable objects can be the result of asking for a Pointable object\n * using an ID from an earlier frame when no Pointable objects with that ID\n * exist in the current frame. A Pointable object created from the Pointable\n * constructor is also invalid. Test for validity with the Pointable.valid\n * property.\n */\nvar Pointable = module.exports = function(data) {\n /**\n * Indicates whether this is a valid Pointable object.\n *\n * @member valid\n * @type {Boolean}\n * @memberof Leap.Pointable.prototype\n */\n this.valid = true;\n /**\n * A unique ID assigned to this Pointable object, whose value remains the\n * same across consecutive frames while the tracked finger or tool remains\n * visible. If tracking is lost (for example, when a finger is occluded by\n * another finger or when it is withdrawn from the Leap field of view), the\n * Leap may assign a new ID when it detects the entity in a future frame.\n *\n * Use the ID value with the pointable() functions defined for the\n * {@link Frame} and {@link Frame.Hand} classes to find this\n * Pointable object in future frames.\n *\n * @member id\n * @type {String}\n * @memberof Leap.Pointable.prototype\n */\n this.id = data.id;\n this.handId = data.handId;\n /**\n * The estimated length of the finger or tool in millimeters.\n *\n * The reported length is the visible length of the finger or tool from the\n * hand to tip. If the length isn't known, then a value of 0 is returned.\n *\n * @member length\n * @type {number}\n * @memberof Leap.Pointable.prototype\n */\n this.length = data.length;\n /**\n * Whether or not the Pointable is believed to be a tool.\n * Tools are generally longer, thinner, and straighter than fingers.\n *\n * If tool is false, then this Pointable must be a finger.\n *\n * @member tool\n * @type {Boolean}\n * @memberof Leap.Pointable.prototype\n */\n this.tool = data.tool;\n /**\n * The estimated width of the tool in millimeters.\n *\n * The reported width is the average width of the visible portion of the\n * tool from the hand to the tip. If the width isn't known,\n * then a value of 0 is returned.\n *\n * Pointable objects representing fingers do not have a width property.\n *\n * @member width\n * @type {number}\n * @memberof Leap.Pointable.prototype\n */\n this.width = data.width;\n /**\n * The direction in which this finger or tool is pointing.\n *\n * The direction is expressed as a unit vector pointing in the same\n * direction as the tip.\n *\n * ![Finger](images/Leap_Finger_Model.png)\n * @member direction\n * @type {number[]}\n * @memberof Leap.Pointable.prototype\n */\n this.direction = data.direction;\n /**\n * The tip position in millimeters from the Leap origin.\n * Stabilized\n *\n * @member stabilizedTipPosition\n * @type {number[]}\n * @memberof Leap.Pointable.prototype\n */\n this.stabilizedTipPosition = data.stabilizedTipPosition;\n /**\n * The tip position in millimeters from the Leap origin.\n *\n * @member tipPosition\n * @type {number[]}\n * @memberof Leap.Pointable.prototype\n */\n this.tipPosition = data.tipPosition;\n /**\n * The rate of change of the tip position in millimeters/second.\n *\n * @member tipVelocity\n * @type {number[]}\n * @memberof Leap.Pointable.prototype\n */\n this.tipVelocity = data.tipVelocity;\n /**\n * The current touch zone of this Pointable object.\n *\n * The Leap Motion software computes the touch zone based on a floating touch\n * plane that adapts to the user's finger movement and hand posture. The Leap\n * Motion software interprets purposeful movements toward this plane as potential touch\n * points. When a Pointable moves close to the adaptive touch plane, it enters the\n * \"hovering\" zone. When a Pointable reaches or passes through the plane, it enters\n * the \"touching\" zone.\n *\n * The possible states include:\n *\n * * \"none\" -- The Pointable is outside the hovering zone.\n * * \"hovering\" -- The Pointable is close to, but not touching the touch plane.\n * * \"touching\" -- The Pointable has penetrated the touch plane.\n *\n * The touchDistance value provides a normalized indication of the distance to\n * the touch plane when the Pointable is in the hovering or touching zones.\n *\n * @member touchZone\n * @type {String}\n * @memberof Leap.Pointable.prototype\n */\n this.touchZone = data.touchZone;\n /**\n * A value proportional to the distance between this Pointable object and the\n * adaptive touch plane.\n *\n * ![Touch Distance](images/Leap_Touch_Plane.png)\n *\n * The touch distance is a value in the range [-1, 1]. The value 1.0 indicates the\n * Pointable is at the far edge of the hovering zone. The value 0 indicates the\n * Pointable is just entering the touching zone. A value of -1.0 indicates the\n * Pointable is firmly within the touching zone. Values in between are\n * proportional to the distance from the plane. Thus, the touchDistance of 0.5\n * indicates that the Pointable is halfway into the hovering zone.\n *\n * You can use the touchDistance value to modulate visual feedback given to the\n * user as their fingers close in on a touch target, such as a button.\n *\n * @member touchDistance\n * @type {number}\n * @memberof Leap.Pointable.prototype\n */\n this.touchDistance = data.touchDistance;\n\n /**\n * How long the pointable has been visible in seconds.\n *\n * @member timeVisible\n * @type {number}\n * @memberof Leap.Pointable.prototype\n */\n this.timeVisible = data.timeVisible;\n}\n\n/**\n * A string containing a brief, human readable description of the Pointable\n * object.\n *\n * @method toString\n * @memberof Leap.Pointable.prototype\n * @returns {String} A description of the Pointable object as a string.\n */\nPointable.prototype.toString = function() {\n return \"Pointable [ id:\" + this.id + \" \" + this.length + \"mmx | width:\" + this.width + \"mm | direction:\" + this.direction + ' ]';\n}\n\n/**\n * Returns the hand which the pointable is attached to.\n */\nPointable.prototype.hand = function(){\n return this.frame.hand(this.handId);\n}\n\n/**\n * An invalid Pointable object.\n *\n * You can use this Pointable instance in comparisons testing\n * whether a given Pointable instance is valid or invalid. (You can also use the\n * Pointable.valid property.)\n\n * @static\n * @type {Leap.Pointable}\n * @name Invalid\n * @memberof Leap.Pointable\n */\nPointable.Invalid = { valid: false };\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/leapjs/lib/pointable.js\n ** module id = 4\n ** module chunks = 0\n **/","var Pointable = require('./pointable'),\n Bone = require('./bone')\n , Dialog = require('./dialog')\n , _ = require('underscore');\n\n/**\n* Constructs a Finger object.\n*\n* An uninitialized finger is considered invalid.\n* Get valid Finger objects from a Frame or a Hand object.\n*\n* @class Finger\n* @memberof Leap\n* @classdesc\n* The Finger class reports the physical characteristics of a finger.\n*\n* Both fingers and tools are classified as Pointable objects. Use the\n* Pointable.tool property to determine whether a Pointable object represents a\n* tool or finger. The Leap classifies a detected entity as a tool when it is\n* thinner, straighter, and longer than a typical finger.\n*\n* Note that Finger objects can be invalid, which means that they do not\n* contain valid tracking data and do not correspond to a physical entity.\n* Invalid Finger objects can be the result of asking for a Finger object\n* using an ID from an earlier frame when no Finger objects with that ID\n* exist in the current frame. A Finger object created from the Finger\n* constructor is also invalid. Test for validity with the Pointable.valid\n* property.\n*/\nvar Finger = module.exports = function(data) {\n Pointable.call(this, data); // use pointable as super-constructor\n \n /**\n * The position of the distal interphalangeal joint of the finger.\n * This joint is closest to the tip.\n * \n * The distal interphalangeal joint is located between the most extreme segment\n * of the finger (the distal phalanx) and the middle segment (the medial\n * phalanx).\n *\n * @member dipPosition\n * @type {number[]}\n * @memberof Leap.Finger.prototype\n */ \n this.dipPosition = data.dipPosition;\n\n /**\n * The position of the proximal interphalangeal joint of the finger. This joint is the middle\n * joint of a finger.\n *\n * The proximal interphalangeal joint is located between the two finger segments\n * closest to the hand (the proximal and the medial phalanges). On a thumb,\n * which lacks an medial phalanx, this joint index identifies the knuckle joint\n * between the proximal phalanx and the metacarpal bone.\n *\n * @member pipPosition\n * @type {number[]}\n * @memberof Leap.Finger.prototype\n */ \n this.pipPosition = data.pipPosition;\n\n /**\n * The position of the metacarpopophalangeal joint, or knuckle, of the finger.\n *\n * The metacarpopophalangeal joint is located at the base of a finger between\n * the metacarpal bone and the first phalanx. The common name for this joint is\n * the knuckle.\n *\n * On a thumb, which has one less phalanx than a finger, this joint index\n * identifies the thumb joint near the base of the hand, between the carpal\n * and metacarpal bones.\n *\n * @member mcpPosition\n * @type {number[]}\n * @memberof Leap.Finger.prototype\n */ \n this.mcpPosition = data.mcpPosition;\n\n /**\n * The position of the Carpometacarpal joint\n *\n * This is at the distal end of the wrist, and has no common name.\n *\n */\n this.carpPosition = data.carpPosition;\n\n /**\n * Whether or not this finger is in an extended posture.\n *\n * A finger is considered extended if it is extended straight from the hand as if\n * pointing. A finger is not extended when it is bent down and curled towards the \n * palm.\n * @member extended\n * @type {Boolean}\n * @memberof Leap.Finger.prototype\n */\n this.extended = data.extended;\n\n /**\n * An integer code for the name of this finger.\n * \n * * 0 -- thumb\n * * 1 -- index finger\n * * 2 -- middle finger\n * * 3 -- ring finger\n * * 4 -- pinky\n *\n * @member type\n * @type {number}\n * @memberof Leap.Finger.prototype\n */\n this.type = data.type;\n\n this.finger = true;\n \n /**\n * The joint positions of this finger as an array in the order base to tip.\n *\n * @member positions\n * @type {array[]}\n * @memberof Leap.Finger.prototype\n */\n this.positions = [this.carpPosition, this.mcpPosition, this.pipPosition, this.dipPosition, this.tipPosition];\n\n if (data.bases){\n this.addBones(data);\n } else {\n Dialog.warnBones();\n }\n\n};\n\n_.extend(Finger.prototype, Pointable.prototype);\n\n\nFinger.prototype.addBones = function(data){\n /**\n * Four bones per finger, from wrist outwards:\n * metacarpal, proximal, medial, and distal.\n *\n * See http://en.wikipedia.org/wiki/Interphalangeal_articulations_of_hand\n */\n this.metacarpal = new Bone(this, {\n type: 0,\n width: this.width,\n prevJoint: this.carpPosition,\n nextJoint: this.mcpPosition,\n basis: data.bases[0]\n });\n\n this.proximal = new Bone(this, {\n type: 1,\n width: this.width,\n prevJoint: this.mcpPosition,\n nextJoint: this.pipPosition,\n basis: data.bases[1]\n });\n\n this.medial = new Bone(this, {\n type: 2,\n width: this.width,\n prevJoint: this.pipPosition,\n nextJoint: this.dipPosition,\n basis: data.bases[2]\n });\n\n /**\n * Note that the `distal.nextJoint` position is slightly different from the `finger.tipPosition`.\n * The former is at the very end of the bone, where the latter is the center of a sphere positioned at\n * the tip of the finger. The btipPosition \"bone tip position\" is a few mm closer to the wrist than\n * the tipPosition.\n * @type {Bone}\n */\n this.distal = new Bone(this, {\n type: 3,\n width: this.width,\n prevJoint: this.dipPosition,\n nextJoint: data.btipPosition,\n basis: data.bases[3]\n });\n\n this.bones = [this.metacarpal, this.proximal, this.medial, this.distal];\n};\n\nFinger.prototype.toString = function() {\n return \"Finger [ id:\" + this.id + \" \" + this.length + \"mmx | width:\" + this.width + \"mm | direction:\" + this.direction + ' ]';\n};\n\nFinger.Invalid = { valid: false };\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/leapjs/lib/finger.js\n ** module id = 5\n ** module chunks = 0\n **/","var Pointable = require(\"./pointable\")\n , Bone = require('./bone')\n , glMatrix = require(\"gl-matrix\")\n , mat3 = glMatrix.mat3\n , vec3 = glMatrix.vec3\n , _ = require(\"underscore\");\n\n/**\n * Constructs a Hand object.\n *\n * An uninitialized hand is considered invalid.\n * Get valid Hand objects from a Frame object.\n * @class Hand\n * @memberof Leap\n * @classdesc\n * The Hand class reports the physical characteristics of a detected hand.\n *\n * Hand tracking data includes a palm position and velocity; vectors for\n * the palm normal and direction to the fingers; properties of a sphere fit\n * to the hand; and lists of the attached fingers and tools.\n *\n * Note that Hand objects can be invalid, which means that they do not contain\n * valid tracking data and do not correspond to a physical entity. Invalid Hand\n * objects can be the result of asking for a Hand object using an ID from an\n * earlier frame when no Hand objects with that ID exist in the current frame.\n * A Hand object created from the Hand constructor is also invalid.\n * Test for validity with the [Hand.valid]{@link Leap.Hand#valid} property.\n */\nvar Hand = module.exports = function(data) {\n /**\n * A unique ID assigned to this Hand object, whose value remains the same\n * across consecutive frames while the tracked hand remains visible. If\n * tracking is lost (for example, when a hand is occluded by another hand\n * or when it is withdrawn from or reaches the edge of the Leap field of view),\n * the Leap may assign a new ID when it detects the hand in a future frame.\n *\n * Use the ID value with the {@link Frame.hand}() function to find this\n * Hand object in future frames.\n *\n * @member id\n * @memberof Leap.Hand.prototype\n * @type {String}\n */\n this.id = data.id;\n /**\n * The center position of the palm in millimeters from the Leap origin.\n * @member palmPosition\n * @memberof Leap.Hand.prototype\n * @type {number[]}\n */\n this.palmPosition = data.palmPosition;\n /**\n * The direction from the palm position toward the fingers.\n *\n * The direction is expressed as a unit vector pointing in the same\n * direction as the directed line from the palm position to the fingers.\n *\n * @member direction\n * @memberof Leap.Hand.prototype\n * @type {number[]}\n */\n this.direction = data.direction;\n /**\n * The rate of change of the palm position in millimeters/second.\n *\n * @member palmVeclocity\n * @memberof Leap.Hand.prototype\n * @type {number[]}\n */\n this.palmVelocity = data.palmVelocity;\n /**\n * The normal vector to the palm. If your hand is flat, this vector will\n * point downward, or \"out\" of the front surface of your palm.\n *\n * ![Palm Vectors](images/Leap_Palm_Vectors.png)\n *\n * The direction is expressed as a unit vector pointing in the same\n * direction as the palm normal (that is, a vector orthogonal to the palm).\n * @member palmNormal\n * @memberof Leap.Hand.prototype\n * @type {number[]}\n */\n this.palmNormal = data.palmNormal;\n /**\n * The center of a sphere fit to the curvature of this hand.\n *\n * This sphere is placed roughly as if the hand were holding a ball.\n *\n * ![Hand Ball](images/Leap_Hand_Ball.png)\n * @member sphereCenter\n * @memberof Leap.Hand.prototype\n * @type {number[]}\n */\n this.sphereCenter = data.sphereCenter;\n /**\n * The radius of a sphere fit to the curvature of this hand, in millimeters.\n *\n * This sphere is placed roughly as if the hand were holding a ball. Thus the\n * size of the sphere decreases as the fingers are curled into a fist.\n *\n * @member sphereRadius\n * @memberof Leap.Hand.prototype\n * @type {number}\n */\n this.sphereRadius = data.sphereRadius;\n /**\n * Reports whether this is a valid Hand object.\n *\n * @member valid\n * @memberof Leap.Hand.prototype\n * @type {boolean}\n */\n this.valid = true;\n /**\n * The list of Pointable objects (fingers and tools) detected in this frame\n * that are associated with this hand, given in arbitrary order. The list\n * can be empty if no fingers or tools associated with this hand are detected.\n *\n * Use the {@link Pointable} tool property to determine\n * whether or not an item in the list represents a tool or finger.\n * You can also get only the tools using the Hand.tools[] list or\n * only the fingers using the Hand.fingers[] list.\n *\n * @member pointables[]\n * @memberof Leap.Hand.prototype\n * @type {Leap.Pointable[]}\n */\n this.pointables = [];\n /**\n * The list of fingers detected in this frame that are attached to\n * this hand, given in arbitrary order.\n *\n * The list can be empty if no fingers attached to this hand are detected.\n *\n * @member fingers[]\n * @memberof Leap.Hand.prototype\n * @type {Leap.Pointable[]}\n */\n this.fingers = [];\n \n if (data.armBasis){\n this.arm = new Bone(this, {\n type: 4,\n width: data.armWidth,\n prevJoint: data.elbow,\n nextJoint: data.wrist,\n basis: data.armBasis\n });\n }else{\n this.arm = null;\n }\n \n /**\n * The list of tools detected in this frame that are held by this\n * hand, given in arbitrary order.\n *\n * The list can be empty if no tools held by this hand are detected.\n *\n * @member tools[]\n * @memberof Leap.Hand.prototype\n * @type {Leap.Pointable[]}\n */\n this.tools = [];\n this._translation = data.t;\n this._rotation = _.flatten(data.r);\n this._scaleFactor = data.s;\n\n /**\n * Time the hand has been visible in seconds.\n *\n * @member timeVisible\n * @memberof Leap.Hand.prototype\n * @type {number}\n */\n this.timeVisible = data.timeVisible;\n\n /**\n * The palm position with stabalization\n * @member stabilizedPalmPosition\n * @memberof Leap.Hand.prototype\n * @type {number[]}\n */\n this.stabilizedPalmPosition = data.stabilizedPalmPosition;\n\n /**\n * Reports whether this is a left or a right hand.\n *\n * @member type\n * @type {String}\n * @memberof Leap.Hand.prototype\n */\n this.type = data.type;\n this.grabStrength = data.grabStrength;\n this.pinchStrength = data.pinchStrength;\n this.confidence = data.confidence;\n}\n\n/**\n * The finger with the specified ID attached to this hand.\n *\n * Use this function to retrieve a Pointable object representing a finger\n * attached to this hand using an ID value obtained from a previous frame.\n * This function always returns a Pointable object, but if no finger\n * with the specified ID is present, an invalid Pointable object is returned.\n *\n * Note that the ID values assigned to fingers persist across frames, but only\n * until tracking of a particular finger is lost. If tracking of a finger is\n * lost and subsequently regained, the new Finger object representing that\n * finger may have a different ID than that representing the finger in an\n * earlier frame.\n *\n * @method finger\n * @memberof Leap.Hand.prototype\n * @param {String} id The ID value of a finger from a previous frame.\n * @returns {Leap.Pointable} The Finger object with\n * the matching ID if one exists for this hand in this frame; otherwise, an\n * invalid Finger object is returned.\n */\nHand.prototype.finger = function(id) {\n var finger = this.frame.finger(id);\n return (finger && (finger.handId == this.id)) ? finger : Pointable.Invalid;\n}\n\n/**\n * The angle of rotation around the rotation axis derived from the change in\n * orientation of this hand, and any associated fingers and tools, between the\n * current frame and the specified frame.\n *\n * The returned angle is expressed in radians measured clockwise around the\n * rotation axis (using the right-hand rule) between the start and end frames.\n * The value is always between 0 and pi radians (0 and 180 degrees).\n *\n * If a corresponding Hand object is not found in sinceFrame, or if either\n * this frame or sinceFrame are invalid Frame objects, then the angle of rotation is zero.\n *\n * @method rotationAngle\n * @memberof Leap.Hand.prototype\n * @param {Leap.Frame} sinceFrame The starting frame for computing the relative rotation.\n * @param {numnber[]} [axis] The axis to measure rotation around.\n * @returns {number} A positive value representing the heuristically determined\n * rotational change of the hand between the current frame and that specified in\n * the sinceFrame parameter.\n */\nHand.prototype.rotationAngle = function(sinceFrame, axis) {\n if (!this.valid || !sinceFrame.valid) return 0.0;\n var sinceHand = sinceFrame.hand(this.id);\n if(!sinceHand.valid) return 0.0;\n var rot = this.rotationMatrix(sinceFrame);\n var cs = (rot[0] + rot[4] + rot[8] - 1.0)*0.5\n var angle = Math.acos(cs);\n angle = isNaN(angle) ? 0.0 : angle;\n if (axis !== undefined) {\n var rotAxis = this.rotationAxis(sinceFrame);\n angle *= vec3.dot(rotAxis, vec3.normalize(vec3.create(), axis));\n }\n return angle;\n}\n\n/**\n * The axis of rotation derived from the change in orientation of this hand, and\n * any associated fingers and tools, between the current frame and the specified frame.\n *\n * The returned direction vector is normalized.\n *\n * If a corresponding Hand object is not found in sinceFrame, or if either\n * this frame or sinceFrame are invalid Frame objects, then this method returns a zero vector.\n *\n * @method rotationAxis\n * @memberof Leap.Hand.prototype\n * @param {Leap.Frame} sinceFrame The starting frame for computing the relative rotation.\n * @returns {number[]} A normalized direction Vector representing the axis of the heuristically determined\n * rotational change of the hand between the current frame and that specified in the sinceFrame parameter.\n */\nHand.prototype.rotationAxis = function(sinceFrame) {\n if (!this.valid || !sinceFrame.valid) return vec3.create();\n var sinceHand = sinceFrame.hand(this.id);\n if (!sinceHand.valid) return vec3.create();\n return vec3.normalize(vec3.create(), [\n this._rotation[7] - sinceHand._rotation[5],\n this._rotation[2] - sinceHand._rotation[6],\n this._rotation[3] - sinceHand._rotation[1]\n ]);\n}\n\n/**\n * The transform matrix expressing the rotation derived from the change in\n * orientation of this hand, and any associated fingers and tools, between\n * the current frame and the specified frame.\n *\n * If a corresponding Hand object is not found in sinceFrame, or if either\n * this frame or sinceFrame are invalid Frame objects, then this method returns\n * an identity matrix.\n *\n * @method rotationMatrix\n * @memberof Leap.Hand.prototype\n * @param {Leap.Frame} sinceFrame The starting frame for computing the relative rotation.\n * @returns {number[]} A transformation Matrix containing the heuristically determined\n * rotational change of the hand between the current frame and that specified in the sinceFrame parameter.\n */\nHand.prototype.rotationMatrix = function(sinceFrame) {\n if (!this.valid || !sinceFrame.valid) return mat3.create();\n var sinceHand = sinceFrame.hand(this.id);\n if(!sinceHand.valid) return mat3.create();\n var transpose = mat3.transpose(mat3.create(), this._rotation);\n var m = mat3.multiply(mat3.create(), sinceHand._rotation, transpose);\n return m;\n}\n\n/**\n * The scale factor derived from the hand's motion between the current frame and the specified frame.\n *\n * The scale factor is always positive. A value of 1.0 indicates no scaling took place.\n * Values between 0.0 and 1.0 indicate contraction and values greater than 1.0 indicate expansion.\n *\n * The Leap derives scaling from the relative inward or outward motion of a hand\n * and its associated fingers and tools (independent of translation and rotation).\n *\n * If a corresponding Hand object is not found in sinceFrame, or if either this frame or sinceFrame\n * are invalid Frame objects, then this method returns 1.0.\n *\n * @method scaleFactor\n * @memberof Leap.Hand.prototype\n * @param {Leap.Frame} sinceFrame The starting frame for computing the relative scaling.\n * @returns {number} A positive value representing the heuristically determined\n * scaling change ratio of the hand between the current frame and that specified in the sinceFrame parameter.\n */\nHand.prototype.scaleFactor = function(sinceFrame) {\n if (!this.valid || !sinceFrame.valid) return 1.0;\n var sinceHand = sinceFrame.hand(this.id);\n if(!sinceHand.valid) return 1.0;\n\n return Math.exp(this._scaleFactor - sinceHand._scaleFactor);\n}\n\n/**\n * The change of position of this hand between the current frame and the specified frame\n *\n * The returned translation vector provides the magnitude and direction of the\n * movement in millimeters.\n *\n * If a corresponding Hand object is not found in sinceFrame, or if either this frame or\n * sinceFrame are invalid Frame objects, then this method returns a zero vector.\n *\n * @method translation\n * @memberof Leap.Hand.prototype\n * @param {Leap.Frame} sinceFrame The starting frame for computing the relative translation.\n * @returns {number[]} A Vector representing the heuristically determined change in hand\n * position between the current frame and that specified in the sinceFrame parameter.\n */\nHand.prototype.translation = function(sinceFrame) {\n if (!this.valid || !sinceFrame.valid) return vec3.create();\n var sinceHand = sinceFrame.hand(this.id);\n if(!sinceHand.valid) return vec3.create();\n return [\n this._translation[0] - sinceHand._translation[0],\n this._translation[1] - sinceHand._translation[1],\n this._translation[2] - sinceHand._translation[2]\n ];\n}\n\n/**\n * A string containing a brief, human readable description of the Hand object.\n * @method toString\n * @memberof Leap.Hand.prototype\n * @returns {String} A description of the Hand as a string.\n */\nHand.prototype.toString = function() {\n return \"Hand (\" + this.type + \") [ id: \"+ this.id + \" | palm velocity:\"+this.palmVelocity+\" | sphere center:\"+this.sphereCenter+\" ] \";\n}\n\n/**\n * The pitch angle in radians.\n *\n * Pitch is the angle between the negative z-axis and the projection of\n * the vector onto the y-z plane. In other words, pitch represents rotation\n * around the x-axis.\n * If the vector points upward, the returned angle is between 0 and pi radians\n * (180 degrees); if it points downward, the angle is between 0 and -pi radians.\n *\n * @method pitch\n * @memberof Leap.Hand.prototype\n * @returns {number} The angle of this vector above or below the horizon (x-z plane).\n *\n */\nHand.prototype.pitch = function() {\n return Math.atan2(this.direction[1], -this.direction[2]);\n}\n\n/**\n * The yaw angle in radians.\n *\n * Yaw is the angle between the negative z-axis and the projection of\n * the vector onto the x-z plane. In other words, yaw represents rotation\n * around the y-axis. If the vector points to the right of the negative z-axis,\n * then the returned angle is between 0 and pi radians (180 degrees);\n * if it points to the left, the angle is between 0 and -pi radians.\n *\n * @method yaw\n * @memberof Leap.Hand.prototype\n * @returns {number} The angle of this vector to the right or left of the y-axis.\n *\n */\nHand.prototype.yaw = function() {\n return Math.atan2(this.direction[0], -this.direction[2]);\n}\n\n/**\n * The roll angle in radians.\n *\n * Roll is the angle between the y-axis and the projection of\n * the vector onto the x-y plane. In other words, roll represents rotation\n * around the z-axis. If the vector points to the left of the y-axis,\n * then the returned angle is between 0 and pi radians (180 degrees);\n * if it points to the right, the angle is between 0 and -pi radians.\n *\n * @method roll\n * @memberof Leap.Hand.prototype\n * @returns {number} The angle of this vector to the right or left of the y-axis.\n *\n */\nHand.prototype.roll = function() {\n return Math.atan2(this.palmNormal[0], -this.palmNormal[1]);\n}\n\n/**\n * An invalid Hand object.\n *\n * You can use an invalid Hand object in comparisons testing\n * whether a given Hand instance is valid or invalid. (You can also use the\n * Hand valid property.)\n *\n * @static\n * @type {Leap.Hand}\n * @name Invalid\n * @memberof Leap.Hand\n */\nHand.Invalid = {\n valid: false,\n fingers: [],\n tools: [],\n pointables: [],\n left: false,\n pointable: function() { return Pointable.Invalid },\n finger: function() { return Pointable.Invalid },\n toString: function() { return \"invalid frame\" },\n dump: function() { return this.toString(); },\n rotationAngle: function() { return 0.0; },\n rotationMatrix: function() { return mat3.create(); },\n rotationAxis: function() { return vec3.create(); },\n scaleFactor: function() { return 1.0; },\n translation: function() { return vec3.create(); }\n};\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/leapjs/lib/hand.js\n ** module id = 6\n ** module chunks = 0\n **/","\nfunction KeyCombo(keyComboStr) {\n this.sourceStr = keyComboStr;\n this.subCombos = KeyCombo.parseComboStr(keyComboStr);\n this.keyNames = this.subCombos.reduce(function(memo, nextSubCombo) {\n return memo.concat(nextSubCombo);\n });\n}\n\n// TODO: Add support for key combo sequences\nKeyCombo.sequenceDeliminator = '>>';\nKeyCombo.comboDeliminator = '>';\nKeyCombo.keyDeliminator = '+';\n\nKeyCombo.parseComboStr = function(keyComboStr) {\n var subComboStrs = KeyCombo._splitStr(keyComboStr, KeyCombo.comboDeliminator);\n var combo = [];\n\n for (var i = 0 ; i < subComboStrs.length; i += 1) {\n combo.push(KeyCombo._splitStr(subComboStrs[i], KeyCombo.keyDeliminator));\n }\n return combo;\n};\n\nKeyCombo.prototype.check = function(pressedKeyNames) {\n var startingKeyNameIndex = 0;\n for (var i = 0; i < this.subCombos.length; i += 1) {\n startingKeyNameIndex = this._checkSubCombo(\n this.subCombos[i],\n startingKeyNameIndex,\n pressedKeyNames\n );\n if (startingKeyNameIndex === -1) { return false; }\n }\n return true;\n};\n\nKeyCombo.prototype.isEqual = function(otherKeyCombo) {\n if (\n !otherKeyCombo ||\n typeof otherKeyCombo !== 'string' &&\n typeof otherKeyCombo !== 'object'\n ) { return false; }\n\n if (typeof otherKeyCombo === 'string') {\n otherKeyCombo = new KeyCombo(otherKeyCombo);\n }\n\n if (this.subCombos.length !== otherKeyCombo.subCombos.length) {\n return false;\n }\n for (var i = 0; i < this.subCombos.length; i += 1) {\n if (this.subCombos[i].length !== otherKeyCombo.subCombos[i].length) {\n return false;\n }\n }\n\n for (var i = 0; i < this.subCombos.length; i += 1) {\n var subCombo = this.subCombos[i];\n var otherSubCombo = otherKeyCombo.subCombos[i].slice(0);\n\n for (var j = 0; j < subCombo.length; j += 1) {\n var keyName = subCombo[j];\n var index = otherSubCombo.indexOf(keyName);\n\n if (index > -1) {\n otherSubCombo.splice(index, 1);\n }\n }\n if (otherSubCombo.length !== 0) {\n return false;\n }\n }\n\n return true;\n};\n\nKeyCombo._splitStr = function(str, deliminator) {\n var s = str;\n var d = deliminator;\n var c = '';\n var ca = [];\n\n for (var ci = 0; ci < s.length; ci += 1) {\n if (ci > 0 && s[ci] === d && s[ci - 1] !== '\\\\') {\n ca.push(c.trim());\n c = '';\n ci += 1;\n }\n c += s[ci];\n }\n if (c) { ca.push(c.trim()); }\n\n return ca;\n};\n\nKeyCombo.prototype._checkSubCombo = function(subCombo, startingKeyNameIndex, pressedKeyNames) {\n subCombo = subCombo.slice(0);\n pressedKeyNames = pressedKeyNames.slice(startingKeyNameIndex);\n\n var endIndex = startingKeyNameIndex;\n for (var i = 0; i < subCombo.length; i += 1) {\n\n var keyName = subCombo[i];\n if (keyName[0] === '\\\\') {\n var escapedKeyName = keyName.slice(1);\n if (\n escapedKeyName === KeyCombo.comboDeliminator ||\n escapedKeyName === KeyCombo.keyDeliminator\n ) {\n keyName = escapedKeyName;\n }\n }\n\n var index = pressedKeyNames.indexOf(keyName);\n if (index > -1) {\n subCombo.splice(i, 1);\n i -= 1;\n if (index > endIndex) {\n endIndex = index;\n }\n if (subCombo.length === 0) {\n return endIndex;\n }\n }\n }\n return -1;\n};\n\n\nmodule.exports = KeyCombo;\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/keyboardjs/lib/key-combo.js\n ** module id = 7\n ** module chunks = 0\n **/","var Hand = require(\"./hand\")\n , Pointable = require(\"./pointable\")\n , createGesture = require(\"./gesture\").createGesture\n , glMatrix = require(\"gl-matrix\")\n , mat3 = glMatrix.mat3\n , vec3 = glMatrix.vec3\n , InteractionBox = require(\"./interaction_box\")\n , Finger = require('./finger')\n , _ = require(\"underscore\");\n\n/**\n * Constructs a Frame object.\n *\n * Frame instances created with this constructor are invalid.\n * Get valid Frame objects by calling the\n * [Controller.frame]{@link Leap.Controller#frame}() function.\n *\n * @class Frame\n * @memberof Leap\n * @classdesc\n * The Frame class represents a set of hand and finger tracking data detected\n * in a single frame.\n *\n * The Leap detects hands, fingers and tools within the tracking area, reporting\n * their positions, orientations and motions in frames at the Leap frame rate.\n *\n * Access Frame objects using the [Controller.frame]{@link Leap.Controller#frame}() function.\n */\nvar Frame = module.exports = function(data) {\n /**\n * Reports whether this Frame instance is valid.\n *\n * A valid Frame is one generated by the Controller object that contains\n * tracking data for all detected entities. An invalid Frame contains no\n * actual tracking data, but you can call its functions without risk of a\n * undefined object exception. The invalid Frame mechanism makes it more\n * convenient to track individual data across the frame history. For example,\n * you can invoke:\n *\n * ```javascript\n * var finger = controller.frame(n).finger(fingerID);\n * ```\n *\n * for an arbitrary Frame history value, \"n\", without first checking whether\n * frame(n) returned a null object. (You should still check that the\n * returned Finger instance is valid.)\n *\n * @member valid\n * @memberof Leap.Frame.prototype\n * @type {Boolean}\n */\n this.valid = true;\n /**\n * A unique ID for this Frame. Consecutive frames processed by the Leap\n * have consecutive increasing values.\n * @member id\n * @memberof Leap.Frame.prototype\n * @type {String}\n */\n this.id = data.id;\n /**\n * The frame capture time in microseconds elapsed since the Leap started.\n * @member timestamp\n * @memberof Leap.Frame.prototype\n * @type {number}\n */\n this.timestamp = data.timestamp;\n /**\n * The list of Hand objects detected in this frame, given in arbitrary order.\n * The list can be empty if no hands are detected.\n *\n * @member hands[]\n * @memberof Leap.Frame.prototype\n * @type {Leap.Hand}\n */\n this.hands = [];\n this.handsMap = {};\n /**\n * The list of Pointable objects (fingers and tools) detected in this frame,\n * given in arbitrary order. The list can be empty if no fingers or tools are\n * detected.\n *\n * @member pointables[]\n * @memberof Leap.Frame.prototype\n * @type {Leap.Pointable}\n */\n this.pointables = [];\n /**\n * The list of Tool objects detected in this frame, given in arbitrary order.\n * The list can be empty if no tools are detected.\n *\n * @member tools[]\n * @memberof Leap.Frame.prototype\n * @type {Leap.Pointable}\n */\n this.tools = [];\n /**\n * The list of Finger objects detected in this frame, given in arbitrary order.\n * The list can be empty if no fingers are detected.\n * @member fingers[]\n * @memberof Leap.Frame.prototype\n * @type {Leap.Pointable}\n */\n this.fingers = [];\n\n /**\n * The InteractionBox associated with the current frame.\n *\n * @member interactionBox\n * @memberof Leap.Frame.prototype\n * @type {Leap.InteractionBox}\n */\n if (data.interactionBox) {\n this.interactionBox = new InteractionBox(data.interactionBox);\n }\n this.gestures = [];\n this.pointablesMap = {};\n this._translation = data.t;\n this._rotation = _.flatten(data.r);\n this._scaleFactor = data.s;\n this.data = data;\n this.type = 'frame'; // used by event emitting\n this.currentFrameRate = data.currentFrameRate;\n\n if (data.gestures) {\n /**\n * The list of Gesture objects detected in this frame, given in arbitrary order.\n * The list can be empty if no gestures are detected.\n *\n * Circle and swipe gestures are updated every frame. Tap gestures\n * only appear in the list for a single frame.\n * @member gestures[]\n * @memberof Leap.Frame.prototype\n * @type {Leap.Gesture}\n */\n for (var gestureIdx = 0, gestureCount = data.gestures.length; gestureIdx != gestureCount; gestureIdx++) {\n this.gestures.push(createGesture(data.gestures[gestureIdx]));\n }\n }\n this.postprocessData(data);\n};\n\nFrame.prototype.postprocessData = function(data){\n if (!data) {\n data = this.data;\n }\n\n for (var handIdx = 0, handCount = data.hands.length; handIdx != handCount; handIdx++) {\n var hand = new Hand(data.hands[handIdx]);\n hand.frame = this;\n this.hands.push(hand);\n this.handsMap[hand.id] = hand;\n }\n\n data.pointables = _.sortBy(data.pointables, function(pointable) { return pointable.id });\n\n for (var pointableIdx = 0, pointableCount = data.pointables.length; pointableIdx != pointableCount; pointableIdx++) {\n var pointableData = data.pointables[pointableIdx];\n var pointable = pointableData.dipPosition ? new Finger(pointableData) : new Pointable(pointableData);\n pointable.frame = this;\n this.addPointable(pointable);\n }\n};\n\n/**\n * Adds data from a pointable element into the pointablesMap; \n * also adds the pointable to the frame.handsMap hand to which it belongs,\n * and to the hand's tools or hand's fingers map.\n * \n * @param pointable {Object} a Pointable\n */\nFrame.prototype.addPointable = function (pointable) {\n this.pointables.push(pointable);\n this.pointablesMap[pointable.id] = pointable;\n (pointable.tool ? this.tools : this.fingers).push(pointable);\n if (pointable.handId !== undefined && this.handsMap.hasOwnProperty(pointable.handId)) {\n var hand = this.handsMap[pointable.handId];\n hand.pointables.push(pointable);\n (pointable.tool ? hand.tools : hand.fingers).push(pointable);\n switch (pointable.type){\n case 0:\n hand.thumb = pointable;\n break;\n case 1:\n hand.indexFinger = pointable;\n break;\n case 2:\n hand.middleFinger = pointable;\n break;\n case 3:\n hand.ringFinger = pointable;\n break;\n case 4:\n hand.pinky = pointable;\n break;\n }\n }\n};\n\n/**\n * The tool with the specified ID in this frame.\n *\n * Use the Frame tool() function to retrieve a tool from\n * this frame using an ID value obtained from a previous frame.\n * This function always returns a Pointable object, but if no tool\n * with the specified ID is present, an invalid Pointable object is returned.\n *\n * Note that ID values persist across frames, but only until tracking of a\n * particular object is lost. If tracking of a tool is lost and subsequently\n * regained, the new Pointable object representing that tool may have a\n * different ID than that representing the tool in an earlier frame.\n *\n * @method tool\n * @memberof Leap.Frame.prototype\n * @param {String} id The ID value of a Tool object from a previous frame.\n * @returns {Leap.Pointable} The tool with the\n * matching ID if one exists in this frame; otherwise, an invalid Pointable object\n * is returned.\n */\nFrame.prototype.tool = function(id) {\n var pointable = this.pointable(id);\n return pointable.tool ? pointable : Pointable.Invalid;\n};\n\n/**\n * The Pointable object with the specified ID in this frame.\n *\n * Use the Frame pointable() function to retrieve the Pointable object from\n * this frame using an ID value obtained from a previous frame.\n * This function always returns a Pointable object, but if no finger or tool\n * with the specified ID is present, an invalid Pointable object is returned.\n *\n * Note that ID values persist across frames, but only until tracking of a\n * particular object is lost. If tracking of a finger or tool is lost and subsequently\n * regained, the new Pointable object representing that finger or tool may have\n * a different ID than that representing the finger or tool in an earlier frame.\n *\n * @method pointable\n * @memberof Leap.Frame.prototype\n * @param {String} id The ID value of a Pointable object from a previous frame.\n * @returns {Leap.Pointable} The Pointable object with\n * the matching ID if one exists in this frame;\n * otherwise, an invalid Pointable object is returned.\n */\nFrame.prototype.pointable = function(id) {\n return this.pointablesMap[id] || Pointable.Invalid;\n};\n\n/**\n * The finger with the specified ID in this frame.\n *\n * Use the Frame finger() function to retrieve the finger from\n * this frame using an ID value obtained from a previous frame.\n * This function always returns a Finger object, but if no finger\n * with the specified ID is present, an invalid Pointable object is returned.\n *\n * Note that ID values persist across frames, but only until tracking of a\n * particular object is lost. If tracking of a finger is lost and subsequently\n * regained, the new Pointable object representing that physical finger may have\n * a different ID than that representing the finger in an earlier frame.\n *\n * @method finger\n * @memberof Leap.Frame.prototype\n * @param {String} id The ID value of a finger from a previous frame.\n * @returns {Leap.Pointable} The finger with the\n * matching ID if one exists in this frame; otherwise, an invalid Pointable\n * object is returned.\n */\nFrame.prototype.finger = function(id) {\n var pointable = this.pointable(id);\n return !pointable.tool ? pointable : Pointable.Invalid;\n};\n\n/**\n * The Hand object with the specified ID in this frame.\n *\n * Use the Frame hand() function to retrieve the Hand object from\n * this frame using an ID value obtained from a previous frame.\n * This function always returns a Hand object, but if no hand\n * with the specified ID is present, an invalid Hand object is returned.\n *\n * Note that ID values persist across frames, but only until tracking of a\n * particular object is lost. If tracking of a hand is lost and subsequently\n * regained, the new Hand object representing that physical hand may have\n * a different ID than that representing the physical hand in an earlier frame.\n *\n * @method hand\n * @memberof Leap.Frame.prototype\n * @param {String} id The ID value of a Hand object from a previous frame.\n * @returns {Leap.Hand} The Hand object with the matching\n * ID if one exists in this frame; otherwise, an invalid Hand object is returned.\n */\nFrame.prototype.hand = function(id) {\n return this.handsMap[id] || Hand.Invalid;\n};\n\n/**\n * The angle of rotation around the rotation axis derived from the overall\n * rotational motion between the current frame and the specified frame.\n *\n * The returned angle is expressed in radians measured clockwise around\n * the rotation axis (using the right-hand rule) between the start and end frames.\n * The value is always between 0 and pi radians (0 and 180 degrees).\n *\n * The Leap derives frame rotation from the relative change in position and\n * orientation of all objects detected in the field of view.\n *\n * If either this frame or sinceFrame is an invalid Frame object, then the\n * angle of rotation is zero.\n *\n * @method rotationAngle\n * @memberof Leap.Frame.prototype\n * @param {Leap.Frame} sinceFrame The starting frame for computing the relative rotation.\n * @param {number[]} [axis] The axis to measure rotation around.\n * @returns {number} A positive value containing the heuristically determined\n * rotational change between the current frame and that specified in the sinceFrame parameter.\n */\nFrame.prototype.rotationAngle = function(sinceFrame, axis) {\n if (!this.valid || !sinceFrame.valid) return 0.0;\n\n var rot = this.rotationMatrix(sinceFrame);\n var cs = (rot[0] + rot[4] + rot[8] - 1.0)*0.5;\n var angle = Math.acos(cs);\n angle = isNaN(angle) ? 0.0 : angle;\n\n if (axis !== undefined) {\n var rotAxis = this.rotationAxis(sinceFrame);\n angle *= vec3.dot(rotAxis, vec3.normalize(vec3.create(), axis));\n }\n\n return angle;\n};\n\n/**\n * The axis of rotation derived from the overall rotational motion between\n * the current frame and the specified frame.\n *\n * The returned direction vector is normalized.\n *\n * The Leap derives frame rotation from the relative change in position and\n * orientation of all objects detected in the field of view.\n *\n * If either this frame or sinceFrame is an invalid Frame object, or if no\n * rotation is detected between the two frames, a zero vector is returned.\n *\n * @method rotationAxis\n * @memberof Leap.Frame.prototype\n * @param {Leap.Frame} sinceFrame The starting frame for computing the relative rotation.\n * @returns {number[]} A normalized direction vector representing the axis of the heuristically determined\n * rotational change between the current frame and that specified in the sinceFrame parameter.\n */\nFrame.prototype.rotationAxis = function(sinceFrame) {\n if (!this.valid || !sinceFrame.valid) return vec3.create();\n return vec3.normalize(vec3.create(), [\n this._rotation[7] - sinceFrame._rotation[5],\n this._rotation[2] - sinceFrame._rotation[6],\n this._rotation[3] - sinceFrame._rotation[1]\n ]);\n}\n\n/**\n * The transform matrix expressing the rotation derived from the overall\n * rotational motion between the current frame and the specified frame.\n *\n * The Leap derives frame rotation from the relative change in position and\n * orientation of all objects detected in the field of view.\n *\n * If either this frame or sinceFrame is an invalid Frame object, then\n * this method returns an identity matrix.\n *\n * @method rotationMatrix\n * @memberof Leap.Frame.prototype\n * @param {Leap.Frame} sinceFrame The starting frame for computing the relative rotation.\n * @returns {number[]} A transformation matrix containing the heuristically determined\n * rotational change between the current frame and that specified in the sinceFrame parameter.\n */\nFrame.prototype.rotationMatrix = function(sinceFrame) {\n if (!this.valid || !sinceFrame.valid) return mat3.create();\n var transpose = mat3.transpose(mat3.create(), this._rotation)\n return mat3.multiply(mat3.create(), sinceFrame._rotation, transpose);\n}\n\n/**\n * The scale factor derived from the overall motion between the current frame and the specified frame.\n *\n * The scale factor is always positive. A value of 1.0 indicates no scaling took place.\n * Values between 0.0 and 1.0 indicate contraction and values greater than 1.0 indicate expansion.\n *\n * The Leap derives scaling from the relative inward or outward motion of all\n * objects detected in the field of view (independent of translation and rotation).\n *\n * If either this frame or sinceFrame is an invalid Frame object, then this method returns 1.0.\n *\n * @method scaleFactor\n * @memberof Leap.Frame.prototype\n * @param {Leap.Frame} sinceFrame The starting frame for computing the relative scaling.\n * @returns {number} A positive value representing the heuristically determined\n * scaling change ratio between the current frame and that specified in the sinceFrame parameter.\n */\nFrame.prototype.scaleFactor = function(sinceFrame) {\n if (!this.valid || !sinceFrame.valid) return 1.0;\n return Math.exp(this._scaleFactor - sinceFrame._scaleFactor);\n}\n\n/**\n * The change of position derived from the overall linear motion between the\n * current frame and the specified frame.\n *\n * The returned translation vector provides the magnitude and direction of the\n * movement in millimeters.\n *\n * The Leap derives frame translation from the linear motion of all objects\n * detected in the field of view.\n *\n * If either this frame or sinceFrame is an invalid Frame object, then this\n * method returns a zero vector.\n *\n * @method translation\n * @memberof Leap.Frame.prototype\n * @param {Leap.Frame} sinceFrame The starting frame for computing the relative translation.\n * @returns {number[]} A vector representing the heuristically determined change in\n * position of all objects between the current frame and that specified in the sinceFrame parameter.\n */\nFrame.prototype.translation = function(sinceFrame) {\n if (!this.valid || !sinceFrame.valid) return vec3.create();\n return vec3.subtract(vec3.create(), this._translation, sinceFrame._translation);\n}\n\n/**\n * A string containing a brief, human readable description of the Frame object.\n *\n * @method toString\n * @memberof Leap.Frame.prototype\n * @returns {String} A brief description of this frame.\n */\nFrame.prototype.toString = function() {\n var str = \"Frame [ id:\"+this.id+\" | timestamp:\"+this.timestamp+\" | Hand count:(\"+this.hands.length+\") | Pointable count:(\"+this.pointables.length+\")\";\n if (this.gestures) str += \" | Gesture count:(\"+this.gestures.length+\")\";\n str += \" ]\";\n return str;\n}\n\n/**\n * Returns a JSON-formatted string containing the hands, pointables and gestures\n * in this frame.\n *\n * @method dump\n * @memberof Leap.Frame.prototype\n * @returns {String} A JSON-formatted string.\n */\nFrame.prototype.dump = function() {\n var out = '';\n out += \"Frame Info:
\";\n out += this.toString();\n out += \"

Hands:
\"\n for (var handIdx = 0, handCount = this.hands.length; handIdx != handCount; handIdx++) {\n out += \" \"+ this.hands[handIdx].toString() + \"
\";\n }\n out += \"

Pointables:
\";\n for (var pointableIdx = 0, pointableCount = this.pointables.length; pointableIdx != pointableCount; pointableIdx++) {\n out += \" \"+ this.pointables[pointableIdx].toString() + \"
\";\n }\n if (this.gestures) {\n out += \"

Gestures:
\";\n for (var gestureIdx = 0, gestureCount = this.gestures.length; gestureIdx != gestureCount; gestureIdx++) {\n out += \" \"+ this.gestures[gestureIdx].toString() + \"
\";\n }\n }\n out += \"

Raw JSON:
\";\n out += JSON.stringify(this.data);\n return out;\n}\n\n/**\n * An invalid Frame object.\n *\n * You can use this invalid Frame in comparisons testing\n * whether a given Frame instance is valid or invalid. (You can also check the\n * [Frame.valid]{@link Leap.Frame#valid} property.)\n *\n * @static\n * @type {Leap.Frame}\n * @name Invalid\n * @memberof Leap.Frame\n */\nFrame.Invalid = {\n valid: false,\n hands: [],\n fingers: [],\n tools: [],\n gestures: [],\n pointables: [],\n pointable: function() { return Pointable.Invalid },\n finger: function() { return Pointable.Invalid },\n hand: function() { return Hand.Invalid },\n toString: function() { return \"invalid frame\" },\n dump: function() { return this.toString() },\n rotationAngle: function() { return 0.0; },\n rotationMatrix: function() { return mat3.create(); },\n rotationAxis: function() { return vec3.create(); },\n scaleFactor: function() { return 1.0; },\n translation: function() { return vec3.create(); }\n};\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/leapjs/lib/frame.js\n ** module id = 8\n ** module chunks = 0\n **/","var glMatrix = require(\"gl-matrix\")\n , vec3 = glMatrix.vec3\n , EventEmitter = require('events').EventEmitter\n , _ = require('underscore');\n\n/**\n * Constructs a new Gesture object.\n *\n * An uninitialized Gesture object is considered invalid. Get valid instances\n * of the Gesture class, which will be one of the Gesture subclasses, from a\n * Frame object.\n *\n * @class Gesture\n * @abstract\n * @memberof Leap\n * @classdesc\n * The Gesture class represents a recognized movement by the user.\n *\n * The Leap watches the activity within its field of view for certain movement\n * patterns typical of a user gesture or command. For example, a movement from side to\n * side with the hand can indicate a swipe gesture, while a finger poking forward\n * can indicate a screen tap gesture.\n *\n * When the Leap recognizes a gesture, it assigns an ID and adds a\n * Gesture object to the frame gesture list. For continuous gestures, which\n * occur over many frames, the Leap updates the gesture by adding\n * a Gesture object having the same ID and updated properties in each\n * subsequent frame.\n *\n * **Important:** Recognition for each type of gesture must be enabled;\n * otherwise **no gestures are recognized or reported**.\n *\n * Subclasses of Gesture define the properties for the specific movement patterns\n * recognized by the Leap.\n *\n * The Gesture subclasses for include:\n *\n * * CircleGesture -- A circular movement by a finger.\n * * SwipeGesture -- A straight line movement by the hand with fingers extended.\n * * ScreenTapGesture -- A forward tapping movement by a finger.\n * * KeyTapGesture -- A downward tapping movement by a finger.\n *\n * Circle and swipe gestures are continuous and these objects can have a\n * state of start, update, and stop.\n *\n * The screen tap gesture is a discrete gesture. The Leap only creates a single\n * ScreenTapGesture object appears for each tap and it always has a stop state.\n *\n * Get valid Gesture instances from a Frame object. You can get a list of gestures\n * from the Frame gestures array. You can also use the Frame gesture() method\n * to find a gesture in the current frame using an ID value obtained in a\n * previous frame.\n *\n * Gesture objects can be invalid. For example, when you get a gesture by ID\n * using Frame.gesture(), and there is no gesture with that ID in the current\n * frame, then gesture() returns an Invalid Gesture object (rather than a null\n * value). Always check object validity in situations where a gesture might be\n * invalid.\n */\nvar createGesture = exports.createGesture = function(data) {\n var gesture;\n switch (data.type) {\n case 'circle':\n gesture = new CircleGesture(data);\n break;\n case 'swipe':\n gesture = new SwipeGesture(data);\n break;\n case 'screenTap':\n gesture = new ScreenTapGesture(data);\n break;\n case 'keyTap':\n gesture = new KeyTapGesture(data);\n break;\n default:\n throw \"unknown gesture type\";\n }\n\n /**\n * The gesture ID.\n *\n * All Gesture objects belonging to the same recognized movement share the\n * same ID value. Use the ID value with the Frame::gesture() method to\n * find updates related to this Gesture object in subsequent frames.\n *\n * @member id\n * @memberof Leap.Gesture.prototype\n * @type {number}\n */\n gesture.id = data.id;\n /**\n * The list of hands associated with this Gesture, if any.\n *\n * If no hands are related to this gesture, the list is empty.\n *\n * @member handIds\n * @memberof Leap.Gesture.prototype\n * @type {Array}\n */\n gesture.handIds = data.handIds.slice();\n /**\n * The list of fingers and tools associated with this Gesture, if any.\n *\n * If no Pointable objects are related to this gesture, the list is empty.\n *\n * @member pointableIds\n * @memberof Leap.Gesture.prototype\n * @type {Array}\n */\n gesture.pointableIds = data.pointableIds.slice();\n /**\n * The elapsed duration of the recognized movement up to the\n * frame containing this Gesture object, in microseconds.\n *\n * The duration reported for the first Gesture in the sequence (with the\n * start state) will typically be a small positive number since\n * the movement must progress far enough for the Leap to recognize it as\n * an intentional gesture.\n *\n * @member duration\n * @memberof Leap.Gesture.prototype\n * @type {number}\n */\n gesture.duration = data.duration;\n /**\n * The gesture ID.\n *\n * Recognized movements occur over time and have a beginning, a middle,\n * and an end. The 'state()' attribute reports where in that sequence this\n * Gesture object falls.\n *\n * Possible values for the state field are:\n *\n * * start\n * * update\n * * stop\n *\n * @member state\n * @memberof Leap.Gesture.prototype\n * @type {String}\n */\n gesture.state = data.state;\n /**\n * The gesture type.\n *\n * Possible values for the type field are:\n *\n * * circle\n * * swipe\n * * screenTap\n * * keyTap\n *\n * @member type\n * @memberof Leap.Gesture.prototype\n * @type {String}\n */\n gesture.type = data.type;\n return gesture;\n}\n\n/*\n * Returns a builder object, which uses method chaining for gesture callback binding.\n */\nvar gestureListener = exports.gestureListener = function(controller, type) {\n var handlers = {};\n var gestureMap = {};\n\n controller.on('gesture', function(gesture, frame) {\n if (gesture.type == type) {\n if (gesture.state == \"start\" || gesture.state == \"stop\") {\n if (gestureMap[gesture.id] === undefined) {\n var gestureTracker = new Gesture(gesture, frame);\n gestureMap[gesture.id] = gestureTracker;\n _.each(handlers, function(cb, name) {\n gestureTracker.on(name, cb);\n });\n }\n }\n gestureMap[gesture.id].update(gesture, frame);\n if (gesture.state == \"stop\") {\n delete gestureMap[gesture.id];\n }\n }\n });\n var builder = {\n start: function(cb) {\n handlers['start'] = cb;\n return builder;\n },\n stop: function(cb) {\n handlers['stop'] = cb;\n return builder;\n },\n complete: function(cb) {\n handlers['stop'] = cb;\n return builder;\n },\n update: function(cb) {\n handlers['update'] = cb;\n return builder;\n }\n }\n return builder;\n}\n\nvar Gesture = exports.Gesture = function(gesture, frame) {\n this.gestures = [gesture];\n this.frames = [frame];\n}\n\nGesture.prototype.update = function(gesture, frame) {\n this.lastGesture = gesture;\n this.lastFrame = frame;\n this.gestures.push(gesture);\n this.frames.push(frame);\n this.emit(gesture.state, this);\n}\n\nGesture.prototype.translation = function() {\n return vec3.subtract(vec3.create(), this.lastGesture.startPosition, this.lastGesture.position);\n}\n\n_.extend(Gesture.prototype, EventEmitter.prototype);\n\n/**\n * Constructs a new CircleGesture object.\n *\n * An uninitialized CircleGesture object is considered invalid. Get valid instances\n * of the CircleGesture class from a Frame object.\n *\n * @class CircleGesture\n * @memberof Leap\n * @augments Leap.Gesture\n * @classdesc\n * The CircleGesture classes represents a circular finger movement.\n *\n * A circle movement is recognized when the tip of a finger draws a circle\n * within the Leap field of view.\n *\n * ![CircleGesture](images/Leap_Gesture_Circle.png)\n *\n * Circle gestures are continuous. The CircleGesture objects for the gesture have\n * three possible states:\n *\n * * start -- The circle gesture has just started. The movement has\n * progressed far enough for the recognizer to classify it as a circle.\n * * update -- The circle gesture is continuing.\n * * stop -- The circle gesture is finished.\n */\nvar CircleGesture = function(data) {\n /**\n * The center point of the circle within the Leap frame of reference.\n *\n * @member center\n * @memberof Leap.CircleGesture.prototype\n * @type {number[]}\n */\n this.center = data.center;\n /**\n * The normal vector for the circle being traced.\n *\n * If you draw the circle clockwise, the normal vector points in the same\n * general direction as the pointable object drawing the circle. If you draw\n * the circle counterclockwise, the normal points back toward the\n * pointable. If the angle between the normal and the pointable object\n * drawing the circle is less than 90 degrees, then the circle is clockwise.\n *\n * ```javascript\n * var clockwiseness;\n * if (circle.pointable.direction.angleTo(circle.normal) <= PI/4) {\n * clockwiseness = \"clockwise\";\n * }\n * else\n * {\n * clockwiseness = \"counterclockwise\";\n * }\n * ```\n *\n * @member normal\n * @memberof Leap.CircleGesture.prototype\n * @type {number[]}\n */\n this.normal = data.normal;\n /**\n * The number of times the finger tip has traversed the circle.\n *\n * Progress is reported as a positive number of the number. For example,\n * a progress value of .5 indicates that the finger has gone halfway\n * around, while a value of 3 indicates that the finger has gone around\n * the the circle three times.\n *\n * Progress starts where the circle gesture began. Since the circle\n * must be partially formed before the Leap can recognize it, progress\n * will be greater than zero when a circle gesture first appears in the\n * frame.\n *\n * @member progress\n * @memberof Leap.CircleGesture.prototype\n * @type {number}\n */\n this.progress = data.progress;\n /**\n * The radius of the circle in mm.\n *\n * @member radius\n * @memberof Leap.CircleGesture.prototype\n * @type {number}\n */\n this.radius = data.radius;\n}\n\nCircleGesture.prototype.toString = function() {\n return \"CircleGesture [\"+JSON.stringify(this)+\"]\";\n}\n\n/**\n * Constructs a new SwipeGesture object.\n *\n * An uninitialized SwipeGesture object is considered invalid. Get valid instances\n * of the SwipeGesture class from a Frame object.\n *\n * @class SwipeGesture\n * @memberof Leap\n * @augments Leap.Gesture\n * @classdesc\n * The SwipeGesture class represents a swiping motion of a finger or tool.\n *\n * ![SwipeGesture](images/Leap_Gesture_Swipe.png)\n *\n * Swipe gestures are continuous.\n */\nvar SwipeGesture = function(data) {\n /**\n * The starting position within the Leap frame of\n * reference, in mm.\n *\n * @member startPosition\n * @memberof Leap.SwipeGesture.prototype\n * @type {number[]}\n */\n this.startPosition = data.startPosition;\n /**\n * The current swipe position within the Leap frame of\n * reference, in mm.\n *\n * @member position\n * @memberof Leap.SwipeGesture.prototype\n * @type {number[]}\n */\n this.position = data.position;\n /**\n * The unit direction vector parallel to the swipe motion.\n *\n * You can compare the components of the vector to classify the swipe as\n * appropriate for your application. For example, if you are using swipes\n * for two dimensional scrolling, you can compare the x and y values to\n * determine if the swipe is primarily horizontal or vertical.\n *\n * @member direction\n * @memberof Leap.SwipeGesture.prototype\n * @type {number[]}\n */\n this.direction = data.direction;\n /**\n * The speed of the finger performing the swipe gesture in\n * millimeters per second.\n *\n * @member speed\n * @memberof Leap.SwipeGesture.prototype\n * @type {number}\n */\n this.speed = data.speed;\n}\n\nSwipeGesture.prototype.toString = function() {\n return \"SwipeGesture [\"+JSON.stringify(this)+\"]\";\n}\n\n/**\n * Constructs a new ScreenTapGesture object.\n *\n * An uninitialized ScreenTapGesture object is considered invalid. Get valid instances\n * of the ScreenTapGesture class from a Frame object.\n *\n * @class ScreenTapGesture\n * @memberof Leap\n * @augments Leap.Gesture\n * @classdesc\n * The ScreenTapGesture class represents a tapping gesture by a finger or tool.\n *\n * A screen tap gesture is recognized when the tip of a finger pokes forward\n * and then springs back to approximately the original postion, as if\n * tapping a vertical screen. The tapping finger must pause briefly before beginning the tap.\n *\n * ![ScreenTap](images/Leap_Gesture_Tap2.png)\n *\n * ScreenTap gestures are discrete. The ScreenTapGesture object representing a tap always\n * has the state, STATE_STOP. Only one ScreenTapGesture object is created for each\n * screen tap gesture recognized.\n */\nvar ScreenTapGesture = function(data) {\n /**\n * The position where the screen tap is registered.\n *\n * @member position\n * @memberof Leap.ScreenTapGesture.prototype\n * @type {number[]}\n */\n this.position = data.position;\n /**\n * The direction of finger tip motion.\n *\n * @member direction\n * @memberof Leap.ScreenTapGesture.prototype\n * @type {number[]}\n */\n this.direction = data.direction;\n /**\n * The progess value is always 1.0 for a screen tap gesture.\n *\n * @member progress\n * @memberof Leap.ScreenTapGesture.prototype\n * @type {number}\n */\n this.progress = data.progress;\n}\n\nScreenTapGesture.prototype.toString = function() {\n return \"ScreenTapGesture [\"+JSON.stringify(this)+\"]\";\n}\n\n/**\n * Constructs a new KeyTapGesture object.\n *\n * An uninitialized KeyTapGesture object is considered invalid. Get valid instances\n * of the KeyTapGesture class from a Frame object.\n *\n * @class KeyTapGesture\n * @memberof Leap\n * @augments Leap.Gesture\n * @classdesc\n * The KeyTapGesture class represents a tapping gesture by a finger or tool.\n *\n * A key tap gesture is recognized when the tip of a finger rotates down toward the\n * palm and then springs back to approximately the original postion, as if\n * tapping. The tapping finger must pause briefly before beginning the tap.\n *\n * ![KeyTap](images/Leap_Gesture_Tap.png)\n *\n * Key tap gestures are discrete. The KeyTapGesture object representing a tap always\n * has the state, STATE_STOP. Only one KeyTapGesture object is created for each\n * key tap gesture recognized.\n */\nvar KeyTapGesture = function(data) {\n /**\n * The position where the key tap is registered.\n *\n * @member position\n * @memberof Leap.KeyTapGesture.prototype\n * @type {number[]}\n */\n this.position = data.position;\n /**\n * The direction of finger tip motion.\n *\n * @member direction\n * @memberof Leap.KeyTapGesture.prototype\n * @type {number[]}\n */\n this.direction = data.direction;\n /**\n * The progess value is always 1.0 for a key tap gesture.\n *\n * @member progress\n * @memberof Leap.KeyTapGesture.prototype\n * @type {number}\n */\n this.progress = data.progress;\n}\n\nKeyTapGesture.prototype.toString = function() {\n return \"KeyTapGesture [\"+JSON.stringify(this)+\"]\";\n}\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/leapjs/lib/gesture.js\n ** module id = 9\n ** module chunks = 0\n **/","// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n throw new Error('clearTimeout has not been defined');\n}\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n} ())\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch(e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch(e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n\n\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/process/browser.js\n ** module id = 10\n ** module chunks = 0\n **/","export const SOUND_GAME_MUSIC = 'gameMusic';\nexport const SOUND_INTERSECT_CUBE_1 = 'intersectCube1';\nexport const SOUND_INTERSECT_CUBE_2 = 'intersectCube2';\nexport const SOUND_INTERSECT_CUBE_3 = 'intersectCube3';\nexport const SOUND_INTERSECT_PADDLE = 'intersectPaddle';\nexport const SOUND_BOOM = 'boom';\nexport const SOUND_VICTORY_VOICE = 'victory';\nexport const SOUND_LOSE_VOICE_1 = 'lose1';\nexport const SOUND_LOSE_VOICE_2 = 'lose2';\nexport const SOUND_START_VOICE = 'start';\n\nexport const IMG_INTERACTOPUS_BG_BLACK = 'interactopusBgBlack';\nexport const IMG_INTERACTOPUS_BG_TRANS = 'interactopusBgTrans';\n\nexport const EVENT_FINAL_BLOCK_KILLED = 'finalBlockKilled';\nexport const EVENT_NO_LIVES = 'noLives';\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/names.js\n **/","\nvar KeyCombo = require('./key-combo');\n\n\nfunction Locale(name) {\n this.localeName = name;\n this.pressedKeys = [];\n this._appliedMacros = [];\n this._keyMap = {};\n this._killKeyCodes = [];\n this._macros = [];\n}\n\nLocale.prototype.bindKeyCode = function(keyCode, keyNames) {\n if (typeof keyNames === 'string') {\n keyNames = [keyNames];\n }\n\n this._keyMap[keyCode] = keyNames;\n};\n\nLocale.prototype.bindMacro = function(keyComboStr, keyNames) {\n if (typeof keyNames === 'string') {\n keyNames = [ keyNames ];\n }\n\n var handler = null;\n if (typeof keyNames === 'function') {\n handler = keyNames;\n keyNames = null;\n }\n\n var macro = {\n keyCombo : new KeyCombo(keyComboStr),\n keyNames : keyNames,\n handler : handler\n };\n\n this._macros.push(macro);\n};\n\nLocale.prototype.getKeyCodes = function(keyName) {\n var keyCodes = [];\n for (var keyCode in this._keyMap) {\n var index = this._keyMap[keyCode].indexOf(keyName);\n if (index > -1) { keyCodes.push(keyCode|0); }\n }\n return keyCodes;\n};\n\nLocale.prototype.getKeyNames = function(keyCode) {\n return this._keyMap[keyCode] || [];\n};\n\nLocale.prototype.setKillKey = function(keyCode) {\n if (typeof keyCode === 'string') {\n var keyCodes = this.getKeyCodes(keyCode);\n for (var i = 0; i < keyCodes.length; i += 1) {\n this.setKillKey(keyCodes[i]);\n }\n return;\n }\n\n this._killKeyCodes.push(keyCode);\n};\n\nLocale.prototype.pressKey = function(keyCode) {\n if (typeof keyCode === 'string') {\n var keyCodes = this.getKeyCodes(keyCode);\n for (var i = 0; i < keyCodes.length; i += 1) {\n this.pressKey(keyCodes[i]);\n }\n return;\n }\n\n var keyNames = this.getKeyNames(keyCode);\n for (var i = 0; i < keyNames.length; i += 1) {\n if (this.pressedKeys.indexOf(keyNames[i]) === -1) {\n this.pressedKeys.push(keyNames[i]);\n }\n }\n\n this._applyMacros();\n};\n\nLocale.prototype.releaseKey = function(keyCode) {\n if (typeof keyCode === 'string') {\n var keyCodes = this.getKeyCodes(keyCode);\n for (var i = 0; i < keyCodes.length; i += 1) {\n this.releaseKey(keyCodes[i]);\n }\n }\n\n else {\n var keyNames = this.getKeyNames(keyCode);\n var killKeyCodeIndex = this._killKeyCodes.indexOf(keyCode);\n \n if (killKeyCodeIndex > -1) {\n this.pressedKeys.length = 0;\n } else {\n for (var i = 0; i < keyNames.length; i += 1) {\n var index = this.pressedKeys.indexOf(keyNames[i]);\n if (index > -1) {\n this.pressedKeys.splice(index, 1);\n }\n }\n }\n\n this._clearMacros();\n }\n};\n\nLocale.prototype._applyMacros = function() {\n var macros = this._macros.slice(0);\n for (var i = 0; i < macros.length; i += 1) {\n var macro = macros[i];\n if (macro.keyCombo.check(this.pressedKeys)) {\n if (macro.handler) {\n macro.keyNames = macro.handler(this.pressedKeys);\n }\n for (var j = 0; j < macro.keyNames.length; j += 1) {\n if (this.pressedKeys.indexOf(macro.keyNames[j]) === -1) {\n this.pressedKeys.push(macro.keyNames[j]);\n }\n }\n this._appliedMacros.push(macro);\n }\n }\n};\n\nLocale.prototype._clearMacros = function() {\n for (var i = 0; i < this._appliedMacros.length; i += 1) {\n var macro = this._appliedMacros[i];\n if (!macro.keyCombo.check(this.pressedKeys)) {\n for (var j = 0; j < macro.keyNames.length; j += 1) {\n var index = this.pressedKeys.indexOf(macro.keyNames[j]);\n if (index > -1) {\n this.pressedKeys.splice(index, 1);\n }\n }\n if (macro.handler) {\n macro.keyNames = null;\n }\n this._appliedMacros.splice(i, 1);\n i -= 1;\n }\n }\n};\n\n\nmodule.exports = Locale;\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/keyboardjs/lib/locale.js\n ** module id = 12\n ** module chunks = 0\n **/","var Pointable = require('./pointable'),\n glMatrix = require(\"gl-matrix\")\n , vec3 = glMatrix.vec3\n , mat3 = glMatrix.mat3\n , mat4 = glMatrix.mat4\n , _ = require('underscore');\n\n\nvar Bone = module.exports = function(finger, data) {\n this.finger = finger;\n\n this._center = null, this._matrix = null;\n\n /**\n * An integer code for the name of this bone.\n *\n * * 0 -- metacarpal\n * * 1 -- proximal\n * * 2 -- medial\n * * 3 -- distal\n * * 4 -- arm\n *\n * @member type\n * @type {number}\n * @memberof Leap.Bone.prototype\n */\n this.type = data.type;\n\n /**\n * The position of the previous, or base joint of the bone closer to the wrist.\n * @type {vector3}\n */\n this.prevJoint = data.prevJoint;\n\n /**\n * The position of the next joint, or the end of the bone closer to the finger tip.\n * @type {vector3}\n */\n this.nextJoint = data.nextJoint;\n\n /**\n * The estimated width of the tool in millimeters.\n *\n * The reported width is the average width of the visible portion of the\n * tool from the hand to the tip. If the width isn't known,\n * then a value of 0 is returned.\n *\n * Pointable objects representing fingers do not have a width property.\n *\n * @member width\n * @type {number}\n * @memberof Leap.Pointable.prototype\n */\n this.width = data.width;\n\n var displacement = new Array(3);\n vec3.sub(displacement, data.nextJoint, data.prevJoint);\n\n this.length = vec3.length(displacement);\n\n\n /**\n *\n * These fully-specify the orientation of the bone.\n * See examples/threejs-bones.html for more info\n * Three vec3s:\n * x (red): The rotation axis of the finger, pointing outwards. (In general, away from the thumb )\n * y (green): The \"up\" vector, orienting the top of the finger\n * z (blue): The roll axis of the bone.\n *\n * Most up vectors will be pointing the same direction, except for the thumb, which is more rightwards.\n *\n * The thumb has one fewer bones than the fingers, but there are the same number of joints & joint-bases provided\n * the first two appear in the same position, but only the second (proximal) rotates.\n *\n * Normalized.\n */\n this.basis = data.basis;\n};\n\nBone.prototype.left = function(){\n\n if (this._left) return this._left;\n\n this._left = mat3.determinant(this.basis[0].concat(this.basis[1]).concat(this.basis[2])) < 0;\n\n return this._left;\n\n};\n\n\n/**\n * The Affine transformation matrix describing the orientation of the bone, in global Leap-space.\n * It contains a 3x3 rotation matrix (in the \"top left\"), and center coordinates in the fourth column.\n *\n * Unlike the basis, the right and left hands have the same coordinate system.\n *\n */\nBone.prototype.matrix = function(){\n\n if (this._matrix) return this._matrix;\n\n var b = this.basis,\n t = this._matrix = mat4.create();\n\n // open transform mat4 from rotation mat3\n t[0] = b[0][0], t[1] = b[0][1], t[2] = b[0][2];\n t[4] = b[1][0], t[5] = b[1][1], t[6] = b[1][2];\n t[8] = b[2][0], t[9] = b[2][1], t[10] = b[2][2];\n\n t[3] = this.center()[0];\n t[7] = this.center()[1];\n t[11] = this.center()[2];\n\n if ( this.left() ) {\n // flip the basis to be right-handed\n t[0] *= -1;\n t[1] *= -1;\n t[2] *= -1;\n }\n\n return this._matrix;\n};\n\n/**\n * Helper method to linearly interpolate between the two ends of the bone.\n *\n * when t = 0, the position of prevJoint will be returned\n * when t = 1, the position of nextJoint will be returned\n */\nBone.prototype.lerp = function(out, t){\n\n vec3.lerp(out, this.prevJoint, this.nextJoint, t);\n\n};\n\n/**\n *\n * The center position of the bone\n * Returns a vec3 array.\n *\n */\nBone.prototype.center = function(){\n\n if (this._center) return this._center;\n\n var center = vec3.create();\n this.lerp(center, 0.5);\n this._center = center;\n return center;\n\n};\n\n// The negative of the z-basis\nBone.prototype.direction = function(){\n\n return [\n this.basis[2][0] * -1,\n this.basis[2][1] * -1,\n this.basis[2][2] * -1\n ];\n\n};\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/leapjs/lib/bone.js\n ** module id = 13\n ** module chunks = 0\n **/","var CircularBuffer = module.exports = function(size) {\n this.pos = 0;\n this._buf = [];\n this.size = size;\n}\n\nCircularBuffer.prototype.get = function(i) {\n if (i == undefined) i = 0;\n if (i >= this.size) return undefined;\n if (i >= this._buf.length) return undefined;\n return this._buf[(this.pos - i - 1) % this.size];\n}\n\nCircularBuffer.prototype.push = function(o) {\n this._buf[this.pos % this.size] = o;\n return this.pos++;\n}\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/leapjs/lib/circular_buffer.js\n ** module id = 14\n ** module chunks = 0\n **/","var chooseProtocol = require('../protocol').chooseProtocol\n , EventEmitter = require('events').EventEmitter\n , _ = require('underscore');\n\nvar BaseConnection = module.exports = function(opts) {\n this.opts = _.defaults(opts || {}, {\n host : '127.0.0.1',\n enableGestures: false,\n scheme: this.getScheme(),\n port: this.getPort(),\n background: false,\n optimizeHMD: false,\n requestProtocolVersion: BaseConnection.defaultProtocolVersion\n });\n this.host = this.opts.host;\n this.port = this.opts.port;\n this.scheme = this.opts.scheme;\n this.protocolVersionVerified = false;\n this.background = null;\n this.optimizeHMD = null;\n this.on('ready', function() {\n this.enableGestures(this.opts.enableGestures);\n this.setBackground(this.opts.background);\n this.setOptimizeHMD(this.opts.optimizeHMD);\n\n if (this.opts.optimizeHMD){\n console.log(\"Optimized for head mounted display usage.\");\n }else {\n console.log(\"Optimized for desktop usage.\");\n }\n\n });\n};\n\n// The latest available:\nBaseConnection.defaultProtocolVersion = 6;\n\nBaseConnection.prototype.getUrl = function() {\n return this.scheme + \"//\" + this.host + \":\" + this.port + \"/v\" + this.opts.requestProtocolVersion + \".json\";\n}\n\n\nBaseConnection.prototype.getScheme = function(){\n return 'ws:'\n}\n\nBaseConnection.prototype.getPort = function(){\n return 6437\n}\n\n\nBaseConnection.prototype.setBackground = function(state) {\n this.opts.background = state;\n if (this.protocol && this.protocol.sendBackground && this.background !== this.opts.background) {\n this.background = this.opts.background;\n this.protocol.sendBackground(this, this.opts.background);\n }\n}\n\nBaseConnection.prototype.setOptimizeHMD = function(state) {\n this.opts.optimizeHMD = state;\n if (this.protocol && this.protocol.sendOptimizeHMD && this.optimizeHMD !== this.opts.optimizeHMD) {\n this.optimizeHMD = this.opts.optimizeHMD;\n this.protocol.sendOptimizeHMD(this, this.opts.optimizeHMD);\n }\n}\n\nBaseConnection.prototype.handleOpen = function() {\n if (!this.connected) {\n this.connected = true;\n this.emit('connect');\n }\n}\n\nBaseConnection.prototype.enableGestures = function(enabled) {\n this.gesturesEnabled = enabled ? true : false;\n this.send(this.protocol.encode({\"enableGestures\": this.gesturesEnabled}));\n}\n\nBaseConnection.prototype.handleClose = function(code, reason) {\n if (!this.connected) return;\n this.disconnect();\n\n // 1001 - an active connection is closed\n // 1006 - cannot connect\n if (code === 1001 && this.opts.requestProtocolVersion > 1) {\n if (this.protocolVersionVerified) {\n this.protocolVersionVerified = false;\n }else{\n this.opts.requestProtocolVersion--;\n }\n }\n this.startReconnection();\n}\n\nBaseConnection.prototype.startReconnection = function() {\n var connection = this;\n if(!this.reconnectionTimer){\n (this.reconnectionTimer = setInterval(function() { connection.reconnect() }, 500));\n }\n}\n\nBaseConnection.prototype.stopReconnection = function() {\n this.reconnectionTimer = clearInterval(this.reconnectionTimer);\n}\n\n// By default, disconnect will prevent auto-reconnection.\n// Pass in true to allow the reconnection loop not be interrupted continue\nBaseConnection.prototype.disconnect = function(allowReconnect) {\n if (!allowReconnect) this.stopReconnection();\n if (!this.socket) return;\n this.socket.close();\n delete this.socket;\n delete this.protocol;\n delete this.background; // This is not persisted when reconnecting to the web socket server\n delete this.optimizeHMD;\n delete this.focusedState;\n if (this.connected) {\n this.connected = false;\n this.emit('disconnect');\n }\n return true;\n}\n\nBaseConnection.prototype.reconnect = function() {\n if (this.connected) {\n this.stopReconnection();\n } else {\n this.disconnect(true);\n this.connect();\n }\n}\n\nBaseConnection.prototype.handleData = function(data) {\n var message = JSON.parse(data);\n\n var messageEvent;\n if (this.protocol === undefined) {\n messageEvent = this.protocol = chooseProtocol(message);\n this.protocolVersionVerified = true;\n this.emit('ready');\n } else {\n messageEvent = this.protocol(message);\n }\n this.emit(messageEvent.type, messageEvent);\n}\n\nBaseConnection.prototype.connect = function() {\n if (this.socket) return;\n this.socket = this.setupSocket();\n return true;\n}\n\nBaseConnection.prototype.send = function(data) {\n this.socket.send(data);\n}\n\nBaseConnection.prototype.reportFocus = function(state) {\n if (!this.connected || this.focusedState === state) return;\n this.focusedState = state;\n this.emit(this.focusedState ? 'focus' : 'blur');\n if (this.protocol && this.protocol.sendFocused) {\n this.protocol.sendFocused(this, this.focusedState);\n }\n}\n\n_.extend(BaseConnection.prototype, EventEmitter.prototype);\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/leapjs/lib/connection/base.js\n ** module id = 15\n ** module chunks = 0\n **/","var Dialog = module.exports = function(message, options){\n this.options = (options || {});\n this.message = message;\n\n this.createElement();\n};\n\nDialog.prototype.createElement = function(){\n this.element = document.createElement('div');\n this.element.className = \"leapjs-dialog\";\n this.element.style.position = \"fixed\";\n this.element.style.top = '8px';\n this.element.style.left = 0;\n this.element.style.right = 0;\n this.element.style.textAlign = 'center';\n this.element.style.zIndex = 1000;\n\n var dialog = document.createElement('div');\n this.element.appendChild(dialog);\n dialog.style.className = \"leapjs-dialog\";\n dialog.style.display = \"inline-block\";\n dialog.style.margin = \"auto\";\n dialog.style.padding = \"8px\";\n dialog.style.color = \"#222\";\n dialog.style.background = \"#eee\";\n dialog.style.borderRadius = \"4px\";\n dialog.style.border = \"1px solid #999\";\n dialog.style.textAlign = \"left\";\n dialog.style.cursor = \"pointer\";\n dialog.style.whiteSpace = \"nowrap\";\n dialog.style.transition = \"box-shadow 1s linear\";\n dialog.innerHTML = this.message;\n\n\n if (this.options.onclick){\n dialog.addEventListener('click', this.options.onclick);\n }\n\n if (this.options.onmouseover){\n dialog.addEventListener('mouseover', this.options.onmouseover);\n }\n\n if (this.options.onmouseout){\n dialog.addEventListener('mouseout', this.options.onmouseout);\n }\n\n if (this.options.onmousemove){\n dialog.addEventListener('mousemove', this.options.onmousemove);\n }\n};\n\nDialog.prototype.show = function(){\n document.body.appendChild(this.element);\n return this;\n};\n\nDialog.prototype.hide = function(){\n document.body.removeChild(this.element);\n return this;\n};\n\n\n\n\n// Shows a DOM dialog box with links to developer.leapmotion.com to upgrade\n// This will work whether or not the Leap is plugged in,\n// As long as it is called after a call to .connect() and the 'ready' event has fired.\nDialog.warnOutOfDate = function(params){\n params || (params = {});\n\n var url = \"http://developer.leapmotion.com?\";\n\n params.returnTo = window.location.href;\n\n for (var key in params){\n url += key + '=' + encodeURIComponent(params[key]) + '&';\n }\n\n var dialog,\n onclick = function(event){\n\n if (event.target.id != 'leapjs-decline-upgrade'){\n\n var popup = window.open(url,\n '_blank',\n 'height=800,width=1000,location=1,menubar=1,resizable=1,status=1,toolbar=1,scrollbars=1'\n );\n\n if (window.focus) {popup.focus()}\n\n }\n\n dialog.hide();\n\n return true;\n },\n\n\n message = \"This site requires Leap Motion Tracking V2.\" +\n \"\" +\n \"\";\n\n dialog = new Dialog(message, {\n onclick: onclick,\n onmousemove: function(e){\n if (e.target == document.getElementById('leapjs-decline-upgrade')){\n document.getElementById('leapjs-decline-upgrade').style.color = '#000';\n document.getElementById('leapjs-decline-upgrade').style.boxShadow = '0px 0px 2px #5daa00';\n\n document.getElementById('leapjs-accept-upgrade').style.color = '#444';\n document.getElementById('leapjs-accept-upgrade').style.boxShadow = 'none';\n }else{\n document.getElementById('leapjs-accept-upgrade').style.color = '#000';\n document.getElementById('leapjs-accept-upgrade').style.boxShadow = '0px 0px 2px #5daa00';\n\n document.getElementById('leapjs-decline-upgrade').style.color = '#444';\n document.getElementById('leapjs-decline-upgrade').style.boxShadow = 'none';\n }\n },\n onmouseout: function(){\n document.getElementById('leapjs-decline-upgrade').style.color = '#444';\n document.getElementById('leapjs-decline-upgrade').style.boxShadow = 'none';\n document.getElementById('leapjs-accept-upgrade').style.color = '#444';\n document.getElementById('leapjs-accept-upgrade').style.boxShadow = 'none';\n }\n }\n );\n\n return dialog.show();\n};\n\n\n// Tracks whether we've warned for lack of bones API. This will be shown only for early private-beta members.\nDialog.hasWarnedBones = false;\n\nDialog.warnBones = function(){\n if (this.hasWarnedBones) return;\n this.hasWarnedBones = true;\n\n console.warn(\"Your Leap Service is out of date\");\n\n if ( !(typeof(process) !== 'undefined' && process.versions && process.versions.node) ){\n this.warnOutOfDate({reason: 'bones'});\n }\n\n}\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/leapjs/lib/dialog.js\n ** module id = 16\n ** module chunks = 0\n **/","var glMatrix = require(\"gl-matrix\")\n , vec3 = glMatrix.vec3;\n\n/**\n * Constructs a InteractionBox object.\n *\n * @class InteractionBox\n * @memberof Leap\n * @classdesc\n * The InteractionBox class represents a box-shaped region completely within\n * the field of view of the Leap Motion controller.\n *\n * The interaction box is an axis-aligned rectangular prism and provides\n * normalized coordinates for hands, fingers, and tools within this box.\n * The InteractionBox class can make it easier to map positions in the\n * Leap Motion coordinate system to 2D or 3D coordinate systems used\n * for application drawing.\n *\n * ![Interaction Box](images/Leap_InteractionBox.png)\n *\n * The InteractionBox region is defined by a center and dimensions along the x, y, and z axes.\n */\nvar InteractionBox = module.exports = function(data) {\n /**\n * Indicates whether this is a valid InteractionBox object.\n *\n * @member valid\n * @type {Boolean}\n * @memberof Leap.InteractionBox.prototype\n */\n this.valid = true;\n /**\n * The center of the InteractionBox in device coordinates (millimeters).\n * This point is equidistant from all sides of the box.\n *\n * @member center\n * @type {number[]}\n * @memberof Leap.InteractionBox.prototype\n */\n this.center = data.center;\n\n this.size = data.size;\n /**\n * The width of the InteractionBox in millimeters, measured along the x-axis.\n *\n * @member width\n * @type {number}\n * @memberof Leap.InteractionBox.prototype\n */\n this.width = data.size[0];\n /**\n * The height of the InteractionBox in millimeters, measured along the y-axis.\n *\n * @member height\n * @type {number}\n * @memberof Leap.InteractionBox.prototype\n */\n this.height = data.size[1];\n /**\n * The depth of the InteractionBox in millimeters, measured along the z-axis.\n *\n * @member depth\n * @type {number}\n * @memberof Leap.InteractionBox.prototype\n */\n this.depth = data.size[2];\n}\n\n/**\n * Converts a position defined by normalized InteractionBox coordinates\n * into device coordinates in millimeters.\n *\n * This function performs the inverse of normalizePoint().\n *\n * @method denormalizePoint\n * @memberof Leap.InteractionBox.prototype\n * @param {number[]} normalizedPosition The input position in InteractionBox coordinates.\n * @returns {number[]} The corresponding denormalized position in device coordinates.\n */\nInteractionBox.prototype.denormalizePoint = function(normalizedPosition) {\n return vec3.fromValues(\n (normalizedPosition[0] - 0.5) * this.size[0] + this.center[0],\n (normalizedPosition[1] - 0.5) * this.size[1] + this.center[1],\n (normalizedPosition[2] - 0.5) * this.size[2] + this.center[2]\n );\n}\n\n/**\n * Normalizes the coordinates of a point using the interaction box.\n *\n * Coordinates from the Leap Motion frame of reference (millimeters) are\n * converted to a range of [0..1] such that the minimum value of the\n * InteractionBox maps to 0 and the maximum value of the InteractionBox maps to 1.\n *\n * @method normalizePoint\n * @memberof Leap.InteractionBox.prototype\n * @param {number[]} position The input position in device coordinates.\n * @param {Boolean} clamp Whether or not to limit the output value to the range [0,1]\n * when the input position is outside the InteractionBox. Defaults to true.\n * @returns {number[]} The normalized position.\n */\nInteractionBox.prototype.normalizePoint = function(position, clamp) {\n var vec = vec3.fromValues(\n ((position[0] - this.center[0]) / this.size[0]) + 0.5,\n ((position[1] - this.center[1]) / this.size[1]) + 0.5,\n ((position[2] - this.center[2]) / this.size[2]) + 0.5\n );\n\n if (clamp) {\n vec[0] = Math.min(Math.max(vec[0], 0), 1);\n vec[1] = Math.min(Math.max(vec[1], 0), 1);\n vec[2] = Math.min(Math.max(vec[2], 0), 1);\n }\n return vec;\n}\n\n/**\n * Writes a brief, human readable description of the InteractionBox object.\n *\n * @method toString\n * @memberof Leap.InteractionBox.prototype\n * @returns {String} A description of the InteractionBox object as a string.\n */\nInteractionBox.prototype.toString = function() {\n return \"InteractionBox [ width:\" + this.width + \" | height:\" + this.height + \" | depth:\" + this.depth + \" ]\";\n}\n\n/**\n * An invalid InteractionBox object.\n *\n * You can use this InteractionBox instance in comparisons testing\n * whether a given InteractionBox instance is valid or invalid. (You can also use the\n * InteractionBox.valid property.)\n *\n * @static\n * @type {Leap.InteractionBox}\n * @name Invalid\n * @memberof Leap.InteractionBox\n */\nInteractionBox.Invalid = { valid: false };\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/leapjs/lib/interaction_box.js\n ** module id = 17\n ** module chunks = 0\n **/","var Frame = require('./frame')\n , Hand = require('./hand')\n , Pointable = require('./pointable')\n , Finger = require('./finger')\n , _ = require('underscore')\n , EventEmitter = require('events').EventEmitter;\n\nvar Event = function(data) {\n this.type = data.type;\n this.state = data.state;\n};\n\nexports.chooseProtocol = function(header) {\n var protocol;\n switch(header.version) {\n case 1:\n case 2:\n case 3:\n case 4:\n case 5:\n case 6:\n protocol = JSONProtocol(header);\n protocol.sendBackground = function(connection, state) {\n connection.send(protocol.encode({background: state}));\n }\n protocol.sendFocused = function(connection, state) {\n connection.send(protocol.encode({focused: state}));\n }\n protocol.sendOptimizeHMD = function(connection, state) {\n connection.send(protocol.encode({optimizeHMD: state}));\n }\n break;\n default:\n throw \"unrecognized version\";\n }\n return protocol;\n}\n\nvar JSONProtocol = exports.JSONProtocol = function(header) {\n\n var protocol = function(frameData) {\n\n if (frameData.event) {\n\n return new Event(frameData.event);\n\n } else {\n\n protocol.emit('beforeFrameCreated', frameData);\n\n var frame = new Frame(frameData);\n\n protocol.emit('afterFrameCreated', frame, frameData);\n\n return frame;\n\n }\n\n };\n\n protocol.encode = function(message) {\n return JSON.stringify(message);\n };\n protocol.version = header.version;\n protocol.serviceVersion = header.serviceVersion;\n protocol.versionLong = 'Version ' + header.version;\n protocol.type = 'protocol';\n\n _.extend(protocol, EventEmitter.prototype);\n\n return protocol;\n};\n\n\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/leapjs/lib/protocol.js\n ** module id = 18\n ** module chunks = 0\n **/","/*jshint eqnull:true*/\n(function (root) {\n \"use strict\";\n\n var GLOBAL_KEY = \"Random\";\n\n var imul = (typeof Math.imul !== \"function\" || Math.imul(0xffffffff, 5) !== -5 ?\n function (a, b) {\n var ah = (a >>> 16) & 0xffff;\n var al = a & 0xffff;\n var bh = (b >>> 16) & 0xffff;\n var bl = b & 0xffff;\n // the shift by 0 fixes the sign on the high part\n // the final |0 converts the unsigned value into a signed value\n return (al * bl) + (((ah * bl + al * bh) << 16) >>> 0) | 0;\n } :\n Math.imul);\n\n var stringRepeat = (typeof String.prototype.repeat === \"function\" && \"x\".repeat(3) === \"xxx\" ?\n function (x, y) {\n return x.repeat(y);\n } : function (pattern, count) {\n var result = \"\";\n while (count > 0) {\n if (count & 1) {\n result += pattern;\n }\n count >>= 1;\n pattern += pattern;\n }\n return result;\n });\n\n function Random(engine) {\n if (!(this instanceof Random)) {\n return new Random(engine);\n }\n\n if (engine == null) {\n engine = Random.engines.nativeMath;\n } else if (typeof engine !== \"function\") {\n throw new TypeError(\"Expected engine to be a function, got \" + typeof engine);\n }\n this.engine = engine;\n }\n var proto = Random.prototype;\n\n Random.engines = {\n nativeMath: function () {\n return (Math.random() * 0x100000000) | 0;\n },\n mt19937: (function (Int32Array) {\n // http://en.wikipedia.org/wiki/Mersenne_twister\n function refreshData(data) {\n var k = 0;\n var tmp = 0;\n for (;\n (k | 0) < 227; k = (k + 1) | 0) {\n tmp = (data[k] & 0x80000000) | (data[(k + 1) | 0] & 0x7fffffff);\n data[k] = data[(k + 397) | 0] ^ (tmp >>> 1) ^ ((tmp & 0x1) ? 0x9908b0df : 0);\n }\n\n for (;\n (k | 0) < 623; k = (k + 1) | 0) {\n tmp = (data[k] & 0x80000000) | (data[(k + 1) | 0] & 0x7fffffff);\n data[k] = data[(k - 227) | 0] ^ (tmp >>> 1) ^ ((tmp & 0x1) ? 0x9908b0df : 0);\n }\n\n tmp = (data[623] & 0x80000000) | (data[0] & 0x7fffffff);\n data[623] = data[396] ^ (tmp >>> 1) ^ ((tmp & 0x1) ? 0x9908b0df : 0);\n }\n\n function temper(value) {\n value ^= value >>> 11;\n value ^= (value << 7) & 0x9d2c5680;\n value ^= (value << 15) & 0xefc60000;\n return value ^ (value >>> 18);\n }\n\n function seedWithArray(data, source) {\n var i = 1;\n var j = 0;\n var sourceLength = source.length;\n var k = Math.max(sourceLength, 624) | 0;\n var previous = data[0] | 0;\n for (;\n (k | 0) > 0; --k) {\n data[i] = previous = ((data[i] ^ imul((previous ^ (previous >>> 30)), 0x0019660d)) + (source[j] | 0) + (j | 0)) | 0;\n i = (i + 1) | 0;\n ++j;\n if ((i | 0) > 623) {\n data[0] = data[623];\n i = 1;\n }\n if (j >= sourceLength) {\n j = 0;\n }\n }\n for (k = 623;\n (k | 0) > 0; --k) {\n data[i] = previous = ((data[i] ^ imul((previous ^ (previous >>> 30)), 0x5d588b65)) - i) | 0;\n i = (i + 1) | 0;\n if ((i | 0) > 623) {\n data[0] = data[623];\n i = 1;\n }\n }\n data[0] = 0x80000000;\n }\n\n function mt19937() {\n var data = new Int32Array(624);\n var index = 0;\n var uses = 0;\n\n function next() {\n if ((index | 0) >= 624) {\n refreshData(data);\n index = 0;\n }\n\n var value = data[index];\n index = (index + 1) | 0;\n uses += 1;\n return temper(value) | 0;\n }\n next.getUseCount = function() {\n return uses;\n };\n next.discard = function (count) {\n uses += count;\n if ((index | 0) >= 624) {\n refreshData(data);\n index = 0;\n }\n while ((count - index) > 624) {\n count -= 624 - index;\n refreshData(data);\n index = 0;\n }\n index = (index + count) | 0;\n return next;\n };\n next.seed = function (initial) {\n var previous = 0;\n data[0] = previous = initial | 0;\n\n for (var i = 1; i < 624; i = (i + 1) | 0) {\n data[i] = previous = (imul((previous ^ (previous >>> 30)), 0x6c078965) + i) | 0;\n }\n index = 624;\n uses = 0;\n return next;\n };\n next.seedWithArray = function (source) {\n next.seed(0x012bd6aa);\n seedWithArray(data, source);\n return next;\n };\n next.autoSeed = function () {\n return next.seedWithArray(Random.generateEntropyArray());\n };\n return next;\n }\n\n return mt19937;\n }(typeof Int32Array === \"function\" ? Int32Array : Array)),\n browserCrypto: (typeof crypto !== \"undefined\" && typeof crypto.getRandomValues === \"function\" && typeof Int32Array === \"function\") ? (function () {\n var data = null;\n var index = 128;\n\n return function () {\n if (index >= 128) {\n if (data === null) {\n data = new Int32Array(128);\n }\n crypto.getRandomValues(data);\n index = 0;\n }\n\n return data[index++] | 0;\n };\n }()) : null\n };\n\n Random.generateEntropyArray = function () {\n var array = [];\n var engine = Random.engines.nativeMath;\n for (var i = 0; i < 16; ++i) {\n array[i] = engine() | 0;\n }\n array.push(new Date().getTime() | 0);\n return array;\n };\n\n function returnValue(value) {\n return function () {\n return value;\n };\n }\n\n // [-0x80000000, 0x7fffffff]\n Random.int32 = function (engine) {\n return engine() | 0;\n };\n proto.int32 = function () {\n return Random.int32(this.engine);\n };\n\n // [0, 0xffffffff]\n Random.uint32 = function (engine) {\n return engine() >>> 0;\n };\n proto.uint32 = function () {\n return Random.uint32(this.engine);\n };\n\n // [0, 0x1fffffffffffff]\n Random.uint53 = function (engine) {\n var high = engine() & 0x1fffff;\n var low = engine() >>> 0;\n return (high * 0x100000000) + low;\n };\n proto.uint53 = function () {\n return Random.uint53(this.engine);\n };\n\n // [0, 0x20000000000000]\n Random.uint53Full = function (engine) {\n while (true) {\n var high = engine() | 0;\n if (high & 0x200000) {\n if ((high & 0x3fffff) === 0x200000 && (engine() | 0) === 0) {\n return 0x20000000000000;\n }\n } else {\n var low = engine() >>> 0;\n return ((high & 0x1fffff) * 0x100000000) + low;\n }\n }\n };\n proto.uint53Full = function () {\n return Random.uint53Full(this.engine);\n };\n\n // [-0x20000000000000, 0x1fffffffffffff]\n Random.int53 = function (engine) {\n var high = engine() | 0;\n var low = engine() >>> 0;\n return ((high & 0x1fffff) * 0x100000000) + low + (high & 0x200000 ? -0x20000000000000 : 0);\n };\n proto.int53 = function () {\n return Random.int53(this.engine);\n };\n\n // [-0x20000000000000, 0x20000000000000]\n Random.int53Full = function (engine) {\n while (true) {\n var high = engine() | 0;\n if (high & 0x400000) {\n if ((high & 0x7fffff) === 0x400000 && (engine() | 0) === 0) {\n return 0x20000000000000;\n }\n } else {\n var low = engine() >>> 0;\n return ((high & 0x1fffff) * 0x100000000) + low + (high & 0x200000 ? -0x20000000000000 : 0);\n }\n }\n };\n proto.int53Full = function () {\n return Random.int53Full(this.engine);\n };\n\n function add(generate, addend) {\n if (addend === 0) {\n return generate;\n } else {\n return function (engine) {\n return generate(engine) + addend;\n };\n }\n }\n\n Random.integer = (function () {\n function isPowerOfTwoMinusOne(value) {\n return ((value + 1) & value) === 0;\n }\n\n function bitmask(masking) {\n return function (engine) {\n return engine() & masking;\n };\n }\n\n function downscaleToLoopCheckedRange(range) {\n var extendedRange = range + 1;\n var maximum = extendedRange * Math.floor(0x100000000 / extendedRange);\n return function (engine) {\n var value = 0;\n do {\n value = engine() >>> 0;\n } while (value >= maximum);\n return value % extendedRange;\n };\n }\n\n function downscaleToRange(range) {\n if (isPowerOfTwoMinusOne(range)) {\n return bitmask(range);\n } else {\n return downscaleToLoopCheckedRange(range);\n }\n }\n\n function isEvenlyDivisibleByMaxInt32(value) {\n return (value | 0) === 0;\n }\n\n function upscaleWithHighMasking(masking) {\n return function (engine) {\n var high = engine() & masking;\n var low = engine() >>> 0;\n return (high * 0x100000000) + low;\n };\n }\n\n function upscaleToLoopCheckedRange(extendedRange) {\n var maximum = extendedRange * Math.floor(0x20000000000000 / extendedRange);\n return function (engine) {\n var ret = 0;\n do {\n var high = engine() & 0x1fffff;\n var low = engine() >>> 0;\n ret = (high * 0x100000000) + low;\n } while (ret >= maximum);\n return ret % extendedRange;\n };\n }\n\n function upscaleWithinU53(range) {\n var extendedRange = range + 1;\n if (isEvenlyDivisibleByMaxInt32(extendedRange)) {\n var highRange = ((extendedRange / 0x100000000) | 0) - 1;\n if (isPowerOfTwoMinusOne(highRange)) {\n return upscaleWithHighMasking(highRange);\n }\n }\n return upscaleToLoopCheckedRange(extendedRange);\n }\n\n function upscaleWithinI53AndLoopCheck(min, max) {\n return function (engine) {\n var ret = 0;\n do {\n var high = engine() | 0;\n var low = engine() >>> 0;\n ret = ((high & 0x1fffff) * 0x100000000) + low + (high & 0x200000 ? -0x20000000000000 : 0);\n } while (ret < min || ret > max);\n return ret;\n };\n }\n\n return function (min, max) {\n min = Math.floor(min);\n max = Math.floor(max);\n if (min < -0x20000000000000 || !isFinite(min)) {\n throw new RangeError(\"Expected min to be at least \" + (-0x20000000000000));\n } else if (max > 0x20000000000000 || !isFinite(max)) {\n throw new RangeError(\"Expected max to be at most \" + 0x20000000000000);\n }\n\n var range = max - min;\n if (range <= 0 || !isFinite(range)) {\n return returnValue(min);\n } else if (range === 0xffffffff) {\n if (min === 0) {\n return Random.uint32;\n } else {\n return add(Random.int32, min + 0x80000000);\n }\n } else if (range < 0xffffffff) {\n return add(downscaleToRange(range), min);\n } else if (range === 0x1fffffffffffff) {\n return add(Random.uint53, min);\n } else if (range < 0x1fffffffffffff) {\n return add(upscaleWithinU53(range), min);\n } else if (max - 1 - min === 0x1fffffffffffff) {\n return add(Random.uint53Full, min);\n } else if (min === -0x20000000000000 && max === 0x20000000000000) {\n return Random.int53Full;\n } else if (min === -0x20000000000000 && max === 0x1fffffffffffff) {\n return Random.int53;\n } else if (min === -0x1fffffffffffff && max === 0x20000000000000) {\n return add(Random.int53, 1);\n } else if (max === 0x20000000000000) {\n return add(upscaleWithinI53AndLoopCheck(min - 1, max - 1), 1);\n } else {\n return upscaleWithinI53AndLoopCheck(min, max);\n }\n };\n }());\n proto.integer = function (min, max) {\n return Random.integer(min, max)(this.engine);\n };\n\n // [0, 1] (floating point)\n Random.realZeroToOneInclusive = function (engine) {\n return Random.uint53Full(engine) / 0x20000000000000;\n };\n proto.realZeroToOneInclusive = function () {\n return Random.realZeroToOneInclusive(this.engine);\n };\n\n // [0, 1) (floating point)\n Random.realZeroToOneExclusive = function (engine) {\n return Random.uint53(engine) / 0x20000000000000;\n };\n proto.realZeroToOneExclusive = function () {\n return Random.realZeroToOneExclusive(this.engine);\n };\n\n Random.real = (function () {\n function multiply(generate, multiplier) {\n if (multiplier === 1) {\n return generate;\n } else if (multiplier === 0) {\n return function () {\n return 0;\n };\n } else {\n return function (engine) {\n return generate(engine) * multiplier;\n };\n }\n }\n\n return function (left, right, inclusive) {\n if (!isFinite(left)) {\n throw new RangeError(\"Expected left to be a finite number\");\n } else if (!isFinite(right)) {\n throw new RangeError(\"Expected right to be a finite number\");\n }\n return add(\n multiply(\n inclusive ? Random.realZeroToOneInclusive : Random.realZeroToOneExclusive,\n right - left),\n left);\n };\n }());\n proto.real = function (min, max, inclusive) {\n return Random.real(min, max, inclusive)(this.engine);\n };\n\n Random.bool = (function () {\n function isLeastBitTrue(engine) {\n return (engine() & 1) === 1;\n }\n\n function lessThan(generate, value) {\n return function (engine) {\n return generate(engine) < value;\n };\n }\n\n function probability(percentage) {\n if (percentage <= 0) {\n return returnValue(false);\n } else if (percentage >= 1) {\n return returnValue(true);\n } else {\n var scaled = percentage * 0x100000000;\n if (scaled % 1 === 0) {\n return lessThan(Random.int32, (scaled - 0x80000000) | 0);\n } else {\n return lessThan(Random.uint53, Math.round(percentage * 0x20000000000000));\n }\n }\n }\n\n return function (numerator, denominator) {\n if (denominator == null) {\n if (numerator == null) {\n return isLeastBitTrue;\n }\n return probability(numerator);\n } else {\n if (numerator <= 0) {\n return returnValue(false);\n } else if (numerator >= denominator) {\n return returnValue(true);\n }\n return lessThan(Random.integer(0, denominator - 1), numerator);\n }\n };\n }());\n proto.bool = function (numerator, denominator) {\n return Random.bool(numerator, denominator)(this.engine);\n };\n\n function toInteger(value) {\n var number = +value;\n if (number < 0) {\n return Math.ceil(number);\n } else {\n return Math.floor(number);\n }\n }\n\n function convertSliceArgument(value, length) {\n if (value < 0) {\n return Math.max(value + length, 0);\n } else {\n return Math.min(value, length);\n }\n }\n Random.pick = function (engine, array, begin, end) {\n var length = array.length;\n var start = begin == null ? 0 : convertSliceArgument(toInteger(begin), length);\n var finish = end === void 0 ? length : convertSliceArgument(toInteger(end), length);\n if (start >= finish) {\n return void 0;\n }\n var distribution = Random.integer(start, finish - 1);\n return array[distribution(engine)];\n };\n proto.pick = function (array, begin, end) {\n return Random.pick(this.engine, array, begin, end);\n };\n\n function returnUndefined() {\n return void 0;\n }\n var slice = Array.prototype.slice;\n Random.picker = function (array, begin, end) {\n var clone = slice.call(array, begin, end);\n if (!clone.length) {\n return returnUndefined;\n }\n var distribution = Random.integer(0, clone.length - 1);\n return function (engine) {\n return clone[distribution(engine)];\n };\n };\n\n Random.shuffle = function (engine, array, downTo) {\n var length = array.length;\n if (length) {\n if (downTo == null) {\n downTo = 0;\n }\n for (var i = (length - 1) >>> 0; i > downTo; --i) {\n var distribution = Random.integer(0, i);\n var j = distribution(engine);\n if (i !== j) {\n var tmp = array[i];\n array[i] = array[j];\n array[j] = tmp;\n }\n }\n }\n return array;\n };\n proto.shuffle = function (array) {\n return Random.shuffle(this.engine, array);\n };\n\n Random.sample = function (engine, population, sampleSize) {\n if (sampleSize < 0 || sampleSize > population.length || !isFinite(sampleSize)) {\n throw new RangeError(\"Expected sampleSize to be within 0 and the length of the population\");\n }\n\n if (sampleSize === 0) {\n return [];\n }\n\n var clone = slice.call(population);\n var length = clone.length;\n if (length === sampleSize) {\n return Random.shuffle(engine, clone, 0);\n }\n var tailLength = length - sampleSize;\n return Random.shuffle(engine, clone, tailLength - 1).slice(tailLength);\n };\n proto.sample = function (population, sampleSize) {\n return Random.sample(this.engine, population, sampleSize);\n };\n\n Random.die = function (sideCount) {\n return Random.integer(1, sideCount);\n };\n proto.die = function (sideCount) {\n return Random.die(sideCount)(this.engine);\n };\n\n Random.dice = function (sideCount, dieCount) {\n var distribution = Random.die(sideCount);\n return function (engine) {\n var result = [];\n result.length = dieCount;\n for (var i = 0; i < dieCount; ++i) {\n result[i] = distribution(engine);\n }\n return result;\n };\n };\n proto.dice = function (sideCount, dieCount) {\n return Random.dice(sideCount, dieCount)(this.engine);\n };\n\n // http://en.wikipedia.org/wiki/Universally_unique_identifier\n Random.uuid4 = (function () {\n function zeroPad(string, zeroCount) {\n return stringRepeat(\"0\", zeroCount - string.length) + string;\n }\n\n return function (engine) {\n var a = engine() >>> 0;\n var b = engine() | 0;\n var c = engine() | 0;\n var d = engine() >>> 0;\n\n return (\n zeroPad(a.toString(16), 8) +\n \"-\" +\n zeroPad((b & 0xffff).toString(16), 4) +\n \"-\" +\n zeroPad((((b >> 4) & 0x0fff) | 0x4000).toString(16), 4) +\n \"-\" +\n zeroPad(((c & 0x3fff) | 0x8000).toString(16), 4) +\n \"-\" +\n zeroPad(((c >> 4) & 0xffff).toString(16), 4) +\n zeroPad(d.toString(16), 8));\n };\n }());\n proto.uuid4 = function () {\n return Random.uuid4(this.engine);\n };\n\n Random.string = (function () {\n // has 2**x chars, for faster uniform distribution\n var DEFAULT_STRING_POOL = \"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_-\";\n\n return function (pool) {\n if (pool == null) {\n pool = DEFAULT_STRING_POOL;\n }\n\n var length = pool.length;\n if (!length) {\n throw new Error(\"Expected pool not to be an empty string\");\n }\n\n var distribution = Random.integer(0, length - 1);\n return function (engine, length) {\n var result = \"\";\n for (var i = 0; i < length; ++i) {\n var j = distribution(engine);\n result += pool.charAt(j);\n }\n return result;\n };\n };\n }());\n proto.string = function (length, pool) {\n return Random.string(pool)(this.engine, length);\n };\n\n Random.hex = (function () {\n var LOWER_HEX_POOL = \"0123456789abcdef\";\n var lowerHex = Random.string(LOWER_HEX_POOL);\n var upperHex = Random.string(LOWER_HEX_POOL.toUpperCase());\n\n return function (upper) {\n if (upper) {\n return upperHex;\n } else {\n return lowerHex;\n }\n };\n }());\n proto.hex = function (length, upper) {\n return Random.hex(upper)(this.engine, length);\n };\n\n Random.date = function (start, end) {\n if (!(start instanceof Date)) {\n throw new TypeError(\"Expected start to be a Date, got \" + typeof start);\n } else if (!(end instanceof Date)) {\n throw new TypeError(\"Expected end to be a Date, got \" + typeof end);\n }\n var distribution = Random.integer(start.getTime(), end.getTime());\n return function (engine) {\n return new Date(distribution(engine));\n };\n };\n proto.date = function (start, end) {\n return Random.date(start, end)(this.engine);\n };\n\n if (typeof define === \"function\" && define.amd) {\n define(function () {\n return Random;\n });\n } else if (typeof module !== \"undefined\" && typeof require === \"function\") {\n module.exports = Random;\n } else {\n (function () {\n var oldGlobal = root[GLOBAL_KEY];\n Random.noConflict = function () {\n root[GLOBAL_KEY] = oldGlobal;\n return this;\n };\n }());\n root[GLOBAL_KEY] = Random;\n }\n}(this));\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/random-js/lib/random.js\n ** module id = 19\n ** module chunks = 0\n **/","export default class DataGUI {\n constructor(data) {\n const gui = new dat.GUI();\n\n this.gui = gui;\n this.data = data;\n\n this.addSlider(data.camera.position, 'CameraPosition', 200, 10);\n this.addSlider(data.lights.position, 'Lights', 1000, 50);\n this.addSlider(data.blocks.rotation, 'BlocksRotation', 5, 1);\n this.addSlider(data.sphere.rotation, 'SphereRotation', 1, 0.05);\n this.addSlider(data.innerSphere.rotation, 'InnerSphereRotation', 1, 0.05);\n }\n\n addSlider(selectedData, title, delta, step, isOpen = true) {\n const data = this;\n const folder = this.gui.addFolder(title);\n\n Object.keys(selectedData).forEach(param => {\n folder\n .add(selectedData, param)\n .name(param)\n .min(selectedData[param] - delta)\n .max(selectedData[param] + delta)\n .step(step)\n ;\n });\n\n isOpen && folder.open();\n\n }\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/DataGUI.js\n **/","module.exports = {\n camera: {\n position: {\n x: 0,\n y: 70,\n z: 420,\n }\n },\n block: {\n position: {\n x:0,y:5,z:10,\n }\n },\n ball: {\n position: {\n x: 0, y: 6, z: 130\n },\n positionOriginal: {\n x: 0, y: 6, z: 130\n }\n },\n lights: {\n position: {\n x: 0, y: 350, z: 500\n }\n },\n blocks: {\n rotation: {\n x: 0, y: 0, z: 0,\n }\n },\n sphere: {\n rotation: {\n x: 0, y: 0, z: 0,\n }\n },\n innerSphere: {\n rotation: {\n x: 0, y: 0, z: 0,\n }\n },\n};\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/data.js\n **/","import LogoScene from './scenes/LogoScene';\nimport GameScene from './scenes/GameScene';\n\nimport SecretSymbols from './utils/SecretSymbols';\nimport AssetsLoader from './utils/AssetsLoader';\nimport * as names from './names';\n\nclass App {\n constructor() {\n const assets = new AssetsLoader({\n sounds: {\n [names.SOUND_GAME_MUSIC]: 'Gamesoundtrack.mp3',\n [names.SOUND_INTERSECT_CUBE_1]: 'Bounce11.mp3',\n [names.SOUND_INTERSECT_CUBE_2]: 'Bounce22.mp3',\n [names.SOUND_INTERSECT_CUBE_3]: 'Bounce33.mp3',\n [names.SOUND_INTERSECT_PADDLE]: 'Platee.mp3',\n [names.SOUND_BOOM]: 'Boom.mp3',\n [names.SOUND_VICTORY_VOICE]: 'Meetup.mp3',\n [names.SOUND_LOSE_VOICE_1]: 'Missu.mp3',\n [names.SOUND_LOSE_VOICE_2]: 'Missu2.mp3',\n [names.SOUND_START_VOICE]: 'Try.mp3',\n },\n images: {\n [names.IMG_INTERACTOPUS_BG_BLACK]: 'interactopus-black-bg.png',\n [names.IMG_INTERACTOPUS_BG_TRANS]: 'interactopus.png',\n }\n });\n\n this.assets = assets;\n this.wasGameRun = false;\n\n assets.load().then(() => {\n this.init();\n this.afterInit();\n });\n\n //\n // const menuScene = new GlitchScene({\n // containerEl: menuEl,\n // containerWidth: 500,\n // containerHeight: 500,\n // imgWidth: 1920,\n // imgHeight: 1080,\n // imgUrl: 'assets/images/1.png',\n // });\n //\n // const menuScene2 = new GlitchScene({\n // containerEl: menu2El,\n // containerWidth: 200,\n // containerHeight: 200,\n // imgWidth: 1920,\n // imgHeight: 1080,\n // imgUrl: 'assets/images/test.jpg',\n // });\n }\n\n init() {\n const eventLogoEl = document.getElementById('eventLogoGlitch');\n const menu2El = document.getElementById('menu2');\n const contentEl = document.getElementById('content');\n const locationValueEl = document.getElementById('locationValue');\n const dateValueEl = document.getElementById('dateValue');\n const timeValueEl = document.getElementById('timeValue');\n\n this.secretSymbolsLocation = new SecretSymbols({\n rootEl: locationValueEl,\n word: 'БВШД',\n symbols: '!@#$%^&*()qwertyuiopljhgfрарцуисчязшфцу'\n });\n this.secretSymbolsDate = new SecretSymbols({\n rootEl: dateValueEl,\n word: '20.11.2016',\n symbols: '1234567890.',\n renderType: 'date',\n });\n this.secretSymbolsTime = new SecretSymbols({\n rootEl: timeValueEl,\n word: '19:00',\n symbols: '!@#1234567890:',\n renderType: 'time',\n });\n //\n // setTimeout(() => {\n // secretSymbolsLocation.reveal();\n // secretSymbolsDate.reveal();\n // secretSymbolsTime.reveal();\n // }, 2000);\n\n //\n this.logoScene = new LogoScene({\n rootEl: eventLogoEl,\n });\n }\n\n afterInit() {\n this.assets.getSound(names.SOUND_GAME_MUSIC).loop = true;\n this.assets.getSound(names.SOUND_GAME_MUSIC).play();\n setTimeout(() => {\n document.body.classList.remove('is-loading');\n document.body.classList.add('is-loaded');\n\n const logoEl = document.getElementById('eventLogo');\n logoEl.addEventListener('click', () => {\n if (this.wasGameRun) {\n window.location.reload();\n } else {\n this.goGame();\n }\n }, false);\n }, 1500);\n }\n\n goGame() {\n this.wasGameRun = true;\n const gameEl = document.getElementById('game');\n const game = new GameScene({\n rootEl: gameEl,\n assets: this.assets,\n });\n game.emitter.on(names.EVENT_FINAL_BLOCK_KILLED, () => {\n this.goVictory();\n });\n game.emitter.on(names.EVENT_NO_LIVES, () => {\n this.goLose();\n });\n document.body.classList.add('is-game');\n this.logoScene.disable();\n this.game = game;\n }\n\n goVictory() {\n this.game.disable();\n document.body.classList.add('is-victory');\n document.body.classList.remove('is-game');\n this.logoScene.enable();\n this.secretSymbolsLocation.reveal();\n this.secretSymbolsTime.reveal();\n this.secretSymbolsDate.reveal();\n }\n\n goLose() {\n this.game.disable();\n document.body.classList.add('is-lose');\n document.body.classList.remove('is-game');\n this.logoScene.enable();\n }\n}\n\nnew App();\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/index.js\n **/","import Events from 'events';\nimport DataGUI from '../DataGUI';\nimport data from '../data';\nimport keyboard from 'keyboardjs';\nimport TWEEN from 'tween.js';\nimport Random from 'random-js';\nimport Leap from 'leapjs';\nconst random = Random();\n\nconst FIELD_WIDTH = 200;\nconst FIELD_HEIGHT = 350;\n\nconst BLOCK_SIZE = 20;\n\nconst SPEED = 4;\n\nimport * as names from '../names';\n\nexport default class GameScene {\n sounds = {};\n soundsSources = {};\n pyramidLevels = {};\n constructor(options) {\n const {\n rootEl,\n assets,\n } = options;\n this.rootEl = rootEl;\n this.assets = assets;\n this.emitter = new Events();\n this.isBallEnabled = false;\n this.run();\n this.initUi();\n }\n\n initUi() {\n this.livesAtBegin = 5;\n this.currLives = this.livesAtBegin;\n this.renderLives();\n }\n renderLives() {\n const ui = document.getElementById('gameUi');\n const lives = ui.querySelector('.gameUi__lives');\n let html = '';\n for (let i = 0, len = this.currLives; i < len; i += 1) {\n html += `
`;\n }\n lives.innerHTML = html;\n }\n deathZone() {\n this.playAudio(names.SOUND_BOOM)\n this.currLives -= 1;\n this.renderLives();\n if (this.currLives === 0) {\n this.isBallEnabled = false;\n this.playAudio(random.pick([names.SOUND_LOSE_VOICE_1, names.SOUND_LOSE_VOICE_2]));\n this.disable();\n this.emitter.emit(names.EVENT_NO_LIVES);\n } else {\n this.ballDx = random.integer(-2,2);\n this.ballDz = -SPEED;\n this.data.ball.position.x = this.data.ball.positionOriginal.x;\n this.data.ball.position.z = this.data.ball.positionOriginal.z;\n this.isBallEnabled = false;\n }\n }\n victory() {\n this.playAudio(names.SOUND_VICTORY_VOICE);\n this.disable();\n this.emitter.emit(names.EVENT_FINAL_BLOCK_KILLED);\n }\n run() {\n this.data = data;\n // this.dataGUI = new DataGUI(data);\n this.onRenderFnArr = [];\n this.init();\n this.initSkyAndBoard();\n this.initBlocks();\n this.initBall();\n this.initAudio();\n this.render();\n\n const rotationValue = 0.08;\n let tween;\n let from = {y1: 0, y2: 0};\n\n this.paddleTweenData = {\n delta: 0.4,\n duration: 200,\n minY: this.degToRad(-40),\n maxY: this.degToRad(40),\n };\n let leapPointBase;\n let leapPoint\n Leap.loop( {background: true}, (frame) => {\n if (frame.pointables.length === 0) {\n if (leapPointBase) {\n this.data.sphere.rotation.y = 0;\n this.data.innerSphere.rotation.y = 0;\n leapPointBase = null;\n }\n return;\n }\n const{minY, maxY} = this.paddleTweenData;\n var appWidth = 2;\n\n var iBox = frame.interactionBox;\n var pointable = frame.pointables[0];\n\n var leapPoint = pointable.stabilizedTipPosition;\n if (!leapPointBase) {\n leapPointBase = leapPoint\n }\n var normalizedPoint = iBox.normalizePoint(leapPoint, true);\n var normalizedPointBase = iBox.normalizePoint(leapPointBase, true);\n\n // var appX = normalizedPoint[0] * appWidth;\n\n const deltaY = (normalizedPoint[0] - normalizedPointBase[0]) * 2.5;\n const finalDeltaY = (() => {\n if (deltaY > maxY) {\n return maxY;\n } else if (deltaY < minY) {\n return minY;\n }\n return deltaY;\n })();\n this.data.sphere.rotation.y = -finalDeltaY;\n this.data.innerSphere.rotation.y = finalDeltaY;\n\n // console.log(normalizedPoint[1], normalizedPoint[1] == 0);\n if (normalizedPoint[1] == 0) {\n if (this.currLives > 0) {\n this.isBallEnabled = true;\n }\n }\n }).connect();\n //\n // this.isRightPressed = true;\n // this.moveRight();\n\n keyboard.bind('up', (e) => {\n if (this.currLives > 0) {\n this.isBallEnabled = true;\n }\n });\n\n keyboard.bind('left', (e) => {\n e.preventRepeat();\n this.isLeftPressed = true;\n this.moveLeft();\n // this.data.block.position.x -= 30;\n // this.data.sphere.rotation.y += rotationValue;\n // this.data.innerSphere.rotation.y -= rotationValue;\n\n\n }, () => {\n this.isLeftPressed = false;\n this.paddleTween.stop();\n // tween.stop();\n });\n\n keyboard.bind('left + right', (e) => {\n e.preventRepeat();\n this.isLeftPressed = false;\n this.isRightPressed = false;\n });\n\n keyboard.bind('right', (e) => {\n e.preventRepeat();\n this.isRightPressed = true;\n this.moveRight();\n // this.data.block.position.x += 30;\n // this.data.sphere.rotation.y -= rotationValue;\n // this.data.innerSphere.rotation.y += rotationValue;\n\n\n }, () => {\n this.isRightPressed = false;\n this.paddleTween.stop();\n // tween.stop();\n });\n\n keyboard.bind('space', () => {\n // this.blocksGroupRotationY += Math.PI / 12;\n // this.blocksGroupRotationY += Math.PI / 3;\n this.rotatePyramid();\n });\n }\n\n moveLeft() {\n const {\n delta,\n duration,\n minY,\n maxY,\n } = this.paddleTweenData;\n let tween = this.paddleTween;\n if (tween) {\n // tween.stop();\n }\n const from = {};\n\n from.y1 = this.data.sphere.rotation.y;\n from.y2 = this.data.innerSphere.rotation.y;\n\n\n\n let newY1 = this.data.sphere.rotation.y + delta;\n // newY1 = newY1 > maxY ? maxY : newY1;\n let newY2 = this.data.innerSphere.rotation.y - delta;\n // newY2 = newY2 < minY ? minY : newY2;\n tween = new TWEEN.Tween(from).to({\n y1: newY1,\n y2: newY2,\n }, duration);\n // tween.easing(TWEEN.Easing.Quadratic.In);\n\n tween.onUpdate(() => {\n this.data.sphere.rotation.y = from.y1 > maxY ? maxY : from.y1;\n this.data.innerSphere.rotation.y = from.y2 < minY ? minY : from.y2;\n });\n tween.onComplete(() => {\n if (this.isLeftPressed) {\n this.moveLeft();\n }\n });\n tween.start();\n this.paddleTween = tween;\n }\n moveRight() {\n const {\n delta,\n duration,\n minY,\n maxY,\n } = this.paddleTweenData;\n let tween = this.paddleTween;\n if (tween) {\n // tween.stop();\n }\n const from = {};\n\n from.y1 = this.data.sphere.rotation.y;\n from.y2 = this.data.innerSphere.rotation.y;\n\n\n\n\n let newY1 = this.data.sphere.rotation.y - delta;\n // newY1 = newY1 < minY ? minY : newY1;\n let newY2 = this.data.innerSphere.rotation.y + delta;\n // newY2 = newY2 > maxY ? maxY : newY2;\n tween = new TWEEN.Tween(from).to({\n y1: newY1,\n y2: newY2,\n }, duration);\n\n tween.onUpdate(() => {\n this.data.sphere.rotation.y = from.y1 < minY ? minY : from.y1;\n this.data.innerSphere.rotation.y = from.y2 > maxY ? maxY : from.y2;\n });\n\n tween.onComplete(() => {\n if (this.isRightPressed) {\n this.moveRight();\n }\n });\n tween.start();\n this.paddleTween = tween;\n }\n\n rotatePyramid() {\n const rad2deg = 180/Math.PI;\n\n if (this.pyramidTween) {\n this.pyramidTween.stop();\n }\n const from = {\n y: this.blocksGroupRotationY,\n };\n const tween = new TWEEN.Tween(from).to({\n y: this.getRadForPyramid(),\n }, 300);\n\n tween.onUpdate(() => {\n this.blocksGroupRotationY = from.y;\n });\n tween.start();\n }\n\n getRadForPyramid() {\n const rad = this.blocksGroupRotationY;\n const deg = rad * 180/Math.PI;\n const inc = (Math.random() > 0.5 ? 1 : -1) * 90;\n const newDeg = parseInt((deg + inc) / 90) * 90;\n const newRad = newDeg * Math.PI/180;;\n // console.log(rad, deg, newDeg, newRad)\n return newRad;\n }\n\n degToRad(deg) {\n return deg * Math.PI/180;\n }\n radToDeg(rad) {\n return rad * 180 / Math.PI;\n }\n\n\n initAudio() {\n // this.playAudio(SOUND_GAME_MUSIC, true);\n }\n\n playAudio(soundName, isLoop = false) {\n this.assets.getSound(soundName).loop = isLoop;\n this.assets.getSound(soundName).play();\n }\n\n init() {\n const scene = new THREE.Scene();\n\n const camera = new THREE.PerspectiveCamera(45, window.innerWidth / window.innerHeight, 0.1, 10000);\n camera.position.y = this.data.camera.position.y;\n camera.position.z = this.data.camera.position.z;\n camera.position.x = this.data.camera.position.x;\n this.onRenderFnArr.push(() => {\n camera.position.y = this.data.camera.position.y;\n camera.position.z = this.data.camera.position.z;\n camera.position.x = this.data.camera.position.x;\n });\n scene.add(camera);\n\n const renderer = new THREE.WebGLRenderer({ antialias: true }); // Initialize renderer + anti-alias\n renderer.shadowMapEnabled = renderer.shadowMapSoft = true; // Enable shadows and make them smoother\n renderer.setSize(window.innerWidth, window.innerHeight); // Set the size to the whole window\n renderer.sortObjects = false; // Improves performance\n\n\n this.rootEl.appendChild(renderer.domElement); // Put the canvas onto the page\n\n this.scene = scene;\n this.camera = camera;\n this.renderer = renderer;\n }\n\n\n initSkyAndBoard() {\n const {scene, renderer, camera} = this;\n // Lights\n [-200, 200].forEach(function (distance) {\n return;\n const light = new THREE.DirectionalLight(0xffffff, 1);\n light.position.set(distance, 200, 500);\n scene.add(light);\n\n });\n\n\n const light = new THREE.SpotLight(0xffffff, 1);\n light.position.set(0, 350, 500);\n light.shadowCameraNear = 0.01;\n light.castShadow = true;\n light.shadowDarkness = 0.3;\n light.shadowMapWidth = light.shadowMapHeight = 2048; // Larger shadow map improves shadow quality\n scene.add(light);\n\n\n // Sky\n let geometry = new THREE.PlaneGeometry(3500, 1500);\n let material = new THREE.MeshBasicMaterial();\n const sky = new THREE.Mesh(geometry, material);\n\n sky.position.set(0, -500, -800);\n sky.rotation.set(-900, 0, 0);\n // scene.add(sky);\n\n\n // Board\n geometry = new THREE.CubeGeometry(FIELD_WIDTH, 3, FIELD_HEIGHT);\n material = new THREE.MeshBasicMaterial();\n const board = new THREE.Mesh(geometry, material);\n\n board.matrixAutoUpdate = false; // The board will be static, so no need to update it\n board.receiveShadow = true; // It can receive shadows\n // scene.add(board);\n // camera.lookAt(board.position);\n\n // geometry\n let radius = 5;\n geometry = new THREE.SphereGeometry( radius, 16, 8 );\n\n // material\n material = new THREE.MeshBasicMaterial( {\n color: 0xffffff,\n wireframe: true\n } );\n\n // mesh\n // let mesh = new THREE.Mesh( geometry, material );\n let mesh = new THREE.Object3D();\n scene.add( mesh );\n mesh.add(board);\n\n this.sphere = mesh;\n\n const innerSphere = new THREE.Object3D();\n this.sphere.add(innerSphere);\n this.innerSphere = innerSphere;\n\n this.onRenderFnArr.push(() => {\n this.sphere.rotation.x = this.data.sphere.rotation.x;\n this.sphere.rotation.y = this.data.sphere.rotation.y;\n\n this.innerSphere.rotation.x = this.data.innerSphere.rotation.x;\n this.innerSphere.rotation.y = this.data.innerSphere.rotation.y;\n });\n\n }\n\n initBlocksPaddle() {\n const size = 15;\n let geometry;\n geometry = new THREE.CubeGeometry(size*4, size * 0.5, size);\n const material = new THREE.MeshLambertMaterial({ color: 0x949ba1 });\n const mesh = new THREE.Mesh(geometry, material);\n const bBox = new THREE.BoundingBoxHelper(mesh, 0x00ff00);\n bBox.update();\n bBox.visible = false;\n mesh.isPaddle = true;\n this.innerSphere.add(mesh);\n this.onRenderFnArr.push(() => {\n mesh.position.set(this.data.block.position.x, this.data.block.position.y, FIELD_HEIGHT/2);\n bBox.update();\n\n if (bBox.box.intersectsBox(this.ballBox.box)) {\n\n\n const x1 = this.data.ball.position.x;\n const z1 = this.data.ball.position.z;\n\n const x2 = x1 + this.ballDx;\n const z2 = z1 + this.ballDz;\n\n var deg2rad = Math.PI/180;\n var rad2deg = 180/Math.PI;\n\n const tan = (x2 - x1)/(z2-z1);\n const ballAngle = Math.atan(tan * rad2deg);\n const paddleAngle = Math.atan(this.innerSphere.rotation.y * rad2deg);\n\n const newBallAngle = ballAngle;\n\n\n this.playAudio(names.SOUND_INTERSECT_PADDLE);\n // console.log(this.ball.position.x, this.ball.position.z, bBox.position.x, bBox.position.z, this.innerSphere.rotation.y);\n // this.ballDz = -this.ballDz;\n this.ballDz = this.ballDz < 0\n ? random.integer(SPEED, SPEED+3)\n : -random.integer(SPEED, SPEED+3);\n if (random.bool(0.1)) {\n this.ballDz = this.ballDz < 0 ? this.ballDz - 1 : this.ballDz + 1;\n }\n // this.ballDx = -this.ballDx;\n // this.ballDx = -1*2*(mesh.position.x-this.ball.position.x)/10;\n\n const prevDx = this.ballDx;\n const prevDz = this.ballDz;\n const newDx = -random.integer(SPEED, SPEED + 4) * Math.cos(newBallAngle + (random.pick([0, -Math.PI/8])));\n // const newDz = -random.integer(SPEED, SPEED + 4) * Math.sin(newBallAngle);\n this.ballDx = newDx;\n // this.ballDz = newDz;\n\n // console.log('boom',\n // [prevDx.toFixed(2), prevDz.toFixed(2)],\n // [newDx.toFixed(2), newDz.toFixed(2)],\n // paddleAngle.toFixed(2),\n // ballAngle.toFixed(2),\n // newBallAngle.toFixed(2),\n // );\n\n // this.paused = true;\n }\n });\n\n this.paddle = {\n mesh: mesh,\n box: bBox,\n }\n }\n\n changePyramidBlocksYPositionIfNeeded() {\n const {pyramidLevels} = this;\n Object.keys(pyramidLevels).forEach(levelNum => {\n const level = pyramidLevels[levelNum];\n const {isCompleted, blocks} = level;\n if (!isCompleted) {\n let atLeastOneVisible = false;\n for (let i = 0, len = blocks.length; i < len; i += 1) {\n if (blocks[i].visible) {\n atLeastOneVisible = true;\n break;\n }\n }\n if (!atLeastOneVisible) {\n level.isCompleted = true;\n this.changePyramidBlocksYPosition();\n }\n }\n })\n }\n\n changePyramidBlocksYPosition() {\n const {pyramidLevels} = this;\n Object.keys(pyramidLevels).forEach(levelNum => {\n const level = pyramidLevels[levelNum];\n const {isCompleted, blocks, currLevel} = level;\n blocks.forEach(mesh => {\n const from = {\n y: this.getBlockOffset(currLevel ),\n }\n const tween = new TWEEN.Tween(from).to({\n y: this.getBlockOffset(currLevel - 1)\n }, 300);\n\n // console.log(from);\n\n tween.onUpdate(() => {\n mesh.position.y = from.y;\n });\n tween.start();\n level.currLevel -= 1;\n });\n });\n\n }\n\n\n\n initBlocksBlocks() {\n const size = BLOCK_SIZE;\n const blocksGroup = new THREE.Object3D();\n const blocksGroupPivot = new THREE.Object3D();\n blocksGroupPivot.position.z = -FIELD_HEIGHT/2 + 100;\n blocksGroupPivot.add(blocksGroup);\n\n this.sphere.add(blocksGroupPivot);\n this.blocksGroupRotationY = 0;\n this.onRenderFnArr.push(() => {\n blocksGroupPivot.rotation.y = this.blocksGroupRotationY;\n });\n\n const createBlock = (x, y, z, level, isEdge, isFinalBlock ) => {\n const geometry = new THREE.CubeGeometry(size, size, size );\n const material = new THREE.MeshLambertMaterial({\n color: isFinalBlock ? 0xeeeeee :\n isEdge ? 0xffffff : 0x949ba1\n });\n const mesh = new THREE.Mesh(geometry, material);\n const bBox = new THREE.BoundingBoxHelper(mesh, 0x00ff00)\n if (!this.pyramidLevels[level]) {\n this.pyramidLevels[level] = {\n isCompleted: false,\n blocks: [],\n currLevel: level,\n isEdge: true,\n }\n }\n this.pyramidLevels[level].blocks.push(mesh);\n bBox.update();\n bBox.visible = false;\n blocksGroup.add(mesh);\n mesh.position.set(x, y, z);\n this.onRenderFnArr.push(() => {\n bBox.update();\n\n if (bBox.box.intersectsBox(this.ballBox.box)) {\n if (mesh.visible) {\n this.data.ball.position.x += this.ballDx;\n this.data.ball.position.z += this.ballDz;\n\n this.ballDz = -this.ballDz;\n this.ballDx = -this.ballDx;\n mesh.visible = false;\n this.playAudio(random.pick([\n names.SOUND_INTERSECT_CUBE_1,\n names.SOUND_INTERSECT_CUBE_2,\n names.SOUND_INTERSECT_CUBE_3,\n ]));\n // Math.random() > 0.5 && this.rotatePyramid();\n if (isEdge) {\n this.rotatePyramid();\n }\n this.changePyramidBlocksYPositionIfNeeded();\n if (isFinalBlock) {\n this.victory();\n }\n }\n }\n });\n\n return {mesh, bBox};\n }\n\n /**\n *\n * x->\n * a a a a a a a\n * a B B B B B a\n * a B c c c B a\n * a B c D c B a\n * a B c c c B a\n * a B B B B B a\n * a a a a a a a\n *\n * z V\n */\n\n const offset = size/3;\n const length = 5;\n\n blocksGroup.position.x -= size * length / 2 + size/2;\n blocksGroup.position.z -= size * length / 2 + size/2;\n\n for (var yIndex = 0; yIndex <= parseInt(length / 2); yIndex += 1) {\n const y = size/2 + yIndex * (size + offset);\n\n for (var zIndex = yIndex; zIndex < length - yIndex; zIndex += 1) {\n const z = zIndex * (size + offset);\n\n for (var xIndex = yIndex; xIndex < length - yIndex; xIndex += 1) {\n const x = xIndex * (size + offset);\n\n const isEdge = (\n (xIndex === yIndex && zIndex === yIndex) ||\n (xIndex === length - yIndex - 1 && zIndex === yIndex) ||\n (xIndex === yIndex && zIndex === length - yIndex - 1) ||\n (xIndex === length - yIndex - 1 && zIndex === length - yIndex - 1)\n );\n const isFinal = yIndex === parseInt(length / 2);\n createBlock(\n x,y,z, yIndex, isEdge ? isEdge : random.bool(0.2), isFinal\n );\n }\n }\n }\n }\n\n getBlockOffset(yIndex) {\n const size = BLOCK_SIZE;\n const offset = size/3;\n return size/2 + (yIndex) * (size + offset);\n }\n\n\n initBlocks() {\n this.initBlocksPaddle();\n this.initBlocksBlocks();\n }\n\n initBall() {\n const size = 10;\n const geometry = new THREE.SphereGeometry(size/2);\n const material = new THREE.MeshLambertMaterial({ color: 0x949ba1 });\n const mesh = new THREE.Mesh(geometry, material);\n const bBox = new THREE.BoundingBoxHelper(mesh, 0x00ff00);\n bBox.update();\n bBox.visible = false;\n\n mesh.position.set(this.data.ball.position.x, this.data.ball.position.y, this.data.ball.position.z);\n bBox.update()\n this.sphere.add(mesh);\n this.ballDx = random.integer(-2,2);\n this.ballDz = -SPEED;\n this.onRenderFnArr.push(() => {\n if (this.isBallEnabled) {\n this.data.ball.position.x += this.ballDx;\n this.data.ball.position.z += this.ballDz;\n if (this.data.ball.position.x > FIELD_WIDTH/2) {\n this.ballDx = -Math.abs(this.ballDx);\n }\n if (this.data.ball.position.x < -FIELD_WIDTH/2) {\n this.ballDx = Math.abs(this.ballDx);\n }\n if (this.data.ball.position.z > FIELD_HEIGHT/2) {\n this.deathZone();\n this.ballDz = -Math.abs(this.ballDz);\n }\n if (this.data.ball.position.z < -FIELD_HEIGHT/2) {\n this.ballDz = Math.abs(this.ballDz);\n }\n mesh.position.set(this.data.ball.position.x, this.data.ball.position.y, this.data.ball.position.z);\n bBox.update();\n }\n });\n\n setTimeout(() => {\n if (!this.isBallEnabled && (this.currLives === this.livesAtBegin)) {\n this.isBallEnabled = true;\n }\n }, 8000);\n\n\n this.ball = mesh;\n this.ballBox = bBox;\n }\n\n render = () => {\n if (this.paused) {\n return;\n }\n // console.log(\n // (this.innerSphere.rotation.y* 180/Math.PI) % 360,\n // this.innerSphere.rotation.y* Math.PI / 180,\n // Math.atan(this.innerSphere.rotation.y) * 180/Math.PI,\n // );\n const {render, renderer, scene, camera, onRenderFnArr} = this;\n onRenderFnArr.forEach(fn => fn());\n\n // Render the current frame\n renderer.render(scene, camera);\n\n requestAnimationFrame(render);\n TWEEN.update();\n }\n\n enable() {\n this.paused = false;\n this.render();\n }\n\n disable() {\n this.paused = true;\n }\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/scenes/GameScene.js\n **/","import EffectComposer from '../utils/postprocessing/EffectComposer.js';\nimport RenderPass from '../utils/postprocessing/RenderPass.js';\nimport ShaderPass from '../utils/postprocessing/ShaderPass.js';\nimport MaskPass from '../utils/postprocessing/MaskPass.js';\nimport CopyShader from '../utils/postprocessing/shaders/CopyShader.js';\nimport FilmShader from '../utils/postprocessing/shaders/FilmShader.js';\nimport RGBShiftShader from '../utils/postprocessing/shaders/RGBShiftShader.js';\nimport BadTVShader from '../utils/postprocessing/shaders/BadTVShader.js';\nimport StaticShader from '../utils/postprocessing/shaders/StaticShader.js';\n\nconst LOGO_WIDTH = 188;\nconst LOGO_HEIGHT = 241;\n\nexport default class LogoScene {\n constructor(options) {\n const {\n rootEl,\n } = options;\n\n this.rootEl = rootEl;\n this.shaderTime = 0;\n this.isEnabled = true;\n\n this.init();\n // this.initGui();\n this.animate();\n }\n\n init() {\n const camera = new THREE.PerspectiveCamera(45, LOGO_WIDTH / LOGO_HEIGHT, 20, 3000);\n camera.position.z = 450;\n const scene = new THREE.Scene();\n this.camera = camera;\n this.scene = scene;\n //init video texture\n const videoTexture = new THREE.TextureLoader().load('assets/images/interactopus-black-bg.png');\n videoTexture.minFilter = THREE.LinearFilter;\n videoTexture.magFilter = THREE.LinearFilter;\n\n const videoMaterial = new THREE.MeshBasicMaterial( {\n map: videoTexture\n } );\n\n //Add video plane\n var planeGeometry = new THREE.PlaneGeometry( LOGO_WIDTH, LOGO_HEIGHT,1,1 );\n var plane = new THREE.Mesh( planeGeometry, videoMaterial );\n scene.add( plane );\n plane.z = 0;\n plane.scale.x = plane.scale.y = 1.45;\n\n //init renderer\n const renderer = new THREE.WebGLRenderer();\n renderer.setSize( LOGO_WIDTH, LOGO_HEIGHT);\n this.rootEl.appendChild( renderer.domElement );\n this.renderer = renderer;\n\n //POST PROCESSING\n //Create Shader Passes\n this.renderPass = new THREE.RenderPass( scene, camera );\n this.badTVPass = new THREE.ShaderPass( THREE.BadTVShader );\n this.rgbPass = new THREE.ShaderPass( THREE.RGBShiftShader );\n this.filmPass = new THREE.ShaderPass( THREE.FilmShader );\n this.staticPass = new THREE.ShaderPass( THREE.StaticShader );\n this.copyPass = new THREE.ShaderPass( THREE.CopyShader );\n\n //set shader uniforms\n this.filmPass.uniforms[ \"grayscale\" ].value = 0;\n\n //Init DAT GUI control panel\n this.badTVParams = {\n mute:true,\n show: true,\n distortion: 3.3,\n distortion2: 5.5,\n speed: 0.04,\n rollSpeed: 0.0\n }\n\n this.staticParams = {\n show: false,\n amount:0.5,\n size2:4.0\n }\n\n this.rgbParams = {\n show: true,\n amount: 0.005,\n angle: 0.0,\n }\n\n this.filmParams = {\n show: true,\n count: 222,\n sIntensity: 0.2,\n nIntensity: 1.6\n }\n\n\n this.onToggleShaders();\n // onToggleMute();\n this.onParamsChange();\n\n // window.addEventListener('resize', this.onResize, false);\n // this.onResize();\n }\n\n initGui() {\n const gui = new dat.GUI();\n const {\n badTVParams,\n rgbParams,\n staticParams,\n filmParams,\n renderPass,\n\n onToggleShaders,\n onParamsChange,\n } = this;\n\n // gui.add(badTVParams, 'mute').onChange(onToggleMute);\n\n var f1 = gui.addFolder('Bad TV');\n f1.add(badTVParams, 'show').onChange(onToggleShaders);\n f1.add(badTVParams, 'distortion', 0.1, 20).step(0.1).listen().name(\"Thick Distort\").onChange(onParamsChange);\n f1.add(badTVParams, 'distortion2', 0.1, 20).step(0.1).listen().name(\"Fine Distort\").onChange(onParamsChange);\n f1.add(badTVParams, 'speed', 0.0,1.0).step(0.01).listen().name(\"Distort Speed\").onChange(onParamsChange);\n f1.add(badTVParams, 'rollSpeed', 0.0,1.0).step(0.01).listen().name(\"Roll Speed\").onChange(onParamsChange);\n f1.open();\n\n var f2 = gui.addFolder('RGB Shift');\n f2.add(rgbParams, 'show').onChange(onToggleShaders);\n f2.add(rgbParams, 'amount', 0.0, 0.1).listen().onChange(onParamsChange);\n f2.add(rgbParams, 'angle', 0.0, 2.0).listen().onChange(onParamsChange);\n f2.open();\n\n var f4 = gui.addFolder('Static');\n f4.add(staticParams, 'show').onChange(onToggleShaders);\n f4.add(staticParams, 'amount', 0.0,1.0).step(0.01).listen().onChange(onParamsChange);\n f4.add(staticParams, 'size2', 1.0,100.0).step(1.0).onChange(onParamsChange);\n f4.open();\n\n var f3 = gui.addFolder('Scanlines');\n f3.add(filmParams, 'show').onChange(onToggleShaders);\n f3.add(filmParams, 'count', 50, 1000).onChange(onParamsChange);\n f3.add(filmParams, 'sIntensity', 0.0, 2.0).step(0.1).onChange(onParamsChange);\n f3.add(filmParams, 'nIntensity', 0.0, 2.0).step(0.1).onChange(onParamsChange);\n f3.open();\n\n gui.close();\n }\n\n onParamsChange = () => {\n const {\n badTVPass,\n staticPass,\n rgbPass,\n filmPass,\n\n badTVParams,\n rgbParams,\n staticParams,\n filmParams,\n } = this;\n //copy gui params into shader uniforms\n badTVPass.uniforms[ \"distortion\" ].value = badTVParams.distortion;\n badTVPass.uniforms[ \"distortion2\" ].value = badTVParams.distortion2;\n badTVPass.uniforms[ \"speed\" ].value = badTVParams.speed;\n badTVPass.uniforms[ \"rollSpeed\" ].value = badTVParams.rollSpeed;\n\n staticPass.uniforms[ \"amount\" ].value = staticParams.amount;\n staticPass.uniforms[ \"size\" ].value = staticParams.size2;\n\n rgbPass.uniforms[ \"angle\" ].value = rgbParams.angle*Math.PI;\n rgbPass.uniforms[ \"amount\" ].value = rgbParams.amount;\n\n filmPass.uniforms[ \"sCount\" ].value = filmParams.count;\n filmPass.uniforms[ \"sIntensity\" ].value = filmParams.sIntensity;\n filmPass.uniforms[ \"nIntensity\" ].value = filmParams.nIntensity;\n }\n\n onToggleShaders = () => {\n const {\n renderer,\n\n badTVPass,\n staticPass,\n rgbPass,\n filmPass,\n renderPass,\n copyPass,\n\n badTVParams,\n rgbParams,\n staticParams,\n filmParams,\n } = this;\n //Add Shader Passes to Composer\n //order is important\n const composer = new THREE.EffectComposer( renderer);\n composer.addPass( renderPass );\n\n if (filmParams.show){\n composer.addPass( filmPass );\n }\n\n if (badTVParams.show){\n composer.addPass( badTVPass );\n }\n\n if (rgbParams.show){\n composer.addPass( rgbPass );\n }\n\n if (staticParams.show){\n composer.addPass( staticPass );\n }\n\n composer.addPass( copyPass );\n copyPass.renderToScreen = true;\n\n\n this.composer = composer;\n }\n\n animate = () => {\n if (!this.isEnabled) {\n return;\n }\n const {\n badTVPass,\n staticPass,\n rgbPass,\n filmPass,\n renderPass,\n copyPass,\n animate,\n\n composer,\n\n renderer,\n scene,\n camera,\n } = this;\n this.shaderTime += 0.1;\n const shaderTime = this.shaderTime;\n badTVPass.uniforms[ 'time' ].value = shaderTime;\n filmPass.uniforms[ 'time' ].value = shaderTime;\n staticPass.uniforms[ 'time' ].value = shaderTime;\n\n // if ( video.readyState === video.HAVE_ENOUGH_DATA ) {\n // if ( videoTexture ) videoTexture.needsUpdate = true;\n // }\n\n requestAnimationFrame( animate );\n // renderer.render(scene, camera);\n composer.render( 0.1);\n // composer2.render( 0.1);\n }\n\n onResize = () => {\n this.renderer.setSize(window.innerWidth, window.innerHeight);\n this.camera.aspect = window.innerWidth / window.innerHeight;\n this.camera.updateProjectionMatrix();\n }\n\n disable() {\n this.isEnabled = false;\n }\n\n enable() {\n this.isEnabled = true;\n this.animate();\n }\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/scenes/LogoScene.js\n **/","export default class AssetsLoader {\n constructor(options) {\n const {\n sounds,\n images,\n } = options;\n\n this.sounds = sounds;\n this.images = images;\n this.imgSources = {};\n this.soundsSources = {};\n }\n\n getImage(imgName) {\n return this.imgSources[imgName];\n }\n\n getSound(audioName) {\n return this.soundsSources[audioName];\n }\n\n load() {\n const {\n sounds,\n images,\n } = this;\n\n return new Promise((resolve) => {\n const audioPromises = Object.keys(sounds).map(soundName => {\n const filename = sounds[soundName];\n const soundUrl = `assets/Sounds/${filename}`;\n const audioPromise = this.loadAudio(soundUrl);\n audioPromise.then((buffer) => {\n this.sounds[soundName] = buffer;\n\n const audioEl = document.createElement( 'audio' );\n const sourceEl = document.createElement( 'source' );\n sourceEl.src = soundUrl;\n audioEl.appendChild(sourceEl);\n this.soundsSources[soundName] = audioEl;\n });\n return audioPromise;\n });\n\n const imagePromises = Object.keys(images).map(imgName => {\n const filename = images[imgName];\n const imgUrl = `assets/images/${filename}`;\n const imagePromise = this.loadImage(imgUrl);\n imagePromise.then((img) => {\n this.imgSources[imgName] = img;\n });\n return imagePromise;\n });\n Promise.all(\n audioPromises.concat(imagePromises)\n ).then(() => {\n resolve();\n });\n });\n }\n\n loadImage(imgUrl) {\n return new Promise((resolve) => {\n var loader = new THREE.ImageLoader();\n\n// load a image resource\n loader.load(imgUrl, (image) => {\n resolve(image);\n },\n // Function called when download progresses\n function ( xhr ) {\n // console.log( (xhr.loaded / xhr.total * 100) + '% loaded' );\n },\n // Function called when download errors\n function ( xhr ) {\n // console.log( 'An error happened' );\n }\n );\n });\n }\n\n loadAudio(url) {\n return new Promise((resolve) => {\n const audioLoader = new THREE.AudioLoader();\n audioLoader.load(url, function( buffer ) {\n resolve(buffer);\n });\n });\n }\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/utils/AssetsLoader.js\n **/","import Random from 'random-js';\nconst random = Random();\n\nconst MIN_SYMBOLS_LENGTH = 8;\n\nexport default class SecretSymbols {\n constructor(options) {\n const {\n rootEl,\n word,\n symbols,\n duration,\n renderType,\n } = options;\n\n this.rootEl = rootEl;\n this.word = word;\n this.symbols = this.symbolsStrToArr(symbols);\n this.duration = duration || 50;\n this.renderType = renderType;\n this.isRevealed = false;\n\n this.render();\n }\n\n symbolsStrToArr(symbolsStr) {\n const arr = [];\n for (let i = 0, len = symbolsStr.length; i < len; i += 1) {\n arr.push(symbolsStr[i]);\n }\n return arr;\n }\n\n render = () => {\n if (this.isRevealed) {\n this.renderReveleadSymbols();\n return;\n }\n setTimeout(() => {\n if (random.bool(0.8)) {\n if (this.renderType === 'date') {\n this.renderSymbolsDate();\n }\n else if (this.renderType === 'time') {\n this.renderSymbolsTime();\n }\n else {\n this.renderSymbols();\n }\n }\n else {\n this.renderSymbols();\n }\n\n this.render();\n }, random.integer(100, 500));\n }\n\n renderSymbols() {\n const {\n rootEl,\n symbols,\n word,\n } = this;\n let secret = '';\n const len = Math.max(word.length, MIN_SYMBOLS_LENGTH);\n for (let i = 0; i < len; i += 1) {\n secret += random.pick(symbols);\n }\n rootEl.innerText = secret;\n }\n\n renderSymbolsDate() {\n const {\n rootEl,\n symbols,\n word,\n } = this;\n let secret = '';\n\n const day = `${random.pick([1,2])}${random.pick([1,2,3,4,5,6,7,8,9,0])}`;\n const month = random.pick(['01','02','03','04','05','06','07','08','09',10,11,12]);\n const year = `20${random.pick([1,2])}${random.pick([6,7,8,9])}`;\n secret = `${day}.${month}.${year}`;\n\n rootEl.innerText = secret;\n }\n\n renderSymbolsTime() {\n const {\n rootEl,\n symbols,\n word,\n } = this;\n let secret = '';\n\n const h1 = random.integer(0,2);\n let h2;\n if (h1 < 2) {\n h2 = random.integer(0,9);\n } else {\n h2 = random.integer(0,3);\n }\n const m1 = random.integer(0,5);\n const m2 = random.integer(0,9);\n secret = `${h1}${h2}:${m1}${m2}`;\n\n rootEl.innerText = secret;\n }\n\n renderReveleadSymbols() {\n const {\n rootEl,\n word,\n } = this;\n rootEl.innerText = word;\n }\n\n reveal() {\n this.isRevealed = true;\n }\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/utils/SecretSymbols.js\n **/","/**\n * @author alteredq / http://alteredqualia.com/\n */\n\nTHREE.EffectComposer = function ( renderer, renderTarget ) {\n\n this.renderer = renderer;\n\n if ( renderTarget === undefined ) {\n\n var width = window.innerWidth || 1;\n var height = window.innerHeight || 1;\n var parameters = { minFilter: THREE.LinearFilter, magFilter: THREE.LinearFilter, format: THREE.RGBFormat, stencilBuffer: false };\n\n renderTarget = new THREE.WebGLRenderTarget( width, height, parameters );\n\n }\n\n this.renderTarget1 = renderTarget;\n this.renderTarget2 = renderTarget.clone();\n\n this.writeBuffer = this.renderTarget1;\n this.readBuffer = this.renderTarget2;\n\n this.passes = [];\n\n if ( THREE.CopyShader === undefined )\n console.error( \"THREE.EffectComposer relies on THREE.CopyShader\" );\n\n this.copyPass = new THREE.ShaderPass( THREE.CopyShader );\n\n};\n\nTHREE.EffectComposer.prototype = {\n\n swapBuffers: function() {\n\n var tmp = this.readBuffer;\n this.readBuffer = this.writeBuffer;\n this.writeBuffer = tmp;\n\n },\n\n addPass: function ( pass ) {\n\n this.passes.push( pass );\n\n },\n\n insertPass: function ( pass, index ) {\n\n this.passes.splice( index, 0, pass );\n\n },\n\n render: function ( delta ) {\n\n this.writeBuffer = this.renderTarget1;\n this.readBuffer = this.renderTarget2;\n\n var maskActive = false;\n\n var pass, i, il = this.passes.length;\n\n for ( i = 0; i < il; i ++ ) {\n\n pass = this.passes[ i ];\n\n if ( !pass.enabled ) continue;\n\n pass.render( this.renderer, this.writeBuffer, this.readBuffer, delta, maskActive );\n\n if ( pass.needsSwap ) {\n\n if ( maskActive ) {\n\n var context = this.renderer.context;\n\n context.stencilFunc( context.NOTEQUAL, 1, 0xffffffff );\n\n this.copyPass.render( this.renderer, this.writeBuffer, this.readBuffer, delta );\n\n context.stencilFunc( context.EQUAL, 1, 0xffffffff );\n\n }\n\n this.swapBuffers();\n\n }\n\n if ( pass instanceof THREE.MaskPass ) {\n\n maskActive = true;\n\n } else if ( pass instanceof THREE.ClearMaskPass ) {\n\n maskActive = false;\n\n }\n\n }\n\n },\n\n reset: function ( renderTarget ) {\n\n if ( renderTarget === undefined ) {\n\n renderTarget = this.renderTarget1.clone();\n\n renderTarget.width = window.innerWidth;\n renderTarget.height = window.innerHeight;\n\n }\n\n this.renderTarget1 = renderTarget;\n this.renderTarget2 = renderTarget.clone();\n\n this.writeBuffer = this.renderTarget1;\n this.readBuffer = this.renderTarget2;\n\n },\n\n setSize: function ( width, height ) {\n\n var renderTarget = this.renderTarget1.clone();\n\n renderTarget.width = width;\n renderTarget.height = height;\n\n this.reset( renderTarget );\n\n }\n\n};\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/utils/postprocessing/EffectComposer.js\n **/","/**\n * @author alteredq / http://alteredqualia.com/\n */\n\nTHREE.MaskPass = function ( scene, camera ) {\n\n this.scene = scene;\n this.camera = camera;\n\n this.enabled = true;\n this.clear = true;\n this.needsSwap = false;\n\n this.inverse = false;\n\n};\n\nTHREE.MaskPass.prototype = {\n\n render: function ( renderer, writeBuffer, readBuffer, delta ) {\n\n var context = renderer.context;\n\n // don't update color or depth\n\n context.colorMask( false, false, false, false );\n context.depthMask( false );\n\n // set up stencil\n\n var writeValue, clearValue;\n\n if ( this.inverse ) {\n\n writeValue = 0;\n clearValue = 1;\n\n } else {\n\n writeValue = 1;\n clearValue = 0;\n\n }\n\n context.enable( context.STENCIL_TEST );\n context.stencilOp( context.REPLACE, context.REPLACE, context.REPLACE );\n context.stencilFunc( context.ALWAYS, writeValue, 0xffffffff );\n context.clearStencil( clearValue );\n\n // draw into the stencil buffer\n\n renderer.render( this.scene, this.camera, readBuffer, this.clear );\n renderer.render( this.scene, this.camera, writeBuffer, this.clear );\n\n // re-enable update of color and depth\n\n context.colorMask( true, true, true, true );\n context.depthMask( true );\n\n // only render where stencil is set to 1\n\n context.stencilFunc( context.EQUAL, 1, 0xffffffff ); // draw if == 1\n context.stencilOp( context.KEEP, context.KEEP, context.KEEP );\n\n }\n\n};\n\n\nTHREE.ClearMaskPass = function () {\n\n this.enabled = true;\n\n};\n\nTHREE.ClearMaskPass.prototype = {\n\n render: function ( renderer, writeBuffer, readBuffer, delta ) {\n\n var context = renderer.context;\n\n context.disable( context.STENCIL_TEST );\n\n }\n\n};\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/utils/postprocessing/MaskPass.js\n **/","/**\n * @author alteredq / http://alteredqualia.com/\n */\n\nTHREE.RenderPass = function ( scene, camera, overrideMaterial, clearColor, clearAlpha ) {\n\n this.scene = scene;\n this.camera = camera;\n\n this.overrideMaterial = overrideMaterial;\n\n this.clearColor = clearColor;\n this.clearAlpha = ( clearAlpha !== undefined ) ? clearAlpha : 1;\n\n this.oldClearColor = new THREE.Color();\n this.oldClearAlpha = 1;\n\n this.enabled = true;\n this.clear = true;\n this.needsSwap = false;\n\n};\n\nTHREE.RenderPass.prototype = {\n\n render: function ( renderer, writeBuffer, readBuffer, delta ) {\n\n this.scene.overrideMaterial = this.overrideMaterial;\n\n if ( this.clearColor ) {\n\n this.oldClearColor.copy( renderer.getClearColor() );\n this.oldClearAlpha = renderer.getClearAlpha();\n\n renderer.setClearColor( this.clearColor, this.clearAlpha );\n\n }\n\n renderer.render( this.scene, this.camera, readBuffer, this.clear );\n\n if ( this.clearColor ) {\n\n renderer.setClearColor( this.oldClearColor, this.oldClearAlpha );\n\n }\n\n this.scene.overrideMaterial = null;\n\n }\n\n};\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/utils/postprocessing/RenderPass.js\n **/","/**\n * @author alteredq / http://alteredqualia.com/\n */\n\nTHREE.ShaderPass = function ( shader, textureID ) {\n\n this.textureID = ( textureID !== undefined ) ? textureID : \"tDiffuse\";\n\n this.uniforms = THREE.UniformsUtils.clone( shader.uniforms );\n\n this.material = new THREE.ShaderMaterial( {\n\n uniforms: this.uniforms,\n vertexShader: shader.vertexShader,\n fragmentShader: shader.fragmentShader\n\n } );\n\n this.renderToScreen = false;\n\n this.enabled = true;\n this.needsSwap = true;\n this.clear = false;\n\n\n this.camera = new THREE.OrthographicCamera( -1, 1, 1, -1, 0, 1 );\n this.scene = new THREE.Scene();\n\n this.quad = new THREE.Mesh( new THREE.PlaneGeometry( 2, 2 ), null );\n this.scene.add( this.quad );\n\n};\n\nTHREE.ShaderPass.prototype = {\n\n render: function ( renderer, writeBuffer, readBuffer, delta ) {\n\n if ( this.uniforms[ this.textureID ] ) {\n\n this.uniforms[ this.textureID ].value = readBuffer;\n\n }\n\n this.quad.material = this.material;\n\n if ( this.renderToScreen ) {\n\n renderer.render( this.scene, this.camera );\n\n } else {\n\n renderer.render( this.scene, this.camera, writeBuffer, this.clear );\n\n }\n\n }\n\n};\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/utils/postprocessing/ShaderPass.js\n **/","/**\n * @author Felix Turner / www.airtight.cc / @felixturner\n *\n * Bad TV Shader\n * Simulates a bad TV via horizontal distortion and vertical roll\n * Uses Ashima WebGl Noise: https://github.com/ashima/webgl-noise\n *\n * time: steadily increasing float passed in\n * distortion: amount of thick distortion\n * distortion2: amount of fine grain distortion\n * speed: distortion vertical travel speed\n * rollSpeed: vertical roll speed\n *\n * The MIT License\n *\n * Copyright (c) Felix Turner\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n *\n */\n\nTHREE.BadTVShader = {\n uniforms: {\n \"tDiffuse\": { type: \"t\", value: null },\n \"time\": { type: \"f\", value: 0.0 },\n \"distortion\": { type: \"f\", value: 3.0 },\n \"distortion2\": { type: \"f\", value: 5.0 },\n \"speed\": { type: \"f\", value: 0.2 },\n \"rollSpeed\": { type: \"f\", value: 0.1 },\n },\n\n vertexShader: [\n \"varying vec2 vUv;\",\n \"void main() {\",\n \"vUv = uv;\",\n \"gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\",\n \"}\"\n\n ].join(\"\\n\"),\n\n fragmentShader: [\n\n \"uniform sampler2D tDiffuse;\",\n \"uniform float time;\",\n \"uniform float distortion;\",\n \"uniform float distortion2;\",\n \"uniform float speed;\",\n \"uniform float rollSpeed;\",\n \"varying vec2 vUv;\",\n\n // Start Ashima 2D Simplex Noise\n\n \"vec3 mod289(vec3 x) {\",\n \" return x - floor(x * (1.0 / 289.0)) * 289.0;\",\n \"}\",\n\n \"vec2 mod289(vec2 x) {\",\n \" return x - floor(x * (1.0 / 289.0)) * 289.0;\",\n \"}\",\n\n \"vec3 permute(vec3 x) {\",\n \" return mod289(((x*34.0)+1.0)*x);\",\n \"}\",\n\n \"float snoise(vec2 v)\",\n \" {\",\n \" const vec4 C = vec4(0.211324865405187, // (3.0-sqrt(3.0))/6.0\",\n \" 0.366025403784439, // 0.5*(sqrt(3.0)-1.0)\",\n \" -0.577350269189626, // -1.0 + 2.0 * C.x\",\n \" 0.024390243902439); // 1.0 / 41.0\",\n \" vec2 i = floor(v + dot(v, C.yy) );\",\n \" vec2 x0 = v - i + dot(i, C.xx);\",\n\n \" vec2 i1;\",\n \" i1 = (x0.x > x0.y) ? vec2(1.0, 0.0) : vec2(0.0, 1.0);\",\n \" vec4 x12 = x0.xyxy + C.xxzz;\",\n \" x12.xy -= i1;\",\n\n \" i = mod289(i); // Avoid truncation effects in permutation\",\n \" vec3 p = permute( permute( i.y + vec3(0.0, i1.y, 1.0 ))\",\n \"\t\t+ i.x + vec3(0.0, i1.x, 1.0 ));\",\n\n \" vec3 m = max(0.5 - vec3(dot(x0,x0), dot(x12.xy,x12.xy), dot(x12.zw,x12.zw)), 0.0);\",\n \" m = m*m ;\",\n \" m = m*m ;\",\n\n \" vec3 x = 2.0 * fract(p * C.www) - 1.0;\",\n \" vec3 h = abs(x) - 0.5;\",\n \" vec3 ox = floor(x + 0.5);\",\n \" vec3 a0 = x - ox;\",\n\n \" m *= 1.79284291400159 - 0.85373472095314 * ( a0*a0 + h*h );\",\n\n \" vec3 g;\",\n \" g.x = a0.x * x0.x + h.x * x0.y;\",\n \" g.yz = a0.yz * x12.xz + h.yz * x12.yw;\",\n \" return 130.0 * dot(m, g);\",\n \"}\",\n\n // End Ashima 2D Simplex Noise\n\n \"void main() {\",\n\n \"vec2 p = vUv;\",\n \"float ty = time*speed;\",\n \"float yt = p.y - ty;\",\n\n //smooth distortion\n \"float offset = snoise(vec2(yt*3.0,0.0))*0.2;\",\n // boost distortion\n \"offset = offset*distortion * offset*distortion * offset;\",\n //add fine grain distortion\n \"offset += snoise(vec2(yt*50.0,0.0))*distortion2*0.001;\",\n //combine distortion on X with roll on Y\n \"gl_FragColor = texture2D(tDiffuse, vec2(fract(p.x + offset),fract(p.y-time*rollSpeed) ));\",\n\n \"}\"\n\n ].join(\"\\n\")\n\n};\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/utils/postprocessing/shaders/BadTVShader.js\n **/","/**\n * @author alteredq / http://alteredqualia.com/\n *\n * Full-screen textured quad shader\n */\n\nTHREE.CopyShader = {\n\n uniforms: {\n\n \"tDiffuse\": { type: \"t\", value: null },\n \"opacity\": { type: \"f\", value: 1.0 }\n\n },\n\n vertexShader: [\n\n \"varying vec2 vUv;\",\n\n \"void main() {\",\n\n \"vUv = uv;\",\n \"gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\",\n\n \"}\"\n\n ].join(\"\\n\"),\n\n fragmentShader: [\n\n \"uniform float opacity;\",\n\n \"uniform sampler2D tDiffuse;\",\n\n \"varying vec2 vUv;\",\n\n \"void main() {\",\n\n \"vec4 texel = texture2D( tDiffuse, vUv );\",\n \"gl_FragColor = opacity * texel;\",\n\n \"}\"\n\n ].join(\"\\n\")\n\n};\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/utils/postprocessing/shaders/CopyShader.js\n **/","/**\n * @author alteredq / http://alteredqualia.com/\n *\n * Film grain & scanlines shader\n *\n * - ported from HLSL to WebGL / GLSL\n * http://www.truevision3d.com/forums/showcase/staticnoise_colorblackwhite_scanline_shaders-t18698.0.html\n *\n * Screen Space Static Postprocessor\n *\n * Produces an analogue noise overlay similar to a film grain / TV static\n *\n * Original implementation and noise algorithm\n * Pat 'Hawthorne' Shearon\n *\n * Optimized scanlines + noise version with intensity scaling\n * Georg 'Leviathan' Steinrohder\n *\n * This version is provided under a Creative Commons Attribution 3.0 License\n * http://creativecommons.org/licenses/by/3.0/\n */\n\nTHREE.FilmShader = {\n\n uniforms: {\n\n \"tDiffuse\": { type: \"t\", value: null },\n \"time\": { type: \"f\", value: 0.0 },\n \"nIntensity\": { type: \"f\", value: 0.5 },\n \"sIntensity\": { type: \"f\", value: 0.05 },\n \"sCount\": { type: \"f\", value: 4096 },\n \"grayscale\": { type: \"i\", value: 1 }\n\n },\n\n vertexShader: [\n\n \"varying vec2 vUv;\",\n\n \"void main() {\",\n\n \"vUv = uv;\",\n \"gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\",\n\n \"}\"\n\n ].join(\"\\n\"),\n\n fragmentShader: [\n\n // control parameter\n \"uniform float time;\",\n\n \"uniform bool grayscale;\",\n\n // noise effect intensity value (0 = no effect, 1 = full effect)\n \"uniform float nIntensity;\",\n\n // scanlines effect intensity value (0 = no effect, 1 = full effect)\n \"uniform float sIntensity;\",\n\n // scanlines effect count value (0 = no effect, 4096 = full effect)\n \"uniform float sCount;\",\n\n \"uniform sampler2D tDiffuse;\",\n\n \"varying vec2 vUv;\",\n\n \"void main() {\",\n\n // sample the source\n \"vec4 cTextureScreen = texture2D( tDiffuse, vUv );\",\n\n // make some noise\n \"float x = vUv.x * vUv.y * time * 1000.0;\",\n \"x = mod( x, 13.0 ) * mod( x, 123.0 );\",\n \"float dx = mod( x, 0.01 );\",\n\n // add noise\n \"vec3 cResult = cTextureScreen.rgb + cTextureScreen.rgb * clamp( 0.1 + dx * 100.0, 0.0, 1.0 );\",\n\n // get us a sine and cosine\n \"vec2 sc = vec2( sin( vUv.y * sCount ), cos( vUv.y * sCount ) );\",\n\n // add scanlines\n \"cResult += cTextureScreen.rgb * vec3( sc.x, sc.y, sc.x ) * sIntensity;\",\n\n // interpolate between source and result by intensity\n \"cResult = cTextureScreen.rgb + clamp( nIntensity, 0.0,1.0 ) * ( cResult - cTextureScreen.rgb );\",\n\n // convert to grayscale if desired\n \"if( grayscale ) {\",\n\n \"cResult = vec3( cResult.r * 0.3 + cResult.g * 0.59 + cResult.b * 0.11 );\",\n\n \"}\",\n\n \"gl_FragColor = vec4( cResult, cTextureScreen.a );\",\n\n \"}\"\n\n ].join(\"\\n\")\n\n};\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/utils/postprocessing/shaders/FilmShader.js\n **/","/**\n * @author felixturner / http://airtight.cc/\n *\n * RGB Shift Shader\n * Shifts red and blue channels from center in opposite directions\n * Ported from http://kriss.cx/tom/2009/05/rgb-shift/\n * by Tom Butterworth / http://kriss.cx/tom/\n *\n * amount: shift distance (1 is width of input)\n * angle: shift angle in radians\n */\n\nTHREE.RGBShiftShader = {\n\n uniforms: {\n\n \"tDiffuse\": { type: \"t\", value: null },\n \"amount\": { type: \"f\", value: 0.005 },\n \"angle\": { type: \"f\", value: 0.0 }\n\n },\n\n vertexShader: [\n\n \"varying vec2 vUv;\",\n\n \"void main() {\",\n\n \"vUv = uv;\",\n \"gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\",\n\n \"}\"\n\n ].join(\"\\n\"),\n\n fragmentShader: [\n\n \"uniform sampler2D tDiffuse;\",\n \"uniform float amount;\",\n \"uniform float angle;\",\n\n \"varying vec2 vUv;\",\n\n \"void main() {\",\n\n \"vec2 offset = amount * vec2( cos(angle), sin(angle));\",\n \"vec4 cr = texture2D(tDiffuse, vUv + offset);\",\n \"vec4 cga = texture2D(tDiffuse, vUv);\",\n \"vec4 cb = texture2D(tDiffuse, vUv - offset);\",\n \"gl_FragColor = vec4(cr.r, cga.g, cb.b, cga.a);\",\n\n \"}\"\n\n ].join(\"\\n\")\n\n};\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/utils/postprocessing/shaders/RGBShiftShader.js\n **/","/**\n * @author Felix Turner / www.airtight.cc / @felixturner\n *\n * Static effect. Additively blended digital noise.\n *\n * amount - amount of noise to add (0 - 1)\n * size - size of noise grains (pixels)\n *\n * The MIT License\n *\n * Copyright (c) 2014 Felix Turner\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n *\n */\n\nTHREE.StaticShader = {\n\n uniforms: {\n\n \"tDiffuse\": { type: \"t\", value: null },\n \"time\": { type: \"f\", value: 0.0 },\n \"amount\": { type: \"f\", value: 0.5 },\n \"size\": { type: \"f\", value: 4.0 }\n },\n\n vertexShader: [\n\n \"varying vec2 vUv;\",\n\n \"void main() {\",\n\n \"vUv = uv;\",\n \"gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\",\n\n \"}\"\n\n ].join(\"\\n\"),\n\n fragmentShader: [\n\n \"uniform sampler2D tDiffuse;\",\n \"uniform float time;\",\n \"uniform float amount;\",\n \"uniform float size;\",\n\n \"varying vec2 vUv;\",\n\n \"float rand(vec2 co){\",\n \"return fract(sin(dot(co.xy ,vec2(12.9898,78.233))) * 43758.5453);\",\n \"}\",\n\n \"void main() {\",\n \"vec2 p = vUv;\",\n \"vec4 color = texture2D(tDiffuse, p);\",\n \"float xs = floor(gl_FragCoord.x / size);\",\n \"float ys = floor(gl_FragCoord.y / size);\",\n \"vec4 snow = vec4(rand(vec2(xs * time,ys * time))*amount);\",\n\n //\"gl_FragColor = color + amount * ( snow - color );\", //interpolate\n\n \"gl_FragColor = color+ snow;\", //additive\n\n \"}\"\n\n ].join(\"\\n\")\n\n};\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/utils/postprocessing/shaders/StaticShader.js\n **/","\nvar Keyboard = require('./lib/keyboard');\nvar Locale = require('./lib/locale');\nvar KeyCombo = require('./lib/key-combo');\n\nvar keyboard = new Keyboard();\n\nkeyboard.setLocale('us', require('./locales/us'));\n\nexports = module.exports = keyboard;\nexports.Keyboard = Keyboard;\nexports.Locale = Locale;\nexports.KeyCombo = KeyCombo;\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/keyboardjs/index.js\n ** module id = 36\n ** module chunks = 0\n **/","\nvar Locale = require('./locale');\nvar KeyCombo = require('./key-combo');\n\n\nfunction Keyboard(targetWindow, targetElement, platform, userAgent) {\n this._locale = null;\n this._currentContext = null;\n this._contexts = {};\n this._listeners = [];\n this._appliedListeners = [];\n this._locales = {};\n this._targetElement = null;\n this._targetWindow = null;\n this._targetPlatform = '';\n this._targetUserAgent = '';\n this._isModernBrowser = false;\n this._targetKeyDownBinding = null;\n this._targetKeyUpBinding = null;\n this._targetResetBinding = null;\n this._paused = false;\n\n this.setContext('global');\n this.watch(targetWindow, targetElement, platform, userAgent);\n}\n\nKeyboard.prototype.setLocale = function(localeName, localeBuilder) {\n var locale = null;\n if (typeof localeName === 'string') {\n\n if (localeBuilder) {\n locale = new Locale(localeName);\n localeBuilder(locale, this._targetPlatform, this._targetUserAgent);\n } else {\n locale = this._locales[localeName] || null;\n }\n } else {\n locale = localeName;\n localeName = locale._localeName;\n }\n\n this._locale = locale;\n this._locales[localeName] = locale;\n if (locale) {\n this._locale.pressedKeys = locale.pressedKeys;\n }\n};\n\nKeyboard.prototype.getLocale = function(localName) {\n localName || (localName = this._locale.localeName);\n return this._locales[localName] || null;\n};\n\nKeyboard.prototype.bind = function(keyComboStr, pressHandler, releaseHandler, preventRepeatByDefault) {\n if (keyComboStr === null || typeof keyComboStr === 'function') {\n preventRepeatByDefault = releaseHandler;\n releaseHandler = pressHandler;\n pressHandler = keyComboStr;\n keyComboStr = null;\n }\n\n if (\n keyComboStr &&\n typeof keyComboStr === 'object' &&\n typeof keyComboStr.length === 'number'\n ) {\n for (var i = 0; i < keyComboStr.length; i += 1) {\n this.bind(keyComboStr[i], pressHandler, releaseHandler);\n }\n return;\n }\n\n this._listeners.push({\n keyCombo : keyComboStr ? new KeyCombo(keyComboStr) : null,\n pressHandler : pressHandler || null,\n releaseHandler : releaseHandler || null,\n preventRepeat : preventRepeatByDefault || false,\n preventRepeatByDefault : preventRepeatByDefault || false\n });\n};\nKeyboard.prototype.addListener = Keyboard.prototype.bind;\nKeyboard.prototype.on = Keyboard.prototype.bind;\n\nKeyboard.prototype.unbind = function(keyComboStr, pressHandler, releaseHandler) {\n if (keyComboStr === null || typeof keyComboStr === 'function') {\n releaseHandler = pressHandler;\n pressHandler = keyComboStr;\n keyComboStr = null;\n }\n\n if (\n keyComboStr &&\n typeof keyComboStr === 'object' &&\n typeof keyComboStr.length === 'number'\n ) {\n for (var i = 0; i < keyComboStr.length; i += 1) {\n this.unbind(keyComboStr[i], pressHandler, releaseHandler);\n }\n return;\n }\n\n for (var i = 0; i < this._listeners.length; i += 1) {\n var listener = this._listeners[i];\n\n var comboMatches = !keyComboStr && !listener.keyCombo ||\n listener.keyCombo && listener.keyCombo.isEqual(keyComboStr);\n var pressHandlerMatches = !pressHandler && !releaseHandler ||\n !pressHandler && !listener.pressHandler ||\n pressHandler === listener.pressHandler;\n var releaseHandlerMatches = !pressHandler && !releaseHandler ||\n !releaseHandler && !listener.releaseHandler ||\n releaseHandler === listener.releaseHandler;\n\n if (comboMatches && pressHandlerMatches && releaseHandlerMatches) {\n this._listeners.splice(i, 1);\n i -= 1;\n }\n }\n};\nKeyboard.prototype.removeListener = Keyboard.prototype.unbind;\nKeyboard.prototype.off = Keyboard.prototype.unbind;\n\nKeyboard.prototype.setContext = function(contextName) {\n if(this._locale) { this.releaseAllKeys(); }\n\n if (!this._contexts[contextName]) {\n this._contexts[contextName] = [];\n }\n this._listeners = this._contexts[contextName];\n this._currentContext = contextName;\n};\n\nKeyboard.prototype.getContext = function() {\n return this._currentContext;\n};\n\nKeyboard.prototype.withContext = function(contextName, callback) {\n var previousContextName = this.getContext();\n this.setContext(contextName);\n\n callback();\n\n this.setContext(previousContextName);\n};\n\nKeyboard.prototype.watch = function(targetWindow, targetElement, targetPlatform, targetUserAgent) {\n var _this = this;\n\n this.stop();\n\n if (!targetWindow) {\n if (!global.addEventListener && !global.attachEvent) {\n throw new Error('Cannot find global functions addEventListener or attachEvent.');\n }\n targetWindow = global;\n }\n\n if (typeof targetWindow.nodeType === 'number') {\n targetUserAgent = targetPlatform;\n targetPlatform = targetElement;\n targetElement = targetWindow;\n targetWindow = global;\n }\n\n if (!targetWindow.addEventListener && !targetWindow.attachEvent) {\n throw new Error('Cannot find addEventListener or attachEvent methods on targetWindow.');\n }\n\n this._isModernBrowser = !!targetWindow.addEventListener;\n\n var userAgent = targetWindow.navigator && targetWindow.navigator.userAgent || '';\n var platform = targetWindow.navigator && targetWindow.navigator.platform || '';\n\n targetElement && targetElement !== null || (targetElement = targetWindow.document);\n targetPlatform && targetPlatform !== null || (targetPlatform = platform);\n targetUserAgent && targetUserAgent !== null || (targetUserAgent = userAgent);\n\n this._targetKeyDownBinding = function(event) {\n _this.pressKey(event.keyCode, event);\n };\n this._targetKeyUpBinding = function(event) {\n _this.releaseKey(event.keyCode, event);\n };\n this._targetResetBinding = function(event) {\n _this.releaseAllKeys(event)\n };\n\n this._bindEvent(targetElement, 'keydown', this._targetKeyDownBinding);\n this._bindEvent(targetElement, 'keyup', this._targetKeyUpBinding);\n this._bindEvent(targetWindow, 'focus', this._targetResetBinding);\n this._bindEvent(targetWindow, 'blur', this._targetResetBinding);\n\n this._targetElement = targetElement;\n this._targetWindow = targetWindow;\n this._targetPlatform = targetPlatform;\n this._targetUserAgent = targetUserAgent;\n};\n\nKeyboard.prototype.stop = function() {\n var _this = this;\n\n if (!this._targetElement || !this._targetWindow) { return; }\n\n this._unbindEvent(this._targetElement, 'keydown', this._targetKeyDownBinding);\n this._unbindEvent(this._targetElement, 'keyup', this._targetKeyUpBinding);\n this._unbindEvent(this._targetWindow, 'focus', this._targetResetBinding);\n this._unbindEvent(this._targetWindow, 'blur', this._targetResetBinding);\n\n this._targetWindow = null;\n this._targetElement = null;\n};\n\nKeyboard.prototype.pressKey = function(keyCode, event) {\n if (this._paused) { return; }\n if (!this._locale) { throw new Error('Locale not set'); }\n\n this._locale.pressKey(keyCode);\n this._applyBindings(event);\n};\n\nKeyboard.prototype.releaseKey = function(keyCode, event) {\n if (this._paused) { return; }\n if (!this._locale) { throw new Error('Locale not set'); }\n\n this._locale.releaseKey(keyCode);\n this._clearBindings(event);\n};\n\nKeyboard.prototype.releaseAllKeys = function(event) {\n if (this._paused) { return; }\n if (!this._locale) { throw new Error('Locale not set'); }\n\n this._locale.pressedKeys.length = 0;\n this._clearBindings(event);\n};\n\nKeyboard.prototype.pause = function() {\n if (this._paused) { return; }\n if (this._locale) { this.releaseAllKeys(); }\n this._paused = true;\n};\n\nKeyboard.prototype.resume = function() {\n this._paused = false;\n};\n\nKeyboard.prototype.reset = function() {\n this.releaseAllKeys();\n this._listeners.length = 0;\n};\n\nKeyboard.prototype._bindEvent = function(targetElement, eventName, handler) {\n return this._isModernBrowser ?\n targetElement.addEventListener(eventName, handler, false) :\n targetElement.attachEvent('on' + eventName, handler);\n};\n\nKeyboard.prototype._unbindEvent = function(targetElement, eventName, handler) {\n return this._isModernBrowser ?\n targetElement.removeEventListener(eventName, handler, false) :\n targetElement.detachEvent('on' + eventName, handler);\n};\n\nKeyboard.prototype._getGroupedListeners = function() {\n var listenerGroups = [];\n var listenerGroupMap = [];\n\n var listeners = this._listeners;\n if (this._currentContext !== 'global') {\n listeners = [].concat(listeners, this._contexts.global);\n }\n\n listeners.sort(function(a, b) {\n return (b.keyCombo ? b.keyCombo.keyNames.length : 0) - (a.keyCombo ? a.keyCombo.keyNames.length : 0);\n }).forEach(function(l) {\n var mapIndex = -1;\n for (var i = 0; i < listenerGroupMap.length; i += 1) {\n if (listenerGroupMap[i] === null && l.keyCombo === null ||\n listenerGroupMap[i] !== null && listenerGroupMap[i].isEqual(l.keyCombo)) {\n mapIndex = i;\n }\n }\n if (mapIndex === -1) {\n mapIndex = listenerGroupMap.length;\n listenerGroupMap.push(l.keyCombo);\n }\n if (!listenerGroups[mapIndex]) {\n listenerGroups[mapIndex] = [];\n }\n listenerGroups[mapIndex].push(l);\n });\n return listenerGroups;\n};\n\nKeyboard.prototype._applyBindings = function(event) {\n var preventRepeat = false;\n\n event || (event = {});\n event.preventRepeat = function() { preventRepeat = true; };\n event.pressedKeys = this._locale.pressedKeys.slice(0);\n\n var pressedKeys = this._locale.pressedKeys.slice(0);\n var listenerGroups = this._getGroupedListeners();\n\n\n for (var i = 0; i < listenerGroups.length; i += 1) {\n var listeners = listenerGroups[i];\n var keyCombo = listeners[0].keyCombo;\n\n if (keyCombo === null || keyCombo.check(pressedKeys)) {\n for (var j = 0; j < listeners.length; j += 1) {\n var listener = listeners[j];\n\n if (keyCombo === null) {\n listener = {\n keyCombo : new KeyCombo(pressedKeys.join('+')),\n pressHandler : listener.pressHandler,\n releaseHandler : listener.releaseHandler,\n preventRepeat : listener.preventRepeat,\n preventRepeatByDefault : listener.preventRepeatByDefault\n };\n }\n\n if (listener.pressHandler && !listener.preventRepeat) {\n listener.pressHandler.call(this, event);\n if (preventRepeat) {\n listener.preventRepeat = preventRepeat;\n preventRepeat = false;\n }\n }\n\n if (listener.releaseHandler && this._appliedListeners.indexOf(listener) === -1) {\n this._appliedListeners.push(listener);\n }\n }\n\n if (keyCombo) {\n for (var j = 0; j < keyCombo.keyNames.length; j += 1) {\n var index = pressedKeys.indexOf(keyCombo.keyNames[j]);\n if (index !== -1) {\n pressedKeys.splice(index, 1);\n j -= 1;\n }\n }\n }\n }\n }\n};\n\nKeyboard.prototype._clearBindings = function(event) {\n event || (event = {});\n\n for (var i = 0; i < this._appliedListeners.length; i += 1) {\n var listener = this._appliedListeners[i];\n var keyCombo = listener.keyCombo;\n if (keyCombo === null || !keyCombo.check(this._locale.pressedKeys)) {\n listener.preventRepeat = listener.preventRepeatByDefault;\n listener.releaseHandler.call(this, event);\n this._appliedListeners.splice(i, 1);\n i -= 1;\n }\n }\n};\n\nmodule.exports = Keyboard;\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/keyboardjs/lib/keyboard.js\n ** module id = 37\n ** module chunks = 0\n **/","\nmodule.exports = function(locale, platform, userAgent) {\n\n // general\n locale.bindKeyCode(3, ['cancel']);\n locale.bindKeyCode(8, ['backspace']);\n locale.bindKeyCode(9, ['tab']);\n locale.bindKeyCode(12, ['clear']);\n locale.bindKeyCode(13, ['enter']);\n locale.bindKeyCode(16, ['shift']);\n locale.bindKeyCode(17, ['ctrl']);\n locale.bindKeyCode(18, ['alt', 'menu']);\n locale.bindKeyCode(19, ['pause', 'break']);\n locale.bindKeyCode(20, ['capslock']);\n locale.bindKeyCode(27, ['escape', 'esc']);\n locale.bindKeyCode(32, ['space', 'spacebar']);\n locale.bindKeyCode(33, ['pageup']);\n locale.bindKeyCode(34, ['pagedown']);\n locale.bindKeyCode(35, ['end']);\n locale.bindKeyCode(36, ['home']);\n locale.bindKeyCode(37, ['left']);\n locale.bindKeyCode(38, ['up']);\n locale.bindKeyCode(39, ['right']);\n locale.bindKeyCode(40, ['down']);\n locale.bindKeyCode(41, ['select']);\n locale.bindKeyCode(42, ['printscreen']);\n locale.bindKeyCode(43, ['execute']);\n locale.bindKeyCode(44, ['snapshot']);\n locale.bindKeyCode(45, ['insert', 'ins']);\n locale.bindKeyCode(46, ['delete', 'del']);\n locale.bindKeyCode(47, ['help']);\n locale.bindKeyCode(145, ['scrolllock', 'scroll']);\n locale.bindKeyCode(187, ['equal', 'equalsign', '=']);\n locale.bindKeyCode(188, ['comma', ',']);\n locale.bindKeyCode(190, ['period', '.']);\n locale.bindKeyCode(191, ['slash', 'forwardslash', '/']);\n locale.bindKeyCode(192, ['graveaccent', '`']);\n locale.bindKeyCode(219, ['openbracket', '[']);\n locale.bindKeyCode(220, ['backslash', '\\\\']);\n locale.bindKeyCode(221, ['closebracket', ']']);\n locale.bindKeyCode(222, ['apostrophe', '\\'']);\n\n // 0-9\n locale.bindKeyCode(48, ['zero', '0']);\n locale.bindKeyCode(49, ['one', '1']);\n locale.bindKeyCode(50, ['two', '2']);\n locale.bindKeyCode(51, ['three', '3']);\n locale.bindKeyCode(52, ['four', '4']);\n locale.bindKeyCode(53, ['five', '5']);\n locale.bindKeyCode(54, ['six', '6']);\n locale.bindKeyCode(55, ['seven', '7']);\n locale.bindKeyCode(56, ['eight', '8']);\n locale.bindKeyCode(57, ['nine', '9']);\n\n // numpad\n locale.bindKeyCode(96, ['numzero', 'num0']);\n locale.bindKeyCode(97, ['numone', 'num1']);\n locale.bindKeyCode(98, ['numtwo', 'num2']);\n locale.bindKeyCode(99, ['numthree', 'num3']);\n locale.bindKeyCode(100, ['numfour', 'num4']);\n locale.bindKeyCode(101, ['numfive', 'num5']);\n locale.bindKeyCode(102, ['numsix', 'num6']);\n locale.bindKeyCode(103, ['numseven', 'num7']);\n locale.bindKeyCode(104, ['numeight', 'num8']);\n locale.bindKeyCode(105, ['numnine', 'num9']);\n locale.bindKeyCode(106, ['nummultiply', 'num*']);\n locale.bindKeyCode(107, ['numadd', 'num+']);\n locale.bindKeyCode(108, ['numenter']);\n locale.bindKeyCode(109, ['numsubtract', 'num-']);\n locale.bindKeyCode(110, ['numdecimal', 'num.']);\n locale.bindKeyCode(111, ['numdivide', 'num/']);\n locale.bindKeyCode(144, ['numlock', 'num']);\n\n // function keys\n locale.bindKeyCode(112, ['f1']);\n locale.bindKeyCode(113, ['f2']);\n locale.bindKeyCode(114, ['f3']);\n locale.bindKeyCode(115, ['f4']);\n locale.bindKeyCode(116, ['f5']);\n locale.bindKeyCode(117, ['f6']);\n locale.bindKeyCode(118, ['f7']);\n locale.bindKeyCode(119, ['f8']);\n locale.bindKeyCode(120, ['f9']);\n locale.bindKeyCode(121, ['f10']);\n locale.bindKeyCode(122, ['f11']);\n locale.bindKeyCode(123, ['f12']);\n\n // secondary key symbols\n locale.bindMacro('shift + `', ['tilde', '~']);\n locale.bindMacro('shift + 1', ['exclamation', 'exclamationpoint', '!']);\n locale.bindMacro('shift + 2', ['at', '@']);\n locale.bindMacro('shift + 3', ['number', '#']);\n locale.bindMacro('shift + 4', ['dollar', 'dollars', 'dollarsign', '$']);\n locale.bindMacro('shift + 5', ['percent', '%']);\n locale.bindMacro('shift + 6', ['caret', '^']);\n locale.bindMacro('shift + 7', ['ampersand', 'and', '&']);\n locale.bindMacro('shift + 8', ['asterisk', '*']);\n locale.bindMacro('shift + 9', ['openparen', '(']);\n locale.bindMacro('shift + 0', ['closeparen', ')']);\n locale.bindMacro('shift + -', ['underscore', '_']);\n locale.bindMacro('shift + =', ['plus', '+']);\n locale.bindMacro('shift + [', ['opencurlybrace', 'opencurlybracket', '{']);\n locale.bindMacro('shift + ]', ['closecurlybrace', 'closecurlybracket', '}']);\n locale.bindMacro('shift + \\\\', ['verticalbar', '|']);\n locale.bindMacro('shift + ;', ['colon', ':']);\n locale.bindMacro('shift + \\'', ['quotationmark', '\\'']);\n locale.bindMacro('shift + !,', ['openanglebracket', '<']);\n locale.bindMacro('shift + .', ['closeanglebracket', '>']);\n locale.bindMacro('shift + /', ['questionmark', '?']);\n\n //a-z and A-Z\n for (var keyCode = 65; keyCode <= 90; keyCode += 1) {\n var keyName = String.fromCharCode(keyCode + 32);\n var capitalKeyName = String.fromCharCode(keyCode);\n \tlocale.bindKeyCode(keyCode, keyName);\n \tlocale.bindMacro('shift + ' + keyName, capitalKeyName);\n \tlocale.bindMacro('capslock + ' + keyName, capitalKeyName);\n }\n\n // browser caveats\n var semicolonKeyCode = userAgent.match('Firefox') ? 59 : 186;\n var dashKeyCode = userAgent.match('Firefox') ? 173 : 189;\n var leftCommandKeyCode;\n var rightCommandKeyCode;\n if (platform.match('Mac') && (userAgent.match('Safari') || userAgent.match('Chrome'))) {\n leftCommandKeyCode = 91;\n rightCommandKeyCode = 93;\n } else if(platform.match('Mac') && userAgent.match('Opera')) {\n leftCommandKeyCode = 17;\n rightCommandKeyCode = 17;\n } else if(platform.match('Mac') && userAgent.match('Firefox')) {\n leftCommandKeyCode = 224;\n rightCommandKeyCode = 224;\n }\n locale.bindKeyCode(semicolonKeyCode, ['semicolon', ';']);\n locale.bindKeyCode(dashKeyCode, ['dash', '-']);\n locale.bindKeyCode(leftCommandKeyCode, ['command', 'windows', 'win', 'super', 'leftcommand', 'leftwindows', 'leftwin', 'leftsuper']);\n locale.bindKeyCode(rightCommandKeyCode, ['command', 'windows', 'win', 'super', 'rightcommand', 'rightwindows', 'rightwin', 'rightsuper']);\n\n // kill keys\n locale.setKillKey('command');\n};\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/keyboardjs/locales/us.js\n ** module id = 38\n ** module chunks = 0\n **/","var BaseConnection = module.exports = require('./base')\n , _ = require('underscore');\n\n\nvar BrowserConnection = module.exports = function(opts) {\n BaseConnection.call(this, opts);\n var connection = this;\n this.on('ready', function() { connection.startFocusLoop(); })\n this.on('disconnect', function() { connection.stopFocusLoop(); })\n}\n\n_.extend(BrowserConnection.prototype, BaseConnection.prototype);\n\nBrowserConnection.__proto__ = BaseConnection;\n\nBrowserConnection.prototype.useSecure = function(){\n return location.protocol === 'https:'\n}\n\nBrowserConnection.prototype.getScheme = function(){\n return this.useSecure() ? 'wss:' : 'ws:'\n}\n\nBrowserConnection.prototype.getPort = function(){\n return this.useSecure() ? 6436 : 6437\n}\n\nBrowserConnection.prototype.setupSocket = function() {\n var connection = this;\n var socket = new WebSocket(this.getUrl());\n socket.onopen = function() { connection.handleOpen(); };\n socket.onclose = function(data) { connection.handleClose(data['code'], data['reason']); };\n socket.onmessage = function(message) { connection.handleData(message.data) };\n socket.onerror = function(error) {\n\n // attempt to degrade to ws: after one failed attempt for older Leap Service installations.\n if (connection.useSecure() && connection.scheme === 'wss:'){\n connection.scheme = 'ws:';\n connection.port = 6437;\n connection.disconnect();\n connection.connect();\n }\n\n };\n return socket;\n}\n\nBrowserConnection.prototype.startFocusLoop = function() {\n if (this.focusDetectorTimer) return;\n var connection = this;\n var propertyName = null;\n if (typeof document.hidden !== \"undefined\") {\n propertyName = \"hidden\";\n } else if (typeof document.mozHidden !== \"undefined\") {\n propertyName = \"mozHidden\";\n } else if (typeof document.msHidden !== \"undefined\") {\n propertyName = \"msHidden\";\n } else if (typeof document.webkitHidden !== \"undefined\") {\n propertyName = \"webkitHidden\";\n } else {\n propertyName = undefined;\n }\n\n if (connection.windowVisible === undefined) {\n connection.windowVisible = propertyName === undefined ? true : document[propertyName] === false;\n }\n\n var focusListener = window.addEventListener('focus', function(e) {\n connection.windowVisible = true;\n updateFocusState();\n });\n\n var blurListener = window.addEventListener('blur', function(e) {\n connection.windowVisible = false;\n updateFocusState();\n });\n\n this.on('disconnect', function() {\n window.removeEventListener('focus', focusListener);\n window.removeEventListener('blur', blurListener);\n });\n\n var updateFocusState = function() {\n var isVisible = propertyName === undefined ? true : document[propertyName] === false;\n connection.reportFocus(isVisible && connection.windowVisible);\n }\n\n // save 100ms when resuming focus\n updateFocusState();\n\n this.focusDetectorTimer = setInterval(updateFocusState, 100);\n}\n\nBrowserConnection.prototype.stopFocusLoop = function() {\n if (!this.focusDetectorTimer) return;\n clearTimeout(this.focusDetectorTimer);\n delete this.focusDetectorTimer;\n}\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/leapjs/lib/connection/browser.js\n ** module id = 39\n ** module chunks = 0\n **/","var WebSocket = require('ws')\n , BaseConnection = require('./base')\n , _ = require('underscore');\n\nvar NodeConnection = module.exports = function(opts) {\n BaseConnection.call(this, opts);\n var connection = this;\n this.on('ready', function() { connection.reportFocus(true); });\n}\n\n_.extend(NodeConnection.prototype, BaseConnection.prototype);\n\nNodeConnection.__proto__ = BaseConnection;\n\nNodeConnection.prototype.setupSocket = function() {\n var connection = this;\n var socket = new WebSocket(this.getUrl());\n socket.on('open', function() { connection.handleOpen(); });\n socket.on('message', function(m) { connection.handleData(m); });\n socket.on('close', function(code, reason) { connection.handleClose(code, reason); });\n socket.on('error', function() { connection.startReconnection(); });\n return socket;\n}\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/leapjs/lib/connection/node.js\n ** module id = 40\n ** module chunks = 0\n **/","var Frame = require('./frame')\n , Hand = require('./hand')\n , Pointable = require('./pointable')\n , Finger = require('./finger')\n , CircularBuffer = require(\"./circular_buffer\")\n , Pipeline = require(\"./pipeline\")\n , EventEmitter = require('events').EventEmitter\n , gestureListener = require('./gesture').gestureListener\n , Dialog = require('./dialog')\n , _ = require('underscore');\n\n/**\n * Constructs a Controller object.\n *\n * When creating a Controller object, you may optionally pass in options\n * to set the host , set the port, enable gestures, or select the frame event type.\n *\n * ```javascript\n * var controller = new Leap.Controller({\n * host: '127.0.0.1',\n * port: 6437,\n * enableGestures: true,\n * frameEventName: 'animationFrame'\n * });\n * ```\n *\n * @class Controller\n * @memberof Leap\n * @classdesc\n * The Controller class is your main interface to the Leap Motion Controller.\n *\n * Create an instance of this Controller class to access frames of tracking data\n * and configuration information. Frame data can be polled at any time using the\n * [Controller.frame]{@link Leap.Controller#frame}() function. Call frame() or frame(0) to get the most recent\n * frame. Set the history parameter to a positive integer to access previous frames.\n * A controller stores up to 60 frames in its frame history.\n *\n * Polling is an appropriate strategy for applications which already have an\n * intrinsic update loop, such as a game.\n *\n * loopWhileDisconnected defaults to true, and maintains a 60FPS frame rate even when Leap Motion is not streaming\n * data at that rate (such as no hands in frame). This is important for VR/WebGL apps which rely on rendering for\n * regular visual updates, including from other input devices. Flipping this to false should be considered an\n * optimization for very specific use-cases.\n *\n *\n */\n\n\nvar Controller = module.exports = function(opts) {\n var inNode = (typeof(process) !== 'undefined' && process.versions && process.versions.node),\n controller = this;\n\n opts = _.defaults(opts || {}, {\n inNode: inNode\n });\n\n this.inNode = opts.inNode;\n\n opts = _.defaults(opts || {}, {\n frameEventName: this.useAnimationLoop() ? 'animationFrame' : 'deviceFrame',\n suppressAnimationLoop: !this.useAnimationLoop(),\n loopWhileDisconnected: true,\n useAllPlugins: false,\n checkVersion: true\n });\n\n this.animationFrameRequested = false;\n this.onAnimationFrame = function(timestamp) {\n if (controller.lastConnectionFrame.valid){\n controller.emit('animationFrame', controller.lastConnectionFrame);\n }\n controller.emit('frameEnd', timestamp);\n if (\n controller.loopWhileDisconnected &&\n ( ( controller.connection.focusedState !== false ) // loop while undefined, pre-ready.\n || controller.connection.opts.background) ){\n window.requestAnimationFrame(controller.onAnimationFrame);\n }else{\n controller.animationFrameRequested = false;\n }\n };\n this.suppressAnimationLoop = opts.suppressAnimationLoop;\n this.loopWhileDisconnected = opts.loopWhileDisconnected;\n this.frameEventName = opts.frameEventName;\n this.useAllPlugins = opts.useAllPlugins;\n this.history = new CircularBuffer(200);\n this.lastFrame = Frame.Invalid;\n this.lastValidFrame = Frame.Invalid;\n this.lastConnectionFrame = Frame.Invalid;\n this.accumulatedGestures = [];\n this.checkVersion = opts.checkVersion;\n if (opts.connectionType === undefined) {\n this.connectionType = (this.inBrowser() ? require('./connection/browser') : require('./connection/node'));\n } else {\n this.connectionType = opts.connectionType;\n }\n this.connection = new this.connectionType(opts);\n this.streamingCount = 0;\n this.devices = {};\n this.plugins = {};\n this._pluginPipelineSteps = {};\n this._pluginExtendedMethods = {};\n if (opts.useAllPlugins) this.useRegisteredPlugins();\n this.setupFrameEvents(opts);\n this.setupConnectionEvents();\n \n this.startAnimationLoop(); // immediately when started\n}\n\nController.prototype.gesture = function(type, cb) {\n var creator = gestureListener(this, type);\n if (cb !== undefined) {\n creator.stop(cb);\n }\n return creator;\n}\n\n/*\n * @returns the controller\n */\nController.prototype.setBackground = function(state) {\n this.connection.setBackground(state);\n return this;\n}\n\nController.prototype.setOptimizeHMD = function(state) {\n this.connection.setOptimizeHMD(state);\n return this;\n}\n\nController.prototype.inBrowser = function() {\n return !this.inNode;\n}\n\nController.prototype.useAnimationLoop = function() {\n return this.inBrowser() && !this.inBackgroundPage();\n}\n\nController.prototype.inBackgroundPage = function(){\n // http://developer.chrome.com/extensions/extension#method-getBackgroundPage\n return (typeof(chrome) !== \"undefined\") &&\n chrome.extension &&\n chrome.extension.getBackgroundPage &&\n (chrome.extension.getBackgroundPage() === window)\n}\n\n/*\n * @returns the controller\n */\nController.prototype.connect = function() {\n this.connection.connect();\n return this;\n}\n\nController.prototype.streaming = function() {\n return this.streamingCount > 0;\n}\n\nController.prototype.connected = function() {\n return !!this.connection.connected;\n}\n\nController.prototype.startAnimationLoop = function(){\n if (!this.suppressAnimationLoop && !this.animationFrameRequested) {\n this.animationFrameRequested = true;\n window.requestAnimationFrame(this.onAnimationFrame);\n }\n}\n\n/*\n * @returns the controller\n */\nController.prototype.disconnect = function() {\n this.connection.disconnect();\n return this;\n}\n\n/**\n * Returns a frame of tracking data from the Leap.\n *\n * Use the optional history parameter to specify which frame to retrieve.\n * Call frame() or frame(0) to access the most recent frame; call frame(1) to\n * access the previous frame, and so on. If you use a history value greater\n * than the number of stored frames, then the controller returns an invalid frame.\n *\n * @method frame\n * @memberof Leap.Controller.prototype\n * @param {number} history The age of the frame to return, counting backwards from\n * the most recent frame (0) into the past and up to the maximum age (59).\n * @returns {Leap.Frame} The specified frame; or, if no history\n * parameter is specified, the newest frame. If a frame is not available at\n * the specified history position, an invalid Frame is returned.\n **/\nController.prototype.frame = function(num) {\n return this.history.get(num) || Frame.Invalid;\n}\n\nController.prototype.loop = function(callback) {\n if (callback) {\n if (typeof callback === 'function'){\n this.on(this.frameEventName, callback);\n }else{\n // callback is actually of the form: {eventName: callback}\n this.setupFrameEvents(callback);\n }\n }\n\n return this.connect();\n}\n\nController.prototype.addStep = function(step) {\n if (!this.pipeline) this.pipeline = new Pipeline(this);\n this.pipeline.addStep(step);\n}\n\n// this is run on every deviceFrame\nController.prototype.processFrame = function(frame) {\n if (frame.gestures) {\n this.accumulatedGestures = this.accumulatedGestures.concat(frame.gestures);\n }\n // lastConnectionFrame is used by the animation loop\n this.lastConnectionFrame = frame;\n this.startAnimationLoop(); // Only has effect if loopWhileDisconnected: false\n this.emit('deviceFrame', frame);\n}\n\n// on a this.deviceEventName (usually 'animationFrame' in browsers), this emits a 'frame'\nController.prototype.processFinishedFrame = function(frame) {\n this.lastFrame = frame;\n if (frame.valid) {\n this.lastValidFrame = frame;\n }\n frame.controller = this;\n frame.historyIdx = this.history.push(frame);\n if (frame.gestures) {\n frame.gestures = this.accumulatedGestures;\n this.accumulatedGestures = [];\n for (var gestureIdx = 0; gestureIdx != frame.gestures.length; gestureIdx++) {\n this.emit(\"gesture\", frame.gestures[gestureIdx], frame);\n }\n }\n if (this.pipeline) {\n frame = this.pipeline.run(frame);\n if (!frame) frame = Frame.Invalid;\n }\n this.emit('frame', frame);\n this.emitHandEvents(frame);\n}\n\n/**\n * The controller will emit 'hand' events for every hand on each frame. The hand in question will be passed\n * to the event callback.\n *\n * @param frame\n */\nController.prototype.emitHandEvents = function(frame){\n for (var i = 0; i < frame.hands.length; i++){\n this.emit('hand', frame.hands[i]);\n }\n}\n\nController.prototype.setupFrameEvents = function(opts){\n if (opts.frame){\n this.on('frame', opts.frame);\n }\n if (opts.hand){\n this.on('hand', opts.hand);\n }\n}\n\n/**\n Controller events. The old 'deviceConnected' and 'deviceDisconnected' have been depricated -\n use 'deviceStreaming' and 'deviceStopped' instead, except in the case of an unexpected disconnect.\n\n There are 4 pairs of device events recently added/changed:\n -deviceAttached/deviceRemoved - called when a device's physical connection to the computer changes\n -deviceStreaming/deviceStopped - called when a device is paused or resumed.\n -streamingStarted/streamingStopped - called when there is/is no longer at least 1 streaming device.\n\t\t\t\t\t\t\t\t\t Always comes after deviceStreaming.\n \n The first of all of the above event pairs is triggered as appropriate upon connection. All of\n these events receives an argument with the most recent info about the device that triggered it.\n These events will always be fired in the order they are listed here, with reverse ordering for the\n matching shutdown call. (ie, deviceStreaming always comes after deviceAttached, and deviceStopped \n will come before deviceRemoved).\n \n -deviceConnected/deviceDisconnected - These are considered deprecated and will be removed in\n the next revision. In contrast to the other events and in keeping with it's original behavior,\n it will only be fired when a device begins streaming AFTER a connection has been established.\n It is not paired, and receives no device info. Nearly identical functionality to\n streamingStarted/Stopped if you need to port.\n*/\nController.prototype.setupConnectionEvents = function() {\n var controller = this;\n this.connection.on('frame', function(frame) {\n controller.processFrame(frame);\n });\n // either deviceFrame or animationFrame:\n this.on(this.frameEventName, function(frame) {\n controller.processFinishedFrame(frame);\n });\n\n\n // here we backfill the 0.5.0 deviceEvents as best possible\n // backfill begin streaming events\n var backfillStreamingStartedEventsHandler = function(){\n if (controller.connection.opts.requestProtocolVersion < 5 && controller.streamingCount == 0){\n controller.streamingCount = 1;\n var info = {\n attached: true,\n streaming: true,\n type: 'unknown',\n id: \"Lx00000000000\"\n };\n controller.devices[info.id] = info;\n\n controller.emit('deviceAttached', info);\n controller.emit('deviceStreaming', info);\n controller.emit('streamingStarted', info);\n controller.connection.removeListener('frame', backfillStreamingStartedEventsHandler)\n }\n }\n\n var backfillStreamingStoppedEvents = function(){\n if (controller.streamingCount > 0) {\n for (var deviceId in controller.devices){\n controller.emit('deviceStopped', controller.devices[deviceId]);\n controller.emit('deviceRemoved', controller.devices[deviceId]);\n }\n // only emit streamingStopped once, with the last device\n controller.emit('streamingStopped', controller.devices[deviceId]);\n\n controller.streamingCount = 0;\n\n for (var deviceId in controller.devices){\n delete controller.devices[deviceId];\n }\n }\n }\n // Delegate connection events\n this.connection.on('focus', function() {\n\n if ( controller.loopWhileDisconnected ){\n\n controller.startAnimationLoop();\n\n }\n\n controller.emit('focus');\n\n });\n this.connection.on('blur', function() { controller.emit('blur') });\n this.connection.on('protocol', function(protocol) {\n\n protocol.on('beforeFrameCreated', function(frameData){\n controller.emit('beforeFrameCreated', frameData)\n });\n\n protocol.on('afterFrameCreated', function(frame, frameData){\n controller.emit('afterFrameCreated', frame, frameData)\n });\n\n controller.emit('protocol', protocol); \n });\n\n this.connection.on('ready', function() {\n\n if (controller.checkVersion && !controller.inNode){\n // show dialog only to web users\n controller.checkOutOfDate();\n }\n\n controller.emit('ready');\n });\n\n this.connection.on('connect', function() {\n controller.emit('connect');\n controller.connection.removeListener('frame', backfillStreamingStartedEventsHandler)\n controller.connection.on('frame', backfillStreamingStartedEventsHandler);\n });\n\n this.connection.on('disconnect', function() {\n controller.emit('disconnect');\n backfillStreamingStoppedEvents();\n });\n\n // this does not fire when the controller is manually disconnected\n // or for Leap Service v1.2.0+\n this.connection.on('deviceConnect', function(evt) {\n if (evt.state){\n controller.emit('deviceConnected');\n controller.connection.removeListener('frame', backfillStreamingStartedEventsHandler)\n controller.connection.on('frame', backfillStreamingStartedEventsHandler);\n }else{\n controller.emit('deviceDisconnected');\n backfillStreamingStoppedEvents();\n }\n });\n\n // Does not fire for Leap Service pre v1.2.0\n this.connection.on('deviceEvent', function(evt) {\n var info = evt.state,\n oldInfo = controller.devices[info.id];\n\n //Grab a list of changed properties in the device info\n var changed = {};\n for(var property in info) {\n //If a property i doesn't exist the cache, or has changed...\n if( !oldInfo || !oldInfo.hasOwnProperty(property) || oldInfo[property] != info[property] ) {\n changed[property] = true;\n }\n }\n\n //Update the device list\n controller.devices[info.id] = info;\n\n //Fire events based on change list\n if(changed.attached) {\n controller.emit(info.attached ? 'deviceAttached' : 'deviceRemoved', info);\n }\n\n if(!changed.streaming) return;\n\n if(info.streaming) {\n controller.streamingCount++;\n controller.emit('deviceStreaming', info);\n if( controller.streamingCount == 1 ) {\n controller.emit('streamingStarted', info);\n }\n //if attached & streaming both change to true at the same time, that device was streaming\n //already when we connected.\n if(!changed.attached) {\n controller.emit('deviceConnected');\n }\n }\n //Since when devices are attached all fields have changed, don't send events for streaming being false.\n else if(!(changed.attached && info.attached)) {\n controller.streamingCount--;\n controller.emit('deviceStopped', info);\n if(controller.streamingCount == 0){\n controller.emit('streamingStopped', info);\n }\n controller.emit('deviceDisconnected');\n }\n\n });\n\n\n this.on('newListener', function(event, listener) {\n if( event == 'deviceConnected' || event == 'deviceDisconnected' ) {\n console.warn(event + \" events are depricated. Consider using 'streamingStarted/streamingStopped' or 'deviceStreaming/deviceStopped' instead\");\n }\n });\n\n};\n\n\n\n\n// Checks if the protocol version is the latest, if if not, shows the dialog.\nController.prototype.checkOutOfDate = function(){\n console.assert(this.connection && this.connection.protocol);\n\n var serviceVersion = this.connection.protocol.serviceVersion;\n var protocolVersion = this.connection.protocol.version;\n var defaultProtocolVersion = this.connectionType.defaultProtocolVersion;\n\n if (defaultProtocolVersion > protocolVersion){\n\n console.warn(\"Your Protocol Version is v\" + protocolVersion +\n \", this app was designed for v\" + defaultProtocolVersion);\n\n Dialog.warnOutOfDate({\n sV: serviceVersion,\n pV: protocolVersion\n });\n return true\n }else{\n return false\n }\n\n};\n\n\n\nController._pluginFactories = {};\n\n/*\n * Registers a plugin, making is accessible to controller.use later on.\n *\n * @member plugin\n * @memberof Leap.Controller.prototype\n * @param {String} name The name of the plugin (usually camelCase).\n * @param {function} factory A factory method which will return an instance of a plugin.\n * The factory receives an optional hash of options, passed in via controller.use.\n *\n * Valid keys for the object include frame, hand, finger, tool, and pointable. The value\n * of each key can be either a function or an object. If given a function, that function\n * will be called once for every instance of the object, with that instance injected as an\n * argument. This allows decoration of objects with additional data:\n *\n * ```javascript\n * Leap.Controller.plugin('testPlugin', function(options){\n * return {\n * frame: function(frame){\n * frame.foo = 'bar';\n * }\n * }\n * });\n * ```\n *\n * When hand is used, the callback is called for every hand in `frame.hands`. Note that\n * hand objects are recreated with every new frame, so that data saved on the hand will not\n * persist.\n *\n * ```javascript\n * Leap.Controller.plugin('testPlugin', function(){\n * return {\n * hand: function(hand){\n * console.log('testPlugin running on hand ' + hand.id);\n * }\n * }\n * });\n * ```\n *\n * A factory can return an object to add custom functionality to Frames, Hands, or Pointables.\n * The methods are added directly to the object's prototype. Finger and Tool cannot be used here, Pointable\n * must be used instead.\n * This is encouraged for calculations which may not be necessary on every frame.\n * Memoization is also encouraged, for cases where the method may be called many times per frame by the application.\n *\n * ```javascript\n * // This plugin allows hand.usefulData() to be called later.\n * Leap.Controller.plugin('testPlugin', function(){\n * return {\n * hand: {\n * usefulData: function(){\n * console.log('usefulData on hand', this.id);\n * // memoize the results on to the hand, preventing repeat work:\n * this.x || this.x = someExpensiveCalculation();\n * return this.x;\n * }\n * }\n * }\n * });\n *\n * Note that the factory pattern allows encapsulation for every plugin instance.\n *\n * ```javascript\n * Leap.Controller.plugin('testPlugin', function(options){\n * options || options = {}\n * options.center || options.center = [0,0,0]\n *\n * privatePrintingMethod = function(){\n * console.log('privatePrintingMethod - options', options);\n * }\n *\n * return {\n * pointable: {\n * publicPrintingMethod: function(){\n * privatePrintingMethod();\n * }\n * }\n * }\n * });\n *\n */\nController.plugin = function(pluginName, factory) {\n if (this._pluginFactories[pluginName]) {\n console.warn(\"Plugin \\\"\" + pluginName + \"\\\" already registered\");\n }\n return this._pluginFactories[pluginName] = factory;\n};\n\n/*\n * Returns a list of registered plugins.\n * @returns {Array} Plugin Factories.\n */\nController.plugins = function() {\n return _.keys(this._pluginFactories);\n};\n\n\n\nvar setPluginCallbacks = function(pluginName, type, callback){\n \n if ( ['beforeFrameCreated', 'afterFrameCreated'].indexOf(type) != -1 ){\n \n // todo - not able to \"unuse\" a plugin currently\n this.on(type, callback);\n \n }else {\n \n if (!this.pipeline) this.pipeline = new Pipeline(this);\n \n if (!this._pluginPipelineSteps[pluginName]) this._pluginPipelineSteps[pluginName] = [];\n\n this._pluginPipelineSteps[pluginName].push(\n \n this.pipeline.addWrappedStep(type, callback)\n \n );\n \n }\n \n};\n\nvar setPluginMethods = function(pluginName, type, hash){\n var klass;\n \n if (!this._pluginExtendedMethods[pluginName]) this._pluginExtendedMethods[pluginName] = [];\n\n switch (type) {\n case 'frame':\n klass = Frame;\n break;\n case 'hand':\n klass = Hand;\n break;\n case 'pointable':\n klass = Pointable;\n _.extend(Finger.prototype, hash);\n _.extend(Finger.Invalid, hash);\n break;\n case 'finger':\n klass = Finger;\n break;\n default:\n throw pluginName + ' specifies invalid object type \"' + type + '\" for prototypical extension'\n }\n\n _.extend(klass.prototype, hash);\n _.extend(klass.Invalid, hash);\n this._pluginExtendedMethods[pluginName].push([klass, hash])\n \n}\n\n\n\n/*\n * Begin using a registered plugin. The plugin's functionality will be added to all frames\n * returned by the controller (and/or added to the objects within the frame).\n * - The order of plugin execution inside the loop will match the order in which use is called by the application.\n * - The plugin be run for both deviceFrames and animationFrames.\n *\n * If called a second time, the options will be merged with those of the already instantiated plugin.\n *\n * @method use\n * @memberOf Leap.Controller.prototype\n * @param pluginName\n * @param {Hash} Options to be passed to the plugin's factory.\n * @returns the controller\n */\nController.prototype.use = function(pluginName, options) {\n var functionOrHash, pluginFactory, key, pluginInstance;\n\n pluginFactory = (typeof pluginName == 'function') ? pluginName : Controller._pluginFactories[pluginName];\n\n if (!pluginFactory) {\n throw 'Leap Plugin ' + pluginName + ' not found.';\n }\n\n options || (options = {});\n\n if (this.plugins[pluginName]){\n _.extend(this.plugins[pluginName], options);\n return this;\n }\n\n this.plugins[pluginName] = options;\n\n pluginInstance = pluginFactory.call(this, options);\n\n for (key in pluginInstance) {\n\n functionOrHash = pluginInstance[key];\n\n if (typeof functionOrHash === 'function') {\n \n setPluginCallbacks.call(this, pluginName, key, functionOrHash);\n \n } else {\n \n setPluginMethods.call(this, pluginName, key, functionOrHash);\n \n }\n\n }\n\n return this;\n};\n\n\n\n\n/*\n * Stop using a used plugin. This will remove any of the plugin's pipeline methods (those called on every frame)\n * and remove any methods which extend frame-object prototypes.\n *\n * @method stopUsing\n * @memberOf Leap.Controller.prototype\n * @param pluginName\n * @returns the controller\n */\nController.prototype.stopUsing = function (pluginName) {\n var steps = this._pluginPipelineSteps[pluginName],\n extMethodHashes = this._pluginExtendedMethods[pluginName],\n i = 0, klass, extMethodHash;\n\n if (!this.plugins[pluginName]) return;\n\n if (steps) {\n for (i = 0; i < steps.length; i++) {\n this.pipeline.removeStep(steps[i]);\n }\n }\n\n if (extMethodHashes){\n for (i = 0; i < extMethodHashes.length; i++){\n klass = extMethodHashes[i][0];\n extMethodHash = extMethodHashes[i][1];\n for (var methodName in extMethodHash) {\n delete klass.prototype[methodName];\n delete klass.Invalid[methodName];\n }\n }\n }\n\n delete this.plugins[pluginName];\n\n return this;\n}\n\nController.prototype.useRegisteredPlugins = function(){\n for (var plugin in Controller._pluginFactories){\n this.use(plugin);\n }\n}\n\n\n_.extend(Controller.prototype, EventEmitter.prototype);\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/leapjs/lib/controller.js\n ** module id = 41\n ** module chunks = 0\n **/","/**\n * Leap is the global namespace of the Leap API.\n * @namespace Leap\n */\nmodule.exports = {\n Controller: require(\"./controller\"),\n Frame: require(\"./frame\"),\n Gesture: require(\"./gesture\"),\n Hand: require(\"./hand\"),\n Pointable: require(\"./pointable\"),\n Finger: require(\"./finger\"),\n InteractionBox: require(\"./interaction_box\"),\n CircularBuffer: require(\"./circular_buffer\"),\n UI: require(\"./ui\"),\n JSONProtocol: require(\"./protocol\").JSONProtocol,\n glMatrix: require(\"gl-matrix\"),\n mat3: require(\"gl-matrix\").mat3,\n vec3: require(\"gl-matrix\").vec3,\n loopController: undefined,\n version: require('./version.js'),\n\n /**\n * Expose utility libraries for convenience\n * Use carefully - they may be subject to upgrade or removal in different versions of LeapJS.\n *\n */\n _: require('underscore'),\n EventEmitter: require('events').EventEmitter,\n\n /**\n * The Leap.loop() function passes a frame of Leap data to your\n * callback function and then calls window.requestAnimationFrame() after\n * executing your callback function.\n *\n * Leap.loop() sets up the Leap controller and WebSocket connection for you.\n * You do not need to create your own controller when using this method.\n *\n * Your callback function is called on an interval determined by the client\n * browser. Typically, this is on an interval of 60 frames/second. The most\n * recent frame of Leap data is passed to your callback function. If the Leap\n * is producing frames at a slower rate than the browser frame rate, the same\n * frame of Leap data can be passed to your function in successive animation\n * updates.\n *\n * As an alternative, you can create your own Controller object and use a\n * {@link Controller#onFrame onFrame} callback to process the data at\n * the frame rate of the Leap device. See {@link Controller} for an\n * example.\n *\n * @method Leap.loop\n * @param {function} callback A function called when the browser is ready to\n * draw to the screen. The most recent {@link Frame} object is passed to\n * your callback function.\n *\n * ```javascript\n * Leap.loop( function( frame ) {\n * // ... your code here\n * })\n * ```\n */\n loop: function(opts, callback) {\n if (opts && callback === undefined && ( ({}).toString.call(opts) === '[object Function]' ) ) {\n callback = opts;\n opts = {};\n }\n\n if (this.loopController) {\n if (opts){\n this.loopController.setupFrameEvents(opts);\n }\n }else{\n this.loopController = new this.Controller(opts);\n }\n\n this.loopController.loop(callback);\n return this.loopController;\n },\n\n /*\n * Convenience method for Leap.Controller.plugin\n */\n plugin: function(name, options){\n this.Controller.plugin(name, options)\n }\n}\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/leapjs/lib/index.js\n ** module id = 42\n ** module chunks = 0\n **/","var Pipeline = module.exports = function (controller) {\n this.steps = [];\n this.controller = controller;\n}\n\nPipeline.prototype.addStep = function (step) {\n this.steps.push(step);\n}\n\nPipeline.prototype.run = function (frame) {\n var stepsLength = this.steps.length;\n for (var i = 0; i != stepsLength; i++) {\n if (!frame) break;\n frame = this.steps[i](frame);\n }\n return frame;\n}\n\nPipeline.prototype.removeStep = function(step){\n var index = this.steps.indexOf(step);\n if (index === -1) throw \"Step not found in pipeline\";\n this.steps.splice(index, 1);\n}\n\n/*\n * Wraps a plugin callback method in method which can be run inside the pipeline.\n * This wrapper method loops the callback over objects within the frame as is appropriate,\n * calling the callback for each in turn.\n *\n * @method createStepFunction\n * @memberOf Leap.Controller.prototype\n * @param {Controller} The controller on which the callback is called.\n * @param {String} type What frame object the callback is run for and receives.\n * Can be one of 'frame', 'finger', 'hand', 'pointable', 'tool'\n * @param {function} callback The method which will be run inside the pipeline loop. Receives one argument, such as a hand.\n * @private\n */\nPipeline.prototype.addWrappedStep = function (type, callback) {\n var controller = this.controller,\n step = function (frame) {\n var dependencies, i, len;\n dependencies = (type == 'frame') ? [frame] : (frame[type + 's'] || []);\n\n for (i = 0, len = dependencies.length; i < len; i++) {\n callback.call(controller, dependencies[i]);\n }\n\n return frame;\n };\n\n this.addStep(step);\n return step;\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/leapjs/lib/pipeline.js\n ** module id = 43\n ** module chunks = 0\n **/","exports.UI = {\n Region: require(\"./ui/region\"),\n Cursor: require(\"./ui/cursor\")\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/leapjs/lib/ui.js\n ** module id = 44\n ** module chunks = 0\n **/","var Cursor = module.exports = function() {\n return function(frame) {\n var pointable = frame.pointables.sort(function(a, b) { return a.z - b.z })[0]\n if (pointable && pointable.valid) {\n frame.cursorPosition = pointable.tipPosition\n }\n return frame\n }\n}\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/leapjs/lib/ui/cursor.js\n ** module id = 45\n ** module chunks = 0\n **/","var EventEmitter = require('events').EventEmitter\n , _ = require('underscore')\n\nvar Region = module.exports = function(start, end) {\n this.start = new Vector(start)\n this.end = new Vector(end)\n this.enteredFrame = null\n}\n\nRegion.prototype.hasPointables = function(frame) {\n for (var i = 0; i != frame.pointables.length; i++) {\n var position = frame.pointables[i].tipPosition\n if (position.x >= this.start.x && position.x <= this.end.x && position.y >= this.start.y && position.y <= this.end.y && position.z >= this.start.z && position.z <= this.end.z) {\n return true\n }\n }\n return false\n}\n\nRegion.prototype.listener = function(opts) {\n var region = this\n if (opts && opts.nearThreshold) this.setupNearRegion(opts.nearThreshold)\n return function(frame) {\n return region.updatePosition(frame)\n }\n}\n\nRegion.prototype.clipper = function() {\n var region = this\n return function(frame) {\n region.updatePosition(frame)\n return region.enteredFrame ? frame : null\n }\n}\n\nRegion.prototype.setupNearRegion = function(distance) {\n var nearRegion = this.nearRegion = new Region(\n [this.start.x - distance, this.start.y - distance, this.start.z - distance],\n [this.end.x + distance, this.end.y + distance, this.end.z + distance]\n )\n var region = this\n nearRegion.on(\"enter\", function(frame) {\n region.emit(\"near\", frame)\n })\n nearRegion.on(\"exit\", function(frame) {\n region.emit(\"far\", frame)\n })\n region.on('exit', function(frame) {\n region.emit(\"near\", frame)\n })\n}\n\nRegion.prototype.updatePosition = function(frame) {\n if (this.nearRegion) this.nearRegion.updatePosition(frame)\n if (this.hasPointables(frame) && this.enteredFrame == null) {\n this.enteredFrame = frame\n this.emit(\"enter\", this.enteredFrame)\n } else if (!this.hasPointables(frame) && this.enteredFrame != null) {\n this.enteredFrame = null\n this.emit(\"exit\", this.enteredFrame)\n }\n return frame\n}\n\nRegion.prototype.normalize = function(position) {\n return new Vector([\n (position.x - this.start.x) / (this.end.x - this.start.x),\n (position.y - this.start.y) / (this.end.y - this.start.y),\n (position.z - this.start.z) / (this.end.z - this.start.z)\n ])\n}\n\nRegion.prototype.mapToXY = function(position, width, height) {\n var normalized = this.normalize(position)\n var x = normalized.x, y = normalized.y\n if (x > 1) x = 1\n else if (x < -1) x = -1\n if (y > 1) y = 1\n else if (y < -1) y = -1\n return [\n (x + 1) / 2 * width,\n (1 - y) / 2 * height,\n normalized.z\n ]\n}\n\n_.extend(Region.prototype, EventEmitter.prototype)\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/leapjs/lib/ui/region.js\n ** module id = 46\n ** module chunks = 0\n **/","// This file is automatically updated from package.json by grunt.\nmodule.exports = {\n full: '0.6.4',\n major: 0,\n minor: 6,\n dot: 4\n}\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/leapjs/lib/version.js\n ** module id = 47\n ** module chunks = 0\n **/","/// shim for browser packaging\n\nmodule.exports = function() {\n return global.WebSocket || global.MozWebSocket;\n}\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/leapjs/~/ws/lib/browser.js\n ** module id = 48\n ** module chunks = 0\n **/","/**\n * Tween.js - Licensed under the MIT license\n * https://github.com/tweenjs/tween.js\n * ----------------------------------------------\n *\n * See https://github.com/tweenjs/tween.js/graphs/contributors for the full list of contributors.\n * Thank you all, you're awesome!\n */\n\nvar TWEEN = TWEEN || (function () {\n\n\tvar _tweens = [];\n\n\treturn {\n\n\t\tgetAll: function () {\n\n\t\t\treturn _tweens;\n\n\t\t},\n\n\t\tremoveAll: function () {\n\n\t\t\t_tweens = [];\n\n\t\t},\n\n\t\tadd: function (tween) {\n\n\t\t\t_tweens.push(tween);\n\n\t\t},\n\n\t\tremove: function (tween) {\n\n\t\t\tvar i = _tweens.indexOf(tween);\n\n\t\t\tif (i !== -1) {\n\t\t\t\t_tweens.splice(i, 1);\n\t\t\t}\n\n\t\t},\n\n\t\tupdate: function (time, preserve) {\n\n\t\t\tif (_tweens.length === 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tvar i = 0;\n\n\t\t\ttime = time !== undefined ? time : TWEEN.now();\n\n\t\t\twhile (i < _tweens.length) {\n\n\t\t\t\tif (_tweens[i].update(time) || preserve) {\n\t\t\t\t\ti++;\n\t\t\t\t} else {\n\t\t\t\t\t_tweens.splice(i, 1);\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\treturn true;\n\n\t\t}\n\t};\n\n})();\n\n\n// Include a performance.now polyfill\n(function () {\n\t// In node.js, use process.hrtime.\n\tif (this.window === undefined && this.process !== undefined) {\n\t\tTWEEN.now = function () {\n\t\t\tvar time = process.hrtime();\n\n\t\t\t// Convert [seconds, microseconds] to milliseconds.\n\t\t\treturn time[0] * 1000 + time[1] / 1000;\n\t\t};\n\t}\n\t// In a browser, use window.performance.now if it is available.\n\telse if (this.window !== undefined &&\n\t window.performance !== undefined &&\n\t\t window.performance.now !== undefined) {\n\n\t\t// This must be bound, because directly assigning this function\n\t\t// leads to an invocation exception in Chrome.\n\t\tTWEEN.now = window.performance.now.bind(window.performance);\n\t}\n\t// Use Date.now if it is available.\n\telse if (Date.now !== undefined) {\n\t\tTWEEN.now = Date.now;\n\t}\n\t// Otherwise, use 'new Date().getTime()'.\n\telse {\n\t\tTWEEN.now = function () {\n\t\t\treturn new Date().getTime();\n\t\t};\n\t}\n})();\n\n\nTWEEN.Tween = function (object) {\n\n\tvar _object = object;\n\tvar _valuesStart = {};\n\tvar _valuesEnd = {};\n\tvar _valuesStartRepeat = {};\n\tvar _duration = 1000;\n\tvar _repeat = 0;\n\tvar _yoyo = false;\n\tvar _isPlaying = false;\n\tvar _reversed = false;\n\tvar _delayTime = 0;\n\tvar _startTime = null;\n\tvar _easingFunction = TWEEN.Easing.Linear.None;\n\tvar _interpolationFunction = TWEEN.Interpolation.Linear;\n\tvar _chainedTweens = [];\n\tvar _onStartCallback = null;\n\tvar _onStartCallbackFired = false;\n\tvar _onUpdateCallback = null;\n\tvar _onCompleteCallback = null;\n\tvar _onStopCallback = null;\n\n\t// Set all starting values present on the target object\n\tfor (var field in object) {\n\t\t_valuesStart[field] = parseFloat(object[field], 10);\n\t}\n\n\tthis.to = function (properties, duration) {\n\n\t\tif (duration !== undefined) {\n\t\t\t_duration = duration;\n\t\t}\n\n\t\t_valuesEnd = properties;\n\n\t\treturn this;\n\n\t};\n\n\tthis.start = function (time) {\n\n\t\tTWEEN.add(this);\n\n\t\t_isPlaying = true;\n\n\t\t_onStartCallbackFired = false;\n\n\t\t_startTime = time !== undefined ? time : TWEEN.now();\n\t\t_startTime += _delayTime;\n\n\t\tfor (var property in _valuesEnd) {\n\n\t\t\t// Check if an Array was provided as property value\n\t\t\tif (_valuesEnd[property] instanceof Array) {\n\n\t\t\t\tif (_valuesEnd[property].length === 0) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t// Create a local copy of the Array with the start value at the front\n\t\t\t\t_valuesEnd[property] = [_object[property]].concat(_valuesEnd[property]);\n\n\t\t\t}\n\n\t\t\t// If `to()` specifies a property that doesn't exist in the source object,\n\t\t\t// we should not set that property in the object\n\t\t\tif (_valuesStart[property] === undefined) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t_valuesStart[property] = _object[property];\n\n\t\t\tif ((_valuesStart[property] instanceof Array) === false) {\n\t\t\t\t_valuesStart[property] *= 1.0; // Ensures we're using numbers, not strings\n\t\t\t}\n\n\t\t\t_valuesStartRepeat[property] = _valuesStart[property] || 0;\n\n\t\t}\n\n\t\treturn this;\n\n\t};\n\n\tthis.stop = function () {\n\n\t\tif (!_isPlaying) {\n\t\t\treturn this;\n\t\t}\n\n\t\tTWEEN.remove(this);\n\t\t_isPlaying = false;\n\n\t\tif (_onStopCallback !== null) {\n\t\t\t_onStopCallback.call(_object);\n\t\t}\n\n\t\tthis.stopChainedTweens();\n\t\treturn this;\n\n\t};\n\n\tthis.stopChainedTweens = function () {\n\n\t\tfor (var i = 0, numChainedTweens = _chainedTweens.length; i < numChainedTweens; i++) {\n\t\t\t_chainedTweens[i].stop();\n\t\t}\n\n\t};\n\n\tthis.delay = function (amount) {\n\n\t\t_delayTime = amount;\n\t\treturn this;\n\n\t};\n\n\tthis.repeat = function (times) {\n\n\t\t_repeat = times;\n\t\treturn this;\n\n\t};\n\n\tthis.yoyo = function (yoyo) {\n\n\t\t_yoyo = yoyo;\n\t\treturn this;\n\n\t};\n\n\n\tthis.easing = function (easing) {\n\n\t\t_easingFunction = easing;\n\t\treturn this;\n\n\t};\n\n\tthis.interpolation = function (interpolation) {\n\n\t\t_interpolationFunction = interpolation;\n\t\treturn this;\n\n\t};\n\n\tthis.chain = function () {\n\n\t\t_chainedTweens = arguments;\n\t\treturn this;\n\n\t};\n\n\tthis.onStart = function (callback) {\n\n\t\t_onStartCallback = callback;\n\t\treturn this;\n\n\t};\n\n\tthis.onUpdate = function (callback) {\n\n\t\t_onUpdateCallback = callback;\n\t\treturn this;\n\n\t};\n\n\tthis.onComplete = function (callback) {\n\n\t\t_onCompleteCallback = callback;\n\t\treturn this;\n\n\t};\n\n\tthis.onStop = function (callback) {\n\n\t\t_onStopCallback = callback;\n\t\treturn this;\n\n\t};\n\n\tthis.update = function (time) {\n\n\t\tvar property;\n\t\tvar elapsed;\n\t\tvar value;\n\n\t\tif (time < _startTime) {\n\t\t\treturn true;\n\t\t}\n\n\t\tif (_onStartCallbackFired === false) {\n\n\t\t\tif (_onStartCallback !== null) {\n\t\t\t\t_onStartCallback.call(_object);\n\t\t\t}\n\n\t\t\t_onStartCallbackFired = true;\n\n\t\t}\n\n\t\telapsed = (time - _startTime) / _duration;\n\t\telapsed = elapsed > 1 ? 1 : elapsed;\n\n\t\tvalue = _easingFunction(elapsed);\n\n\t\tfor (property in _valuesEnd) {\n\n\t\t\t// Don't update properties that do not exist in the source object\n\t\t\tif (_valuesStart[property] === undefined) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tvar start = _valuesStart[property] || 0;\n\t\t\tvar end = _valuesEnd[property];\n\n\t\t\tif (end instanceof Array) {\n\n\t\t\t\t_object[property] = _interpolationFunction(end, value);\n\n\t\t\t} else {\n\n\t\t\t\t// Parses relative end values with start as base (e.g.: +10, -3)\n\t\t\t\tif (typeof (end) === 'string') {\n\n\t\t\t\t\tif (end.charAt(0) === '+' || end.charAt(0) === '-') {\n\t\t\t\t\t\tend = start + parseFloat(end, 10);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tend = parseFloat(end, 10);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Protect against non numeric properties.\n\t\t\t\tif (typeof (end) === 'number') {\n\t\t\t\t\t_object[property] = start + (end - start) * value;\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\tif (_onUpdateCallback !== null) {\n\t\t\t_onUpdateCallback.call(_object, value);\n\t\t}\n\n\t\tif (elapsed === 1) {\n\n\t\t\tif (_repeat > 0) {\n\n\t\t\t\tif (isFinite(_repeat)) {\n\t\t\t\t\t_repeat--;\n\t\t\t\t}\n\n\t\t\t\t// Reassign starting values, restart by making startTime = now\n\t\t\t\tfor (property in _valuesStartRepeat) {\n\n\t\t\t\t\tif (typeof (_valuesEnd[property]) === 'string') {\n\t\t\t\t\t\t_valuesStartRepeat[property] = _valuesStartRepeat[property] + parseFloat(_valuesEnd[property], 10);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (_yoyo) {\n\t\t\t\t\t\tvar tmp = _valuesStartRepeat[property];\n\n\t\t\t\t\t\t_valuesStartRepeat[property] = _valuesEnd[property];\n\t\t\t\t\t\t_valuesEnd[property] = tmp;\n\t\t\t\t\t}\n\n\t\t\t\t\t_valuesStart[property] = _valuesStartRepeat[property];\n\n\t\t\t\t}\n\n\t\t\t\tif (_yoyo) {\n\t\t\t\t\t_reversed = !_reversed;\n\t\t\t\t}\n\n\t\t\t\t_startTime = time + _delayTime;\n\n\t\t\t\treturn true;\n\n\t\t\t} else {\n\n\t\t\t\tif (_onCompleteCallback !== null) {\n\t\t\t\t\t_onCompleteCallback.call(_object);\n\t\t\t\t}\n\n\t\t\t\tfor (var i = 0, numChainedTweens = _chainedTweens.length; i < numChainedTweens; i++) {\n\t\t\t\t\t// Make the chained tweens start exactly at the time they should,\n\t\t\t\t\t// even if the `update()` method was called way past the duration of the tween\n\t\t\t\t\t_chainedTweens[i].start(_startTime + _duration);\n\t\t\t\t}\n\n\t\t\t\treturn false;\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn true;\n\n\t};\n\n};\n\n\nTWEEN.Easing = {\n\n\tLinear: {\n\n\t\tNone: function (k) {\n\n\t\t\treturn k;\n\n\t\t}\n\n\t},\n\n\tQuadratic: {\n\n\t\tIn: function (k) {\n\n\t\t\treturn k * k;\n\n\t\t},\n\n\t\tOut: function (k) {\n\n\t\t\treturn k * (2 - k);\n\n\t\t},\n\n\t\tInOut: function (k) {\n\n\t\t\tif ((k *= 2) < 1) {\n\t\t\t\treturn 0.5 * k * k;\n\t\t\t}\n\n\t\t\treturn - 0.5 * (--k * (k - 2) - 1);\n\n\t\t}\n\n\t},\n\n\tCubic: {\n\n\t\tIn: function (k) {\n\n\t\t\treturn k * k * k;\n\n\t\t},\n\n\t\tOut: function (k) {\n\n\t\t\treturn --k * k * k + 1;\n\n\t\t},\n\n\t\tInOut: function (k) {\n\n\t\t\tif ((k *= 2) < 1) {\n\t\t\t\treturn 0.5 * k * k * k;\n\t\t\t}\n\n\t\t\treturn 0.5 * ((k -= 2) * k * k + 2);\n\n\t\t}\n\n\t},\n\n\tQuartic: {\n\n\t\tIn: function (k) {\n\n\t\t\treturn k * k * k * k;\n\n\t\t},\n\n\t\tOut: function (k) {\n\n\t\t\treturn 1 - (--k * k * k * k);\n\n\t\t},\n\n\t\tInOut: function (k) {\n\n\t\t\tif ((k *= 2) < 1) {\n\t\t\t\treturn 0.5 * k * k * k * k;\n\t\t\t}\n\n\t\t\treturn - 0.5 * ((k -= 2) * k * k * k - 2);\n\n\t\t}\n\n\t},\n\n\tQuintic: {\n\n\t\tIn: function (k) {\n\n\t\t\treturn k * k * k * k * k;\n\n\t\t},\n\n\t\tOut: function (k) {\n\n\t\t\treturn --k * k * k * k * k + 1;\n\n\t\t},\n\n\t\tInOut: function (k) {\n\n\t\t\tif ((k *= 2) < 1) {\n\t\t\t\treturn 0.5 * k * k * k * k * k;\n\t\t\t}\n\n\t\t\treturn 0.5 * ((k -= 2) * k * k * k * k + 2);\n\n\t\t}\n\n\t},\n\n\tSinusoidal: {\n\n\t\tIn: function (k) {\n\n\t\t\treturn 1 - Math.cos(k * Math.PI / 2);\n\n\t\t},\n\n\t\tOut: function (k) {\n\n\t\t\treturn Math.sin(k * Math.PI / 2);\n\n\t\t},\n\n\t\tInOut: function (k) {\n\n\t\t\treturn 0.5 * (1 - Math.cos(Math.PI * k));\n\n\t\t}\n\n\t},\n\n\tExponential: {\n\n\t\tIn: function (k) {\n\n\t\t\treturn k === 0 ? 0 : Math.pow(1024, k - 1);\n\n\t\t},\n\n\t\tOut: function (k) {\n\n\t\t\treturn k === 1 ? 1 : 1 - Math.pow(2, - 10 * k);\n\n\t\t},\n\n\t\tInOut: function (k) {\n\n\t\t\tif (k === 0) {\n\t\t\t\treturn 0;\n\t\t\t}\n\n\t\t\tif (k === 1) {\n\t\t\t\treturn 1;\n\t\t\t}\n\n\t\t\tif ((k *= 2) < 1) {\n\t\t\t\treturn 0.5 * Math.pow(1024, k - 1);\n\t\t\t}\n\n\t\t\treturn 0.5 * (- Math.pow(2, - 10 * (k - 1)) + 2);\n\n\t\t}\n\n\t},\n\n\tCircular: {\n\n\t\tIn: function (k) {\n\n\t\t\treturn 1 - Math.sqrt(1 - k * k);\n\n\t\t},\n\n\t\tOut: function (k) {\n\n\t\t\treturn Math.sqrt(1 - (--k * k));\n\n\t\t},\n\n\t\tInOut: function (k) {\n\n\t\t\tif ((k *= 2) < 1) {\n\t\t\t\treturn - 0.5 * (Math.sqrt(1 - k * k) - 1);\n\t\t\t}\n\n\t\t\treturn 0.5 * (Math.sqrt(1 - (k -= 2) * k) + 1);\n\n\t\t}\n\n\t},\n\n\tElastic: {\n\n\t\tIn: function (k) {\n\n\t\t\tif (k === 0) {\n\t\t\t\treturn 0;\n\t\t\t}\n\n\t\t\tif (k === 1) {\n\t\t\t\treturn 1;\n\t\t\t}\n\n\t\t\treturn -Math.pow(2, 10 * (k - 1)) * Math.sin((k - 1.1) * 5 * Math.PI);\n\n\t\t},\n\n\t\tOut: function (k) {\n\n\t\t\tif (k === 0) {\n\t\t\t\treturn 0;\n\t\t\t}\n\n\t\t\tif (k === 1) {\n\t\t\t\treturn 1;\n\t\t\t}\n\n\t\t\treturn Math.pow(2, -10 * k) * Math.sin((k - 0.1) * 5 * Math.PI) + 1;\n\n\t\t},\n\n\t\tInOut: function (k) {\n\n\t\t\tif (k === 0) {\n\t\t\t\treturn 0;\n\t\t\t}\n\n\t\t\tif (k === 1) {\n\t\t\t\treturn 1;\n\t\t\t}\n\n\t\t\tk *= 2;\n\n\t\t\tif (k < 1) {\n\t\t\t\treturn -0.5 * Math.pow(2, 10 * (k - 1)) * Math.sin((k - 1.1) * 5 * Math.PI);\n\t\t\t}\n\n\t\t\treturn 0.5 * Math.pow(2, -10 * (k - 1)) * Math.sin((k - 1.1) * 5 * Math.PI) + 1;\n\n\t\t}\n\n\t},\n\n\tBack: {\n\n\t\tIn: function (k) {\n\n\t\t\tvar s = 1.70158;\n\n\t\t\treturn k * k * ((s + 1) * k - s);\n\n\t\t},\n\n\t\tOut: function (k) {\n\n\t\t\tvar s = 1.70158;\n\n\t\t\treturn --k * k * ((s + 1) * k + s) + 1;\n\n\t\t},\n\n\t\tInOut: function (k) {\n\n\t\t\tvar s = 1.70158 * 1.525;\n\n\t\t\tif ((k *= 2) < 1) {\n\t\t\t\treturn 0.5 * (k * k * ((s + 1) * k - s));\n\t\t\t}\n\n\t\t\treturn 0.5 * ((k -= 2) * k * ((s + 1) * k + s) + 2);\n\n\t\t}\n\n\t},\n\n\tBounce: {\n\n\t\tIn: function (k) {\n\n\t\t\treturn 1 - TWEEN.Easing.Bounce.Out(1 - k);\n\n\t\t},\n\n\t\tOut: function (k) {\n\n\t\t\tif (k < (1 / 2.75)) {\n\t\t\t\treturn 7.5625 * k * k;\n\t\t\t} else if (k < (2 / 2.75)) {\n\t\t\t\treturn 7.5625 * (k -= (1.5 / 2.75)) * k + 0.75;\n\t\t\t} else if (k < (2.5 / 2.75)) {\n\t\t\t\treturn 7.5625 * (k -= (2.25 / 2.75)) * k + 0.9375;\n\t\t\t} else {\n\t\t\t\treturn 7.5625 * (k -= (2.625 / 2.75)) * k + 0.984375;\n\t\t\t}\n\n\t\t},\n\n\t\tInOut: function (k) {\n\n\t\t\tif (k < 0.5) {\n\t\t\t\treturn TWEEN.Easing.Bounce.In(k * 2) * 0.5;\n\t\t\t}\n\n\t\t\treturn TWEEN.Easing.Bounce.Out(k * 2 - 1) * 0.5 + 0.5;\n\n\t\t}\n\n\t}\n\n};\n\nTWEEN.Interpolation = {\n\n\tLinear: function (v, k) {\n\n\t\tvar m = v.length - 1;\n\t\tvar f = m * k;\n\t\tvar i = Math.floor(f);\n\t\tvar fn = TWEEN.Interpolation.Utils.Linear;\n\n\t\tif (k < 0) {\n\t\t\treturn fn(v[0], v[1], f);\n\t\t}\n\n\t\tif (k > 1) {\n\t\t\treturn fn(v[m], v[m - 1], m - f);\n\t\t}\n\n\t\treturn fn(v[i], v[i + 1 > m ? m : i + 1], f - i);\n\n\t},\n\n\tBezier: function (v, k) {\n\n\t\tvar b = 0;\n\t\tvar n = v.length - 1;\n\t\tvar pw = Math.pow;\n\t\tvar bn = TWEEN.Interpolation.Utils.Bernstein;\n\n\t\tfor (var i = 0; i <= n; i++) {\n\t\t\tb += pw(1 - k, n - i) * pw(k, i) * v[i] * bn(n, i);\n\t\t}\n\n\t\treturn b;\n\n\t},\n\n\tCatmullRom: function (v, k) {\n\n\t\tvar m = v.length - 1;\n\t\tvar f = m * k;\n\t\tvar i = Math.floor(f);\n\t\tvar fn = TWEEN.Interpolation.Utils.CatmullRom;\n\n\t\tif (v[0] === v[m]) {\n\n\t\t\tif (k < 0) {\n\t\t\t\ti = Math.floor(f = m * (1 + k));\n\t\t\t}\n\n\t\t\treturn fn(v[(i - 1 + m) % m], v[i], v[(i + 1) % m], v[(i + 2) % m], f - i);\n\n\t\t} else {\n\n\t\t\tif (k < 0) {\n\t\t\t\treturn v[0] - (fn(v[0], v[0], v[1], v[1], -f) - v[0]);\n\t\t\t}\n\n\t\t\tif (k > 1) {\n\t\t\t\treturn v[m] - (fn(v[m], v[m], v[m - 1], v[m - 1], f - m) - v[m]);\n\t\t\t}\n\n\t\t\treturn fn(v[i ? i - 1 : 0], v[i], v[m < i + 1 ? m : i + 1], v[m < i + 2 ? m : i + 2], f - i);\n\n\t\t}\n\n\t},\n\n\tUtils: {\n\n\t\tLinear: function (p0, p1, t) {\n\n\t\t\treturn (p1 - p0) * t + p0;\n\n\t\t},\n\n\t\tBernstein: function (n, i) {\n\n\t\t\tvar fc = TWEEN.Interpolation.Utils.Factorial;\n\n\t\t\treturn fc(n) / fc(i) / fc(n - i);\n\n\t\t},\n\n\t\tFactorial: (function () {\n\n\t\t\tvar a = [1];\n\n\t\t\treturn function (n) {\n\n\t\t\t\tvar s = 1;\n\n\t\t\t\tif (a[n]) {\n\t\t\t\t\treturn a[n];\n\t\t\t\t}\n\n\t\t\t\tfor (var i = n; i > 1; i--) {\n\t\t\t\t\ts *= i;\n\t\t\t\t}\n\n\t\t\t\ta[n] = s;\n\t\t\t\treturn s;\n\n\t\t\t};\n\n\t\t})(),\n\n\t\tCatmullRom: function (p0, p1, p2, p3, t) {\n\n\t\t\tvar v0 = (p2 - p0) * 0.5;\n\t\t\tvar v1 = (p3 - p1) * 0.5;\n\t\t\tvar t2 = t * t;\n\t\t\tvar t3 = t * t2;\n\n\t\t\treturn (2 * p1 - 2 * p2 + v0 + v1) * t3 + (- 3 * p1 + 3 * p2 - 2 * v0 - v1) * t2 + v0 * t + p1;\n\n\t\t}\n\n\t}\n\n};\n\n// UMD (Universal Module Definition)\n(function (root) {\n\n\tif (typeof define === 'function' && define.amd) {\n\n\t\t// AMD\n\t\tdefine([], function () {\n\t\t\treturn TWEEN;\n\t\t});\n\n\t} else if (typeof module !== 'undefined' && typeof exports === 'object') {\n\n\t\t// Node.js\n\t\tmodule.exports = TWEEN;\n\n\t} else if (root !== undefined) {\n\n\t\t// Global variable\n\t\troot.TWEEN = TWEEN;\n\n\t}\n\n})(this);\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/tween.js/src/Tween.js\n ** module id = 49\n ** module chunks = 0\n **/"],"sourceRoot":""}