Mr.doob 12 years ago
parent
commit
ad419d40bd
5 changed files with 120 additions and 960 deletions
  1. 1 807
      README.md
  2. 61 93
      build/three.js
  3. 56 58
      build/three.min.js
  4. 1 1
      docs/index.html
  5. 1 1
      src/Three.js

+ 1 - 807
README.md

@@ -66,810 +66,4 @@ If everything went well you should see [this](http://jsfiddle.net/ksRyQ/).
 
 ### Change log ###
 
-
-2013 04 17 - **r58** (411,339 KB, gzip: 97,298 KB)
-
-* Removed `Matrix4`'s ` translate()`, `rotateX()`, `rotateY()`, `rotateZ()` and `rotateByAxis()`. ([mrdoob](http://github.com/mrdoob))
-* Documentation improvements. ([yurifury](http://github.com/yurifury), [tmcw](http://github.com/tmcw), [deepan2k5](http://github.com/deepan2k5), [cjshannon](http://github.com/cjshannon) and [sh0ot1e](http://github.com/sh0ot1e))
-* Improvements to `WebGLRenderer` stable z sorting.([wereHamster](http://github.com/wereHamster) and [mrdoob](http://github.com/mrdoob))
-* Lots of progress in `SceneLoader2` and `SceneExporter2`, now known as `ObjectLoader` and `ObjectExporter`. ([mrdoob](http://github.com/mrdoob))
-* Added morphTargets support to `MeshNormalMaterial`. ([mrdoob](http://github.com/mrdoob))
-* Renamed `Matrix4`'s `extractPosition()` to `copyPosition()`. ([mrdoob](http://github.com/mrdoob))
-* Editor now using localStorage for keeping state. ([mrdoob](http://github.com/mrdoob) and [sole](http://github.com/sole))
-* Added `MaterialLoader` and `MaterialExporter`. ([mrdoob](http://github.com/mrdoob))
-* Renamed `Matrix4`'s `setRotationFrom*()` to `makeRotationFrom*()`. ([bhouston](http://github.com/bhouston))
-* Added `setGeometry()` and `setMaterial()` to `Mesh`. ([mrdoob](http://github.com/mrdoob))
-* Editor primitives can now have the parameters updated at any point. ([mrdoob](http://github.com/mrdoob))
-* Renamed `Matrix4`'s `compose()` to `makeFromPositionQuaternionScale()` and added `makeFromPositionEulerScale()`. ([bhouston](http://github.com/bhouston))
-* Added `rotateOnAxis()` and `translateOnAxis()` to `Object3D`. ([WestLangley](http://github.com/WestLangley))
-* Removed `Matrix4`'s `crossVector()`. ([WestLangley](http://github.com/WestLangley))
-* Added `PLYLoader` (ASCII files). ([menway](http://github.com/menway))
-* Added new `BokehShader2`. ([zz85](http://github.com/zz85))
-* Replaced recursive calls in `PolyhedronGeometry` with an analytical construction of the geometry. ([bhickey](http://github.com/bhickey))
-* Renamed `Object3D`'s `getChildByName()` to `getObjectByName()` and added `getObjectById()`. ([mrdoob](http://github.com/mrdoob))
-* Add `materialOffset` parameter to `GeometryUtils`'s `merge()`. ([tapio](http://github.com/tapio))
-* Now using prototype based `EventDispatcher`. ([mrdoob](http://github.com/mrdoob))
-* Added `linewidth` to `ShaderMaterial`. ([mrdoob](http://github.com/mrdoob))
-* `LOD` support in `Raycaster`. ([mrdoob](http://github.com/mrdoob))
-* Added lights support to `ColladaLoader`. ([mrdoob](http://github.com/mrdoob))
-* Started `WebGLRenderer3`. Aiming to find better solutions for the WebGL layer. ([mrdoob](http://github.com/mrdoob))
-* Optimized the PCF shadow map filtering to use vector comparisons. ([MiiBond](http://github.com/MiiBond))
-* `SoftwareRenderer` now handles color changes at runtime. ([mrdoob](http://github.com/mrdoob))
-* Added `BoxHelper`. ([mrdoob](http://github.com/mrdoob))
-* Removed `setClearColorHex()`, `parameters.clearColor` and `parameters.clearAlpha`. ([mrdoob](http://github.com/mrdoob))
-* Refactored `CameraHelper`. ([mrdoob](http://github.com/mrdoob))
-* Fixed bug in `DirectionalLightHelper` and `SpotLightHelper`. ([mrdoob](http://github.com/mrdoob))
-* Fixed bug in Phong shader when using normal maps with derivative tangents. ([WestLangley](http://github.com/WestLangley))
-* Added support for `FaceColors` to `SoftwareRenderer`.
-* Updated `convert_obj_three.py` docstring with current loader interface. ([wilsaj](http://github.com/wilsaj))
-* Updated `OculusRiftEffect`. Now it should work with the original OculusRift. ([troffmo5](http://github.com/troffmo5))
-* Fixed vertex normals and UVs for `CircleGeometry`. ([WestLangley](http://github.com/WestLangley))
-* Added snapping to the editor. ([arodic](http://github.com/arodic))
-* Fixed `SpotLight`'s `angle` and `SpotlightHelper`'s cone size bug. ([WestLangley](http://github.com/WestLangley))
-* Using `CanvasRenderer` in the editor when there is no WebGL support. ([mrdoob](http://github.com/mrdoob))
-* Update `STLLoader` with [github improvements](https://github.com/blog/1465-stl-file-viewing). ([gero3](http://github.com/gero3))
-* Fixed UVs for faces that straddle the seam in `PolyhedronGeometry`. ([WestLangley](http://github.com/WestLangley))
-* Cleaned up `ArrowHelper`. ([WestLangley](http://github.com/WestLangley))
-* Added `VertexColors` support for `Line` in `CanvasRenderer`. ([gero3](http://github.com/gero3))
-* Fixed `TrackballControls` zoom increment to normalize responsiveness across various inputs. ([protometa](http://github.com/protometa))
-
-
-2013 03 15 - **r57** (403,818 KB, gzip: 96,416 KB)
-
-* Added Renderer panel to the editor. ([mrdoob](http://github.com/mrdoob))
-* Added support for custom attributes to `BufferGeometry`. ([zz85](http://github.com/zz85))
-* `CanvasRenderer` and `SVGRenderer` behave like `WebGLRenderer` with `MeshLambertMaterial` and no lights. ([mrdoob](http://github.com/mrdoob))
-* Added `ColorConverter` in examples folder. ([bhouston](http://github.com/bhouston) and [zz85](http://github.com/zz85))
-* Fixed `SVGRenderer` when autoClear false. ([mrdoob](http://github.com/mrdoob))
-* Made `WebGLRenderer` sorting truly stable. ([wereHamster](http://github.com/wereHamster) and [mrdoob](http://github.com/mrdoob))
-* Improved `Object3D` and `Camera` `lookAt()`. ([WestLangley](http://github.com/WestLangley))
-* Added `RingGeometry`. ([merpnderp](http://github.com/merpnderp))
-* Made `OBJLoader` and `OBJMTLLoader` more robust. ([mrdoob](http://github.com/mrdoob))
-* Added pan to `OrbitControls`. ([WestLangley](http://github.com/WestLangley) and [mrdoob](http://github.com/mrdoob))
-* Added `.getColumnFromMatrix()` to `Vector3`. ([WestLangley](http://github.com/WestLangley))
-* Renamed `Object3D` `properties` to `userData`. ([mrdoob](http://github.com/mrdoob))
-* Simplified `PointLightHelper`, `DirectionalLightHelper`, `SpotLightHelper` and `HemisphereLightHelper`. ([mrdoob](http://github.com/mrdoob))
-* Added `GridHelper`. ([mrdoob](http://github.com/mrdoob))
-* Added `.clone()` method to `AmbientLight`, `PointLight`, `DirectionalLight`, `SpotLight` and `HemisphereLight`. ([mrdoob](http://github.com/mrdoob))
-
-
-2013 02 15 - **r56** (408,927 KB, gzip: 97,095 KB)
-
-* Added `LineDashedMaterial` support to `CanvasRenderer`. ([sole](http://github.com/sole))
-* Documentation improvements. ([gero3](http://github.com/gero3), [erich666](http://github.com/erich666), [Stompfrog](http://github.com/Stompfrog), [morenoh149](http://github.com/morenoh149), [chrmoritz](http://github.com/chrmoritz) and [mrdoob](http://github.com/mrdoob))
-* Added `Matrix3.getNormalMatrix()` and `Vector3.transformDirection()`. ([WestLangley](http://github.com/WestLangley))
-* Added [generator](https://github.com/mrdoob/three.js/blob/master/utils/sublime.py) for [Sublime Text 2 completion file](https://github.com/mrdoob/three.js/tree/master/utils/editors/sublimetext2). ([mrdoob](http://github.com/mrdoob))
-* Removed `Matrix4`'s `getPosition()` and `getColumn*()`. ([mrdoob](http://github.com/mrdoob) and [bhouston](http://github.com/bhouston))
-* [Blender exporter](https://github.com/mrdoob/three.js/tree/master/utils/exporters/blender) improvements. ([migvel](http://github.com/migvel))
-* Added `Vector*.toArray()`. ([mrdoob](http://github.com/mrdoob))
-* Added [Maya exporter](https://github.com/mrdoob/three.js/tree/master/utils/exporters/maya) for JSON format. ([etic](http://github.com/etic))
-* Improvements to `FlyControls`. ([WestLangley](http://github.com/WestLangley))
-* Improvements to `OBJLoader` and `OBJMTLLoader`. ([edwardsp](http://github.com/edwardsp) and [Fktrcfylh](http://github.com/Fktrcfylh))
-* Added `.reflect()`, `projectOnVector()` and `projectOnPlane()` to `Vector3`. ([bhouston](http://github.com/bhouston))
-* Added `OculusRiftEffect`. ([troffmo5](http://github.com/troffmo5))
-* Fixed loading of JSON format 2.0 files in the editor.  ([mrdoob](http://github.com/mrdoob) and [drewnoakes](http://github.com/drewnoakes))
-* Added `setHSL()` and `getHSL()` to `Color`.  ([pksunkara](http://github.com/pksunkara) and [mrdoob](http://github.com/mrdoob))
-* Added binary files support to `STLLoader`.  ([aleeper](http://github.com/aleeper))
-* Removed `setHSV()`, `getHSV()` from `Color`. ([mrdoob](http://github.com/mrdoob))
-* Replaced `ColorUtils.adjustHSV()` with `Color`'s `.offsetHSL()`. ([mrdoob](http://github.com/mrdoob))
-* Added `Line3`. ([bhouston](http://github.com/bhouston))
-* Added `linewidth` support to `BufferGeometry` lines. ([arodic](http://github.com/arodic))
-* Renamed `Box3`/`Line3`/`Plane`/`Ray`/`Sphere`'s `.transform()` to `applyMatrix4()`. ([bhouston](http://github.com/bhouston))
-* Added `smoothstep` and `smootherstep` to `Math`. ([bhouston](http://github.com/bhouston))
-* Improvements to the editor. ([drewnoakes](http://github.com/drewnoakes))
-* Added `.reset()` to `TrackballControls`. ([WestLangley](http://github.com/WestLangley))
-* Added two edge detection shader effects. ([zz85](http://github.com/zz85))
-* Unit conversion handling in`ColladaLoader`. ([jihoonl](http://github.com/jihoonl))
-
-
-2013 01 15 - **r55** (406,462 KB, gzip: 96,542 KB)
-
-* Added `set()`, `identity()`, `copy()`, `multiplyScalar()`, `determinant()`, `getInverse()` and `clone()` to `Matrix3`. ([bhouston](http://github.com/bhouston))
-* Added a refactored `WebGLRenderer` under the `WebGLRenderer2` name (may become `WebGLRenderer` next release). ([gero3](http://github.com/gero3))
-* Optimised `Matrix4`'s `determinant()`. ([bhouston](http://github.com/bhouston))
-* Added `negate()` to `Plane`. ([bhouston](http://github.com/bhouston))
-* Added `containsPoint()` and `intersectsObject()` to `Frustum`. ([bhouston](http://github.com/bhouston))
-* Fixed `MeshNormalMaterial` rendering in `CanvasRenderer` and `SVGRenderer`. ([mrdoob](http://github.com/mrdoob))
-* Moved `Matrix*/Quaternion`'s `multiply*` to `Vector*`'s `.apply*`. ([mrdoob](http://github.com/mrdoob))
-* Added `MeshNormalMaterial` with `SmoothShading` support to `CanvasRenderer`. ([mrdoob](http://github.com/mrdoob))
-* Added `Edit / Clone` to the editor. ([mrdoob](http://github.com/mrdoob))
-* Fixes to `ArrowHelper`. ([bhouston](http://github.com/bhouston) and [WestLangley](http://github.com/WestLangley))
-* Improved `Geometry`'s `mergeVertices()`. ([bhouston](http://github.com/bhouston))
-* Improved `LatheGeometry`. ([bhouston](http://github.com/bhouston) and [WestLangley](http://github.com/WestLangley))
-* Added `insertPass` to `EffectComposer`. ([alteredq](http://github.com/alteredq))
-* Added support for `BufferGeometry` support to `Line`. ([arodic](http://github.com/arodic))
-* Added `intersectsSphere` to `Sphere`. ([Fox32](http://github.com/Fox32))
-* Added Tone Mapping to `WebGLDeferredRenderer`. ([alteredq](http://github.com/alteredq))
-* Made `updateMorphTargets` a public method of `Mesh`. ([jonobr1](http://github.com/jonobr1))
-* Added `add()`, `addColors()`, `addScalar()`, `multiply()` and `multiplyScalar()` to `Color`. ([mrdoob](http://github.com/mrdoob))
-* Renamed `Vector*/Matrix*/Quaternion`'s `add()/sub()/cross()...` to `addVectors()/subVectors()/crossVectors()...`. ([mrdoob](http://github.com/mrdoob))
-* Renamed `Vector*/Matrix*/Quaternion`'s `addSelf()/subSelf()/crossSelf()...` to `add()/sub()/cross()...`. ([mrdoob](http://github.com/mrdoob))
-* Moved `GeometryUtils`'s `explode()` and `tessellate()` to `ExplodeModifier` and `TessellateModifier`. ([mrdoob](http://github.com/mrdoob))
-* Moved `BinaryLoader` out of the lib to examples folder. ([mrdoob](http://github.com/mrdoob))
-* Added `OBJExporter`. ([mrdoob](http://github.com/mrdoob))
-* Implemented pinch gesture to `TrackballControls`. ([ericnoble](http://github.com/ericnoble) and [mrdoob](http://github.com/mrdoob))
-* Firefox support in `OrbitControls`.. ([mrdoob](http://github.com/mrdoob))
-* Added zbuffer to `SoftwareRenderer` and started adding material handling. ([rygorous](http://github.com/rygorous) and [mrdoob](http://github.com/mrdoob))
-* Moved `CanvasRenderer/SVGRenderer` x/y clipping to `Projector`. ([mrdoob](http://github.com/mrdoob))
-* Added `applyEuler()` and `applyAxisAngle()` in `Vector3`. ([WestLangley](http://github.com/WestLangley))
-* Improvements to `FirstPersonControls`. ([RommelVR](http://github.com/RommelVR))
-
-
-
-2012 12 25 - **r54** (411,352 KB, gzip: 98,639 KB)
-
-* Added nodejs, perl, python and ruby based localhost server. ([zz85](http://github.com/zz85))
-* Added support for alphaTest to `Sprite`. ([alteredq](http://github.com/alteredq))
-* Added `WebGLDeferredRenderer` with all sorts of goodness. ([mpanknin](http://github.com/mpanknin) and [alteredq](http://github.com/alteredq))
-* Changed `Sprite` to use `SpriteMaterial` instead of custom object. ([alteredq](http://github.com/alteredq))
-* Added `sourcemap` option to python and nodejs build systems. ([zz85](http://github.com/zz85) and [gero3](http://github.com/gero3))
-* Non-indexed `BufferGeometry`. ([benaadams](http://github.com/benaadams))
-* Added support for loading cubemap DDS textures. ([MiiBond](http://github.com/MiiBond))
-* Added manual mipmapping support to `Texture` and `DataTexture`. ([benaadams](http://github.com/benaadams) and [alteredq](http://github.com/alteredq))
-* Added style strings support `Color`. ([mrdoob](http://github.com/mrdoob))
-* Added new fbx converter. ([zfedoran](http://github.com/zfedoran))
-* Improvements to `SceneLoader`. ([RommelVR](http://github.com/RommelVR) and [alteredq](http://github.com/alteredq))
-* Added `Plane` class and implemented in `Frustum`. ([bhouston](http://github.com/bhouston))
-* Added `Box3`, `Sphere` math classes and implemented in `Geometry`. ([bhouston](http://github.com/bhouston))
-* Added bilinear filtered shadow map. ([MiiBond](http://github.com/MiiBond))
-* Added test framework. ([bhouston](http://github.com/bhouston))
-* Replaced `UV` with `Vector2`. ([mrdoob](http://github.com/mrdoob))
-* Renamed `Ray` to `Raycaster` and added new `Ray` math class. ([bhouston](http://github.com/bhouston))
-* Improvements to `CSS3DRenderer`. ([mrdoob](http://github.com/mrdoob), [benaadams](http://github.com/benaadams) and [zz85](http://github.com/zz85))
-* Implemented `.dispose()` to `Geometry`, `BufferGeometry`, `Texture`, `Material` and `WebGLRenderTarget` for deallocating from GPU. ([mrdoob](http://github.com/mrdoob) and [alteredq](http://github.com/alteredq))
-* Moved `SubdivisionModifier` out of the build to `examples/js/modifiers`. ([mrdoob](http://github.com/mrdoob))
-* Improvements to `ColladaLoader`. ([dgossow](http://github.com/dgossow))
-* Added Blender 2.65 exporter. ([tapio](http://github.com/tapio))
-* Added `.setMaterialIndex()` to `GeometryUtils`. ([gero3](http://github.com/gero3))
-* Added benchmark framework. ([bhouston](http://github.com/bhouston))
-* Fixed Blender scene exporter rotations. ([alteredq](http://github.com/alteredq) and [WestLangley](http://github.com/WestLangley))
-* Added `devicePixelRatio` support to `CanvasRenderer` and `WebGLRenderer`. ([mrdoob](http://github.com/mrdoob))
-
-
-2012 11 15 - **r53** (392,799 KB, gzip: 96,044 KB)
-
-* Lots of improvements to [editor](http://threejs.org/editor/). Including possibility to export geometry and scene. ([alteredq](http://github.com/alteredq) and [mrdoob](http://github.com/mrdoob))
-* `Sprite` no longer gets its size from the texture. ([alteredq](http://github.com/alteredq) and [mrdoob](http://github.com/mrdoob))
-* Improved `CSS3DRenderer`. ([mrdoob](http://github.com/mrdoob) and [alteredq](http://github.com/alteredq))
-* Added support for vertex normals in `Ribbon`. ([alteredq](http://github.com/alteredq))
-* `Object3D`'s `.clone()` is now recursive. ([mrdoob](http://github.com/mrdoob))
-* Added support for fog in `Sprite`. ([alteredq](http://github.com/alteredq))
-* Scene format now supports nested lights, cameras and SkinnedMesh, OBJ, VTK, STL, UTF8 and Collada files. ([alteredq](http://github.com/alteredq))
-* `Object3D`'s `.lookAt()` now working when using quaternions. ([motin](http://github.com/motin))
-* Added touch support to `TrackballControls`. ([mrdoob](http://github.com/mrdoob))
-* Object sorting in `WebGLRenderer` is now stable, regardless of browser implementation. ([alteredq](http://github.com/alteredq))
-* `MeshPhongMaterial`'s `perPixel` is not `true` by default. ([alteredq](http://github.com/alteredq))
-* Added `LineDashedMaterial`. ([alteredq](http://github.com/alteredq))
-* Added `.setContextStyle` to `Color`. ([greyscales](http://github.com/greyscales))
-* Corrected normal matrix calculations. ([WestLangley](http://github.com/WestLangley))
-* Added `KaleidoShader`, `MirrorShader` and `RGBShiftShader`. ([felixturner](http://github.com/felixturner))
-* Added area weighted vertex normals computation to `Geometry`. ([alteredq](http://github.com/alteredq))
-* Moved geometry.materials to `MeshFaceMaterial`. ([gero3](http://github.com/gero3), [alteredq](http://github.com/alteredq) and [mrdoob](http://github.com/mrdoob))
-* Removed `materials` and `sides` from `CubeGeometry`. ([mrdoob](http://github.com/mrdoob))
-* Move `GeometryUtils`'s `.clone()` to `Geometry`. ([mrdoob](http://github.com/mrdoob))
-
-
-2012 10 15 - **r52** (379,442 KB, gzip: 94,126 KB)
-
-* New node.js build system. ([gero3](http://github.com/gero3))
-* Proper edge handling in `SubdivisionModifier`. ([zz85](http://github.com/zz85))
-* Added `defines` parameter for adding preprocessor definitions to `ShaderMaterial`. ([alteredq](http://github.com/alteredq))
-* Split `ShaderExtras` into single files (`BasicShader`, `BlendShader`, `ConvolutionShader`, ... ). ([mrdoob](http://github.com/mrdoob))
-* Added `HueSaturationShader` and `BrightnessContrastShader`. ([tapio](http://github.com/tapio))
-* Fixed `ColladaLoader` not loading sometimes. ([tapio](http://github.com/tapio))
-* Added `material.vertexColors = THREE.FaceColor` support to `CanvasRenderer` and `SVGRenderer`. ([mrdoob](http://github.com/mrdoob))
-* Added `Object3D.defaultEulerOrder`. ([mrdoob](http://github.com/mrdoob))
-* Replaced `SceneUtils.traverseHierarchy` and `SceneUtils.showHierarchy` with `object.traverse`. ([mrdoob](http://github.com/mrdoob))
-* Added `PointerLockControls`. ([mrdoob](http://github.com/mrdoob))
-* Completed more [documentation](http://threejs.org/docs/) pages. ([sole](http://github.com/sole))
-* Split `SceneUtils.cloneObject` into `*.clone()`. ([mrdoob](http://github.com/mrdoob))
-* Simplified `AxisHelper`. ([mrdoob](http://github.com/mrdoob))
-* Added `GeometryExporter`. ([mrdoob](http://github.com/mrdoob))
-* Improved `OrbitControls`. ([WestLangley](http://github.com/WestLangley))
-* Added `GeometryLibrary`, `MaterialLibrary`, `TextureLibrary` and `ObjectLibrary` (bear in mind that you can't rely on the GC now. Call `*.deallocate()` for removing). ([mrdoob](http://github.com/mrdoob))
-* Moved `*Controls` out of the lib. ([mrdoob](http://github.com/mrdoob))
-* Fixed shadows getting animated when skinning / morphing was disabled. ([alteredq](http://github.com/alteredq))
-* Added `Manual` section to the [documentation](http://threejs.org/docs/) pages. ([oal](http://github.com/oal))
-* Added `.angleTo()` to `Vector3`. ([Wilt](http://github.com/Wilt))
-* Many improvements to the [editor](http://threejs.org/editor/). ([mrdoob](http://github.com/mrdoob) and [alteredq](http://github.com/alteredq))
-
-
-2012 09 15 - **r51** (405,491 KB, gzip: 99,389 KB)
-
-* Added `STLLoader`. ([aleeper](http://github.com/aleeper) and [mrdoob](http://github.com/mrdoob))
-* Optimised `Ray` (2x faster). ([gero3](http://github.com/gero3))
-* Added `.getDescendants` method to `Object3D`. ([gero3](http://github.com/gero3) and [mrdoob](http://github.com/mrdoob))
-* `SkinnedMesh` can now work with `MorphAnimMesh`. ([apendua](http://github.com/apendua))
-* Changed `CameraHelper`. Now it matches the camera independently of where it's in the scene graph. ([mrdoob](http://github.com/mrdoob))
-* Removed the need for manually setting texture units with `ShaderMaterial`. ([alteredq](http://github.com/alteredq))
-* Added `HemisphereLight`. ([alteredq](http://github.com/alteredq))
-* Fixed `WebGLRenderer` handling of flip sided materials. ([WestLangley](http://github.com/WestLangley) and [alteredq](http://github.com/alteredq))
-* Added support to normals maps in `MeshPhongMaterial`. ([crobi](http://github.com/crobi) and [alteredq](http://github.com/alteredq))
-* Added handling of `BufferGeometry` for `ParticleSystems`. ([alteredq](http://github.com/alteredq))
-* Added support for compressed textures and cube maps to `WebGLRenderer`. ([alteredq](http://github.com/alteredq))
-* Outliner and Material panel improvements to the [editor](http://threejs.org/editor/). ([mrdoob](http://github.com/mrdoob))
-* Added material.emissive support to `CanvasRenderer` and `SVGRenderer`. ([mrdoob](http://github.com/mrdoob))
-* Added handling of multiple UV layers and anisotropy to Blender exporter. ([alteredq](http://github.com/alteredq))
-* Handling bump and anisotropy in `Loader` and `SceneLoader`. ([alteredq](http://github.com/alteredq))
-* Added mousewheel support to `TrackballControls`. ([jherrm](http://github.com/jherrm))
-* Added `MTLLoader` and `OBJMTLLoader`. ([angelxuanchang](http://github.com/angelxuanchang))
-* Updated `UTF8Loader` to latest version. ([angelxuanchang](http://github.com/angelxuanchang) and [alteredq](http://github.com/alteredq))
-* Pluginized `SceneLoader`. ([alteredq](http://github.com/alteredq))
-* Added support of `object.renderDepth` in `Projector`. ([mrdoob](http://github.com/mrdoob))
-* Made build system more flexible. ([mrdoob](http://github.com/mrdoob))
-* Many enhancements to `SceneLoader`. ([alteredq](http://github.com/alteredq))
-* Experimenting with `CSS3DRenderer`. ([mrdoob](http://github.com/mrdoob))
-* Added `ShapeGeometry`. ([jonobr1](http://github.com/jonobr1))
-* Fixes to `Vector3`'s `.setEulerFromRotationMatrix` method.([WestLangley](http://github.com/WestLangley))
-
-
-2012 08 15 - **r50** (391,250 KB, gzip: 96,143 KB)
-
-* Experimenting with [SoftwareRenderer](http://pouet.net/topic.php?which=8760&page=1). ([mrdoob](http://github.com/mrdoob) and [rygorous](http://github.com/rygorous))
-* Improved rotation conversion routines. ([WestLangley](http://github.com/WestLangley))
-* Moved `DOMRenderer` and `SVGRenderer` out of common build. ([mrdoob](http://github.com/mrdoob))
-* Improvements to Morph targets. ([alteredq](http://github.com/alteredq) and [gero3](http://github.com/gero3))
-* Added `.deallocateMaterial` method to `WebGLRenderer`. ([alteredq](http://github.com/alteredq))
-* Added `.worldToLocal` and `.localToWorld` methods to `Object3D`. ([zz85](http://github.com/zz85) and [WestLangley](http://github.com/WestLangley))
-* Added `ConvexGeometry`. ([qiao](http://github.com/qiao))
-* Added node.js build system. ([gero3](http://github.com/gero3))
-* Improvements to Blender exporter. ([timbot](http://github.com/timbot) and [alteredq](http://github.com/alteredq))
-* Added uvs and vertex colors support to `ImmediateRenderObjects`. ([alteredq](http://github.com/alteredq))
-* Started implementing `LoadingMonitor` and `EventTarget` in loaders. ([mrdoob](http://github.com/mrdoob))
-* Added `Path.ellipse`. ([linzhp](http://github.com/linzhp))
-* Added `near` and `far` properties to `Ray`. ([niklassa](http://github.com/niklassa))
-* Added `OrbitControls`. ([qiao](http://github.com/qiao), [mrdoob](http://github.com/mrdoob) and [alteredq](http://github.com/alteredq))
-* Completed some more documentation pages. ([mrdoob](http://github.com/mrdoob), [phenomnomnominal](http://github.com/phenomnomnominal), [FuzzYspo0N](http://github.com/FuzzYspo0N), [poeschko](http://github.com/poeschko), [wwwtyro](http://github.com/wwwtyro), [maximeq](http://github.com/maximeq) and [alteredq](http://github.com/alteredq))
-* Completed lots more documentation pages. ([sole](http://github.com/sole))
-* Started reworking [GUI](http://threejs.org/gui/). ([mrdoob](http://github.com/mrdoob))
-* Improved python build system. ([gero3](http://github.com/gero3))
-* Made `VTKLoader` parsing more robust. ([mrdoob](http://github.com/mrdoob))
-* Added `recursive` flag to `Ray`. ([mrdoob](http://github.com/mrdoob))
-* Handling resizes properly in controls and examples. ([alteredq](http://github.com/alteredq))
-* Improvements to ColladaLoader. ([spacecookies](http://github.com/spacecookies))
-* Unflipped V coordinate across the whole library. ([mrdoob](http://github.com/mrdoob) and [alteredq](http://github.com/alteredq))
-* Refactored `BufferGeometry`. ([alteredq](http://github.com/alteredq))
-* Improved GL extensions initialisation in `WebGLRenderer`. ([alteredq](http://github.com/alteredq))
-* Rescued `SkinnedMesh`. ([n3tfr34k](http://github.com/n3tfr34k) and [alteredq](http://github.com/alteredq))
-* Made `OBJLoader` parsing more robust. ([Dahie](http://github.com/Dahie))
-* Implemented skinning via floating point textures. ([alteredq](http://github.com/alteredq))
-* Improved documentation system. ([mrdoob](http://github.com/mrdoob) and [alteredq](http://github.com/alteredq))
-* Added support for anisotropic texture filtering and standard derivatives in `WebGLRenderer`. ([alteredq](http://github.com/alteredq))
-* Added support for `ParticleBasicMaterial` without `map` in `CanvasRenderer`. ([mrdoob](http://github.com/mrdoob))
-* `SceneLoader` now supports nested scene graphs and per object custom properties. ([skfcz](http://github.com/skfcz))
-* `Camera` doesn't need to be added to the scene anymore. ([mrdoob](http://github.com/mrdoob))
-* `Object3D`'s `flipSided` and `doubleSided` properties are now `Material`'s `side` property. ([alteredq](http://github.com/alteredq) and [mrdoob](http://github.com/mrdoob))
-* Added `.clone` method to `*Material`. ([gero3](http://github.com/gero3), [mrdoob](http://github.com/mrdoob) and [alteredq](http://github.com/alteredq))
-* [IEWEBGL](http://iewebgl.com/Engines.aspx#ThreeJS) support. ([iewebgl](http://github.com/iewebgl) and [mrdoob](http://github.com/mrdoob))
-* Added `CircleGeometry`. ([hughes](http://github.com/hughes))
-* Added `bumpMap` to `MeshPhongMaterial`. ([alteredq](http://github.com/alteredq))
-* Added `specularMap` to `MeshBasicMaterial`, `MeshLambertMaterial` and `MeshPhongMaterial`. ([alteredq](http://github.com/alteredq))
-* Reworked python build system. ([mrdoob](http://github.com/mrdoob))
-
-
-2012 04 22 - **r49** (364,242 KB, gzip: 89,057 KB)
-
-* Yet more `ColladaLoader` improvements. ([ekitson](http://github.com/ekitson), [AddictArts](http://github.com/AddictArts) and [pblasco](http://github.com/pblasco))
-* Created documentation system. ([mrdoob](http://github.com/mrdoob))
-* Added some documentation. ([mrdoob](http://github.com/mrdoob) and [sole](http://github.com/sole))
-* Added `MorphBlendMesh`. ([alteredq](http://github.com/alteredq))
-* Added `emissive` component to WebGL Materials. ([alteredq](http://github.com/alteredq))
-* Added `DepthPassPlugin`. ([alteredq](http://github.com/alteredq))
-* Improvements to `Path`. ([asutherland](http://github.com/asutherland))
-* Improvements to `Curve`. ([zz85](http://github.com/zz85))
-* Added `ArrowHelper`. ([zz85](http://github.com/zz85) and [WestLangley](http://github.com/WestLangley))
-* Changed depth sorting in `WebGLRenderer` to use world positions. ([alteredq](http://github.com/alteredq))
-* Improved physically based shading in `WebGLRenderer`. ([WestLangley](http://github.com/WestLangley))
-* Changed depth sorting in `Projector` to use world positions. ([mrdoob](http://github.com/mrdoob))
-* Added physical specular term also to normal map shader. ([alteredq](http://github.com/alteredq))
-* Added `TubeGeometry`. ([zz85](http://github.com/zz85) and [WestLangley](http://github.com/WestLangley))
-* Added `needsUpdate` flag to `Material`. ([alteredq](http://github.com/alteredq))
-* Fixed `GeometryUtils.triangulateQuads`. ([alteredq](http://github.com/alteredq))
-* Improvements to `GeometryUtils.tessellate`. ([alteredq](http://github.com/alteredq))
-* Change `PlaneGeometry` from XY to XZ. ([mrdoob](http://github.com/mrdoob))
-* `WebGLRenderer` back to `highp` shader precision. ([mrdoob](http://github.com/mrdoob))
-* Added `deallocateRenderTarget` to `WebGLRenderer. ([kovleouf](http://github.com/kovleouf))
-* Support zIndex and scale into `DOMRenderer`. ([ajorkowski](http://github.com/ajorkowski))
-* Improvements to `CameraHelper`. ([zz85](http://github.com/zz85))
-* Added 3D spline path extrusion support to `ExtrudeGeometry`. ([zz85](http://github.com/zz85))
-* `MarchingCubes` moved out of the lib into `/examples/js` folder. ([alteredq](http://github.com/alteredq))
-* Added `ImmediateRenderObject`. ([alteredq](http://github.com/alteredq))
-* Renamed `__dirty*` to `*NeedUpdate`. ([valette](http://github.com/valette) and [mrdoob](http://github.com/mrdoob))
-* Added `CustomBlending` to `Material` and `premultiplyAlpha` to `Texture`.  ([alteredq](http://github.com/alteredq))
-* Improvements to `CubeCamera`. ([alteredq](http://github.com/alteredq) and [mrdoob](http://github.com/mrdoob))
-* `CanvasRenderer.setClearColor()` and `.setClearColorHex()` now sets `opacity` to 1 when null. ([mrdoob](http://github.com/mrdoob))
-* Fixed broken UVs in `SubdivisionModifier`. ([zz85](http://github.com/zz85))
-* Renamed `Matrix4`'s `setTranslation`, `setRotationX`, `setRotationY`, `setRotationZ`, `setRotationAxis` and `setScale` to `makeTranslation`, `makeRotationX`, `makeRotationY`, `makeRotationZ`, `makeRotationAxis` and `makeScale`. ([mrdoob](http://github.com/mrdoob))
-* `Matrix4` static methods `makeFrustum`, `makePerspective`, `makeOrtho` to non-static methods. ([mrdoob](http://github.com/mrdoob))
-* Refactore handling of `Matrix4` to `Matrix3` inversion. ([alteredq](http://github.com/alteredq))
-* Added `GodRays` postprocessing. ([huwb](http://github.com/huwb))
-* Added `LinePieces` support to `Projector`. ([mrdoob](http://github.com/mrdoob))
-* Fixed UVs handling bug in `GeometryUtils.tessellate`. ([alteredq](http://github.com/alteredq))
-* Serious performance improvements to `Matrix4`, `Matrix3` and `Frustum`. ([gero3](http://github.com/gero3))
-* Fixes to `LatheGeometry`. ([zz85](http://github.com/zz85))
-* Removed `Vertex`. Use `Vector3` instead. ([mrdoob](http://github.com/mrdoob))
-* Implemented real `Spotlight`s. ([alteredq](http://github.com/alteredq))
-* Added `ParametricGeometry`. ([zz85](http://github.com/zz85))
-* Added basic `OBJLoader` in `/examples/js/loaders` folder. ([mrdoob](http://github.com/mrdoob))
-* Moved `ColladaLoader` and `UTF8Loader` to `/examples/js/loaders` folder. ([mrdoob](http://github.com/mrdoob))
-* Added `VTKLoader` to `/examples/js/loaders` folder. ([valette](http://github.com/valette) and [mrdoob](http://github.com/mrdoob))
-* Blender exporter now supports linked groups. ([Druidhawk](http://github.com/Druidhawk))
-* Added `visible` property to `Material`. ([mrdoob](http://github.com/mrdoob))
-* Removed Lamber+Texture support in `CanvasRenderer`. ([mrdoob](http://github.com/mrdoob))
-* Fixed normals in `CylinderGeometry`. ([qiao](http://github.com/qiao))
-* Added floating point textures support to `WebGLRenderer`. ([mrdoob](http://github.com/mrdoob))
-* Renamed `AnaglyphWebGLRenderer` and co. to `AnaglyphEffect` & co. and moved to `/examples/js/effects`. ([mrdoob](http://github.com/mrdoob))
-* Improvements to documentation system. ([mrdoob](http://github.com/mrdoob) and [codler](http://github.com/codler))
-* Added `AsciiEffect`. ([zz85](http://github.com/zz85))
-
-
-2012 03 04 - **r48** (393,626 KB, gzip: 99,395 KB)
-
-* Added camera support to `ColladaLoader`. ([jbaicoianu](http://github.com/jbaicoianu))
-* More `ColladaLoader` improvements. ([mrdoob](http://github.com/mrdoob), [AddictArts](http://github.com/AddictArts), [kduong](http://github.com/kduong))
-* Updated `IcosahedronGeometry` and `OctahedronGeometry` with [timothypratley](http://github.com/timothypratley)'s `PolyhedronGeometry` code which also brings `TetrahedronGeometry`. ([mrdoob](http://github.com/mrdoob))
-* `LOD` should now behave as expected from anywhere in the scene graph. ([mrdoob](http://github.com/mrdoob))
-* Added `THREE.REVISION`. ([mrdoob](http://github.com/mrdoob))
-* Fixed cancelRequestAnimationFrame polyfill. ([also](http://github.com/also))
-* Improvements to convert_obj_three.py. ([alteredq](http://github.com/alteredq))
-* Fixes to `Geometry`'s `.computeBoundingBox` and `.computeBoundingSphere`. ([alteredq](http://github.com/alteredq))
-* Refactored ShadowMap shader. ([alteredq](http://github.com/alteredq))
-* Fixed handling of meshes with multiple materials in `SceneLoader`. ([alteredq](http://github.com/alteredq))
-* Changed `Material`'s default ambient color to 0xffffff. ([alteredq](http://github.com/alteredq))
-* Added normals support to `MorphTarget`. ([alteredq](http://github.com/alteredq))
-* Added `.setFrameRange` and `.setAnimationLabel` to `MorphAnimMesh`. ([alteredq](http://github.com/alteredq))
-* Added handling of named animation sequences to `MorphAnimMesh`. ([alteredq](http://github.com/alteredq))
-* Extended `MorphAnimMesh` to be able to play animations backwards. ([alteredq](http://github.com/alteredq))
-* Added `.generateDataTexture` to `ImageUtils`. ([alteredq](http://github.com/alteredq))
-* Removed hierarchy support and `.intersectScene()` from `Ray`. ([mrdoob](http://github.com/mrdoob))
-* Added `.triangulateQuads` to `GeometryUtils`. ([alteredq](http://github.com/alteredq))
-* `Projector` and `WebGLRenderer` now handles doubleSided lighting properly. ([mrdoob](http://github.com/mrdoob) and [alteredq](http://github.com/alteredq))
-* Fixed `MorphAnimMesh` playback bug where the last frame didn't display. ([alteredq](http://github.com/alteredq))
-* `TrackballControls` implements `EventTarget`. ([mrdoob](http://github.com/mrdoob))
-* Added `.clone` to `Vertex`, `Face3` and `Face4`. ([alteredq](http://github.com/alteredq))
-* Added `.explode` and `.tessellate` to `GeometryUtils`. ([alteredq](http://github.com/alteredq))
-* Added `.lerpSelf` to `Vector2`, `Vector3` and `UV`. ([alteredq](http://github.com/alteredq))
-* Fixed `DOMRenderer` by using single-materials. ([ajorkowski ](http://github.com/ajorkowski ))
-* Added `.setPrecision` to `Ray`. ([mrdoob](http://github.com/mrdoob))
-* Blender exporter now honors the "Flip YZ" option. ([rectalogic](http://github.com/rectalogic))
-* Added `NoBlending` to `Material` and `WebGLRenderer`. ([kovleouf](http://github.com/kovleouf))
-* Added `.applyMatrix` to `Object3D`. ([mrdoob](http://github.com/mrdoob) and [alteredq](http://github.com/alteredq))
-* Added `.attach` and `.detach` to `SceneUtils` to retain position in space. ([alteredq](http://github.com/alteredq))
-* Added `.sign` to `Math`. ([alteredq](http://github.com/alteredq))
-* Implemented sphinx based documentation. ([ivankuzev](http://github.com/ivankuzev))
-* Documented part of the API. ([ivankuzev](http://github.com/ivankuzev) and [alteredq](http://github.com/alteredq))
-* Replaced sphinx based documentation with compilation-less sytem. ([mrdoob](http://github.com/mrdoob))
-* Added default material to `Mesh`, `Line` and `ParticleSystem`. ([mrdoob](http://github.com/mrdoob))
-
-
-2012 01 14 - **r47** (378,169 KB, gzip: 96,015 KB)
-
-* Resurrected lens flares as custom `WebGLRenderer` plugin. ([alteredq](http://github.com/alteredq))
-* Fixed typos in `Matrix4`'s `transpose()` and `getInverse()`. ([ekitson](http://github.com/ekitson))
-* "Pluginized" Sprites and ShadowMaps. ([alteredq](http://github.com/alteredq))
-* Added `Frustum` class. ([alteredq](http://github.com/alteredq))
-* `ColladaLoader` improvements. ([ekitson](http://github.com/ekitson), [jterrace](http://github.com/jterrace), [mrdoob](http://github.com/mrdoob) and [alteredq](http://github.com/alteredq))
-* Lights in a hierarchy are now supported when using `WebGLRenderer`. ([alteredq](http://github.com/alteredq))
-* Included requestAnimationFrame shim in the lib. ([mrdoob](http://github.com/mrdoob))
-* Started documentation effort in `/doc` (using sphinx). ([jterrace](http://github.com/jterrace))
-* Changed default shader precission to `mediump`. ([mrdoob](http://github.com/mrdoob))
-* Added support for the format [OpenCTM](http://openctm.sourceforge.net/). ([alteredq](http://github.com/alteredq))
-* Added `BufferGeometry` for direct rendering from typed arrays. ([alteredq](http://github.com/alteredq))
-* Extended `Texture` class with `format` and `type` parameters. ([alteredq](http://github.com/alteredq))
-* Automatically reducing texture to max size of WebGL hardware. ([greggman](http://github.com/greggman) and [alteredq](http://github.com/alteredq))
-* Improved `WebGLRenderer`'s Shadow Map code. ([alteredq](http://github.com/alteredq))
-* Checking for `xhr.overrideMimeType` before using it (fixing IE support). ([mrdoob](http://github.com/mrdoob) and [alteredq](http://github.com/alteredq))
-* Improved ATI and ANGLE support in across `WebGLRenderer` shaders. ([alteredq](http://github.com/alteredq))
-* Added `generateMipmaps` property to `Texture` and `RenderTarget`. ([alteredq](http://github.com/alteredq))
-* `Frustum` properly handling children with scaled parents. ([avinoamr](http://github.com/avinoamr))
-* Fixed `Ray` when dealing with big polygons. ([WestLangley](http://github.com/WestLangley))
-* Fixed `WebGLRenderer` bug where depth buffer was not cleared. ([ekitson](http://github.com/ekitson))
-* Added `CameraHelper` objects for visualising both Perspective and Orthographic cameras. ([alteredq](http://github.com/alteredq))
-* Improvements to `Path`. ([zz85](http://github.com/zz85))
-* Improvements to Postprocessing stack. ([alteredq](http://github.com/alteredq))
-* Added shadows for `DirectionalLight`s. ([alteredq](http://github.com/alteredq))
-* Added `Gyroscope` object. ([alteredq](http://github.com/alteredq))
-* Added `alpha` and `premultipliedAlpha` parameters to `WebGLRenderer`. ([mrdoob](http://github.com/mrdoob))
-* `Ray` properly handling children with scaled parents. ([mrdoob](http://github.com/mrdoob))
-* Renamed `Axes` object to `AxisHelper`. ([mrdoob](http://github.com/mrdoob))
-
-
-2011 11 17 - **r46** (343.383 KB, gzip: 87.468 KB)
-
-* Added reflections to Normal Mapping. ([alteredq](http://github.com/alteredq))
-* `Ray` now checks also object children. ([mrdoob](http://github.com/mrdoob))
-* `*Loader.load( parameters )` to `*Loader( url, callback, texturePath )`. ([mrdoob](http://github.com/mrdoob) and [alteredq](http://github.com/alteredq))
-* Reworked scene graph setup. ([mrdoob](http://github.com/mrdoob) and [alteredq](http://github.com/alteredq))
-* Fixed `CanvasRenderer`'s `SphericalReflectionMapping` rendering. ([mrdoob](http://github.com/mrdoob))
-* Improved `SubdivisionModifier`. ([zz85](http://github.com/zz85))
-* Refactored `*Controls` to use externally supplied time delta. ([alteredq](http://github.com/alteredq))
-* Improvements to `CombinedCamera`. ([zz85](http://github.com/zz85))
-* `ColladaLoader` doesn't create extra `Object3D`. ([mrdoob](http://github.com/mrdoob))
-* Improvements to Lambert and Phong materials. ([alteredq](http://github.com/alteredq))
-* Removed multi-materials for simplicity reasons. (Multi-materials will come back with MeshLayerMaterial hopefully soon) ([alteredq](http://github.com/alteredq))
-* Fixed `Ray` not considering edges. ([mrdoob](http://github.com/mrdoob))
-* Massive cleanup to `WebGLRenderer`. ([alteredq](http://github.com/alteredq))
-* `Ray` optimisations. ([mrdoob](http://github.com/mrdoob) and [alteredq](http://github.com/alteredq))
-* JSON file format is now worker-less (this was crashing Chrome/Firefox with dealing with many assets). ([alteredq](http://github.com/alteredq))
-* Improved `CubeGeometry`, `PlaneGeometry`, `IcosahedronGeometry` and `SphereGeometry`. ([mrdoob](http://github.com/mrdoob))
-* Improvements to `Curve`. ([zz85](http://github.com/zz85))
-* Removed `Collisions` code and focusing on `Ray`. ([mrdoob](http://github.com/mrdoob))
-* Added `cloneObject()` method to `SceneUtils`. ([alteredq](http://github.com/alteredq))
-
-
-2011 10 06 - **r45** (340.863 KB, gzip: 86.568 KB)
-
-* `Object/Scene.add*()` and `Object/Scene.remove*()` are now `Object/Scene.add()` and `Object/Scene.remove()`. ([mrdoob](http://github.com/mrdoob))
-* `LOD.add()` is now `LOD.addLevel()`. ([mrdoob](http://github.com/mrdoob))
-* Reworked `CylinderGeometry`. ([mrdoob](http://github.com/mrdoob))
-* Added `.depthWrite` and `.fog` to `Material`. ([alteredq](http://github.com/alteredq))
-* Added `.applyMatrix` to `Geometry`. ([mrdoob](http://github.com/mrdoob))
-* Improved postprocessing stack in `/examples/js/postprocessing`. ([alteredq](http://github.com/alteredq))
-* Added a realistic skin shading example. ([alteredq](http://github.com/alteredq))
-* Started of a GUI for composing scenes and autogenerate code. ([mrdoob](http://github.com/mrdoob))
-* Added `.center()` to `GeometryUtils`. ([alteredq](http://github.com/alteredq))
-* Fixed buggy scenegraph manipulation (adding/removing objects). ([jsermeno](http://github.com/jsermeno), [alteredq](http://github.com/alteredq) and [skython](http://github.com/skython))
-* Renamed `MeshShaderMaterial` to `ShaderMaterial`. ([alteredq](http://github.com/alteredq))
-* Fixed `CanvasRenderer` ignoring color of `SmoothShading`ed `MeshLambertMaterial`. ([mrdoob](http://github.com/mrdoob))
-* Renamed `renderer.data` to `renderer.info`. ([mrdoob](http://github.com/mrdoob))
-* Fixed ShadowMap aspect ratio. ([kig](http://github.com/kig) and [alteredq](http://github.com/alteredq))
-* Fixed `Loader`'s `extractUrlbase()` incorrect output for short urls. ([rectalogic](http://github.com/rectalogic) and [alteredq](http://github.com/alteredq))
-* Added `.color` and `.visible` support to `Sprite`. ([alteredq](http://github.com/alteredq))
-* Added `Face4`, Vertex Colors and Maya support to `ColladaLoader`. ([mrdoob](http://github.com/mrdoob))
-* Rewrite of lighting shader code. ([alteredq](http://github.com/alteredq))
-* Improved internal array concatenation approach. ([pyrotechnick](http://github.com/pyrotechnick))
-* `WebGLRenderer` performance improvements. ([alteredq](http://github.com/alteredq))
-* Added lower level immediate rendering support to `WebGLRenderer`. ([NINE78](http://github.com/NINE78) and [alteredq](http://github.com/alteredq))
-* Added `CubeCamera` for rendering cubemaps. ([alteredq](http://github.com/alteredq))
-* Improved `GeometryUtils`'s `.mergeVertices()` performance. ([zz85](http://github.com/zz85))
-* Removed `Camera`'s `.target`. ([mrdoob](http://github.com/mrdoob))
-* `WebGLRenderer`'s `.clear()` is now `.clear( color, depth, stencil )`. ([mrdoob](http://github.com/mrdoob))
-* Added `.autoClearColor`, `.autoClearDepth` and `.autoClearStencil` to `WebGLRenderer`. ([mrdoob](http://github.com/mrdoob) and [alteredq](http://github.com/alteredq))
-* Added `OctahedronGeometry`. ([clockworkgeek](http://github.com/clockworkgeek))
-* Splitted `Camera` into `PerspectiveCamera` and `OrthographicCamera`. ([mrdoob](http://github.com/mrdoob) and [alteredq](http://github.com/alteredq))
-* Special cameras are now `*Controls`. ([alteredq](http://github.com/alteredq) and [mrdoob](http://github.com/mrdoob))
-* Added `SubdivisionModifier`. ([zz85](http://github.com/zz85))
-* `Projector`'s `unprojectVector()` now also works with `OrthographicCamera`. ([jsermeno](http://github.com/jsermeno))
-* Added `.setLens()` method to `PerspectiveCamera`. ([zz85](http://github.com/zz85))
-* Added Shadow Maps, `Texture`'s `.offset` and `.repeat` and reflections support to Normal Map shader. ([alteredq](http://github.com/alteredq))
-
-
-2011 09 04 - **r44** (330.356 KB, gzip: 84.039 KB)
-
-* Added `ColladaLoader`. ([timknip2](http://github.com/timknip2))
-* Improved `ExtrudeGeometry`. ([zz85](http://github.com/zz85))
-* Fixed `CylinderGeometry` normals. ([alteredq](http://github.com/alteredq))
-* Fixed issue with `WebGLRenderer.setTexture` ([rectalogic](http://github.com/rectalogic))
-* Fixed `TorusGeometry` normals. ([mrdoob](http://github.com/mrdoob))
-* Fixed `Ray` behind-ray intersects. ([mrdoob](http://github.com/mrdoob))
-* Added `OrthoCamera`. ([alteredq](http://github.com/alteredq))
-* Refactored postprocessing effects used in some examples. ([alteredq](http://github.com/alteredq))
-* Added `.deallocateObject()` and `.deallocateTexture()` methods to `WebGLRenderer`. ([mrdoob](http://github.com/mrdoob))
-* Fixed a glitch in normal and phong shader. ([evanw](http://github.com/evanw) and [alteredq](http://github.com/alteredq))
-* Added `.frustumCulled` property to `Object3D`. ([alteredq](http://github.com/alteredq) and [mrdoob](http://github.com/mrdoob))
-
-
-2011 08 14 - **r43** (298.199 KB, gzip: 74.805 KB)
-
-* Improved Blender exporter - 2.58 (and 2.59) support, normals maps, specular, ao maps... ([alteredq](http://github.com/alteredq))
-* Added [CORS](http://www.w3.org/TR/cors/) to `ImageUtils`. ([mrdoob](http://github.com/mrdoob))
-* Refactored `TextGeometry` and added `Shape`, `Curve`, `Path`, `ExtrudeGeometry`, `TextPath`. ([zz85](http://github.com/zz85) and [alteredq](http://github.com/alteredq))
-* Added handling of custom attributes for `ParticleSystems`. ([alteredq](http://github.com/alteredq))
-* Fixed `CanvasRenderer.setClearColor`. ([mrdoob](http://github.com/mrdoob), [StephenHopkins](http://github.com/StephenHopkins) and [sebleedelisle](http://github.com/sebleedelisle))
-* Improved uniform handling in `WebGLRenderer`. ([alteredq](http://github.com/alteredq))
-* Implemented Shadow Mapping in `WebGLRenderer`. ([alteredq](http://github.com/alteredq))
-* Added `Spotlight` light type. ([alteredq](http://github.com/alteredq))
-* Fixed constructor-less prototypes. ([pushmatrix](http://github.com/pushmatrix))
-* Added `DataTexture`. ([alteredq](http://github.com/alteredq))
-* `WebGLRenderer` opaque pass now renders from front to back. ([alteredq](http://github.com/alteredq))
-* Simplified `Color`. ([mrdoob](http://github.com/mrdoob))
-* Added `preserveDrawingBuffer` option to `WebGLRenderer`. ([jeromeetienne](http://github.com/jeromeetienne))
-* Added `UTF8Loader` for loading the new, uber compressed, [UTF8 format](http://code.google.com/p/webgl-loader/). ([alteredq](http://github.com/alteredq))
-* `CanvasRenderer` now supports `RepeatWrapping`, `texture.offset` and `texture.repeat`. ([mrdoob](http://github.com/mrdoob))
-* Removed Stencil Shadows and Lensflare code. ([mrdoob](http://github.com/mrdoob))
-
-
-2011 07 06 - **r42** (277.852 KB, gzip: 69.469 KB)
-
-* Added `AnaglypWebGLRenderer` and `CrosseyedWebGLRenderer`. ([mrdoob](http://github.com/mrdoob), [alteredq](http://github.com/alteredq) and [marklundin](http://github.com/marklundin))
-* Added `TextGeometry`. ([zz85](http://github.com/zz85) and [alteredq](http://github.com/alteredq))
-* Added `setViewOffset` method to `Camera`. ([greggman](http://github.com/greggman))
-* Renamed geometries to `*Geometry`. ([mrdoob](http://github.com/mrdoob))
-* Improved Blender exporter. ([alteredq](http://github.com/alteredq), [sweetfish](http://github.com/sweetfish) and [Jhonnyg](http://github.com/Jhonnyg))
-* Added Blender 2.58 exporter. ([georgik](http://github.com/georgik))
-* Fixed `Matrix4.multiply()`. (thanks [lukem1](http://github.com/lukem1)) 
-* Added support for additional Euler rotation orders in `Matrix4`. ([rectalogic](http://github.com/rectalogic))
-* Renamed `QuakeCamera` to `FirstPersonCamera`. ([chriskillpack](http://github.com/chriskillpack))
-* Improved Normal Map Shader. ([alteredq](http://github.com/alteredq))
-* `Collision` now supports `Object3D.flipSided` and `Object3D.doubleSided`. ([NINE78](http://github.com/NINE78))
-* Removed most of `SceneUtils` methods. ([mrdoob](http://github.com/mrdoob))
-* Removed `Sound` object and `SoundRenderer`. ([mrdoob](http://github.com/mrdoob))
-
-
-2011 05 31 - **r41/ROME** (265.317 KB, gzip: 64.849 KB)
-
-(Up to this point, some [RO.ME](http://ro.me) specific features managed to get in the lib. The aim is to clean this up in next revisions.)
-
-* Improved Blender Object and Scene exporters. ([alteredq](http://github.com/alteredq))
-* Fixes on WebGL attributes. ([alteredq](http://github.com/alteredq) and [empaempa](http://github.com/empaempa))
-* Reduced overall memory footprint. ([mrdoob](http://github.com/mrdoob))
-* Added `Face4` support to `CollisionSystem`. ([NINE78](http://github.com/NINE78))
-* Added Blender 2.57 exporter. ([remoe](http://github.com/remoe))
-* Added `Particle` support to `Ray`. ([mrdoob](http://github.com/mrdoob) and [jaycrossler](http://github.com/jaycrossler))
-* Improved `Ray.intersectObject` performance by checking boundingSphere first. ([mrdoob](http://github.com/mrdoob))
-* Added `TrackballCamera`. ([egraether](http://github.com/egraether))
-* Added `repeat` and `offset` properties to `Texture`. ([mrdoob](http://github.com/mrdoob) and [alteredq](http://github.com/alteredq))
-* Cleaned up `Vector2`, `Vector3` and `Vector4`. ([egraether](http://github.com/egraether))
-
-
-2011 04 24 - **r40** (263.774 KB, gzip: 64.320 KB)
-
-* Fixed `Object3D.lookAt`. ([mrdoob](http://github.com/mrdoob))
-* More and more Blender exporter goodness. ([alteredq](http://github.com/alteredq) and [mrdoob](http://github.com/mrdoob))
-* Improved `CollisionSystem`. ([drojdjou](http://github.com/drojdjou) and [alteredq](http://github.com/alteredq))
-* Fixes on WebGLRenderer. ([empaempa](http://github.com/empaempa))
-* Added `Trident` object. ([sroucheray](http://github.com/sroucheray))
-* Added `data` object to Renderers for getting number of vertices/faces/callDraws from last render. ([mrdoob](http://github.com/mrdoob))
-* Fixed `Projector` handling Particles with hierarchies. ([mrdoob](http://github.com/mrdoob))
-
-
-2011 04 09 - **r39** (249.048 KB, gzip: 61.020 KB)
-
-* Improved WebGLRenderer program cache. ([alteredq](http://github.com/alteredq))
-* Added support for pre-computed edges in loaders and exporters. ([alteredq](http://github.com/alteredq))
-* Added `Collisions` classes. ([drojdjou](http://github.com/drojdjou))
-* Added `Sprite` object. ([empaempa](http://github.com/empaempa))
-* Fixed `*Loader` issue where Workers were kept alive and next loads were delayed. ([alteredq](http://github.com/alteredq))
-* Added `THREE` namespace to all the classes that missed it. ([mrdoob](http://github.com/mrdoob))
-
-
-2011 03 31 - **r38** (225.442 KB, gzip: 55.908 KB)
-
-* Added `LensFlare` light. ([empaempa](http://github.com/empaempa))
-* Added `ShadowVolume` object (stencil shadows). ([empaempa](http://github.com/empaempa))
-* Improved Blender Exporter plus added Scene support. ([alteredq](http://github.com/alteredq))
-* Blender Importer for loading JSON files. ([alteredq](http://github.com/alteredq))
-* Added load/complete callbacks to `Loader` ([mrdoob](http://github.com/mrdoob))
-* Minor WebGL blend mode clean up. ([mrdoob](http://github.com/mrdoob))
-* *Materials now extend Material ([mrdoob](http://github.com/mrdoob))
-* `material.transparent` define whether material is transparent or not (before we were guessing). ([mrdoob](http://github.com/mrdoob))
-* Added internal program cache to WebGLRenderer (reuse already available programs). ([mrdoob](http://github.com/mrdoob))
-
-
-2011 03 22 - **r37** (208.495 KB, gzip: 51.376 KB)
-
-* Changed JSON file format. (**Re-exporting of models required**) ([alteredq](http://github.com/alteredq) and [mrdoob](http://github.com/mrdoob))
-* Updated Blender and 3DSMAX exporters for new format. ([alteredq](http://github.com/alteredq))
-* Vertex colors are now per-face ([alteredq](http://github.com/alteredq))
-* `Geometry.uvs` is now a multidimensional array (allowing infinite uv sets) ([alteredq](http://github.com/alteredq))
-* `CanvasRenderer` renders `Face4` again (without spliting to 2 `Face3`) ([mrdoob](http://github.com/mrdoob))
-* `ParticleCircleMaterial` > `ParticleCanvasMaterial`. Allowing injecting any `canvas.context` code! ([mrdoob](http://github.com/mrdoob))
-
-
-2011 03 14 - **r36** (194.547 KB, gzip: 48.608 KB)
-
-* Added 3DSMAX exporter. ([alteredq](http://github.com/alteredq))
-* Fixed `WebGLRenderer` aspect ratio bug when scene had only one material. ([mrdoob](http://github.com/mrdoob))
-* Added `sizeAttenuation` property to `ParticleBasicMaterial`. ([mrdoob](http://github.com/mrdoob))
-* Added `PathCamera`. ([alteredq](http://github.com/alteredq))
-* Fixed `WebGLRenderer` bug when Camera has a parent. Camera`Camera.updateMatrix` method. ([empaempa](http://github.com/empaempa))
-* Fixed `Camera.updateMatrix` method and `Object3D.updateMatrix`. ([mrdoob](http://github.com/mrdoob))
-
-
-2011 03 06 - **r35** (187.875 KB, gzip: 46.433 KB)
-
-* Added methods `translate`, `translateX`, `translateY`, `translateZ` and `lookAt` methods to `Object3D`. ([mrdoob](http://github.com/mrdoob))
-* Added methods `setViewport` and `setScissor` to `WebGLRenderer`. ([alteredq](http://github.com/alteredq))
-* Added support for non-po2 textures. ([mrdoob](http://github.com/mrdoob) and [alteredq](http://github.com/alteredq))
-* Minor API clean up. ([mrdoob](http://github.com/mrdoob))
-
-
-2011 03 02 - **r34** (186.045 KB, gzip: 45.953 KB)
-
-* Now using camera.matrixWorldInverse instead of camera.matrixWorld for projecting. ([empaempa](http://github.com/empaempa) and [mrdoob](http://github.com/mrdoob))
-* Camel cased properties and object json format (**Re-exporting of models required**) ([alteredq](http://github.com/alteredq))
-* Added `QuakeCamera` for easy fly-bys ([alteredq](http://github.com/alteredq))
-* Added `LOD` example ([alteredq](http://github.com/alteredq))
-
-
-2011 02 26 - **r33** (184.483 KB, gzip: 45.580 KB)
-
-* Changed build setup (**build/Three.js now also include extras**) ([mrdoob](http://github.com/mrdoob))
-* Added `ParticleSystem` object to `WebGLRenderer` ([alteredq](http://github.com/alteredq))
-* Added `Line` support to `WebGLRenderer` ([alteredq](http://github.com/alteredq))
-* Added vertex colors support to `WebGLRenderer` ([alteredq](http://github.com/alteredq))
-* Added `Ribbon` object. ([alteredq](http://github.com/alteredq))
-* Added updateable textures support to `WebGLRenderer` ([alteredq](http://github.com/alteredq))
-* Added `Sound` object and `SoundRenderer`. ([empaempa](http://github.com/empaempa))
-* `LOD`, `Bone`, `SkinnedMesh` objects and hierarchy being developed. ([empaempa](http://github.com/empaempa))
-* Added hierarchies examples ([mrdoob](http://github.com/mrdoob))
-
-
-2010 12 31 - **r32** (89.301 KB, gzip: 21.351 KB)
-
-* `Scene` now supports `Fog` and `FogExp2`. `WebGLRenderer` only right now. ([alteredq](http://github.com/alteredq))
-* Added `setClearColor( hex, opacity )` to `WebGLRenderer` and `CanvasRenderer` ([alteredq](http://github.com/alteredq) & [mrdoob](http://github.com/mrdoob))
-* `WebGLRenderer` shader system refactored improving performance. ([alteredq](http://github.com/alteredq))
-* `Projector` now does frustum culling of all the objects using their sphereBoundingBox. (thx [errynp](http://github.com/errynp))
-* `material` property changed to `materials` globaly.
-
-
-2010 12 06 - **r31** (79.479 KB, gzip: 18.788 KB)
-
-* Minor Materials API change (mappings). ([alteredq](http://github.com/alteredq) & [mrdoob](http://github.com/mrdoob))
-* Added Filters to `WebGLRenderer`
-* `python build.py --includes` generates includes string
-
-
-2010 11 30 - **r30** (77.809 KB, gzip: 18.336 KB)
-
-* Reflection and Refraction materials support in `WebGLRenderer` ([alteredq](http://github.com/alteredq))
-* `SmoothShading` support on `CanvasRenderer`/`MeshLambertMaterial`
-* `MeshShaderMaterial` for `WebGLRenderer` ([alteredq](http://github.com/alteredq))
-* Removed `RenderableFace4` from `Projector`/`CanvasRenderer` (maybe just temporary).
-* Added extras folder with `GeometryUtils`, `ImageUtils`, `SceneUtils` and `ShaderUtils` ([alteredq](http://github.com/alteredq) & [mrdoob](http://github.com/mrdoob))
-* Blender 2.5x Slim now the default exporter (old exporter removed).
-
-
-2010 11 17 - **r29** (69.563 KB)
-
-* **New materials API** Still work in progress, but mostly there. ([alteredq](http://github.com/alteredq) & [mrdoob](http://github.com/mrdoob))
-* Line clipping in `CanvasRenderer` ([julianwa](http://github.com/julianwa))
-* Refactored `CanvasRenderer` and `SVGRenderer`. ([mrdoob](http://github.com/mrdoob))
-* Switched to Closure compiler.
-
-
-2010 11 04 - **r28** (62.802 KB)
-
-* `Loader` class allows load geometry asynchronously at runtime. ([alteredq](http://github.com/alteredq))
-* `MeshPhongMaterial` working with `WebGLRenderer`. ([alteredq](http://github.com/alteredq))
-* Support for *huge* objects. Max 500k polys and counting. ([alteredq](http://github.com/alteredq))
-* `Projector.unprojectVector` and `Ray` class to check intersections with faces (based on [mindlapse](http://github.com/mindlapse) work)
-* Fixed `Projector` z-sorting (not as jumpy anymore).
-* Fixed Orthographic projection (was y-inverted).
-* Hmmm.. lib file size starting to get too big...
-
-
-2010 10 28 - **r25** (54.480 KB)
-
-* `WebGLRenderer` now up to date with other renderers! ([alteredq](http://github.com/alteredq))
-* .obj to .js python converter ([alteredq](http://github.com/alteredq))
-* Blender 2.54 exporter
-* Added `MeshFaceMaterial` (multipass per face)
-* Reworked `CanvasRenderer` and `SVGRenderer` material handling
-
-
-2010 10 06 - **r18** (44.420 KB)
-
-* Added `PointLight`
-* `CanvasRenderer` and `SVGRenderer` basic lighting support (ColorStroke/ColorFill only)
-* `Renderer` > `Projector`. `CanvasRenderer`, `SVGRenderer` and `DOMRenderer` do not extend anymore
-* Added `computeCentroids` method to `Geometry`
-
-
-2010 09 17 - **r17** (39.487 KB)
-
-* Added `Light`, `AmbientLight` and `DirectionalLight` ([philogb](http://github.com/philogb))
-* `WebGLRenderer` basic lighting support ([philogb](http://github.com/philogb))
-* Memory optimisations
-
-
-2010 08 21 - **r16** (35.592 KB)
-
-* Workaround for Opera bug (clearRect not working with context with negative scale)
-* Additional `Matrix4` and `Vector3` methods
-
-
-2010 07 23 - **r15** (32.440 KB)
-
-* Using new object `UV` instead of `Vector2` where it should be used
-* Added `Mesh.flipSided` boolean (false by default)
-* `CanvasRenderer` was handling UVs at 1,1 as bitmapWidth, bitmapHeight (instead of bitmapWidth - 1, bitmapHeight - 1)
-* `ParticleBitmapMaterial.offset` added
-* Fixed gap when rendering `Face4` with `MeshBitmapUVMappingMaterial`
-
-
-2010 07 17 - **r14** (32.144 KB)
-
-* Refactored `CanvasRenderer` (more duplicated code, but easier to handle)
-* `Face4` now supports `MeshBitmapUVMappingMaterial`
-* Changed order of `*StrokeMaterial` parameters. Now it's `color`, `opacity`, `lineWidth`.
-* `BitmapUVMappingMaterial` > `MeshBitmapUVMappingMaterial`
-* `ColorFillMaterial` > `MeshColorFillMaterial`
-* `ColorStrokeMaterial` > `MeshColorStrokeMaterial`
-* `FaceColorFillMaterial` > `MeshFaceColorFillMaterial`
-* `FaceColorStrokeMaterial` > `MeshFaceColorStrokeMaterial`
-* `ColorStrokeMaterial` > `LineColorMaterial`
-* `Rectangle.instersects` returned false with rectangles with 0px witdh or height
-
-
-2010 07 12 - **r13** (29.492 KB)
-
-* Added `ParticleCircleMaterial` and `ParticleBitmapMaterial`
-* `Particle` now use `ParticleCircleMaterial` instead of `ColorFillMaterial`
-* `Particle.size` > `Particle.scale.x` and `Particle.scale.y`
-* `Particle.rotation.z` for rotating the particle
-* `SVGRenderer` currently out of sync
-
-
-2010 07 07 - **r12** (28.494 KB)
-
-* First version of the `WebGLRenderer` (`ColorFillMaterial` and `FaceColorFillMaterial` by now)
-* `Matrix4.lookAt` fix (`CanvasRenderer` and `SVGRenderer` now handle the -Y)
-* `Color` now using 0-1 floats instead of 0-255 integers
-
-
-2010 07 03 - **r11** (23.541 KB)
-
-* Blender 2.5 exporter (utils/export_threejs.py) now exports UV and normals (Thx [kikko](http://github.com/kikko))
-* `Scene.add` > `Scene.addObject`
-* Enabled `Scene.removeObject`
-
-
-2010 06 22 - **r10** (23.959 KB)
-
-* Changed Camera system. (Thx [Paul Brunt](http://github.com/supereggbert))
-* `Object3D.overdraw = true` to enable CanvasRenderer screen space point expansion hack.
-
-
-2010 06 20 - **r9** (23.753 KB)
-
-* JSLinted.
-* `autoClear` property for renderers.
-* Removed SVG rgba() workaround for WebKit. (WebKit now supports it)
-* Fixed matrix bug. (transformed objects outside the x axis would get infinitely tall :S)
-
-
-2010 06 06 - **r8** (23.496 KB)
-
-* Moved UVs to `Geometry`.
-* `CanvasRenderer` expands screen space points (workaround for antialias gaps).
-* `CanvasRenderer` supports `BitmapUVMappingMaterial`.
-
-
-2010 06 05 - **r7** (22.387 KB)
-
-* Added Line Object.
-* Workaround for WebKit not supporting rgba() in SVG yet.
-* No need to call updateMatrix(). Use .autoUpdateMatrix = false if needed. (Thx [Gregory Athons](http://github.com/gregmax17)).
-
-
-2010 05 17 - **r6** (21.003 KB)
-
-* 2d clipping on `CanvasRenderer` and `SVGRenderer`
-* `clearRect` optimisations on `CanvasRenderer`
-
-
-2010 05 16 - **r5** (19.026 KB)
-
-* Removed Class.js dependency
-* Added `THREE` namespace
-* `Camera.x` -> `Camera.position.x`
-* `Camera.target.x` > `Camera.target.position.x`
-* `ColorMaterial` > `ColorFillMaterial`
-* `FaceColorMaterial` > `FaceColorFillMaterial`
-* Materials are now multipass (use array)
-* Added `ColorStrokeMaterial` and `FaceColorStrokeMaterial`
-* `geometry.faces.a` are now indexes instead of references
-
-
-2010 04 26 - **r4** (16.274 KB)
-
-* `SVGRenderer` Particle rendering
-* `CanvasRenderer` uses `context.setTransform` to avoid extra calculations
-
-
-2010 04 24 - **r3** (16.392 KB)
-
-* Fixed incorrect rotation matrix transforms
-* Added `Plane` and `Cube` primitives
-
-
-2010 04 24 - **r2** (15.724 KB)
-
-* Improved `Color` handling
-
-
-2010 04 24 - **r1** (15.25 KB)
-
-* First alpha release
+[releases](https://github.com/mrdoob/three.js/releases)

+ 61 - 93
build/three.js

@@ -4,7 +4,7 @@
  * @author bhouston / http://exocortex.com
  */
 
-var THREE = THREE || { REVISION: '59dev' };
+var THREE = THREE || { REVISION: '59' };
 
 self.console = self.console || {
 
@@ -6485,6 +6485,15 @@ THREE.EventDispatcher.prototype = {
 
 	constructor: THREE.EventDispatcher,
 
+	apply: function ( object ) {
+
+		object.addEventListener = THREE.EventDispatcher.prototype.addEventListener;
+		object.hasEventListener = THREE.EventDispatcher.prototype.hasEventListener;
+		object.removeEventListener = THREE.EventDispatcher.prototype.removeEventListener;
+		object.dispatchEvent = THREE.EventDispatcher.prototype.dispatchEvent;
+
+	},
+
 	addEventListener: function ( type, listener ) {
 
 		if ( this._listeners === undefined ) this._listeners = {};
@@ -7070,11 +7079,6 @@ THREE.Object3D.prototype = {
 
 	constructor: THREE.Object3D,
 
-	addEventListener: THREE.EventDispatcher.prototype.addEventListener,
-	hasEventListener: THREE.EventDispatcher.prototype.hasEventListener,
-	removeEventListener: THREE.EventDispatcher.prototype.removeEventListener,
-	dispatchEvent: THREE.EventDispatcher.prototype.dispatchEvent,
-
 	get eulerOrder () {
 
 		console.warn( 'DEPRECATED: Object3D\'s .eulerOrder has been moved to Object3D\'s .rotation.order.' );
@@ -7563,6 +7567,8 @@ THREE.Object3D.prototype = {
 
 };
 
+THREE.EventDispatcher.prototype.apply( THREE.Object3D.prototype );
+
 THREE.Object3DIdCount = 0;
 
 /**
@@ -8386,11 +8392,6 @@ THREE.Geometry.prototype = {
 
 	constructor: THREE.Geometry,
 
-	addEventListener: THREE.EventDispatcher.prototype.addEventListener,
-	hasEventListener: THREE.EventDispatcher.prototype.hasEventListener,
-	removeEventListener: THREE.EventDispatcher.prototype.removeEventListener,
-	dispatchEvent: THREE.EventDispatcher.prototype.dispatchEvent,
-
 	applyMatrix: function ( matrix ) {
 
 		var normalMatrix = new THREE.Matrix3().getNormalMatrix( matrix );
@@ -9145,6 +9146,8 @@ THREE.Geometry.prototype = {
 
 };
 
+THREE.EventDispatcher.prototype.apply( THREE.Geometry.prototype );
+
 THREE.GeometryIdCount = 0;
 
 /**
@@ -9185,11 +9188,6 @@ THREE.BufferGeometry.prototype = {
 
 	constructor: THREE.BufferGeometry,
 
-	addEventListener: THREE.EventDispatcher.prototype.addEventListener,
-	hasEventListener: THREE.EventDispatcher.prototype.hasEventListener,
-	removeEventListener: THREE.EventDispatcher.prototype.removeEventListener,
-	dispatchEvent: THREE.EventDispatcher.prototype.dispatchEvent,
-
 	applyMatrix: function ( matrix ) {
 
 		var positionArray;
@@ -9701,6 +9699,8 @@ THREE.BufferGeometry.prototype = {
 
 };
 
+THREE.EventDispatcher.prototype.apply( THREE.BufferGeometry.prototype );
+
 /**
  * @author mrdoob / http://mrdoob.com/
  * @author mikael emtinger / http://gomo.se/
@@ -13015,11 +13015,6 @@ THREE.Material.prototype = {
 
 	constructor: THREE.Material,
 
-	addEventListener: THREE.EventDispatcher.prototype.addEventListener,
-	hasEventListener: THREE.EventDispatcher.prototype.hasEventListener,
-	removeEventListener: THREE.EventDispatcher.prototype.removeEventListener,
-	dispatchEvent: THREE.EventDispatcher.prototype.dispatchEvent,
-
 	setValues: function ( values ) {
 
 		if ( values === undefined ) return;
@@ -13106,6 +13101,8 @@ THREE.Material.prototype = {
 
 };
 
+THREE.EventDispatcher.prototype.apply( THREE.Material.prototype );
+
 THREE.MaterialIdCount = 0;
 
 /**
@@ -14073,11 +14070,6 @@ THREE.Texture.prototype = {
 
 	constructor: THREE.Texture,
 
-	addEventListener: THREE.EventDispatcher.prototype.addEventListener,
-	hasEventListener: THREE.EventDispatcher.prototype.hasEventListener,
-	removeEventListener: THREE.EventDispatcher.prototype.removeEventListener,
-	dispatchEvent: THREE.EventDispatcher.prototype.dispatchEvent,
-
 	clone: function ( texture ) {
 
 		if ( texture === undefined ) texture = new THREE.Texture();
@@ -14118,6 +14110,8 @@ THREE.Texture.prototype = {
 
 };
 
+THREE.EventDispatcher.prototype.apply( THREE.Texture.prototype );
+
 THREE.TextureIdCount = 0;
 
 /**
@@ -27047,11 +27041,6 @@ THREE.WebGLRenderTarget.prototype = {
 
 	constructor: THREE.WebGLRenderTarget,
 
-	addEventListener: THREE.EventDispatcher.prototype.addEventListener,
-	hasEventListener: THREE.EventDispatcher.prototype.hasEventListener,
-	removeEventListener: THREE.EventDispatcher.prototype.removeEventListener,
-	dispatchEvent: THREE.EventDispatcher.prototype.dispatchEvent,
-
 	clone: function () {
 
 		var tmp = new THREE.WebGLRenderTarget( this.width, this.height );
@@ -27089,6 +27078,8 @@ THREE.WebGLRenderTarget.prototype = {
 
 };
 
+THREE.EventDispatcher.prototype.apply( THREE.WebGLRenderTarget.prototype );
+
 /**
  * @author alteredq / http://alteredqualia.com
  */
@@ -27390,40 +27381,44 @@ THREE.GeometryUtils = {
 	// 	(uniform distribution)
 	// 	http://www.cgafaq.info/wiki/Random_Point_In_Triangle
 
-	randomPointInTriangle: function ( vectorA, vectorB, vectorC ) {
+	randomPointInTriangle: function () {
 
-		var a, b, c,
-			point = new THREE.Vector3(),
-			tmp = THREE.GeometryUtils.__v1;
+		var vector = new THREE.Vector3();
 
-		a = THREE.GeometryUtils.random();
-		b = THREE.GeometryUtils.random();
+		return function ( vectorA, vectorB, vectorC ) {
 
-		if ( ( a + b ) > 1 ) {
+			var point = new THREE.Vector3();
 
-			a = 1 - a;
-			b = 1 - b;
+			var a = THREE.Math.random16();
+			var b = THREE.Math.random16();
 
-		}
+			if ( ( a + b ) > 1 ) {
 
-		c = 1 - a - b;
+				a = 1 - a;
+				b = 1 - b;
 
-		point.copy( vectorA );
-		point.multiplyScalar( a );
+			}
 
-		tmp.copy( vectorB );
-		tmp.multiplyScalar( b );
+			var c = 1 - a - b;
 
-		point.add( tmp );
+			point.copy( vectorA );
+			point.multiplyScalar( a );
 
-		tmp.copy( vectorC );
-		tmp.multiplyScalar( c );
+			vector.copy( vectorB );
+			vector.multiplyScalar( b );
 
-		point.add( tmp );
+			point.add( vector );
 
-		return point;
+			vector.copy( vectorC );
+			vector.multiplyScalar( c );
 
-	},
+			point.add( vector );
+
+			return point;
+
+		};
+
+	}(),
 
 	// Get random point in face (triangle / quad)
 	// (uniform distribution)
@@ -27473,7 +27468,7 @@ THREE.GeometryUtils = {
 
 			}
 
-			var r = THREE.GeometryUtils.random() * ( area1 + area2 );
+			var r = THREE.Math.random16() * ( area1 + area2 );
 
 			if ( r < area1 ) {
 
@@ -27583,7 +27578,7 @@ THREE.GeometryUtils = {
 
 		for ( i = 0; i < n; i ++ ) {
 
-			r = THREE.GeometryUtils.random() * totalArea;
+			r = THREE.Math.random16() * totalArea;
 
 			index = binarySearchIndices( r );
 
@@ -27608,18 +27603,22 @@ THREE.GeometryUtils = {
 	// Get triangle area (half of parallelogram)
 	//	http://mathworld.wolfram.com/TriangleArea.html
 
-	triangleArea: function ( vectorA, vectorB, vectorC ) {
+	triangleArea: function () {
 
-		var tmp1 = THREE.GeometryUtils.__v1,
-			tmp2 = THREE.GeometryUtils.__v2;
+		var vector1 = new THREE.Vector3();
+		var vector2 = new THREE.Vector3();
 
-		tmp1.subVectors( vectorB, vectorA );
-		tmp2.subVectors( vectorC, vectorA );
-		tmp1.cross( tmp2 );
+		return function ( vectorA, vectorB, vectorC ) {
 
-		return 0.5 * tmp1.length();
+			vector1.subVectors( vectorB, vectorA );
+			vector2.subVectors( vectorC, vectorA );
+			vector1.cross( vector2 );
 
-	},
+			return 0.5 * vector1.length();
+
+		};
+
+	}(),
 
 	// Center geometry so that 0,0,0 is in center of bounding box
 
@@ -27641,30 +27640,6 @@ THREE.GeometryUtils = {
 
 	},
 
-	// Normalize UVs to be from <0,1>
-	// (for now just the first set of UVs)
-
-	normalizeUVs: function ( geometry ) {
-
-		var uvSet = geometry.faceVertexUvs[ 0 ];
-
-		for ( var i = 0, il = uvSet.length; i < il; i ++ ) {
-
-			var uvs = uvSet[ i ];
-
-			for ( var j = 0, jl = uvs.length; j < jl; j ++ ) {
-
-				// texture repeat
-
-				if( uvs[ j ].x !== 1.0 ) uvs[ j ].x = uvs[ j ].x - Math.floor( uvs[ j ].x );
-				if( uvs[ j ].y !== 1.0 ) uvs[ j ].y = uvs[ j ].y - Math.floor( uvs[ j ].y );
-
-			}
-
-		}
-
-	},
-
 	triangulateQuads: function ( geometry ) {
 
 		var i, il, j, jl;
@@ -27807,11 +27782,6 @@ THREE.GeometryUtils = {
 
 };
 
-THREE.GeometryUtils.random = THREE.Math.random16;
-
-THREE.GeometryUtils.__v1 = new THREE.Vector3();
-THREE.GeometryUtils.__v2 = new THREE.Vector3();
-
 /**
  * @author alteredq / http://alteredqualia.com/
  * @author mrdoob / http://mrdoob.com/
@@ -35117,8 +35087,6 @@ THREE.BoundingBoxHelper.prototype.update = function () {
 
 THREE.CameraHelper = function ( camera ) {
 
-	THREE.Line.call( this );
-
 	var geometry = new THREE.Geometry();
 	var material = new THREE.LineBasicMaterial( { color: 0xffffff, vertexColors: THREE.FaceColors } );
 

+ 56 - 58
build/three.min.js

@@ -1,5 +1,5 @@
 // three.js - http://github.com/mrdoob/three.js
-'use strict';var THREE=THREE||{REVISION:"59dev"};self.console=self.console||{info:function(){},log:function(){},debug:function(){},warn:function(){},error:function(){}};String.prototype.trim=String.prototype.trim||function(){return this.replace(/^\s+|\s+$/g,"")};THREE.extend=function(a,b){if(Object.keys)for(var c=Object.keys(b),d=0,e=c.length;d<e;d++){var f=c[d];Object.defineProperty(a,f,Object.getOwnPropertyDescriptor(b,f))}else for(f in c={}.hasOwnProperty,b)c.call(b,f)&&(a[f]=b[f]);return a};
+'use strict';var THREE=THREE||{REVISION:"59"};self.console=self.console||{info:function(){},log:function(){},debug:function(){},warn:function(){},error:function(){}};String.prototype.trim=String.prototype.trim||function(){return this.replace(/^\s+|\s+$/g,"")};THREE.extend=function(a,b){if(Object.keys)for(var c=Object.keys(b),d=0,e=c.length;d<e;d++){var f=c[d];Object.defineProperty(a,f,Object.getOwnPropertyDescriptor(b,f))}else for(f in c={}.hasOwnProperty,b)c.call(b,f)&&(a[f]=b[f]);return a};
 (function(){for(var a=0,b=["ms","moz","webkit","o"],c=0;c<b.length&&!self.requestAnimationFrame;++c)self.requestAnimationFrame=self[b[c]+"RequestAnimationFrame"],self.cancelAnimationFrame=self[b[c]+"CancelAnimationFrame"]||self[b[c]+"CancelRequestAnimationFrame"];void 0===self.requestAnimationFrame&&void 0!==self.setTimeout&&(self.requestAnimationFrame=function(b){var c=Date.now(),f=Math.max(0,16-(c-a)),h=self.setTimeout(function(){b(c+f)},f);a=c+f;return h});void 0===self.cancelAnimationFrame&&void 0!==
 self.clearTimeout&&(self.cancelAnimationFrame=function(a){self.clearTimeout(a)})})();THREE.CullFaceNone=0;THREE.CullFaceBack=1;THREE.CullFaceFront=2;THREE.CullFaceFrontBack=3;THREE.FrontFaceDirectionCW=0;THREE.FrontFaceDirectionCCW=1;THREE.BasicShadowMap=0;THREE.PCFShadowMap=1;THREE.PCFSoftShadowMap=2;THREE.FrontSide=0;THREE.BackSide=1;THREE.DoubleSide=2;THREE.NoShading=0;THREE.FlatShading=1;THREE.SmoothShading=2;THREE.NoColors=0;THREE.FaceColors=1;THREE.VertexColors=2;THREE.NoBlending=0;
 THREE.NormalBlending=1;THREE.AdditiveBlending=2;THREE.SubtractiveBlending=3;THREE.MultiplyBlending=4;THREE.CustomBlending=5;THREE.AddEquation=100;THREE.SubtractEquation=101;THREE.ReverseSubtractEquation=102;THREE.ZeroFactor=200;THREE.OneFactor=201;THREE.SrcColorFactor=202;THREE.OneMinusSrcColorFactor=203;THREE.SrcAlphaFactor=204;THREE.OneMinusSrcAlphaFactor=205;THREE.DstAlphaFactor=206;THREE.OneMinusDstAlphaFactor=207;THREE.DstColorFactor=208;THREE.OneMinusDstColorFactor=209;
@@ -134,8 +134,8 @@ new THREE.Vector3).addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)},no
 clone:function(){return(new THREE.Triangle).copy(this)}};THREE.Vertex=function(a){console.warn("THREE.Vertex has been DEPRECATED. Use THREE.Vector3 instead.");return a};THREE.UV=function(a,b){console.warn("THREE.UV has been DEPRECATED. Use THREE.Vector2 instead.");return new THREE.Vector2(a,b)};THREE.Clock=function(a){this.autoStart=void 0!==a?a:!0;this.elapsedTime=this.oldTime=this.startTime=0;this.running=!1};
 THREE.Clock.prototype={constructor:THREE.Clock,start:function(){this.oldTime=this.startTime=void 0!==self.performance&&void 0!==self.performance.now?self.performance.now():Date.now();this.running=!0},stop:function(){this.getElapsedTime();this.running=!1},getElapsedTime:function(){this.getDelta();return this.elapsedTime},getDelta:function(){var a=0;this.autoStart&&!this.running&&this.start();if(this.running){var b=void 0!==self.performance&&void 0!==self.performance.now?self.performance.now():Date.now(),
 a=0.001*(b-this.oldTime);this.oldTime=b;this.elapsedTime+=a}return a}};THREE.EventDispatcher=function(){};
-THREE.EventDispatcher.prototype={constructor:THREE.EventDispatcher,addEventListener:function(a,b){void 0===this._listeners&&(this._listeners={});var c=this._listeners;void 0===c[a]&&(c[a]=[]);-1===c[a].indexOf(b)&&c[a].push(b)},hasEventListener:function(a,b){if(void 0===this._listeners)return!1;var c=this._listeners;return void 0!==c[a]&&-1!==c[a].indexOf(b)?!0:!1},removeEventListener:function(a,b){if(void 0!==this._listeners){var c=this._listeners,d=c[a].indexOf(b);-1!==d&&c[a].splice(d,1)}},dispatchEvent:function(a){if(void 0!==
-this._listeners){var b=this._listeners[a.type];if(void 0!==b){a.target=this;for(var c=0,d=b.length;c<d;c++)b[c].call(this,a)}}}};(function(a){a.Raycaster=function(b,c,d,e){this.ray=new a.Ray(b,c);0<this.ray.direction.lengthSq()&&this.ray.direction.normalize();this.near=d||0;this.far=e||Infinity};var b=new a.Sphere,c=new a.Ray,d=new a.Plane,e=new a.Vector3,f=new a.Vector3,h=new a.Matrix4,g=function(a,b){return a.distance-b.distance},i=function(g,j,n){if(g instanceof a.Particle){f.getPositionFromMatrix(g.matrixWorld);var p=j.ray.distanceToPoint(f);if(p>g.scale.x)return n;n.push({distance:p,point:g.position,face:null,object:g})}else if(g instanceof
+THREE.EventDispatcher.prototype={constructor:THREE.EventDispatcher,apply:function(a){a.addEventListener=THREE.EventDispatcher.prototype.addEventListener;a.hasEventListener=THREE.EventDispatcher.prototype.hasEventListener;a.removeEventListener=THREE.EventDispatcher.prototype.removeEventListener;a.dispatchEvent=THREE.EventDispatcher.prototype.dispatchEvent},addEventListener:function(a,b){void 0===this._listeners&&(this._listeners={});var c=this._listeners;void 0===c[a]&&(c[a]=[]);-1===c[a].indexOf(b)&&
+c[a].push(b)},hasEventListener:function(a,b){if(void 0===this._listeners)return!1;var c=this._listeners;return void 0!==c[a]&&-1!==c[a].indexOf(b)?!0:!1},removeEventListener:function(a,b){if(void 0!==this._listeners){var c=this._listeners,d=c[a].indexOf(b);-1!==d&&c[a].splice(d,1)}},dispatchEvent:function(a){if(void 0!==this._listeners){var b=this._listeners[a.type];if(void 0!==b){a.target=this;for(var c=0,d=b.length;c<d;c++)b[c].call(this,a)}}}};(function(a){a.Raycaster=function(b,c,d,e){this.ray=new a.Ray(b,c);0<this.ray.direction.lengthSq()&&this.ray.direction.normalize();this.near=d||0;this.far=e||Infinity};var b=new a.Sphere,c=new a.Ray,d=new a.Plane,e=new a.Vector3,f=new a.Vector3,h=new a.Matrix4,g=function(a,b){return a.distance-b.distance},i=function(g,j,n){if(g instanceof a.Particle){f.getPositionFromMatrix(g.matrixWorld);var p=j.ray.distanceToPoint(f);if(p>g.scale.x)return n;n.push({distance:p,point:g.position,face:null,object:g})}else if(g instanceof
 a.LOD)f.getPositionFromMatrix(g.matrixWorld),p=j.ray.origin.distanceTo(f),i(g.getObjectForDistance(p),j,n);else if(g instanceof a.Mesh){p=g.geometry;f.getPositionFromMatrix(g.matrixWorld);null===p.boundingSphere&&p.computeBoundingSphere();b.set(f,p.boundingSphere.radius*g.matrixWorld.getMaxScaleOnAxis());if(!1===j.ray.isIntersectionSphere(b))return n;var t=p.vertices;if(p instanceof a.BufferGeometry){var q=g.material;if(void 0===q||!1===p.dynamic)return n;var r=g.material instanceof a.MeshFaceMaterial,
 s=!0===r?g.material.materials:null,v=g.material.side,z,C,F=j.precision;h.getInverse(g.matrixWorld);c.copy(j.ray).applyMatrix4(h);var H,t=!1;p.attributes.index&&(t=!0);s=new a.Vector3;H=new a.Vector3;var I=new a.Vector3;new a.Vector3;new a.Vector3;for(var G=0;G<p.offsets.length;++G)for(var A=p.offsets[G].start,K=p.offsets[G].index,r=A,B=A+p.offsets[G].count;r<B;r+=3)if(t?(v=K+p.attributes.index.array[r],z=K+p.attributes.index.array[r+1],C=K+p.attributes.index.array[r+2]):(v=K,z=K+1,C=K+2),s.set(p.attributes.position.array[3*
 v],p.attributes.position.array[3*v+1],p.attributes.position.array[3*v+2]),H.set(p.attributes.position.array[3*z],p.attributes.position.array[3*z+1],p.attributes.position.array[3*z+2]),I.set(p.attributes.position.array[3*C],p.attributes.position.array[3*C+1],p.attributes.position.array[3*C+2]),d.setFromCoplanarPoints(s,H,I),A=c.distanceToPlane(d),!(A<F)&&null!==A){v=q.side;if(v!==a.DoubleSide&&(z=c.direction.dot(d.normal),!(v===a.FrontSide?0>z:0<z)))continue;A<j.near||A>j.far||(e=c.at(A,e),!1!==a.Triangle.containsPoint(e,
@@ -145,17 +145,17 @@ g.geometry;null===p.boundingSphere&&p.computeBoundingSphere();f.getPositionFromM
 point:A.clone().applyMatrix4(g.matrixWorld),face:null,faceIndex:null,object:g}))}},j=function(a,b,c){for(var a=a.getDescendants(),d=0,e=a.length;d<e;d++)i(a[d],b,c)};a.Raycaster.prototype.precision=1E-4;a.Raycaster.prototype.linePrecision=1;a.Raycaster.prototype.set=function(a,b){this.ray.set(a,b);0<this.ray.direction.length()&&this.ray.direction.normalize()};a.Raycaster.prototype.intersectObject=function(a,b){var c=[];!0===b&&j(a,this,c);i(a,this,c);c.sort(g);return c};a.Raycaster.prototype.intersectObjects=
 function(a,b){for(var c=[],d=0,e=a.length;d<e;d++)i(a[d],this,c),!0===b&&j(a[d],this,c);c.sort(g);return c}})(THREE);THREE.Object3D=function(){this.id=THREE.Object3DIdCount++;this.uuid=THREE.Math.generateUUID();this.name="";this.parent=void 0;this.children=[];this.up=new THREE.Vector3(0,1,0);this.position=new THREE.Vector3;this.rotation=new THREE.Euler;this.quaternion=new THREE.Quaternion;this.scale=new THREE.Vector3(1,1,1);this.rotation._quaternion=this.quaternion;this.quaternion._euler=this.rotation;this.renderDepth=null;this.rotationAutoUpdate=!0;this.matrix=new THREE.Matrix4;this.matrixWorld=new THREE.Matrix4;
 this.visible=this.matrixWorldNeedsUpdate=this.matrixAutoUpdate=!0;this.receiveShadow=this.castShadow=!1;this.frustumCulled=!0;this.userData={}};
-THREE.Object3D.prototype={constructor:THREE.Object3D,addEventListener:THREE.EventDispatcher.prototype.addEventListener,hasEventListener:THREE.EventDispatcher.prototype.hasEventListener,removeEventListener:THREE.EventDispatcher.prototype.removeEventListener,dispatchEvent:THREE.EventDispatcher.prototype.dispatchEvent,get eulerOrder(){console.warn("DEPRECATED: Object3D's .eulerOrder has been moved to Object3D's .rotation.order.");return this.rotation.order},set eulerOrder(a){console.warn("DEPRECATED: Object3D's .eulerOrder has been moved to Object3D's .rotation.order.");
-this.rotation.order=a},get useQuaternion(){console.warn("DEPRECATED: Object3D's .useQuaternion has been removed. The library now uses quaternions by default.")},set useQuaternion(a){console.warn("DEPRECATED: Object3D's .useQuaternion has been removed. The library now uses quaternions by default.")},applyMatrix:function(){var a=new THREE.Matrix4;return function(b){this.matrix.multiplyMatrices(b,this.matrix);this.position.getPositionFromMatrix(this.matrix);this.scale.getScaleFromMatrix(this.matrix);
-a.extractRotation(this.matrix);this.quaternion.setFromRotationMatrix(a)}}(),setRotationFromAxisAngle:function(a,b){this.quaternion.setFromAxisAngle(a,b)},setRotationFromEuler:function(a){this.quaternion.setFromEuler(a,!0)},setRotationFromMatrix:function(a){this.quaternion.setFromRotationMatrix(a)},setRotationFromQuaternion:function(a){this.quaternion.copy(a)},rotateOnAxis:function(){var a=new THREE.Quaternion;return function(b,c){a.setFromAxisAngle(b,c);this.quaternion.multiply(a);return this}}(),
-rotateX:function(){var a=new THREE.Vector3(1,0,0);return function(b){return this.rotateOnAxis(a,b)}}(),rotateY:function(){var a=new THREE.Vector3(0,1,0);return function(b){return this.rotateOnAxis(a,b)}}(),rotateZ:function(){var a=new THREE.Vector3(0,0,1);return function(b){return this.rotateOnAxis(a,b)}}(),translateOnAxis:function(){var a=new THREE.Vector3;return function(b,c){a.copy(b);a.applyQuaternion(this.quaternion);this.position.add(a.multiplyScalar(c));return this}}(),translate:function(a,
-b){console.warn("DEPRECATED: Object3D's .translate() has been removed. Use .translateOnAxis( axis, distance ) instead. Note args have been changed.");return this.translateOnAxis(b,a)},translateX:function(){var a=new THREE.Vector3(1,0,0);return function(b){return this.translateOnAxis(a,b)}}(),translateY:function(){var a=new THREE.Vector3(0,1,0);return function(b){return this.translateOnAxis(a,b)}}(),translateZ:function(){var a=new THREE.Vector3(0,0,1);return function(b){return this.translateOnAxis(a,
-b)}}(),localToWorld:function(a){return a.applyMatrix4(this.matrixWorld)},worldToLocal:function(){var a=new THREE.Matrix4;return function(b){return b.applyMatrix4(a.getInverse(this.matrixWorld))}}(),lookAt:function(){var a=new THREE.Matrix4;return function(b){a.lookAt(b,this.position,this.up);this.quaternion.setFromRotationMatrix(a)}}(),add:function(a){if(a===this)console.warn("THREE.Object3D.add: An object can't be added as a child of itself.");else if(a instanceof THREE.Object3D){void 0!==a.parent&&
-a.parent.remove(a);a.parent=this;a.dispatchEvent({type:"added"});this.children.push(a);for(var b=this;void 0!==b.parent;)b=b.parent;void 0!==b&&b instanceof THREE.Scene&&b.__addObject(a)}},remove:function(a){var b=this.children.indexOf(a);if(-1!==b){a.parent=void 0;a.dispatchEvent({type:"removed"});this.children.splice(b,1);for(b=this;void 0!==b.parent;)b=b.parent;void 0!==b&&b instanceof THREE.Scene&&b.__removeObject(a)}},traverse:function(a){a(this);for(var b=0,c=this.children.length;b<c;b++)this.children[b].traverse(a)},
-getObjectById:function(a,b){for(var c=0,d=this.children.length;c<d;c++){var e=this.children[c];if(e.id===a||!0===b&&(e=e.getObjectById(a,b),void 0!==e))return e}},getObjectByName:function(a,b){for(var c=0,d=this.children.length;c<d;c++){var e=this.children[c];if(e.name===a||!0===b&&(e=e.getObjectByName(a,b),void 0!==e))return e}},getChildByName:function(a,b){console.warn("DEPRECATED: Object3D's .getChildByName() has been renamed to .getObjectByName().");return this.getObjectByName(a,b)},getDescendants:function(a){void 0===
-a&&(a=[]);Array.prototype.push.apply(a,this.children);for(var b=0,c=this.children.length;b<c;b++)this.children[b].getDescendants(a);return a},updateMatrix:function(){this.matrix.compose(this.position,this.quaternion,this.scale);this.matrixWorldNeedsUpdate=!0},updateMatrixWorld:function(a){!0===this.matrixAutoUpdate&&this.updateMatrix();if(!0===this.matrixWorldNeedsUpdate||!0===a)void 0===this.parent?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),
-this.matrixWorldNeedsUpdate=!1,a=!0;for(var b=0,c=this.children.length;b<c;b++)this.children[b].updateMatrixWorld(a)},clone:function(a,b){void 0===a&&(a=new THREE.Object3D);void 0===b&&(b=!0);a.name=this.name;a.up.copy(this.up);a.position.copy(this.position);a.quaternion.copy(this.quaternion);a.scale.copy(this.scale);a.renderDepth=this.renderDepth;a.rotationAutoUpdate=this.rotationAutoUpdate;a.matrix.copy(this.matrix);a.matrixWorld.copy(this.matrixWorld);a.matrixAutoUpdate=this.matrixAutoUpdate;a.matrixWorldNeedsUpdate=
-this.matrixWorldNeedsUpdate;a.visible=this.visible;a.castShadow=this.castShadow;a.receiveShadow=this.receiveShadow;a.frustumCulled=this.frustumCulled;a.userData=JSON.parse(JSON.stringify(this.userData));if(!0===b)for(var c=0;c<this.children.length;c++)a.add(this.children[c].clone());return a}};THREE.Object3DIdCount=0;THREE.Projector=function(){function a(){if(i===l){var a=new THREE.RenderableVertex;j.push(a);l++;i++;return a}return j[i++]}function b(a,b){return a.z!==b.z?b.z-a.z:a.id!==b.id?a.id-b.id:0}function c(a,b){var c=0,d=1,e=a.z+a.w,f=b.z+b.w,h=-a.z+a.w,g=-b.z+b.w;if(0<=e&&0<=f&&0<=h&&0<=g)return!0;if(0>e&&0>f||0>h&&0>g)return!1;0>e?c=Math.max(c,e/(e-f)):0>f&&(d=Math.min(d,e/(e-f)));0>h?c=Math.max(c,h/(h-g)):0>g&&(d=Math.min(d,h/(h-g)));if(d<c)return!1;a.lerp(b,c);b.lerp(a,1-d);return!0}var d,e,f=[],h=
+THREE.Object3D.prototype={constructor:THREE.Object3D,get eulerOrder(){console.warn("DEPRECATED: Object3D's .eulerOrder has been moved to Object3D's .rotation.order.");return this.rotation.order},set eulerOrder(a){console.warn("DEPRECATED: Object3D's .eulerOrder has been moved to Object3D's .rotation.order.");this.rotation.order=a},get useQuaternion(){console.warn("DEPRECATED: Object3D's .useQuaternion has been removed. The library now uses quaternions by default.")},set useQuaternion(a){console.warn("DEPRECATED: Object3D's .useQuaternion has been removed. The library now uses quaternions by default.")},
+applyMatrix:function(){var a=new THREE.Matrix4;return function(b){this.matrix.multiplyMatrices(b,this.matrix);this.position.getPositionFromMatrix(this.matrix);this.scale.getScaleFromMatrix(this.matrix);a.extractRotation(this.matrix);this.quaternion.setFromRotationMatrix(a)}}(),setRotationFromAxisAngle:function(a,b){this.quaternion.setFromAxisAngle(a,b)},setRotationFromEuler:function(a){this.quaternion.setFromEuler(a,!0)},setRotationFromMatrix:function(a){this.quaternion.setFromRotationMatrix(a)},
+setRotationFromQuaternion:function(a){this.quaternion.copy(a)},rotateOnAxis:function(){var a=new THREE.Quaternion;return function(b,c){a.setFromAxisAngle(b,c);this.quaternion.multiply(a);return this}}(),rotateX:function(){var a=new THREE.Vector3(1,0,0);return function(b){return this.rotateOnAxis(a,b)}}(),rotateY:function(){var a=new THREE.Vector3(0,1,0);return function(b){return this.rotateOnAxis(a,b)}}(),rotateZ:function(){var a=new THREE.Vector3(0,0,1);return function(b){return this.rotateOnAxis(a,
+b)}}(),translateOnAxis:function(){var a=new THREE.Vector3;return function(b,c){a.copy(b);a.applyQuaternion(this.quaternion);this.position.add(a.multiplyScalar(c));return this}}(),translate:function(a,b){console.warn("DEPRECATED: Object3D's .translate() has been removed. Use .translateOnAxis( axis, distance ) instead. Note args have been changed.");return this.translateOnAxis(b,a)},translateX:function(){var a=new THREE.Vector3(1,0,0);return function(b){return this.translateOnAxis(a,b)}}(),translateY:function(){var a=
+new THREE.Vector3(0,1,0);return function(b){return this.translateOnAxis(a,b)}}(),translateZ:function(){var a=new THREE.Vector3(0,0,1);return function(b){return this.translateOnAxis(a,b)}}(),localToWorld:function(a){return a.applyMatrix4(this.matrixWorld)},worldToLocal:function(){var a=new THREE.Matrix4;return function(b){return b.applyMatrix4(a.getInverse(this.matrixWorld))}}(),lookAt:function(){var a=new THREE.Matrix4;return function(b){a.lookAt(b,this.position,this.up);this.quaternion.setFromRotationMatrix(a)}}(),
+add:function(a){if(a===this)console.warn("THREE.Object3D.add: An object can't be added as a child of itself.");else if(a instanceof THREE.Object3D){void 0!==a.parent&&a.parent.remove(a);a.parent=this;a.dispatchEvent({type:"added"});this.children.push(a);for(var b=this;void 0!==b.parent;)b=b.parent;void 0!==b&&b instanceof THREE.Scene&&b.__addObject(a)}},remove:function(a){var b=this.children.indexOf(a);if(-1!==b){a.parent=void 0;a.dispatchEvent({type:"removed"});this.children.splice(b,1);for(b=this;void 0!==
+b.parent;)b=b.parent;void 0!==b&&b instanceof THREE.Scene&&b.__removeObject(a)}},traverse:function(a){a(this);for(var b=0,c=this.children.length;b<c;b++)this.children[b].traverse(a)},getObjectById:function(a,b){for(var c=0,d=this.children.length;c<d;c++){var e=this.children[c];if(e.id===a||!0===b&&(e=e.getObjectById(a,b),void 0!==e))return e}},getObjectByName:function(a,b){for(var c=0,d=this.children.length;c<d;c++){var e=this.children[c];if(e.name===a||!0===b&&(e=e.getObjectByName(a,b),void 0!==
+e))return e}},getChildByName:function(a,b){console.warn("DEPRECATED: Object3D's .getChildByName() has been renamed to .getObjectByName().");return this.getObjectByName(a,b)},getDescendants:function(a){void 0===a&&(a=[]);Array.prototype.push.apply(a,this.children);for(var b=0,c=this.children.length;b<c;b++)this.children[b].getDescendants(a);return a},updateMatrix:function(){this.matrix.compose(this.position,this.quaternion,this.scale);this.matrixWorldNeedsUpdate=!0},updateMatrixWorld:function(a){!0===
+this.matrixAutoUpdate&&this.updateMatrix();if(!0===this.matrixWorldNeedsUpdate||!0===a)void 0===this.parent?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),this.matrixWorldNeedsUpdate=!1,a=!0;for(var b=0,c=this.children.length;b<c;b++)this.children[b].updateMatrixWorld(a)},clone:function(a,b){void 0===a&&(a=new THREE.Object3D);void 0===b&&(b=!0);a.name=this.name;a.up.copy(this.up);a.position.copy(this.position);a.quaternion.copy(this.quaternion);
+a.scale.copy(this.scale);a.renderDepth=this.renderDepth;a.rotationAutoUpdate=this.rotationAutoUpdate;a.matrix.copy(this.matrix);a.matrixWorld.copy(this.matrixWorld);a.matrixAutoUpdate=this.matrixAutoUpdate;a.matrixWorldNeedsUpdate=this.matrixWorldNeedsUpdate;a.visible=this.visible;a.castShadow=this.castShadow;a.receiveShadow=this.receiveShadow;a.frustumCulled=this.frustumCulled;a.userData=JSON.parse(JSON.stringify(this.userData));if(!0===b)for(var c=0;c<this.children.length;c++)a.add(this.children[c].clone());
+return a}};THREE.EventDispatcher.prototype.apply(THREE.Object3D.prototype);THREE.Object3DIdCount=0;THREE.Projector=function(){function a(){if(i===l){var a=new THREE.RenderableVertex;j.push(a);l++;i++;return a}return j[i++]}function b(a,b){return a.z!==b.z?b.z-a.z:a.id!==b.id?a.id-b.id:0}function c(a,b){var c=0,d=1,e=a.z+a.w,f=b.z+b.w,h=-a.z+a.w,g=-b.z+b.w;if(0<=e&&0<=f&&0<=h&&0<=g)return!0;if(0>e&&0>f||0>h&&0>g)return!1;0>e?c=Math.max(c,e/(e-f)):0>f&&(d=Math.min(d,e/(e-f)));0>h?c=Math.max(c,h/(h-g)):0>g&&(d=Math.min(d,h/(h-g)));if(d<c)return!1;a.lerp(b,c);b.lerp(a,1-d);return!0}var d,e,f=[],h=
 0,g,i,j=[],l=0,m,n,p=[],t=0,q,r=[],s=0,v,z,C=[],F=0,H,I,G=[],A=0,K={objects:[],sprites:[],lights:[],elements:[]},B=new THREE.Vector3,J=new THREE.Vector4,N=new THREE.Box3(new THREE.Vector3(-1,-1,-1),new THREE.Vector3(1,1,1)),y=new THREE.Box3,M=Array(3),w=Array(4),Z=new THREE.Matrix4,L=new THREE.Matrix4,pa,Pa=new THREE.Matrix4,Ua=new THREE.Matrix3,O=new THREE.Matrix3,ka=new THREE.Vector3,Fa=new THREE.Frustum,wa=new THREE.Vector4,D=new THREE.Vector4;this.projectVector=function(a,b){b.matrixWorldInverse.getInverse(b.matrixWorld);
 L.multiplyMatrices(b.projectionMatrix,b.matrixWorldInverse);return a.applyProjection(L)};this.unprojectVector=function(a,b){b.projectionMatrixInverse.getInverse(b.projectionMatrix);L.multiplyMatrices(b.matrixWorld,b.projectionMatrixInverse);return a.applyProjection(L)};this.pickingRay=function(a,b){a.z=-1;var c=new THREE.Vector3(a.x,a.y,1);this.unprojectVector(a,b);this.unprojectVector(c,b);c.sub(a).normalize();return new THREE.Raycaster(a,c)};var V=function(a){if(e===h){var b=new THREE.RenderableObject;
 f.push(b);h++;e++;d=b}else d=f[e++];d.id=a.id;d.object=a;null!==a.renderDepth?d.z=a.renderDepth:(B.getPositionFromMatrix(a.matrixWorld),B.applyProjection(L),d.z=B.z);return d},ea=function(a){if(!1!==a.visible){a instanceof THREE.Light?K.lights.push(a):a instanceof THREE.Mesh||a instanceof THREE.Line?(!1===a.frustumCulled||!0===Fa.intersectsObject(a))&&K.objects.push(V(a)):(a instanceof THREE.Sprite||a instanceof THREE.Particle)&&K.sprites.push(V(a));for(var b=0,c=a.children.length;b<c;b++)ea(a.children[b])}};
@@ -174,33 +174,31 @@ return a}};THREE.Face4=function(a,b,c,d,e,f,h){this.a=a;this.b=b;this.c=c;this.d
 THREE.Face4.prototype={constructor:THREE.Face4,clone:function(){var a=new THREE.Face4(this.a,this.b,this.c,this.d);a.normal.copy(this.normal);a.color.copy(this.color);a.centroid.copy(this.centroid);a.materialIndex=this.materialIndex;var b,c;b=0;for(c=this.vertexNormals.length;b<c;b++)a.vertexNormals[b]=this.vertexNormals[b].clone();b=0;for(c=this.vertexColors.length;b<c;b++)a.vertexColors[b]=this.vertexColors[b].clone();b=0;for(c=this.vertexTangents.length;b<c;b++)a.vertexTangents[b]=this.vertexTangents[b].clone();
 return a}};THREE.Geometry=function(){this.id=THREE.GeometryIdCount++;this.uuid=THREE.Math.generateUUID();this.name="";this.vertices=[];this.colors=[];this.normals=[];this.faces=[];this.faceUvs=[[]];this.faceVertexUvs=[[]];this.morphTargets=[];this.morphColors=[];this.morphNormals=[];this.skinWeights=[];this.skinIndices=[];this.lineDistances=[];this.boundingSphere=this.boundingBox=null;this.hasTangents=!1;this.dynamic=!0;this.buffersNeedUpdate=this.lineDistancesNeedUpdate=this.colorsNeedUpdate=this.tangentsNeedUpdate=
 this.normalsNeedUpdate=this.uvsNeedUpdate=this.elementsNeedUpdate=this.verticesNeedUpdate=!1};
-THREE.Geometry.prototype={constructor:THREE.Geometry,addEventListener:THREE.EventDispatcher.prototype.addEventListener,hasEventListener:THREE.EventDispatcher.prototype.hasEventListener,removeEventListener:THREE.EventDispatcher.prototype.removeEventListener,dispatchEvent:THREE.EventDispatcher.prototype.dispatchEvent,applyMatrix:function(a){for(var b=(new THREE.Matrix3).getNormalMatrix(a),c=0,d=this.vertices.length;c<d;c++)this.vertices[c].applyMatrix4(a);c=0;for(d=this.faces.length;c<d;c++){var e=
-this.faces[c];e.normal.applyMatrix3(b).normalize();for(var f=0,h=e.vertexNormals.length;f<h;f++)e.vertexNormals[f].applyMatrix3(b).normalize();e.centroid.applyMatrix4(a)}this.boundingBox instanceof THREE.Box3&&this.computeBoundingBox();this.boundingSphere instanceof THREE.Sphere&&this.computeBoundingSphere()},computeCentroids:function(){var a,b,c;a=0;for(b=this.faces.length;a<b;a++)c=this.faces[a],c.centroid.set(0,0,0),c instanceof THREE.Face3?(c.centroid.add(this.vertices[c.a]),c.centroid.add(this.vertices[c.b]),
-c.centroid.add(this.vertices[c.c]),c.centroid.divideScalar(3)):c instanceof THREE.Face4&&(c.centroid.add(this.vertices[c.a]),c.centroid.add(this.vertices[c.b]),c.centroid.add(this.vertices[c.c]),c.centroid.add(this.vertices[c.d]),c.centroid.divideScalar(4))},computeFaceNormals:function(){for(var a=new THREE.Vector3,b=new THREE.Vector3,c=0,d=this.faces.length;c<d;c++){var e=this.faces[c],f=this.vertices[e.a],h=this.vertices[e.b];a.subVectors(this.vertices[e.c],h);b.subVectors(f,h);a.cross(b);a.normalize();
-e.normal.copy(a)}},computeVertexNormals:function(a){var b,c,d,e;if(void 0===this.__tmpVertices){e=this.__tmpVertices=Array(this.vertices.length);b=0;for(c=this.vertices.length;b<c;b++)e[b]=new THREE.Vector3;b=0;for(c=this.faces.length;b<c;b++)d=this.faces[b],d instanceof THREE.Face3?d.vertexNormals=[new THREE.Vector3,new THREE.Vector3,new THREE.Vector3]:d instanceof THREE.Face4&&(d.vertexNormals=[new THREE.Vector3,new THREE.Vector3,new THREE.Vector3,new THREE.Vector3])}else{e=this.__tmpVertices;b=
-0;for(c=this.vertices.length;b<c;b++)e[b].set(0,0,0)}if(a){var f,h,g,i=new THREE.Vector3,j=new THREE.Vector3,l=new THREE.Vector3,m=new THREE.Vector3,n=new THREE.Vector3;b=0;for(c=this.faces.length;b<c;b++)d=this.faces[b],d instanceof THREE.Face3?(a=this.vertices[d.a],f=this.vertices[d.b],h=this.vertices[d.c],i.subVectors(h,f),j.subVectors(a,f),i.cross(j),e[d.a].add(i),e[d.b].add(i),e[d.c].add(i)):d instanceof THREE.Face4&&(a=this.vertices[d.a],f=this.vertices[d.b],h=this.vertices[d.c],g=this.vertices[d.d],
-l.subVectors(g,f),j.subVectors(a,f),l.cross(j),e[d.a].add(l),e[d.b].add(l),e[d.d].add(l),m.subVectors(g,h),n.subVectors(f,h),m.cross(n),e[d.b].add(m),e[d.c].add(m),e[d.d].add(m))}else{b=0;for(c=this.faces.length;b<c;b++)d=this.faces[b],d instanceof THREE.Face3?(e[d.a].add(d.normal),e[d.b].add(d.normal),e[d.c].add(d.normal)):d instanceof THREE.Face4&&(e[d.a].add(d.normal),e[d.b].add(d.normal),e[d.c].add(d.normal),e[d.d].add(d.normal))}b=0;for(c=this.vertices.length;b<c;b++)e[b].normalize();b=0;for(c=
-this.faces.length;b<c;b++)d=this.faces[b],d instanceof THREE.Face3?(d.vertexNormals[0].copy(e[d.a]),d.vertexNormals[1].copy(e[d.b]),d.vertexNormals[2].copy(e[d.c])):d instanceof THREE.Face4&&(d.vertexNormals[0].copy(e[d.a]),d.vertexNormals[1].copy(e[d.b]),d.vertexNormals[2].copy(e[d.c]),d.vertexNormals[3].copy(e[d.d]))},computeMorphNormals:function(){var a,b,c,d,e;c=0;for(d=this.faces.length;c<d;c++){e=this.faces[c];e.__originalFaceNormal?e.__originalFaceNormal.copy(e.normal):e.__originalFaceNormal=
-e.normal.clone();e.__originalVertexNormals||(e.__originalVertexNormals=[]);a=0;for(b=e.vertexNormals.length;a<b;a++)e.__originalVertexNormals[a]?e.__originalVertexNormals[a].copy(e.vertexNormals[a]):e.__originalVertexNormals[a]=e.vertexNormals[a].clone()}var f=new THREE.Geometry;f.faces=this.faces;a=0;for(b=this.morphTargets.length;a<b;a++){if(!this.morphNormals[a]){this.morphNormals[a]={};this.morphNormals[a].faceNormals=[];this.morphNormals[a].vertexNormals=[];var h=this.morphNormals[a].faceNormals,
-g=this.morphNormals[a].vertexNormals,i,j;c=0;for(d=this.faces.length;c<d;c++)e=this.faces[c],i=new THREE.Vector3,j=e instanceof THREE.Face3?{a:new THREE.Vector3,b:new THREE.Vector3,c:new THREE.Vector3}:{a:new THREE.Vector3,b:new THREE.Vector3,c:new THREE.Vector3,d:new THREE.Vector3},h.push(i),g.push(j)}h=this.morphNormals[a];f.vertices=this.morphTargets[a].vertices;f.computeFaceNormals();f.computeVertexNormals();c=0;for(d=this.faces.length;c<d;c++)e=this.faces[c],i=h.faceNormals[c],j=h.vertexNormals[c],
-i.copy(e.normal),e instanceof THREE.Face3?(j.a.copy(e.vertexNormals[0]),j.b.copy(e.vertexNormals[1]),j.c.copy(e.vertexNormals[2])):(j.a.copy(e.vertexNormals[0]),j.b.copy(e.vertexNormals[1]),j.c.copy(e.vertexNormals[2]),j.d.copy(e.vertexNormals[3]))}c=0;for(d=this.faces.length;c<d;c++)e=this.faces[c],e.normal=e.__originalFaceNormal,e.vertexNormals=e.__originalVertexNormals},computeTangents:function(){function a(a,b,c,d,e,f,y){g=a.vertices[b];i=a.vertices[c];j=a.vertices[d];l=h[e];m=h[f];n=h[y];p=i.x-
-g.x;t=j.x-g.x;q=i.y-g.y;r=j.y-g.y;s=i.z-g.z;v=j.z-g.z;z=m.x-l.x;C=n.x-l.x;F=m.y-l.y;H=n.y-l.y;I=1/(z*H-C*F);B.set((H*p-F*t)*I,(H*q-F*r)*I,(H*s-F*v)*I);J.set((z*t-C*p)*I,(z*r-C*q)*I,(z*v-C*s)*I);A[b].add(B);A[c].add(B);A[d].add(B);K[b].add(J);K[c].add(J);K[d].add(J)}var b,c,d,e,f,h,g,i,j,l,m,n,p,t,q,r,s,v,z,C,F,H,I,G,A=[],K=[],B=new THREE.Vector3,J=new THREE.Vector3,N=new THREE.Vector3,y=new THREE.Vector3,M=new THREE.Vector3;b=0;for(c=this.vertices.length;b<c;b++)A[b]=new THREE.Vector3,K[b]=new THREE.Vector3;
-b=0;for(c=this.faces.length;b<c;b++)f=this.faces[b],h=this.faceVertexUvs[0][b],f instanceof THREE.Face3?a(this,f.a,f.b,f.c,0,1,2):f instanceof THREE.Face4&&(a(this,f.a,f.b,f.d,0,1,3),a(this,f.b,f.c,f.d,1,2,3));var w=["a","b","c","d"];b=0;for(c=this.faces.length;b<c;b++){f=this.faces[b];for(d=0;d<f.vertexNormals.length;d++)M.copy(f.vertexNormals[d]),e=f[w[d]],G=A[e],N.copy(G),N.sub(M.multiplyScalar(M.dot(G))).normalize(),y.crossVectors(f.vertexNormals[d],G),e=y.dot(K[e]),e=0>e?-1:1,f.vertexTangents[d]=
-new THREE.Vector4(N.x,N.y,N.z,e)}this.hasTangents=!0},computeLineDistances:function(){for(var a=0,b=this.vertices,c=0,d=b.length;c<d;c++)0<c&&(a+=b[c].distanceTo(b[c-1])),this.lineDistances[c]=a},computeBoundingBox:function(){null===this.boundingBox&&(this.boundingBox=new THREE.Box3);this.boundingBox.setFromPoints(this.vertices)},computeBoundingSphere:function(){null===this.boundingSphere&&(this.boundingSphere=new THREE.Sphere);this.boundingSphere.setFromPoints(this.vertices)},mergeVertices:function(){var a=
-{},b=[],c=[],d,e=Math.pow(10,4),f,h,g,i,j;this.__tmpVertices=void 0;f=0;for(h=this.vertices.length;f<h;f++)d=this.vertices[f],d=Math.round(d.x*e)+"_"+Math.round(d.y*e)+"_"+Math.round(d.z*e),void 0===a[d]?(a[d]=f,b.push(this.vertices[f]),c[f]=b.length-1):c[f]=c[a[d]];e=[];f=0;for(h=this.faces.length;f<h;f++)if(a=this.faces[f],a instanceof THREE.Face3){a.a=c[a.a];a.b=c[a.b];a.c=c[a.c];g=[a.a,a.b,a.c];d=-1;for(i=0;3>i;i++)if(g[i]==g[(i+1)%3]){e.push(f);break}}else if(a instanceof THREE.Face4){a.a=c[a.a];
-a.b=c[a.b];a.c=c[a.c];a.d=c[a.d];g=[a.a,a.b,a.c,a.d];d=-1;for(i=0;4>i;i++)g[i]==g[(i+1)%4]&&(0<=d&&e.push(f),d=i);if(0<=d){g.splice(d,1);var l=new THREE.Face3(g[0],g[1],g[2],a.normal,a.color,a.materialIndex);g=0;for(i=this.faceVertexUvs.length;g<i;g++)(j=this.faceVertexUvs[g][f])&&j.splice(d,1);a.vertexNormals&&0<a.vertexNormals.length&&(l.vertexNormals=a.vertexNormals,l.vertexNormals.splice(d,1));a.vertexColors&&0<a.vertexColors.length&&(l.vertexColors=a.vertexColors,l.vertexColors.splice(d,1));
-this.faces[f]=l}}for(f=e.length-1;0<=f;f--){this.faces.splice(f,1);g=0;for(i=this.faceVertexUvs.length;g<i;g++)this.faceVertexUvs[g].splice(f,1)}c=this.vertices.length-b.length;this.vertices=b;return c},clone:function(){for(var a=new THREE.Geometry,b=this.vertices,c=0,d=b.length;c<d;c++)a.vertices.push(b[c].clone());b=this.faces;c=0;for(d=b.length;c<d;c++)a.faces.push(b[c].clone());b=this.faceVertexUvs[0];c=0;for(d=b.length;c<d;c++){for(var e=b[c],f=[],h=0,g=e.length;h<g;h++)f.push(new THREE.Vector2(e[h].x,
-e[h].y));a.faceVertexUvs[0].push(f)}return a},dispose:function(){this.dispatchEvent({type:"dispose"})}};THREE.GeometryIdCount=0;THREE.BufferGeometry=function(){this.id=THREE.GeometryIdCount++;this.uuid=THREE.Math.generateUUID();this.attributes={};this.dynamic=!1;this.offsets=[];this.boundingSphere=this.boundingBox=null;this.hasTangents=!1;this.morphTargets=[]};
-THREE.BufferGeometry.prototype={constructor:THREE.BufferGeometry,addEventListener:THREE.EventDispatcher.prototype.addEventListener,hasEventListener:THREE.EventDispatcher.prototype.hasEventListener,removeEventListener:THREE.EventDispatcher.prototype.removeEventListener,dispatchEvent:THREE.EventDispatcher.prototype.dispatchEvent,applyMatrix:function(a){var b,c;this.attributes.position&&(b=this.attributes.position.array);this.attributes.normal&&(c=this.attributes.normal.array);void 0!==b&&(a.multiplyVector3Array(b),
-this.verticesNeedUpdate=!0);void 0!==c&&((new THREE.Matrix3).getNormalMatrix(a).multiplyVector3Array(c),this.normalizeNormals(),this.normalsNeedUpdate=!0)},computeBoundingBox:function(){null===this.boundingBox&&(this.boundingBox=new THREE.Box3);var a=this.attributes.position.array;if(a){var b=this.boundingBox,c,d,e;3<=a.length&&(b.min.x=b.max.x=a[0],b.min.y=b.max.y=a[1],b.min.z=b.max.z=a[2]);for(var f=3,h=a.length;f<h;f+=3)c=a[f],d=a[f+1],e=a[f+2],c<b.min.x?b.min.x=c:c>b.max.x&&(b.max.x=c),d<b.min.y?
-b.min.y=d:d>b.max.y&&(b.max.y=d),e<b.min.z?b.min.z=e:e>b.max.z&&(b.max.z=e)}if(void 0===a||0===a.length)this.boundingBox.min.set(0,0,0),this.boundingBox.max.set(0,0,0)},computeBoundingSphere:function(){null===this.boundingSphere&&(this.boundingSphere=new THREE.Sphere);var a=this.attributes.position.array;if(a){for(var b,c=0,d,e,f=0,h=a.length;f<h;f+=3)b=a[f],d=a[f+1],e=a[f+2],b=b*b+d*d+e*e,b>c&&(c=b);this.boundingSphere.radius=Math.sqrt(c)}},computeVertexNormals:function(){if(this.attributes.position){var a,
-b,c,d;a=this.attributes.position.array.length;if(void 0===this.attributes.normal)this.attributes.normal={itemSize:3,array:new Float32Array(a)};else{a=0;for(b=this.attributes.normal.array.length;a<b;a++)this.attributes.normal.array[a]=0}var e=this.attributes.position.array,f=this.attributes.normal.array,h,g,i,j,l,m,n=new THREE.Vector3,p=new THREE.Vector3,t=new THREE.Vector3,q=new THREE.Vector3,r=new THREE.Vector3;if(this.attributes.index){var s=this.attributes.index.array,v=this.offsets;c=0;for(d=
-v.length;c<d;++c){b=v[c].start;h=v[c].count;var z=v[c].index;a=b;for(b+=h;a<b;a+=3)h=z+s[a],g=z+s[a+1],i=z+s[a+2],j=e[3*h],l=e[3*h+1],m=e[3*h+2],n.set(j,l,m),j=e[3*g],l=e[3*g+1],m=e[3*g+2],p.set(j,l,m),j=e[3*i],l=e[3*i+1],m=e[3*i+2],t.set(j,l,m),q.subVectors(t,p),r.subVectors(n,p),q.cross(r),f[3*h]+=q.x,f[3*h+1]+=q.y,f[3*h+2]+=q.z,f[3*g]+=q.x,f[3*g+1]+=q.y,f[3*g+2]+=q.z,f[3*i]+=q.x,f[3*i+1]+=q.y,f[3*i+2]+=q.z}}else{a=0;for(b=e.length;a<b;a+=9)j=e[a],l=e[a+1],m=e[a+2],n.set(j,l,m),j=e[a+3],l=e[a+4],
-m=e[a+5],p.set(j,l,m),j=e[a+6],l=e[a+7],m=e[a+8],t.set(j,l,m),q.subVectors(t,p),r.subVectors(n,p),q.cross(r),f[a]=q.x,f[a+1]=q.y,f[a+2]=q.z,f[a+3]=q.x,f[a+4]=q.y,f[a+5]=q.z,f[a+6]=q.x,f[a+7]=q.y,f[a+8]=q.z}this.normalizeNormals();this.normalsNeedUpdate=!0}},normalizeNormals:function(){for(var a=this.attributes.normal.array,b,c,d,e=0,f=a.length;e<f;e+=3)b=a[e],c=a[e+1],d=a[e+2],b=1/Math.sqrt(b*b+c*c+d*d),a[e]*=b,a[e+1]*=b,a[e+2]*=b},computeTangents:function(){function a(a){Pa.x=d[3*a];Pa.y=d[3*a+1];
-Pa.z=d[3*a+2];Ua.copy(Pa);ka=g[a];L.copy(ka);L.sub(Pa.multiplyScalar(Pa.dot(ka))).normalize();pa.crossVectors(Ua,ka);Fa=pa.dot(i[a]);O=0>Fa?-1:1;h[4*a]=L.x;h[4*a+1]=L.y;h[4*a+2]=L.z;h[4*a+3]=O}if(void 0===this.attributes.index||void 0===this.attributes.position||void 0===this.attributes.normal||void 0===this.attributes.uv)console.warn("Missing required attributes (index, position, normal or uv) in BufferGeometry.computeTangents()");else{var b=this.attributes.index.array,c=this.attributes.position.array,
-d=this.attributes.normal.array,e=this.attributes.uv.array,f=c.length/3;void 0===this.attributes.tangent&&(this.attributes.tangent={itemSize:4,array:new Float32Array(4*f)});for(var h=this.attributes.tangent.array,g=[],i=[],j=0;j<f;j++)g[j]=new THREE.Vector3,i[j]=new THREE.Vector3;var l,m,n,p,t,q,r,s,v,z,C,F,H,I,G,f=new THREE.Vector3,j=new THREE.Vector3,A,K,B,J,N,y,M,w=this.offsets;B=0;for(J=w.length;B<J;++B){K=w[B].start;N=w[B].count;var Z=w[B].index;A=K;for(K+=N;A<K;A+=3)N=Z+b[A],y=Z+b[A+1],M=Z+b[A+
-2],l=c[3*N],m=c[3*N+1],n=c[3*N+2],p=c[3*y],t=c[3*y+1],q=c[3*y+2],r=c[3*M],s=c[3*M+1],v=c[3*M+2],z=e[2*N],C=e[2*N+1],F=e[2*y],H=e[2*y+1],I=e[2*M],G=e[2*M+1],p-=l,l=r-l,t-=m,m=s-m,q-=n,n=v-n,F-=z,z=I-z,H-=C,C=G-C,G=1/(F*C-z*H),f.set((C*p-H*l)*G,(C*t-H*m)*G,(C*q-H*n)*G),j.set((F*l-z*p)*G,(F*m-z*t)*G,(F*n-z*q)*G),g[N].add(f),g[y].add(f),g[M].add(f),i[N].add(j),i[y].add(j),i[M].add(j)}var L=new THREE.Vector3,pa=new THREE.Vector3,Pa=new THREE.Vector3,Ua=new THREE.Vector3,O,ka,Fa;B=0;for(J=w.length;B<J;++B){K=
-w[B].start;N=w[B].count;Z=w[B].index;A=K;for(K+=N;A<K;A+=3)N=Z+b[A],y=Z+b[A+1],M=Z+b[A+2],a(N),a(y),a(M)}this.tangentsNeedUpdate=this.hasTangents=!0}},dispose:function(){this.dispatchEvent({type:"dispose"})}};THREE.Camera=function(){THREE.Object3D.call(this);this.matrixWorldInverse=new THREE.Matrix4;this.projectionMatrix=new THREE.Matrix4;this.projectionMatrixInverse=new THREE.Matrix4};THREE.Camera.prototype=Object.create(THREE.Object3D.prototype);THREE.Camera.prototype.lookAt=function(){var a=new THREE.Matrix4;return function(b){a.lookAt(this.position,b,this.up);this.quaternion.setFromRotationMatrix(a)}}();THREE.OrthographicCamera=function(a,b,c,d,e,f){THREE.Camera.call(this);this.left=a;this.right=b;this.top=c;this.bottom=d;this.near=void 0!==e?e:0.1;this.far=void 0!==f?f:2E3;this.updateProjectionMatrix()};THREE.OrthographicCamera.prototype=Object.create(THREE.Camera.prototype);THREE.OrthographicCamera.prototype.updateProjectionMatrix=function(){this.projectionMatrix.makeOrthographic(this.left,this.right,this.top,this.bottom,this.near,this.far)};THREE.PerspectiveCamera=function(a,b,c,d){THREE.Camera.call(this);this.fov=void 0!==a?a:50;this.aspect=void 0!==b?b:1;this.near=void 0!==c?c:0.1;this.far=void 0!==d?d:2E3;this.updateProjectionMatrix()};THREE.PerspectiveCamera.prototype=Object.create(THREE.Camera.prototype);THREE.PerspectiveCamera.prototype.setLens=function(a,b){void 0===b&&(b=24);this.fov=2*THREE.Math.radToDeg(Math.atan(b/(2*a)));this.updateProjectionMatrix()};
+THREE.Geometry.prototype={constructor:THREE.Geometry,applyMatrix:function(a){for(var b=(new THREE.Matrix3).getNormalMatrix(a),c=0,d=this.vertices.length;c<d;c++)this.vertices[c].applyMatrix4(a);c=0;for(d=this.faces.length;c<d;c++){var e=this.faces[c];e.normal.applyMatrix3(b).normalize();for(var f=0,h=e.vertexNormals.length;f<h;f++)e.vertexNormals[f].applyMatrix3(b).normalize();e.centroid.applyMatrix4(a)}this.boundingBox instanceof THREE.Box3&&this.computeBoundingBox();this.boundingSphere instanceof
+THREE.Sphere&&this.computeBoundingSphere()},computeCentroids:function(){var a,b,c;a=0;for(b=this.faces.length;a<b;a++)c=this.faces[a],c.centroid.set(0,0,0),c instanceof THREE.Face3?(c.centroid.add(this.vertices[c.a]),c.centroid.add(this.vertices[c.b]),c.centroid.add(this.vertices[c.c]),c.centroid.divideScalar(3)):c instanceof THREE.Face4&&(c.centroid.add(this.vertices[c.a]),c.centroid.add(this.vertices[c.b]),c.centroid.add(this.vertices[c.c]),c.centroid.add(this.vertices[c.d]),c.centroid.divideScalar(4))},
+computeFaceNormals:function(){for(var a=new THREE.Vector3,b=new THREE.Vector3,c=0,d=this.faces.length;c<d;c++){var e=this.faces[c],f=this.vertices[e.a],h=this.vertices[e.b];a.subVectors(this.vertices[e.c],h);b.subVectors(f,h);a.cross(b);a.normalize();e.normal.copy(a)}},computeVertexNormals:function(a){var b,c,d,e;if(void 0===this.__tmpVertices){e=this.__tmpVertices=Array(this.vertices.length);b=0;for(c=this.vertices.length;b<c;b++)e[b]=new THREE.Vector3;b=0;for(c=this.faces.length;b<c;b++)d=this.faces[b],
+d instanceof THREE.Face3?d.vertexNormals=[new THREE.Vector3,new THREE.Vector3,new THREE.Vector3]:d instanceof THREE.Face4&&(d.vertexNormals=[new THREE.Vector3,new THREE.Vector3,new THREE.Vector3,new THREE.Vector3])}else{e=this.__tmpVertices;b=0;for(c=this.vertices.length;b<c;b++)e[b].set(0,0,0)}if(a){var f,h,g,i=new THREE.Vector3,j=new THREE.Vector3,l=new THREE.Vector3,m=new THREE.Vector3,n=new THREE.Vector3;b=0;for(c=this.faces.length;b<c;b++)d=this.faces[b],d instanceof THREE.Face3?(a=this.vertices[d.a],
+f=this.vertices[d.b],h=this.vertices[d.c],i.subVectors(h,f),j.subVectors(a,f),i.cross(j),e[d.a].add(i),e[d.b].add(i),e[d.c].add(i)):d instanceof THREE.Face4&&(a=this.vertices[d.a],f=this.vertices[d.b],h=this.vertices[d.c],g=this.vertices[d.d],l.subVectors(g,f),j.subVectors(a,f),l.cross(j),e[d.a].add(l),e[d.b].add(l),e[d.d].add(l),m.subVectors(g,h),n.subVectors(f,h),m.cross(n),e[d.b].add(m),e[d.c].add(m),e[d.d].add(m))}else{b=0;for(c=this.faces.length;b<c;b++)d=this.faces[b],d instanceof THREE.Face3?
+(e[d.a].add(d.normal),e[d.b].add(d.normal),e[d.c].add(d.normal)):d instanceof THREE.Face4&&(e[d.a].add(d.normal),e[d.b].add(d.normal),e[d.c].add(d.normal),e[d.d].add(d.normal))}b=0;for(c=this.vertices.length;b<c;b++)e[b].normalize();b=0;for(c=this.faces.length;b<c;b++)d=this.faces[b],d instanceof THREE.Face3?(d.vertexNormals[0].copy(e[d.a]),d.vertexNormals[1].copy(e[d.b]),d.vertexNormals[2].copy(e[d.c])):d instanceof THREE.Face4&&(d.vertexNormals[0].copy(e[d.a]),d.vertexNormals[1].copy(e[d.b]),d.vertexNormals[2].copy(e[d.c]),
+d.vertexNormals[3].copy(e[d.d]))},computeMorphNormals:function(){var a,b,c,d,e;c=0;for(d=this.faces.length;c<d;c++){e=this.faces[c];e.__originalFaceNormal?e.__originalFaceNormal.copy(e.normal):e.__originalFaceNormal=e.normal.clone();e.__originalVertexNormals||(e.__originalVertexNormals=[]);a=0;for(b=e.vertexNormals.length;a<b;a++)e.__originalVertexNormals[a]?e.__originalVertexNormals[a].copy(e.vertexNormals[a]):e.__originalVertexNormals[a]=e.vertexNormals[a].clone()}var f=new THREE.Geometry;f.faces=
+this.faces;a=0;for(b=this.morphTargets.length;a<b;a++){if(!this.morphNormals[a]){this.morphNormals[a]={};this.morphNormals[a].faceNormals=[];this.morphNormals[a].vertexNormals=[];var h=this.morphNormals[a].faceNormals,g=this.morphNormals[a].vertexNormals,i,j;c=0;for(d=this.faces.length;c<d;c++)e=this.faces[c],i=new THREE.Vector3,j=e instanceof THREE.Face3?{a:new THREE.Vector3,b:new THREE.Vector3,c:new THREE.Vector3}:{a:new THREE.Vector3,b:new THREE.Vector3,c:new THREE.Vector3,d:new THREE.Vector3},
+h.push(i),g.push(j)}h=this.morphNormals[a];f.vertices=this.morphTargets[a].vertices;f.computeFaceNormals();f.computeVertexNormals();c=0;for(d=this.faces.length;c<d;c++)e=this.faces[c],i=h.faceNormals[c],j=h.vertexNormals[c],i.copy(e.normal),e instanceof THREE.Face3?(j.a.copy(e.vertexNormals[0]),j.b.copy(e.vertexNormals[1]),j.c.copy(e.vertexNormals[2])):(j.a.copy(e.vertexNormals[0]),j.b.copy(e.vertexNormals[1]),j.c.copy(e.vertexNormals[2]),j.d.copy(e.vertexNormals[3]))}c=0;for(d=this.faces.length;c<
+d;c++)e=this.faces[c],e.normal=e.__originalFaceNormal,e.vertexNormals=e.__originalVertexNormals},computeTangents:function(){function a(a,b,c,d,e,f,y){g=a.vertices[b];i=a.vertices[c];j=a.vertices[d];l=h[e];m=h[f];n=h[y];p=i.x-g.x;t=j.x-g.x;q=i.y-g.y;r=j.y-g.y;s=i.z-g.z;v=j.z-g.z;z=m.x-l.x;C=n.x-l.x;F=m.y-l.y;H=n.y-l.y;I=1/(z*H-C*F);B.set((H*p-F*t)*I,(H*q-F*r)*I,(H*s-F*v)*I);J.set((z*t-C*p)*I,(z*r-C*q)*I,(z*v-C*s)*I);A[b].add(B);A[c].add(B);A[d].add(B);K[b].add(J);K[c].add(J);K[d].add(J)}var b,c,d,
+e,f,h,g,i,j,l,m,n,p,t,q,r,s,v,z,C,F,H,I,G,A=[],K=[],B=new THREE.Vector3,J=new THREE.Vector3,N=new THREE.Vector3,y=new THREE.Vector3,M=new THREE.Vector3;b=0;for(c=this.vertices.length;b<c;b++)A[b]=new THREE.Vector3,K[b]=new THREE.Vector3;b=0;for(c=this.faces.length;b<c;b++)f=this.faces[b],h=this.faceVertexUvs[0][b],f instanceof THREE.Face3?a(this,f.a,f.b,f.c,0,1,2):f instanceof THREE.Face4&&(a(this,f.a,f.b,f.d,0,1,3),a(this,f.b,f.c,f.d,1,2,3));var w=["a","b","c","d"];b=0;for(c=this.faces.length;b<
+c;b++){f=this.faces[b];for(d=0;d<f.vertexNormals.length;d++)M.copy(f.vertexNormals[d]),e=f[w[d]],G=A[e],N.copy(G),N.sub(M.multiplyScalar(M.dot(G))).normalize(),y.crossVectors(f.vertexNormals[d],G),e=y.dot(K[e]),e=0>e?-1:1,f.vertexTangents[d]=new THREE.Vector4(N.x,N.y,N.z,e)}this.hasTangents=!0},computeLineDistances:function(){for(var a=0,b=this.vertices,c=0,d=b.length;c<d;c++)0<c&&(a+=b[c].distanceTo(b[c-1])),this.lineDistances[c]=a},computeBoundingBox:function(){null===this.boundingBox&&(this.boundingBox=
+new THREE.Box3);this.boundingBox.setFromPoints(this.vertices)},computeBoundingSphere:function(){null===this.boundingSphere&&(this.boundingSphere=new THREE.Sphere);this.boundingSphere.setFromPoints(this.vertices)},mergeVertices:function(){var a={},b=[],c=[],d,e=Math.pow(10,4),f,h,g,i,j;this.__tmpVertices=void 0;f=0;for(h=this.vertices.length;f<h;f++)d=this.vertices[f],d=Math.round(d.x*e)+"_"+Math.round(d.y*e)+"_"+Math.round(d.z*e),void 0===a[d]?(a[d]=f,b.push(this.vertices[f]),c[f]=b.length-1):c[f]=
+c[a[d]];e=[];f=0;for(h=this.faces.length;f<h;f++)if(a=this.faces[f],a instanceof THREE.Face3){a.a=c[a.a];a.b=c[a.b];a.c=c[a.c];g=[a.a,a.b,a.c];d=-1;for(i=0;3>i;i++)if(g[i]==g[(i+1)%3]){e.push(f);break}}else if(a instanceof THREE.Face4){a.a=c[a.a];a.b=c[a.b];a.c=c[a.c];a.d=c[a.d];g=[a.a,a.b,a.c,a.d];d=-1;for(i=0;4>i;i++)g[i]==g[(i+1)%4]&&(0<=d&&e.push(f),d=i);if(0<=d){g.splice(d,1);var l=new THREE.Face3(g[0],g[1],g[2],a.normal,a.color,a.materialIndex);g=0;for(i=this.faceVertexUvs.length;g<i;g++)(j=
+this.faceVertexUvs[g][f])&&j.splice(d,1);a.vertexNormals&&0<a.vertexNormals.length&&(l.vertexNormals=a.vertexNormals,l.vertexNormals.splice(d,1));a.vertexColors&&0<a.vertexColors.length&&(l.vertexColors=a.vertexColors,l.vertexColors.splice(d,1));this.faces[f]=l}}for(f=e.length-1;0<=f;f--){this.faces.splice(f,1);g=0;for(i=this.faceVertexUvs.length;g<i;g++)this.faceVertexUvs[g].splice(f,1)}c=this.vertices.length-b.length;this.vertices=b;return c},clone:function(){for(var a=new THREE.Geometry,b=this.vertices,
+c=0,d=b.length;c<d;c++)a.vertices.push(b[c].clone());b=this.faces;c=0;for(d=b.length;c<d;c++)a.faces.push(b[c].clone());b=this.faceVertexUvs[0];c=0;for(d=b.length;c<d;c++){for(var e=b[c],f=[],h=0,g=e.length;h<g;h++)f.push(new THREE.Vector2(e[h].x,e[h].y));a.faceVertexUvs[0].push(f)}return a},dispose:function(){this.dispatchEvent({type:"dispose"})}};THREE.EventDispatcher.prototype.apply(THREE.Geometry.prototype);THREE.GeometryIdCount=0;THREE.BufferGeometry=function(){this.id=THREE.GeometryIdCount++;this.uuid=THREE.Math.generateUUID();this.attributes={};this.dynamic=!1;this.offsets=[];this.boundingSphere=this.boundingBox=null;this.hasTangents=!1;this.morphTargets=[]};
+THREE.BufferGeometry.prototype={constructor:THREE.BufferGeometry,applyMatrix:function(a){var b,c;this.attributes.position&&(b=this.attributes.position.array);this.attributes.normal&&(c=this.attributes.normal.array);void 0!==b&&(a.multiplyVector3Array(b),this.verticesNeedUpdate=!0);void 0!==c&&((new THREE.Matrix3).getNormalMatrix(a).multiplyVector3Array(c),this.normalizeNormals(),this.normalsNeedUpdate=!0)},computeBoundingBox:function(){null===this.boundingBox&&(this.boundingBox=new THREE.Box3);var a=
+this.attributes.position.array;if(a){var b=this.boundingBox,c,d,e;3<=a.length&&(b.min.x=b.max.x=a[0],b.min.y=b.max.y=a[1],b.min.z=b.max.z=a[2]);for(var f=3,h=a.length;f<h;f+=3)c=a[f],d=a[f+1],e=a[f+2],c<b.min.x?b.min.x=c:c>b.max.x&&(b.max.x=c),d<b.min.y?b.min.y=d:d>b.max.y&&(b.max.y=d),e<b.min.z?b.min.z=e:e>b.max.z&&(b.max.z=e)}if(void 0===a||0===a.length)this.boundingBox.min.set(0,0,0),this.boundingBox.max.set(0,0,0)},computeBoundingSphere:function(){null===this.boundingSphere&&(this.boundingSphere=
+new THREE.Sphere);var a=this.attributes.position.array;if(a){for(var b,c=0,d,e,f=0,h=a.length;f<h;f+=3)b=a[f],d=a[f+1],e=a[f+2],b=b*b+d*d+e*e,b>c&&(c=b);this.boundingSphere.radius=Math.sqrt(c)}},computeVertexNormals:function(){if(this.attributes.position){var a,b,c,d;a=this.attributes.position.array.length;if(void 0===this.attributes.normal)this.attributes.normal={itemSize:3,array:new Float32Array(a)};else{a=0;for(b=this.attributes.normal.array.length;a<b;a++)this.attributes.normal.array[a]=0}var e=
+this.attributes.position.array,f=this.attributes.normal.array,h,g,i,j,l,m,n=new THREE.Vector3,p=new THREE.Vector3,t=new THREE.Vector3,q=new THREE.Vector3,r=new THREE.Vector3;if(this.attributes.index){var s=this.attributes.index.array,v=this.offsets;c=0;for(d=v.length;c<d;++c){b=v[c].start;h=v[c].count;var z=v[c].index;a=b;for(b+=h;a<b;a+=3)h=z+s[a],g=z+s[a+1],i=z+s[a+2],j=e[3*h],l=e[3*h+1],m=e[3*h+2],n.set(j,l,m),j=e[3*g],l=e[3*g+1],m=e[3*g+2],p.set(j,l,m),j=e[3*i],l=e[3*i+1],m=e[3*i+2],t.set(j,l,
+m),q.subVectors(t,p),r.subVectors(n,p),q.cross(r),f[3*h]+=q.x,f[3*h+1]+=q.y,f[3*h+2]+=q.z,f[3*g]+=q.x,f[3*g+1]+=q.y,f[3*g+2]+=q.z,f[3*i]+=q.x,f[3*i+1]+=q.y,f[3*i+2]+=q.z}}else{a=0;for(b=e.length;a<b;a+=9)j=e[a],l=e[a+1],m=e[a+2],n.set(j,l,m),j=e[a+3],l=e[a+4],m=e[a+5],p.set(j,l,m),j=e[a+6],l=e[a+7],m=e[a+8],t.set(j,l,m),q.subVectors(t,p),r.subVectors(n,p),q.cross(r),f[a]=q.x,f[a+1]=q.y,f[a+2]=q.z,f[a+3]=q.x,f[a+4]=q.y,f[a+5]=q.z,f[a+6]=q.x,f[a+7]=q.y,f[a+8]=q.z}this.normalizeNormals();this.normalsNeedUpdate=
+!0}},normalizeNormals:function(){for(var a=this.attributes.normal.array,b,c,d,e=0,f=a.length;e<f;e+=3)b=a[e],c=a[e+1],d=a[e+2],b=1/Math.sqrt(b*b+c*c+d*d),a[e]*=b,a[e+1]*=b,a[e+2]*=b},computeTangents:function(){function a(a){Pa.x=d[3*a];Pa.y=d[3*a+1];Pa.z=d[3*a+2];Ua.copy(Pa);ka=g[a];L.copy(ka);L.sub(Pa.multiplyScalar(Pa.dot(ka))).normalize();pa.crossVectors(Ua,ka);Fa=pa.dot(i[a]);O=0>Fa?-1:1;h[4*a]=L.x;h[4*a+1]=L.y;h[4*a+2]=L.z;h[4*a+3]=O}if(void 0===this.attributes.index||void 0===this.attributes.position||
+void 0===this.attributes.normal||void 0===this.attributes.uv)console.warn("Missing required attributes (index, position, normal or uv) in BufferGeometry.computeTangents()");else{var b=this.attributes.index.array,c=this.attributes.position.array,d=this.attributes.normal.array,e=this.attributes.uv.array,f=c.length/3;void 0===this.attributes.tangent&&(this.attributes.tangent={itemSize:4,array:new Float32Array(4*f)});for(var h=this.attributes.tangent.array,g=[],i=[],j=0;j<f;j++)g[j]=new THREE.Vector3,
+i[j]=new THREE.Vector3;var l,m,n,p,t,q,r,s,v,z,C,F,H,I,G,f=new THREE.Vector3,j=new THREE.Vector3,A,K,B,J,N,y,M,w=this.offsets;B=0;for(J=w.length;B<J;++B){K=w[B].start;N=w[B].count;var Z=w[B].index;A=K;for(K+=N;A<K;A+=3)N=Z+b[A],y=Z+b[A+1],M=Z+b[A+2],l=c[3*N],m=c[3*N+1],n=c[3*N+2],p=c[3*y],t=c[3*y+1],q=c[3*y+2],r=c[3*M],s=c[3*M+1],v=c[3*M+2],z=e[2*N],C=e[2*N+1],F=e[2*y],H=e[2*y+1],I=e[2*M],G=e[2*M+1],p-=l,l=r-l,t-=m,m=s-m,q-=n,n=v-n,F-=z,z=I-z,H-=C,C=G-C,G=1/(F*C-z*H),f.set((C*p-H*l)*G,(C*t-H*m)*G,
+(C*q-H*n)*G),j.set((F*l-z*p)*G,(F*m-z*t)*G,(F*n-z*q)*G),g[N].add(f),g[y].add(f),g[M].add(f),i[N].add(j),i[y].add(j),i[M].add(j)}var L=new THREE.Vector3,pa=new THREE.Vector3,Pa=new THREE.Vector3,Ua=new THREE.Vector3,O,ka,Fa;B=0;for(J=w.length;B<J;++B){K=w[B].start;N=w[B].count;Z=w[B].index;A=K;for(K+=N;A<K;A+=3)N=Z+b[A],y=Z+b[A+1],M=Z+b[A+2],a(N),a(y),a(M)}this.tangentsNeedUpdate=this.hasTangents=!0}},dispose:function(){this.dispatchEvent({type:"dispose"})}};THREE.EventDispatcher.prototype.apply(THREE.BufferGeometry.prototype);THREE.Camera=function(){THREE.Object3D.call(this);this.matrixWorldInverse=new THREE.Matrix4;this.projectionMatrix=new THREE.Matrix4;this.projectionMatrixInverse=new THREE.Matrix4};THREE.Camera.prototype=Object.create(THREE.Object3D.prototype);THREE.Camera.prototype.lookAt=function(){var a=new THREE.Matrix4;return function(b){a.lookAt(this.position,b,this.up);this.quaternion.setFromRotationMatrix(a)}}();THREE.OrthographicCamera=function(a,b,c,d,e,f){THREE.Camera.call(this);this.left=a;this.right=b;this.top=c;this.bottom=d;this.near=void 0!==e?e:0.1;this.far=void 0!==f?f:2E3;this.updateProjectionMatrix()};THREE.OrthographicCamera.prototype=Object.create(THREE.Camera.prototype);THREE.OrthographicCamera.prototype.updateProjectionMatrix=function(){this.projectionMatrix.makeOrthographic(this.left,this.right,this.top,this.bottom,this.near,this.far)};THREE.PerspectiveCamera=function(a,b,c,d){THREE.Camera.call(this);this.fov=void 0!==a?a:50;this.aspect=void 0!==b?b:1;this.near=void 0!==c?c:0.1;this.far=void 0!==d?d:2E3;this.updateProjectionMatrix()};THREE.PerspectiveCamera.prototype=Object.create(THREE.Camera.prototype);THREE.PerspectiveCamera.prototype.setLens=function(a,b){void 0===b&&(b=24);this.fov=2*THREE.Math.radToDeg(Math.atan(b/(2*a)));this.updateProjectionMatrix()};
 THREE.PerspectiveCamera.prototype.setViewOffset=function(a,b,c,d,e,f){this.fullWidth=a;this.fullHeight=b;this.x=c;this.y=d;this.width=e;this.height=f;this.updateProjectionMatrix()};
 THREE.PerspectiveCamera.prototype.updateProjectionMatrix=function(){if(this.fullWidth){var a=this.fullWidth/this.fullHeight,b=Math.tan(THREE.Math.degToRad(0.5*this.fov))*this.near,c=-b,d=a*c,a=Math.abs(a*b-d),c=Math.abs(b-c);this.projectionMatrix.makeFrustum(d+this.x*a/this.fullWidth,d+(this.x+this.width)*a/this.fullWidth,b-(this.y+this.height)*c/this.fullHeight,b-this.y*c/this.fullHeight,this.near,this.far)}else this.projectionMatrix.makePerspective(this.fov,this.aspect,this.near,this.far)};THREE.Light=function(a){THREE.Object3D.call(this);this.color=new THREE.Color(a)};THREE.Light.prototype=Object.create(THREE.Object3D.prototype);THREE.Light.prototype.clone=function(a){void 0===a&&(a=new THREE.Light);THREE.Object3D.prototype.clone.call(this,a);a.color.copy(this.color);return a};THREE.AmbientLight=function(a){THREE.Light.call(this,a)};THREE.AmbientLight.prototype=Object.create(THREE.Light.prototype);THREE.AmbientLight.prototype.clone=function(){var a=new THREE.AmbientLight;THREE.Light.prototype.clone.call(this,a);return a};THREE.AreaLight=function(a,b){THREE.Light.call(this,a);this.normal=new THREE.Vector3(0,-1,0);this.right=new THREE.Vector3(1,0,0);this.intensity=void 0!==b?b:1;this.height=this.width=1;this.constantAttenuation=1.5;this.linearAttenuation=0.5;this.quadraticAttenuation=0.1};THREE.AreaLight.prototype=Object.create(THREE.Light.prototype);THREE.DirectionalLight=function(a,b){THREE.Light.call(this,a);this.position.set(0,1,0);this.target=new THREE.Object3D;this.intensity=void 0!==b?b:1;this.onlyShadow=this.castShadow=!1;this.shadowCameraNear=50;this.shadowCameraFar=5E3;this.shadowCameraLeft=-500;this.shadowCameraTop=this.shadowCameraRight=500;this.shadowCameraBottom=-500;this.shadowCameraVisible=!1;this.shadowBias=0;this.shadowDarkness=0.5;this.shadowMapHeight=this.shadowMapWidth=512;this.shadowCascade=!1;this.shadowCascadeOffset=new THREE.Vector3(0,
 0,-1E3);this.shadowCascadeCount=2;this.shadowCascadeBias=[0,0,0];this.shadowCascadeWidth=[512,512,512];this.shadowCascadeHeight=[512,512,512];this.shadowCascadeNearZ=[-1,0.99,0.998];this.shadowCascadeFarZ=[0.99,0.998,1];this.shadowCascadeArray=[];this.shadowMatrix=this.shadowCamera=this.shadowMapSize=this.shadowMap=null};THREE.DirectionalLight.prototype=Object.create(THREE.Light.prototype);
@@ -256,9 +254,9 @@ s=w.parameters.color,M=w.parameters.specular,r=w.parameters.ambient,N=w.paramete
 y.enableAO.value=!0),w.parameters.specularMap&&(y.tSpecular.value=A.textures[w.parameters.specularMap],y.enableSpecular.value=!0),w.parameters.displacementMap&&(y.tDisplacement.value=A.textures[w.parameters.displacementMap],y.enableDisplacement.value=!0,y.uDisplacementBias.value=w.parameters.displacementBias,y.uDisplacementScale.value=w.parameters.displacementScale),y.uDiffuseColor.value.setHex(s),y.uSpecularColor.value.setHex(M),y.uAmbientColor.value.setHex(r),y.uShininess.value=N,w.parameters.opacity&&
 (y.uOpacity.value=w.parameters.opacity),t=new THREE.ShaderMaterial({fragmentShader:J.fragmentShader,vertexShader:J.vertexShader,uniforms:y,lights:!0,fog:!0})):t=new THREE[w.type](w.parameters);t.name=Z;A.materials[Z]=t}for(Z in B.materials)if(w=B.materials[Z],w.parameters.materials){L=[];for(s=0;s<w.parameters.materials.length;s++)L.push(A.materials[w.parameters.materials[s]]);A.materials[Z].materials=L}e();A.cameras&&B.defaults.camera&&(A.currentCamera=A.cameras[B.defaults.camera]);A.fogs&&B.defaults.fog&&
 (A.scene.fog=A.fogs[B.defaults.fog]);m.callbackSync(A);j()}};THREE.TextureLoader=function(a){this.manager=void 0!==a?a:THREE.DefaultLoadingManager};THREE.TextureLoader.prototype={constructor:THREE.TextureLoader,load:function(a,b){var c=new THREE.ImageLoader(this.manager);c.setCrossOrigin(this.crossOrigin);c.load(a,function(a){a=new THREE.Texture(a);a.needsUpdate=!0;void 0!==b&&b(a)})},setCrossOrigin:function(a){this.crossOrigin=a}};THREE.Material=function(){this.id=THREE.MaterialIdCount++;this.uuid=THREE.Math.generateUUID();this.name="";this.side=THREE.FrontSide;this.opacity=1;this.transparent=!1;this.blending=THREE.NormalBlending;this.blendSrc=THREE.SrcAlphaFactor;this.blendDst=THREE.OneMinusSrcAlphaFactor;this.blendEquation=THREE.AddEquation;this.depthWrite=this.depthTest=!0;this.polygonOffset=!1;this.overdraw=this.alphaTest=this.polygonOffsetUnits=this.polygonOffsetFactor=0;this.needsUpdate=this.visible=!0};
-THREE.Material.prototype={constructor:THREE.Material,addEventListener:THREE.EventDispatcher.prototype.addEventListener,hasEventListener:THREE.EventDispatcher.prototype.hasEventListener,removeEventListener:THREE.EventDispatcher.prototype.removeEventListener,dispatchEvent:THREE.EventDispatcher.prototype.dispatchEvent,setValues:function(a){if(void 0!==a)for(var b in a){var c=a[b];if(void 0===c)console.warn("THREE.Material: '"+b+"' parameter is undefined.");else if(b in this){var d=this[b];d instanceof
-THREE.Color?d.set(c):d instanceof THREE.Vector3&&c instanceof THREE.Vector3?d.copy(c):this[b]="overdraw"==b?Number(c):c}}},clone:function(a){void 0===a&&(a=new THREE.Material);a.name=this.name;a.side=this.side;a.opacity=this.opacity;a.transparent=this.transparent;a.blending=this.blending;a.blendSrc=this.blendSrc;a.blendDst=this.blendDst;a.blendEquation=this.blendEquation;a.depthTest=this.depthTest;a.depthWrite=this.depthWrite;a.polygonOffset=this.polygonOffset;a.polygonOffsetFactor=this.polygonOffsetFactor;
-a.polygonOffsetUnits=this.polygonOffsetUnits;a.alphaTest=this.alphaTest;a.overdraw=this.overdraw;a.visible=this.visible;return a},dispose:function(){this.dispatchEvent({type:"dispose"})}};THREE.MaterialIdCount=0;THREE.LineBasicMaterial=function(a){THREE.Material.call(this);this.color=new THREE.Color(16777215);this.linewidth=1;this.linejoin=this.linecap="round";this.vertexColors=!1;this.fog=!0;this.setValues(a)};THREE.LineBasicMaterial.prototype=Object.create(THREE.Material.prototype);
+THREE.Material.prototype={constructor:THREE.Material,setValues:function(a){if(void 0!==a)for(var b in a){var c=a[b];if(void 0===c)console.warn("THREE.Material: '"+b+"' parameter is undefined.");else if(b in this){var d=this[b];d instanceof THREE.Color?d.set(c):d instanceof THREE.Vector3&&c instanceof THREE.Vector3?d.copy(c):this[b]="overdraw"==b?Number(c):c}}},clone:function(a){void 0===a&&(a=new THREE.Material);a.name=this.name;a.side=this.side;a.opacity=this.opacity;a.transparent=this.transparent;
+a.blending=this.blending;a.blendSrc=this.blendSrc;a.blendDst=this.blendDst;a.blendEquation=this.blendEquation;a.depthTest=this.depthTest;a.depthWrite=this.depthWrite;a.polygonOffset=this.polygonOffset;a.polygonOffsetFactor=this.polygonOffsetFactor;a.polygonOffsetUnits=this.polygonOffsetUnits;a.alphaTest=this.alphaTest;a.overdraw=this.overdraw;a.visible=this.visible;return a},dispose:function(){this.dispatchEvent({type:"dispose"})}};THREE.EventDispatcher.prototype.apply(THREE.Material.prototype);
+THREE.MaterialIdCount=0;THREE.LineBasicMaterial=function(a){THREE.Material.call(this);this.color=new THREE.Color(16777215);this.linewidth=1;this.linejoin=this.linecap="round";this.vertexColors=!1;this.fog=!0;this.setValues(a)};THREE.LineBasicMaterial.prototype=Object.create(THREE.Material.prototype);
 THREE.LineBasicMaterial.prototype.clone=function(){var a=new THREE.LineBasicMaterial;THREE.Material.prototype.clone.call(this,a);a.color.copy(this.color);a.linewidth=this.linewidth;a.linecap=this.linecap;a.linejoin=this.linejoin;a.vertexColors=this.vertexColors;a.fog=this.fog;return a};THREE.LineDashedMaterial=function(a){THREE.Material.call(this);this.color=new THREE.Color(16777215);this.scale=this.linewidth=1;this.dashSize=3;this.gapSize=1;this.vertexColors=!1;this.fog=!0;this.setValues(a)};THREE.LineDashedMaterial.prototype=Object.create(THREE.Material.prototype);
 THREE.LineDashedMaterial.prototype.clone=function(){var a=new THREE.LineDashedMaterial;THREE.Material.prototype.clone.call(this,a);a.color.copy(this.color);a.linewidth=this.linewidth;a.scale=this.scale;a.dashSize=this.dashSize;a.gapSize=this.gapSize;a.vertexColors=this.vertexColors;a.fog=this.fog;return a};THREE.MeshBasicMaterial=function(a){THREE.Material.call(this);this.color=new THREE.Color(16777215);this.envMap=this.specularMap=this.lightMap=this.map=null;this.combine=THREE.MultiplyOperation;this.reflectivity=1;this.refractionRatio=0.98;this.fog=!0;this.shading=THREE.SmoothShading;this.wireframe=!1;this.wireframeLinewidth=1;this.wireframeLinejoin=this.wireframeLinecap="round";this.vertexColors=THREE.NoColors;this.morphTargets=this.skinning=!1;this.setValues(a)};
 THREE.MeshBasicMaterial.prototype=Object.create(THREE.Material.prototype);
@@ -277,8 +275,8 @@ void 0===a.sizeAttenuation&&(this.sizeAttenuation=!this.useScreenCoordinates);vo
 THREE.SpriteMaterial.prototype.clone=function(){var a=new THREE.SpriteMaterial;THREE.Material.prototype.clone.call(this,a);a.color.copy(this.color);a.map=this.map;a.useScreenCoordinates=this.useScreenCoordinates;a.sizeAttenuation=this.sizeAttenuation;a.scaleByViewport=this.scaleByViewport;a.alignment.copy(this.alignment);a.uvOffset.copy(this.uvOffset);a.uvScale.copy(this.uvScale);a.fog=this.fog;return a};THREE.SpriteAlignment={};THREE.SpriteAlignment.topLeft=new THREE.Vector2(1,-1);
 THREE.SpriteAlignment.topCenter=new THREE.Vector2(0,-1);THREE.SpriteAlignment.topRight=new THREE.Vector2(-1,-1);THREE.SpriteAlignment.centerLeft=new THREE.Vector2(1,0);THREE.SpriteAlignment.center=new THREE.Vector2(0,0);THREE.SpriteAlignment.centerRight=new THREE.Vector2(-1,0);THREE.SpriteAlignment.bottomLeft=new THREE.Vector2(1,1);THREE.SpriteAlignment.bottomCenter=new THREE.Vector2(0,1);THREE.SpriteAlignment.bottomRight=new THREE.Vector2(-1,1);THREE.Texture=function(a,b,c,d,e,f,h,g,i){this.id=THREE.TextureIdCount++;this.uuid=THREE.Math.generateUUID();this.name="";this.image=a;this.mipmaps=[];this.mapping=void 0!==b?b:new THREE.UVMapping;this.wrapS=void 0!==c?c:THREE.ClampToEdgeWrapping;this.wrapT=void 0!==d?d:THREE.ClampToEdgeWrapping;this.magFilter=void 0!==e?e:THREE.LinearFilter;this.minFilter=void 0!==f?f:THREE.LinearMipMapLinearFilter;this.anisotropy=void 0!==i?i:1;this.format=void 0!==h?h:THREE.RGBAFormat;this.type=void 0!==g?g:THREE.UnsignedByteType;
 this.offset=new THREE.Vector2(0,0);this.repeat=new THREE.Vector2(1,1);this.generateMipmaps=!0;this.premultiplyAlpha=!1;this.flipY=!0;this.unpackAlignment=4;this.needsUpdate=!1;this.onUpdate=null};
-THREE.Texture.prototype={constructor:THREE.Texture,addEventListener:THREE.EventDispatcher.prototype.addEventListener,hasEventListener:THREE.EventDispatcher.prototype.hasEventListener,removeEventListener:THREE.EventDispatcher.prototype.removeEventListener,dispatchEvent:THREE.EventDispatcher.prototype.dispatchEvent,clone:function(a){void 0===a&&(a=new THREE.Texture);a.image=this.image;a.mipmaps=this.mipmaps.slice(0);a.mapping=this.mapping;a.wrapS=this.wrapS;a.wrapT=this.wrapT;a.magFilter=this.magFilter;
-a.minFilter=this.minFilter;a.anisotropy=this.anisotropy;a.format=this.format;a.type=this.type;a.offset.copy(this.offset);a.repeat.copy(this.repeat);a.generateMipmaps=this.generateMipmaps;a.premultiplyAlpha=this.premultiplyAlpha;a.flipY=this.flipY;a.unpackAlignment=this.unpackAlignment;return a},dispose:function(){this.dispatchEvent({type:"dispose"})}};THREE.TextureIdCount=0;THREE.CompressedTexture=function(a,b,c,d,e,f,h,g,i,j,l){THREE.Texture.call(this,null,f,h,g,i,j,d,e,l);this.image={width:b,height:c};this.mipmaps=a;this.generateMipmaps=!1};THREE.CompressedTexture.prototype=Object.create(THREE.Texture.prototype);THREE.CompressedTexture.prototype.clone=function(){var a=new THREE.CompressedTexture;THREE.Texture.prototype.clone.call(this,a);return a};THREE.DataTexture=function(a,b,c,d,e,f,h,g,i,j,l){THREE.Texture.call(this,null,f,h,g,i,j,d,e,l);this.image={data:a,width:b,height:c}};THREE.DataTexture.prototype=Object.create(THREE.Texture.prototype);THREE.DataTexture.prototype.clone=function(){var a=new THREE.DataTexture;THREE.Texture.prototype.clone.call(this,a);return a};THREE.Particle=function(a){THREE.Object3D.call(this);this.material=a};THREE.Particle.prototype=Object.create(THREE.Object3D.prototype);THREE.Particle.prototype.clone=function(a){void 0===a&&(a=new THREE.Particle(this.material));THREE.Object3D.prototype.clone.call(this,a);return a};THREE.ParticleSystem=function(a,b){THREE.Object3D.call(this);this.geometry=void 0!==a?a:new THREE.Geometry;this.material=void 0!==b?b:new THREE.ParticleBasicMaterial({color:16777215*Math.random()});this.frustumCulled=this.sortParticles=!1};THREE.ParticleSystem.prototype=Object.create(THREE.Object3D.prototype);
+THREE.Texture.prototype={constructor:THREE.Texture,clone:function(a){void 0===a&&(a=new THREE.Texture);a.image=this.image;a.mipmaps=this.mipmaps.slice(0);a.mapping=this.mapping;a.wrapS=this.wrapS;a.wrapT=this.wrapT;a.magFilter=this.magFilter;a.minFilter=this.minFilter;a.anisotropy=this.anisotropy;a.format=this.format;a.type=this.type;a.offset.copy(this.offset);a.repeat.copy(this.repeat);a.generateMipmaps=this.generateMipmaps;a.premultiplyAlpha=this.premultiplyAlpha;a.flipY=this.flipY;a.unpackAlignment=
+this.unpackAlignment;return a},dispose:function(){this.dispatchEvent({type:"dispose"})}};THREE.EventDispatcher.prototype.apply(THREE.Texture.prototype);THREE.TextureIdCount=0;THREE.CompressedTexture=function(a,b,c,d,e,f,h,g,i,j,l){THREE.Texture.call(this,null,f,h,g,i,j,d,e,l);this.image={width:b,height:c};this.mipmaps=a;this.generateMipmaps=!1};THREE.CompressedTexture.prototype=Object.create(THREE.Texture.prototype);THREE.CompressedTexture.prototype.clone=function(){var a=new THREE.CompressedTexture;THREE.Texture.prototype.clone.call(this,a);return a};THREE.DataTexture=function(a,b,c,d,e,f,h,g,i,j,l){THREE.Texture.call(this,null,f,h,g,i,j,d,e,l);this.image={data:a,width:b,height:c}};THREE.DataTexture.prototype=Object.create(THREE.Texture.prototype);THREE.DataTexture.prototype.clone=function(){var a=new THREE.DataTexture;THREE.Texture.prototype.clone.call(this,a);return a};THREE.Particle=function(a){THREE.Object3D.call(this);this.material=a};THREE.Particle.prototype=Object.create(THREE.Object3D.prototype);THREE.Particle.prototype.clone=function(a){void 0===a&&(a=new THREE.Particle(this.material));THREE.Object3D.prototype.clone.call(this,a);return a};THREE.ParticleSystem=function(a,b){THREE.Object3D.call(this);this.geometry=void 0!==a?a:new THREE.Geometry;this.material=void 0!==b?b:new THREE.ParticleBasicMaterial({color:16777215*Math.random()});this.frustumCulled=this.sortParticles=!1};THREE.ParticleSystem.prototype=Object.create(THREE.Object3D.prototype);
 THREE.ParticleSystem.prototype.clone=function(a){void 0===a&&(a=new THREE.ParticleSystem(this.geometry,this.material));a.sortParticles=this.sortParticles;THREE.Object3D.prototype.clone.call(this,a);return a};THREE.Line=function(a,b,c){THREE.Object3D.call(this);this.geometry=void 0!==a?a:new THREE.Geometry;this.material=void 0!==b?b:new THREE.LineBasicMaterial({color:16777215*Math.random()});this.type=void 0!==c?c:THREE.LineStrip};THREE.LineStrip=0;THREE.LinePieces=1;THREE.Line.prototype=Object.create(THREE.Object3D.prototype);THREE.Line.prototype.clone=function(a){void 0===a&&(a=new THREE.Line(this.geometry,this.material,this.type));THREE.Object3D.prototype.clone.call(this,a);return a};THREE.Mesh=function(a,b){THREE.Object3D.call(this);this.geometry=void 0!==a?a:new THREE.Geometry;this.material=void 0!==b?b:new THREE.MeshBasicMaterial({color:16777215*Math.random()});this.updateMorphTargets()};THREE.Mesh.prototype=Object.create(THREE.Object3D.prototype);
 THREE.Mesh.prototype.updateMorphTargets=function(){if(0<this.geometry.morphTargets.length){this.morphTargetBase=-1;this.morphTargetForcedOrder=[];this.morphTargetInfluences=[];this.morphTargetDictionary={};for(var a=0,b=this.geometry.morphTargets.length;a<b;a++)this.morphTargetInfluences.push(0),this.morphTargetDictionary[this.geometry.morphTargets[a].name]=a}};
 THREE.Mesh.prototype.getMorphTargetIndexByName=function(a){if(void 0!==this.morphTargetDictionary[a])return this.morphTargetDictionary[a];console.log("THREE.Mesh.getMorphTargetIndexByName: morph target "+a+" does not exist. Returning 0.");return 0};THREE.Mesh.prototype.clone=function(a){void 0===a&&(a=new THREE.Mesh(this.geometry,this.material));THREE.Object3D.prototype.clone.call(this,a);return a};THREE.Bone=function(a){THREE.Object3D.call(this);this.skin=a;this.skinMatrix=new THREE.Matrix4};THREE.Bone.prototype=Object.create(THREE.Object3D.prototype);THREE.Bone.prototype.update=function(a,b){this.matrixAutoUpdate&&(b|=this.updateMatrix());if(b||this.matrixWorldNeedsUpdate)a?this.skinMatrix.multiplyMatrices(a,this.matrix):this.skinMatrix.copy(this.matrix),this.matrixWorldNeedsUpdate=!1,b=!0;var c,d=this.children.length;for(c=0;c<d;c++)this.children[c].update(this.skinMatrix,b)};THREE.SkinnedMesh=function(a,b,c){THREE.Mesh.call(this,a,b);this.useVertexTexture=void 0!==c?c:!0;this.identityMatrix=new THREE.Matrix4;this.bones=[];this.boneMatrices=[];var d,e,f;if(this.geometry&&void 0!==this.geometry.bones){for(a=0;a<this.geometry.bones.length;a++)c=this.geometry.bones[a],d=c.pos,e=c.rotq,f=c.scl,b=this.addBone(),b.name=c.name,b.position.set(d[0],d[1],d[2]),b.quaternion.set(e[0],e[1],e[2],e[3]),void 0!==f?b.scale.set(f[0],f[1],f[2]):b.scale.set(1,1,1);for(a=0;a<this.bones.length;a++)c=
@@ -529,19 +527,19 @@ a.__webglFramebuffer[f]);k.framebufferTexture2D(k.FRAMEBUFFER,k.COLOR_ATTACHMENT
 k.framebufferTexture2D(k.FRAMEBUFFER,k.COLOR_ATTACHMENT0,d,a.__webglTexture,0),a.shareDepthFrom?a.depthBuffer&&!a.stencilBuffer?k.framebufferRenderbuffer(k.FRAMEBUFFER,k.DEPTH_ATTACHMENT,k.RENDERBUFFER,a.__webglRenderbuffer):a.depthBuffer&&a.stencilBuffer&&k.framebufferRenderbuffer(k.FRAMEBUFFER,k.DEPTH_STENCIL_ATTACHMENT,k.RENDERBUFFER,a.__webglRenderbuffer):y(a.__webglRenderbuffer,a),c&&k.generateMipmap(k.TEXTURE_2D);b?k.bindTexture(k.TEXTURE_CUBE_MAP,null):k.bindTexture(k.TEXTURE_2D,null);k.bindRenderbuffer(k.RENDERBUFFER,
 null);k.bindFramebuffer(k.FRAMEBUFFER,null)}a?(b=b?a.__webglFramebuffer[a.activeCubeFace]:a.__webglFramebuffer,c=a.width,a=a.height,e=d=0):(b=null,c=Qa,a=Xa,d=ua,e=Ra);b!==eb&&(k.bindFramebuffer(k.FRAMEBUFFER,b),k.viewport(d,e,c,a),eb=b);Xb=c;Jb=a};this.shadowMapPlugin=new THREE.ShadowMapPlugin;this.addPrePlugin(this.shadowMapPlugin);this.addPostPlugin(new THREE.SpritePlugin);this.addPostPlugin(new THREE.LensFlarePlugin)};THREE.WebGLRenderTarget=function(a,b,c){this.width=a;this.height=b;c=c||{};this.wrapS=void 0!==c.wrapS?c.wrapS:THREE.ClampToEdgeWrapping;this.wrapT=void 0!==c.wrapT?c.wrapT:THREE.ClampToEdgeWrapping;this.magFilter=void 0!==c.magFilter?c.magFilter:THREE.LinearFilter;this.minFilter=void 0!==c.minFilter?c.minFilter:THREE.LinearMipMapLinearFilter;this.anisotropy=void 0!==c.anisotropy?c.anisotropy:1;this.offset=new THREE.Vector2(0,0);this.repeat=new THREE.Vector2(1,1);this.format=void 0!==c.format?c.format:
 THREE.RGBAFormat;this.type=void 0!==c.type?c.type:THREE.UnsignedByteType;this.depthBuffer=void 0!==c.depthBuffer?c.depthBuffer:!0;this.stencilBuffer=void 0!==c.stencilBuffer?c.stencilBuffer:!0;this.generateMipmaps=!0;this.shareDepthFrom=null};
-THREE.WebGLRenderTarget.prototype={constructor:THREE.WebGLRenderTarget,addEventListener:THREE.EventDispatcher.prototype.addEventListener,hasEventListener:THREE.EventDispatcher.prototype.hasEventListener,removeEventListener:THREE.EventDispatcher.prototype.removeEventListener,dispatchEvent:THREE.EventDispatcher.prototype.dispatchEvent,clone:function(){var a=new THREE.WebGLRenderTarget(this.width,this.height);a.wrapS=this.wrapS;a.wrapT=this.wrapT;a.magFilter=this.magFilter;a.minFilter=this.minFilter;
-a.anisotropy=this.anisotropy;a.offset.copy(this.offset);a.repeat.copy(this.repeat);a.format=this.format;a.type=this.type;a.depthBuffer=this.depthBuffer;a.stencilBuffer=this.stencilBuffer;a.generateMipmaps=this.generateMipmaps;a.shareDepthFrom=this.shareDepthFrom;return a},dispose:function(){this.dispatchEvent({type:"dispose"})}};THREE.WebGLRenderTargetCube=function(a,b,c){THREE.WebGLRenderTarget.call(this,a,b,c);this.activeCubeFace=0};THREE.WebGLRenderTargetCube.prototype=Object.create(THREE.WebGLRenderTarget.prototype);THREE.RenderableVertex=function(){this.positionWorld=new THREE.Vector3;this.positionScreen=new THREE.Vector4;this.visible=!0};THREE.RenderableVertex.prototype.copy=function(a){this.positionWorld.copy(a.positionWorld);this.positionScreen.copy(a.positionScreen)};THREE.RenderableFace3=function(){this.id=0;this.v1=new THREE.RenderableVertex;this.v2=new THREE.RenderableVertex;this.v3=new THREE.RenderableVertex;this.centroidModel=new THREE.Vector3;this.normalModel=new THREE.Vector3;this.normalModelView=new THREE.Vector3;this.vertexNormalsLength=0;this.vertexNormalsModel=[new THREE.Vector3,new THREE.Vector3,new THREE.Vector3];this.vertexNormalsModelView=[new THREE.Vector3,new THREE.Vector3,new THREE.Vector3];this.material=this.color=null;this.uvs=[[]];this.z=
+THREE.WebGLRenderTarget.prototype={constructor:THREE.WebGLRenderTarget,clone:function(){var a=new THREE.WebGLRenderTarget(this.width,this.height);a.wrapS=this.wrapS;a.wrapT=this.wrapT;a.magFilter=this.magFilter;a.minFilter=this.minFilter;a.anisotropy=this.anisotropy;a.offset.copy(this.offset);a.repeat.copy(this.repeat);a.format=this.format;a.type=this.type;a.depthBuffer=this.depthBuffer;a.stencilBuffer=this.stencilBuffer;a.generateMipmaps=this.generateMipmaps;a.shareDepthFrom=this.shareDepthFrom;
+return a},dispose:function(){this.dispatchEvent({type:"dispose"})}};THREE.EventDispatcher.prototype.apply(THREE.WebGLRenderTarget.prototype);THREE.WebGLRenderTargetCube=function(a,b,c){THREE.WebGLRenderTarget.call(this,a,b,c);this.activeCubeFace=0};THREE.WebGLRenderTargetCube.prototype=Object.create(THREE.WebGLRenderTarget.prototype);THREE.RenderableVertex=function(){this.positionWorld=new THREE.Vector3;this.positionScreen=new THREE.Vector4;this.visible=!0};THREE.RenderableVertex.prototype.copy=function(a){this.positionWorld.copy(a.positionWorld);this.positionScreen.copy(a.positionScreen)};THREE.RenderableFace3=function(){this.id=0;this.v1=new THREE.RenderableVertex;this.v2=new THREE.RenderableVertex;this.v3=new THREE.RenderableVertex;this.centroidModel=new THREE.Vector3;this.normalModel=new THREE.Vector3;this.normalModelView=new THREE.Vector3;this.vertexNormalsLength=0;this.vertexNormalsModel=[new THREE.Vector3,new THREE.Vector3,new THREE.Vector3];this.vertexNormalsModelView=[new THREE.Vector3,new THREE.Vector3,new THREE.Vector3];this.material=this.color=null;this.uvs=[[]];this.z=
 0};THREE.RenderableFace4=function(){this.id=0;this.v1=new THREE.RenderableVertex;this.v2=new THREE.RenderableVertex;this.v3=new THREE.RenderableVertex;this.v4=new THREE.RenderableVertex;this.centroidModel=new THREE.Vector3;this.normalModel=new THREE.Vector3;this.normalModelView=new THREE.Vector3;this.vertexNormalsLength=0;this.vertexNormalsModel=[new THREE.Vector3,new THREE.Vector3,new THREE.Vector3,new THREE.Vector3];this.vertexNormalsModelView=[new THREE.Vector3,new THREE.Vector3,new THREE.Vector3,
 new THREE.Vector3];this.material=this.color=null;this.uvs=[[]];this.z=0};THREE.RenderableObject=function(){this.id=0;this.object=null;this.z=0};THREE.RenderableParticle=function(){this.id=0;this.object=null;this.z=this.y=this.x=0;this.rotation=null;this.scale=new THREE.Vector2;this.material=null};THREE.RenderableLine=function(){this.id=0;this.v1=new THREE.RenderableVertex;this.v2=new THREE.RenderableVertex;this.vertexColors=[new THREE.Color,new THREE.Color];this.material=null;this.z=0};THREE.GeometryUtils={merge:function(a,b,c){var d,e,f=a.vertices.length,h=b instanceof THREE.Mesh?b.geometry:b,g=a.vertices,i=h.vertices,j=a.faces,l=h.faces,a=a.faceVertexUvs[0],h=h.faceVertexUvs[0];void 0===c&&(c=0);b instanceof THREE.Mesh&&(b.matrixAutoUpdate&&b.updateMatrix(),d=b.matrix,e=(new THREE.Matrix3).getNormalMatrix(d));for(var b=0,m=i.length;b<m;b++){var n=i[b].clone();d&&n.applyMatrix4(d);g.push(n)}b=0;for(m=l.length;b<m;b++){var n=l[b],p,t,q=n.vertexNormals,r=n.vertexColors;n instanceof
 THREE.Face3?p=new THREE.Face3(n.a+f,n.b+f,n.c+f):n instanceof THREE.Face4&&(p=new THREE.Face4(n.a+f,n.b+f,n.c+f,n.d+f));p.normal.copy(n.normal);e&&p.normal.applyMatrix3(e).normalize();g=0;for(i=q.length;g<i;g++)t=q[g].clone(),e&&t.applyMatrix3(e).normalize(),p.vertexNormals.push(t);p.color.copy(n.color);g=0;for(i=r.length;g<i;g++)t=r[g],p.vertexColors.push(t.clone());p.materialIndex=n.materialIndex+c;p.centroid.copy(n.centroid);d&&p.centroid.applyMatrix4(d);j.push(p)}b=0;for(m=h.length;b<m;b++){c=
-h[b];d=[];g=0;for(i=c.length;g<i;g++)d.push(new THREE.Vector2(c[g].x,c[g].y));a.push(d)}},removeMaterials:function(a,b){for(var c={},d=0,e=b.length;d<e;d++)c[b[d]]=!0;for(var f,h=[],d=0,e=a.faces.length;d<e;d++)f=a.faces[d],f.materialIndex in c||h.push(f);a.faces=h},randomPointInTriangle:function(a,b,c){var d,e,f,h=new THREE.Vector3,g=THREE.GeometryUtils.__v1;d=THREE.GeometryUtils.random();e=THREE.GeometryUtils.random();1<d+e&&(d=1-d,e=1-e);f=1-d-e;h.copy(a);h.multiplyScalar(d);g.copy(b);g.multiplyScalar(e);
-h.add(g);g.copy(c);g.multiplyScalar(f);h.add(g);return h},randomPointInFace:function(a,b,c){var d,e,f;if(a instanceof THREE.Face3)return d=b.vertices[a.a],e=b.vertices[a.b],f=b.vertices[a.c],THREE.GeometryUtils.randomPointInTriangle(d,e,f);if(a instanceof THREE.Face4){d=b.vertices[a.a];e=b.vertices[a.b];f=b.vertices[a.c];var b=b.vertices[a.d],h;c?a._area1&&a._area2?(c=a._area1,h=a._area2):(c=THREE.GeometryUtils.triangleArea(d,e,b),h=THREE.GeometryUtils.triangleArea(e,f,b),a._area1=c,a._area2=h):(c=
-THREE.GeometryUtils.triangleArea(d,e,b),h=THREE.GeometryUtils.triangleArea(e,f,b));return THREE.GeometryUtils.random()*(c+h)<c?THREE.GeometryUtils.randomPointInTriangle(d,e,b):THREE.GeometryUtils.randomPointInTriangle(e,f,b)}},randomPointsInGeometry:function(a,b){function c(a){function b(c,d){if(d<c)return c;var e=c+Math.floor((d-c)/2);return j[e]>a?b(c,e-1):j[e]<a?b(e+1,d):e}return b(0,j.length-1)}var d,e,f=a.faces,h=a.vertices,g=f.length,i=0,j=[],l,m,n,p;for(e=0;e<g;e++)d=f[e],d instanceof THREE.Face3?
-(l=h[d.a],m=h[d.b],n=h[d.c],d._area=THREE.GeometryUtils.triangleArea(l,m,n)):d instanceof THREE.Face4&&(l=h[d.a],m=h[d.b],n=h[d.c],p=h[d.d],d._area1=THREE.GeometryUtils.triangleArea(l,m,p),d._area2=THREE.GeometryUtils.triangleArea(m,n,p),d._area=d._area1+d._area2),i+=d._area,j[e]=i;d=[];for(e=0;e<b;e++)h=THREE.GeometryUtils.random()*i,h=c(h),d[e]=THREE.GeometryUtils.randomPointInFace(f[h],a,!0);return d},triangleArea:function(a,b,c){var d=THREE.GeometryUtils.__v1,e=THREE.GeometryUtils.__v2;d.subVectors(b,
-a);e.subVectors(c,a);d.cross(e);return 0.5*d.length()},center:function(a){a.computeBoundingBox();var b=a.boundingBox,c=new THREE.Vector3;c.addVectors(b.min,b.max);c.multiplyScalar(-0.5);a.applyMatrix((new THREE.Matrix4).makeTranslation(c.x,c.y,c.z));a.computeBoundingBox();return c},normalizeUVs:function(a){for(var a=a.faceVertexUvs[0],b=0,c=a.length;b<c;b++)for(var d=a[b],e=0,f=d.length;e<f;e++)1!==d[e].x&&(d[e].x-=Math.floor(d[e].x)),1!==d[e].y&&(d[e].y-=Math.floor(d[e].y))},triangulateQuads:function(a){var b,
-c,d,e,f=[],h=[],g=[];b=0;for(c=a.faceUvs.length;b<c;b++)h[b]=[];b=0;for(c=a.faceVertexUvs.length;b<c;b++)g[b]=[];b=0;for(c=a.faces.length;b<c;b++)if(d=a.faces[b],d instanceof THREE.Face4){e=d.a;var i=d.b,j=d.c,l=d.d,m=new THREE.Face3,n=new THREE.Face3;m.color.copy(d.color);n.color.copy(d.color);m.materialIndex=d.materialIndex;n.materialIndex=d.materialIndex;m.a=e;m.b=i;m.c=l;n.a=i;n.b=j;n.c=l;4===d.vertexColors.length&&(m.vertexColors[0]=d.vertexColors[0].clone(),m.vertexColors[1]=d.vertexColors[1].clone(),
-m.vertexColors[2]=d.vertexColors[3].clone(),n.vertexColors[0]=d.vertexColors[1].clone(),n.vertexColors[1]=d.vertexColors[2].clone(),n.vertexColors[2]=d.vertexColors[3].clone());f.push(m,n);d=0;for(e=a.faceVertexUvs.length;d<e;d++)a.faceVertexUvs[d].length&&(m=a.faceVertexUvs[d][b],i=m[1],j=m[2],l=m[3],m=[m[0].clone(),i.clone(),l.clone()],i=[i.clone(),j.clone(),l.clone()],g[d].push(m,i));d=0;for(e=a.faceUvs.length;d<e;d++)a.faceUvs[d].length&&(i=a.faceUvs[d][b],h[d].push(i,i))}else{f.push(d);d=0;for(e=
-a.faceUvs.length;d<e;d++)h[d].push(a.faceUvs[d][b]);d=0;for(e=a.faceVertexUvs.length;d<e;d++)g[d].push(a.faceVertexUvs[d][b])}a.faces=f;a.faceUvs=h;a.faceVertexUvs=g;a.computeCentroids();a.computeFaceNormals();a.computeVertexNormals();a.hasTangents&&a.computeTangents()},setMaterialIndex:function(a,b,c,d){a=a.faces;d=d||a.length-1;for(c=c||0;c<=d;c++)a[c].materialIndex=b}};THREE.GeometryUtils.random=THREE.Math.random16;THREE.GeometryUtils.__v1=new THREE.Vector3;THREE.GeometryUtils.__v2=new THREE.Vector3;THREE.ImageUtils={crossOrigin:"anonymous",loadTexture:function(a,b,c){var d=new Image,e=new THREE.Texture(d,b),b=new THREE.ImageLoader;b.crossOrigin=this.crossOrigin;b.load(a,function(a){e.image=a;e.needsUpdate=!0;c&&c(e)});e.sourceFile=a;return e},loadCompressedTexture:function(a,b,c,d){var e=new THREE.CompressedTexture;e.mapping=b;var f=new XMLHttpRequest;f.onload=function(){var a=THREE.ImageUtils.parseDDS(f.response,!0);e.format=a.format;e.mipmaps=a.mipmaps;e.image.width=a.width;e.image.height=
+h[b];d=[];g=0;for(i=c.length;g<i;g++)d.push(new THREE.Vector2(c[g].x,c[g].y));a.push(d)}},removeMaterials:function(a,b){for(var c={},d=0,e=b.length;d<e;d++)c[b[d]]=!0;for(var f,h=[],d=0,e=a.faces.length;d<e;d++)f=a.faces[d],f.materialIndex in c||h.push(f);a.faces=h},randomPointInTriangle:function(){var a=new THREE.Vector3;return function(b,c,d){var e=new THREE.Vector3,f=THREE.Math.random16(),h=THREE.Math.random16();1<f+h&&(f=1-f,h=1-h);var g=1-f-h;e.copy(b);e.multiplyScalar(f);a.copy(c);a.multiplyScalar(h);
+e.add(a);a.copy(d);a.multiplyScalar(g);e.add(a);return e}}(),randomPointInFace:function(a,b,c){var d,e,f;if(a instanceof THREE.Face3)return d=b.vertices[a.a],e=b.vertices[a.b],f=b.vertices[a.c],THREE.GeometryUtils.randomPointInTriangle(d,e,f);if(a instanceof THREE.Face4){d=b.vertices[a.a];e=b.vertices[a.b];f=b.vertices[a.c];var b=b.vertices[a.d],h;c?a._area1&&a._area2?(c=a._area1,h=a._area2):(c=THREE.GeometryUtils.triangleArea(d,e,b),h=THREE.GeometryUtils.triangleArea(e,f,b),a._area1=c,a._area2=h):
+(c=THREE.GeometryUtils.triangleArea(d,e,b),h=THREE.GeometryUtils.triangleArea(e,f,b));return THREE.Math.random16()*(c+h)<c?THREE.GeometryUtils.randomPointInTriangle(d,e,b):THREE.GeometryUtils.randomPointInTriangle(e,f,b)}},randomPointsInGeometry:function(a,b){function c(a){function b(c,d){if(d<c)return c;var e=c+Math.floor((d-c)/2);return j[e]>a?b(c,e-1):j[e]<a?b(e+1,d):e}return b(0,j.length-1)}var d,e,f=a.faces,h=a.vertices,g=f.length,i=0,j=[],l,m,n,p;for(e=0;e<g;e++)d=f[e],d instanceof THREE.Face3?
+(l=h[d.a],m=h[d.b],n=h[d.c],d._area=THREE.GeometryUtils.triangleArea(l,m,n)):d instanceof THREE.Face4&&(l=h[d.a],m=h[d.b],n=h[d.c],p=h[d.d],d._area1=THREE.GeometryUtils.triangleArea(l,m,p),d._area2=THREE.GeometryUtils.triangleArea(m,n,p),d._area=d._area1+d._area2),i+=d._area,j[e]=i;d=[];for(e=0;e<b;e++)h=THREE.Math.random16()*i,h=c(h),d[e]=THREE.GeometryUtils.randomPointInFace(f[h],a,!0);return d},triangleArea:function(){var a=new THREE.Vector3,b=new THREE.Vector3;return function(c,d,e){a.subVectors(d,
+c);b.subVectors(e,c);a.cross(b);return 0.5*a.length()}}(),center:function(a){a.computeBoundingBox();var b=a.boundingBox,c=new THREE.Vector3;c.addVectors(b.min,b.max);c.multiplyScalar(-0.5);a.applyMatrix((new THREE.Matrix4).makeTranslation(c.x,c.y,c.z));a.computeBoundingBox();return c},triangulateQuads:function(a){var b,c,d,e,f=[],h=[],g=[];b=0;for(c=a.faceUvs.length;b<c;b++)h[b]=[];b=0;for(c=a.faceVertexUvs.length;b<c;b++)g[b]=[];b=0;for(c=a.faces.length;b<c;b++)if(d=a.faces[b],d instanceof THREE.Face4){e=
+d.a;var i=d.b,j=d.c,l=d.d,m=new THREE.Face3,n=new THREE.Face3;m.color.copy(d.color);n.color.copy(d.color);m.materialIndex=d.materialIndex;n.materialIndex=d.materialIndex;m.a=e;m.b=i;m.c=l;n.a=i;n.b=j;n.c=l;4===d.vertexColors.length&&(m.vertexColors[0]=d.vertexColors[0].clone(),m.vertexColors[1]=d.vertexColors[1].clone(),m.vertexColors[2]=d.vertexColors[3].clone(),n.vertexColors[0]=d.vertexColors[1].clone(),n.vertexColors[1]=d.vertexColors[2].clone(),n.vertexColors[2]=d.vertexColors[3].clone());f.push(m,
+n);d=0;for(e=a.faceVertexUvs.length;d<e;d++)a.faceVertexUvs[d].length&&(m=a.faceVertexUvs[d][b],i=m[1],j=m[2],l=m[3],m=[m[0].clone(),i.clone(),l.clone()],i=[i.clone(),j.clone(),l.clone()],g[d].push(m,i));d=0;for(e=a.faceUvs.length;d<e;d++)a.faceUvs[d].length&&(i=a.faceUvs[d][b],h[d].push(i,i))}else{f.push(d);d=0;for(e=a.faceUvs.length;d<e;d++)h[d].push(a.faceUvs[d][b]);d=0;for(e=a.faceVertexUvs.length;d<e;d++)g[d].push(a.faceVertexUvs[d][b])}a.faces=f;a.faceUvs=h;a.faceVertexUvs=g;a.computeCentroids();
+a.computeFaceNormals();a.computeVertexNormals();a.hasTangents&&a.computeTangents()},setMaterialIndex:function(a,b,c,d){a=a.faces;d=d||a.length-1;for(c=c||0;c<=d;c++)a[c].materialIndex=b}};THREE.ImageUtils={crossOrigin:"anonymous",loadTexture:function(a,b,c){var d=new Image,e=new THREE.Texture(d,b),b=new THREE.ImageLoader;b.crossOrigin=this.crossOrigin;b.load(a,function(a){e.image=a;e.needsUpdate=!0;c&&c(e)});e.sourceFile=a;return e},loadCompressedTexture:function(a,b,c,d){var e=new THREE.CompressedTexture;e.mapping=b;var f=new XMLHttpRequest;f.onload=function(){var a=THREE.ImageUtils.parseDDS(f.response,!0);e.format=a.format;e.mipmaps=a.mipmaps;e.image.width=a.width;e.image.height=
 a.height;e.generateMipmaps=!1;e.needsUpdate=!0;c&&c(e)};f.onerror=d;f.open("GET",a,!0);f.responseType="arraybuffer";f.send(null);return e},loadTextureCube:function(a,b,c,d){var e=[];e.loadCount=0;var f=new THREE.Texture;f.image=e;void 0!==b&&(f.mapping=b);f.flipY=!1;for(var b=0,h=a.length;b<h;++b){var g=new Image;e[b]=g;g.onload=function(){e.loadCount+=1;6===e.loadCount&&(f.needsUpdate=!0,c&&c(f))};g.onerror=d;g.crossOrigin=this.crossOrigin;g.src=a[b]}return f},loadCompressedTextureCube:function(a,
 b,c,d){var e=[];e.loadCount=0;var f=new THREE.CompressedTexture;f.image=e;void 0!==b&&(f.mapping=b);f.flipY=!1;f.generateMipmaps=!1;b=function(a,b){return function(){var d=THREE.ImageUtils.parseDDS(a.response,!0);b.format=d.format;b.mipmaps=d.mipmaps;b.width=d.width;b.height=d.height;e.loadCount+=1;6===e.loadCount&&(f.format=d.format,f.needsUpdate=!0,c&&c(f))}};if(a instanceof Array)for(var h=0,g=a.length;h<g;++h){var i={};e[h]=i;var j=new XMLHttpRequest;j.onload=b(j,i);j.onerror=d;i=a[h];j.open("GET",
 i,!0);j.responseType="arraybuffer";j.send(null)}else j=new XMLHttpRequest,j.onload=function(){var a=THREE.ImageUtils.parseDDS(j.response,!0);if(a.isCubemap){for(var b=a.mipmaps.length/a.mipmapCount,d=0;d<b;d++){e[d]={mipmaps:[]};for(var h=0;h<a.mipmapCount;h++)e[d].mipmaps.push(a.mipmaps[d*a.mipmapCount+h]),e[d].format=a.format,e[d].width=a.width,e[d].height=a.height}f.format=a.format;f.needsUpdate=!0;c&&c(f)}},j.onerror=d,j.open("GET",a,!0),j.responseType="arraybuffer",j.send(null);return f},parseDDS:function(a,
@@ -664,8 +662,8 @@ THREE.AxisHelper.prototype=Object.create(THREE.Line.prototype);THREE.ArrowHelper
 this.cone.matrixAutoUpdate=!1;this.add(this.cone);this.setDirection(a);this.setLength(c)};THREE.ArrowHelper.prototype=Object.create(THREE.Object3D.prototype);THREE.ArrowHelper.prototype.setDirection=function(){var a=new THREE.Vector3,b;return function(c){0.99999<c.y?this.quaternion.set(0,0,0,1):-0.99999>c.y?this.quaternion.set(1,0,0,0):(a.set(c.z,0,-c.x).normalize(),b=Math.acos(c.y),this.quaternion.setFromAxisAngle(a,b))}}();THREE.ArrowHelper.prototype.setLength=function(a){this.scale.set(a,a,a)};
 THREE.ArrowHelper.prototype.setColor=function(a){this.line.material.color.setHex(a);this.cone.material.color.setHex(a)};THREE.BoxHelper=function(a){var b=[new THREE.Vector3(1,1,1),new THREE.Vector3(-1,1,1),new THREE.Vector3(-1,-1,1),new THREE.Vector3(1,-1,1),new THREE.Vector3(1,1,-1),new THREE.Vector3(-1,1,-1),new THREE.Vector3(-1,-1,-1),new THREE.Vector3(1,-1,-1)];this.vertices=b;var c=new THREE.Geometry;c.vertices.push(b[0],b[1],b[1],b[2],b[2],b[3],b[3],b[0],b[4],b[5],b[5],b[6],b[6],b[7],b[7],b[4],b[0],b[4],b[1],b[5],b[2],b[6],b[3],b[7]);THREE.Line.call(this,c,new THREE.LineBasicMaterial({color:16776960}),THREE.LinePieces);
 void 0!==a&&this.update(a)};THREE.BoxHelper.prototype=Object.create(THREE.Line.prototype);
-THREE.BoxHelper.prototype.update=function(a){var b=a.geometry;null===b.boundingBox&&b.computeBoundingBox();var c=b.boundingBox.min,b=b.boundingBox.max,d=this.vertices;d[0].set(b.x,b.y,b.z);d[1].set(c.x,b.y,b.z);d[2].set(c.x,c.y,b.z);d[3].set(b.x,c.y,b.z);d[4].set(b.x,b.y,c.z);d[5].set(c.x,b.y,c.z);d[6].set(c.x,c.y,c.z);d[7].set(b.x,c.y,c.z);this.geometry.computeBoundingSphere();this.geometry.verticesNeedUpdate=!0;this.matrixAutoUpdate=!1;this.matrixWorld=a.matrixWorld};THREE.BoundingBoxHelper=function(a,b){var c=b||8947848;this.object=a;this.box=new THREE.Box3;THREE.Mesh.call(this,new THREE.CubeGeometry(1,1,1),new THREE.MeshBasicMaterial({color:c,wireframe:!0}))};THREE.BoundingBoxHelper.prototype=Object.create(THREE.Mesh.prototype);THREE.BoundingBoxHelper.prototype.update=function(){this.box.setFromObject(this.object);this.box.size(this.scale);this.box.center(this.position)};THREE.CameraHelper=function(a){function b(a,b,d){c(a,d);c(b,d)}function c(a,b){d.vertices.push(new THREE.Vector3);d.colors.push(new THREE.Color(b));void 0===f[a]&&(f[a]=[]);f[a].push(d.vertices.length-1)}THREE.Line.call(this);var d=new THREE.Geometry,e=new THREE.LineBasicMaterial({color:16777215,vertexColors:THREE.FaceColors}),f={};b("n1","n2",16755200);b("n2","n4",16755200);b("n4","n3",16755200);b("n3","n1",16755200);b("f1","f2",16755200);b("f2","f4",16755200);b("f4","f3",16755200);b("f3","f1",16755200);
-b("n1","f1",16755200);b("n2","f2",16755200);b("n3","f3",16755200);b("n4","f4",16755200);b("p","n1",16711680);b("p","n2",16711680);b("p","n3",16711680);b("p","n4",16711680);b("u1","u2",43775);b("u2","u3",43775);b("u3","u1",43775);b("c","t",16777215);b("p","c",3355443);b("cn1","cn2",3355443);b("cn3","cn4",3355443);b("cf1","cf2",3355443);b("cf3","cf4",3355443);THREE.Line.call(this,d,e,THREE.LinePieces);this.camera=a;this.matrixWorld=a.matrixWorld;this.matrixAutoUpdate=!1;this.pointMap=f;this.update()};
+THREE.BoxHelper.prototype.update=function(a){var b=a.geometry;null===b.boundingBox&&b.computeBoundingBox();var c=b.boundingBox.min,b=b.boundingBox.max,d=this.vertices;d[0].set(b.x,b.y,b.z);d[1].set(c.x,b.y,b.z);d[2].set(c.x,c.y,b.z);d[3].set(b.x,c.y,b.z);d[4].set(b.x,b.y,c.z);d[5].set(c.x,b.y,c.z);d[6].set(c.x,c.y,c.z);d[7].set(b.x,c.y,c.z);this.geometry.computeBoundingSphere();this.geometry.verticesNeedUpdate=!0;this.matrixAutoUpdate=!1;this.matrixWorld=a.matrixWorld};THREE.BoundingBoxHelper=function(a,b){var c=b||8947848;this.object=a;this.box=new THREE.Box3;THREE.Mesh.call(this,new THREE.CubeGeometry(1,1,1),new THREE.MeshBasicMaterial({color:c,wireframe:!0}))};THREE.BoundingBoxHelper.prototype=Object.create(THREE.Mesh.prototype);THREE.BoundingBoxHelper.prototype.update=function(){this.box.setFromObject(this.object);this.box.size(this.scale);this.box.center(this.position)};THREE.CameraHelper=function(a){function b(a,b,d){c(a,d);c(b,d)}function c(a,b){d.vertices.push(new THREE.Vector3);d.colors.push(new THREE.Color(b));void 0===f[a]&&(f[a]=[]);f[a].push(d.vertices.length-1)}var d=new THREE.Geometry,e=new THREE.LineBasicMaterial({color:16777215,vertexColors:THREE.FaceColors}),f={};b("n1","n2",16755200);b("n2","n4",16755200);b("n4","n3",16755200);b("n3","n1",16755200);b("f1","f2",16755200);b("f2","f4",16755200);b("f4","f3",16755200);b("f3","f1",16755200);b("n1","f1",16755200);
+b("n2","f2",16755200);b("n3","f3",16755200);b("n4","f4",16755200);b("p","n1",16711680);b("p","n2",16711680);b("p","n3",16711680);b("p","n4",16711680);b("u1","u2",43775);b("u2","u3",43775);b("u3","u1",43775);b("c","t",16777215);b("p","c",3355443);b("cn1","cn2",3355443);b("cn3","cn4",3355443);b("cf1","cf2",3355443);b("cf3","cf4",3355443);THREE.Line.call(this,d,e,THREE.LinePieces);this.camera=a;this.matrixWorld=a.matrixWorld;this.matrixAutoUpdate=!1;this.pointMap=f;this.update()};
 THREE.CameraHelper.prototype=Object.create(THREE.Line.prototype);
 THREE.CameraHelper.prototype.update=function(){var a=new THREE.Vector3,b=new THREE.Camera,c=new THREE.Projector;return function(){function d(d,h,g,i){a.set(h,g,i);c.unprojectVector(a,b);d=e.pointMap[d];if(void 0!==d){h=0;for(g=d.length;h<g;h++)e.geometry.vertices[d[h]].copy(a)}}var e=this;b.projectionMatrix.copy(this.camera.projectionMatrix);d("c",0,0,-1);d("t",0,0,1);d("n1",-1,-1,-1);d("n2",1,-1,-1);d("n3",-1,1,-1);d("n4",1,1,-1);d("f1",-1,-1,1);d("f2",1,-1,1);d("f3",-1,1,1);d("f4",1,1,1);d("u1",
 0.7,1.1,-1);d("u2",-0.7,1.1,-1);d("u3",0,2,-1);d("cf1",-1,0,1);d("cf2",1,0,1);d("cf3",0,-1,1);d("cf4",0,1,1);d("cn1",-1,0,-1);d("cn2",1,0,-1);d("cn3",0,-1,-1);d("cn4",0,1,-1);this.geometry.verticesNeedUpdate=!0}}();THREE.DirectionalLightHelper=function(a,b){THREE.Object3D.call(this);this.light=a;this.light.updateMatrixWorld();this.matrixWorld=a.matrixWorld;this.matrixAutoUpdate=!1;var c=new THREE.PlaneGeometry(b,b),d=new THREE.MeshBasicMaterial({wireframe:!0,fog:!1});d.color.copy(this.light.color).multiplyScalar(this.light.intensity);this.lightPlane=new THREE.Mesh(c,d);this.add(this.lightPlane);c=new THREE.Geometry;c.vertices.push(new THREE.Vector3);c.vertices.push(new THREE.Vector3);c.computeLineDistances();

+ 1 - 1
docs/index.html

@@ -97,7 +97,7 @@
 
 		<script src="list.js"></script>
 		<script>
-			var REVISION = '58';
+			var REVISION = '59';
 
 			var panel = document.getElementById( 'panel' );
 			var viewer = document.getElementById( 'viewer' );

+ 1 - 1
src/Three.js

@@ -4,7 +4,7 @@
  * @author bhouston / http://exocortex.com
  */
 
-var THREE = THREE || { REVISION: '59dev' };
+var THREE = THREE || { REVISION: '59' };
 
 self.console = self.console || {