diff --git a/.DS_Store b/.DS_Store index 9246838..90c6f1b 100644 Binary files a/.DS_Store and b/.DS_Store differ diff --git a/app/cover.py b/app/cover.py index 7fbb835..5847e0b 100755 --- a/app/cover.py +++ b/app/cover.py @@ -1,5 +1,6 @@ import PyPDF2 from wand.image import Image +from wand.color import Color import io import os @@ -19,7 +20,9 @@ def pdf_page_to_png(src_pdf, pagenum = 0, resolution = 72,): pdf_bytes.seek(0) img = Image(file = pdf_bytes, resolution = resolution) - img.convert("png") + img.background_color = Color('white') + img.alpha_channel = 'remove' + img.convert("jpeg") return img @@ -45,17 +48,17 @@ def get_cover(file_path, filename): # Convert each page to a png image. for page in pages: - big_filename = "app/cover/"+page["filename"] + "_cover.png" - small_filename = "app/cover/"+page["filename"] + "cover_small" + ".png" + big_filename = "app/cover/"+page["filename"] + "_cover.jpeg" + #small_filename = "app/cover/"+page["filename"] + "cover_small" + ".jpeg" - img = pdf_page_to_png(src_pdf, pagenum = page["pagenum"], resolution = 200) - img.save(filename = big_filename) + img = pdf_page_to_png(src_pdf, pagenum = page["pagenum"], resolution = 130) + #img.save(filename = big_filename) # Ensmallen - img.transform("", "200") - img.save(filename = small_filename) + img.transform("", "250") + img.save(filename = big_filename) - return page["filename"] + "_cover.png" + return page["filename"] + "_cover.jpeg" #--- #epub diff --git a/app/cover/175_potentialposters_cover.png b/app/cover/175_potentialposters_cover.png deleted file mode 100644 index 679b91c..0000000 Binary files a/app/cover/175_potentialposters_cover.png and /dev/null differ diff --git a/app/cover/175_potentialposterscover_small.png b/app/cover/175_potentialposterscover_small.png deleted file mode 100644 index b8afbc8..0000000 Binary files a/app/cover/175_potentialposterscover_small.png and /dev/null differ diff --git a/app/cover/2_Drucker_Johanna_Graphesis_Visual_Forms_of_Knowledge_Production_cover.png b/app/cover/2_Drucker_Johanna_Graphesis_Visual_Forms_of_Knowledge_Production_cover.png deleted file mode 100644 index 09a3f75..0000000 Binary files a/app/cover/2_Drucker_Johanna_Graphesis_Visual_Forms_of_Knowledge_Production_cover.png and /dev/null differ diff --git a/app/cover/2_Drucker_Johanna_Graphesis_Visual_Forms_of_Knowledge_Productioncover_small.png b/app/cover/2_Drucker_Johanna_Graphesis_Visual_Forms_of_Knowledge_Productioncover_small.png deleted file mode 100644 index ddc8d4b..0000000 Binary files a/app/cover/2_Drucker_Johanna_Graphesis_Visual_Forms_of_Knowledge_Productioncover_small.png and /dev/null differ diff --git a/app/cover/2_Joseph_Weizenbaum_-_Computer_Power_and_Human_Reason__From_Judgement_to_Calculation_1976_W._H._Freeman__Company_cover.png b/app/cover/2_Joseph_Weizenbaum_-_Computer_Power_and_Human_Reason__From_Judgement_to_Calculation_1976_W._H._Freeman__Company_cover.png deleted file mode 100644 index 187d1ff..0000000 Binary files a/app/cover/2_Joseph_Weizenbaum_-_Computer_Power_and_Human_Reason__From_Judgement_to_Calculation_1976_W._H._Freeman__Company_cover.png and /dev/null differ diff --git a/app/cover/2_Joseph_Weizenbaum_-_Computer_Power_and_Human_Reason__From_Judgement_to_Calculation_1976_W._H._Freeman__Companycover_small.png b/app/cover/2_Joseph_Weizenbaum_-_Computer_Power_and_Human_Reason__From_Judgement_to_Calculation_1976_W._H._Freeman__Companycover_small.png deleted file mode 100644 index 895ed73..0000000 Binary files a/app/cover/2_Joseph_Weizenbaum_-_Computer_Power_and_Human_Reason__From_Judgement_to_Calculation_1976_W._H._Freeman__Companycover_small.png and /dev/null differ diff --git a/app/cover/3_The_Moral_Of_The_Xerox_cover.png b/app/cover/3_The_Moral_Of_The_Xerox_cover.png deleted file mode 100644 index 0ab6c9a..0000000 Binary files a/app/cover/3_The_Moral_Of_The_Xerox_cover.png and /dev/null differ diff --git a/app/cover/3_The_Moral_Of_The_Xeroxcover_small.png b/app/cover/3_The_Moral_Of_The_Xeroxcover_small.png deleted file mode 100644 index 1f3c532..0000000 Binary files a/app/cover/3_The_Moral_Of_The_Xeroxcover_small.png and /dev/null differ diff --git a/app/static/css/style.css b/app/static/css/style.css index 06ad59b..9f3d6a0 100755 --- a/app/static/css/style.css +++ b/app/static/css/style.css @@ -548,3 +548,12 @@ nav { font-size: .7em } @media print { nav { display: none } } + + +#interface_links{ + font-size: 32px; + margin-top: 40px; +} +#interface_links a{ + margin-right:10px; +} diff --git a/app/templates/home.html b/app/templates/home.html index 064ec68..f53cab1 100755 --- a/app/templates/home.html +++ b/app/templates/home.html @@ -9,10 +9,12 @@ On instance: {{server}} / From: {{client}} Feel free to browse our catalogue, interfaced in many different ways.

-Scape +


{%if light%} diff --git a/app/templates/scape_new.html b/app/templates/scape_new.html index 256464e..3fe98e0 100644 --- a/app/templates/scape_new.html +++ b/app/templates/scape_new.html @@ -4,21 +4,35 @@ + @@ -59,7 +73,7 @@ d3.json("/api/books").then(function(data){ .attr("height", height) .style("pointer-events", "all") .call(d3.zoom() - .scaleExtent([1/2, 4]) + .scaleExtent([0.1, 6]) .on("zoom", zoomed)); function zoomed(){ @@ -78,25 +92,76 @@ g.attr("transform", d3.event.transform); // .text(function(d){return d.title}) .style("position", "absolute") .attr("transform", function (d) { return "translate("+d.scapeX+","+d.scapeY+")"}) - .append("a") .call(d3.drag() - .container(function(){return this.parentNode}) - .on("start", function(){}) - .on("drag", function(d){ - console.log("dragging", this, d3.event); - d3.select(this).attr("transform", "translate("+d3.event.x+"," +d3.event.y+")" ) - }) - ) - .attr("xlink:href", function(d){return "/books/"+d.id}) - .append("rect") - .attr("width", "40") - .attr("height", "40"); + .on("start", function(d) { + svg.selectAll("g.item").sort(function (a, b) { // select the parent and sort the path's + if (a.id != d.id) return -1; // a is not the hovered element, send "a" to the back + else return 1; // a is the hovered element, bring "a" to the front + }); +}) + .on("drag", function(d,i) { + + d.scapeX += d3.event.dx + d.scapeY += d3.event.dy + updateDB(d.id, d.scapeX, d.scapeY); + d3.select(this).attr("transform", function(d,i){ + return "translate(" + [ d.scapeX,d.scapeY ] + ")" + })}) +); + + var itemLink = g.selectAll("g.item") + .append("a") + .attr("xlink:href", function(d){return "/books/"+d.id}); + + +/*itemLink.append("rect") +.attr("class", "no_cover") +.attr('x', 0) +.attr('y', 0) +.attr('height', 60) +.attr('width', 40);*/ + + + itemLink.append("svg:image") +.attr("class", "no_cover") +.attr('x', 0) +.attr('y', 0) +.attr('height', 60) +.attr('width', 40) +.attr("xlink:href", function(d){if(d.cover!=null) return "/cover/"+d.cover}); + +itemLink.append("text") +.text(function(d){return d.title}) +.attr("x", 0) + .attr("y", 80) +.style("font-size", "6px"); +/* .style("font-size", "10px") + + .attr("width", 80);*/ // update existing elements join.transition(1000).attr("transform", function (d) { return "translate("+d.scapeX+","+d.scapeY+")"}); join.exit().remove(); + + + function updateDB(id, xPos, yPos){ + var postForm = { //Fetch form data + 'id' : id, + 'x' : xPos, //Store name fields value, + 'y' : yPos +}; + + $.ajax({ //Process the form using $.ajax() + type : 'POST', //Method type + url : '/scape', //Your form processing file URL + data : postForm, //Forms name + dataType : 'json' +}); + + } + }) diff --git a/app/templates/volumetric_catalog/OrbitControls.js b/app/templates/volumetric_catalog/OrbitControls.js new file mode 100644 index 0000000..2d55022 --- /dev/null +++ b/app/templates/volumetric_catalog/OrbitControls.js @@ -0,0 +1,1043 @@ +/** + * @author qiao / https://github.com/qiao + * @author mrdoob / http://mrdoob.com + * @author alteredq / http://alteredqualia.com/ + * @author WestLangley / http://github.com/WestLangley + * @author erich666 / http://erichaines.com + */ + +// This set of controls performs orbiting, dollying (zooming), and panning. +// Unlike TrackballControls, it maintains the "up" direction object.up (+Y by default). +// +// Orbit - left mouse / touch: one-finger move +// Zoom - middle mouse, or mousewheel / touch: two-finger spread or squish +// Pan - right mouse, or arrow keys / touch: two-finger move + +THREE.OrbitControls = function ( object, domElement ) { + + this.object = object; + + this.domElement = ( domElement !== undefined ) ? domElement : document; + + // Set to false to disable this control + this.enabled = true; + + // "target" sets the location of focus, where the object orbits around + this.target = new THREE.Vector3(); + + // How far you can dolly in and out ( PerspectiveCamera only ) + this.minDistance = 0; + this.maxDistance = Infinity; + + // How far you can zoom in and out ( OrthographicCamera only ) + this.minZoom = 0; + this.maxZoom = Infinity; + + // How far you can orbit vertically, upper and lower limits. + // Range is 0 to Math.PI radians. + this.minPolarAngle = 0; // radians + this.maxPolarAngle = Math.PI; // radians + + // How far you can orbit horizontally, upper and lower limits. + // If set, must be a sub-interval of the interval [ - Math.PI, Math.PI ]. + this.minAzimuthAngle = - Infinity; // radians + this.maxAzimuthAngle = Infinity; // radians + + // Set to true to enable damping (inertia) + // If damping is enabled, you must call controls.update() in your animation loop + this.enableDamping = false; + this.dampingFactor = 0.25; + + // This option actually enables dollying in and out; left as "zoom" for backwards compatibility. + // Set to false to disable zooming + this.enableZoom = true; + this.zoomSpeed = 1.0; + + // Set to false to disable rotating + this.enableRotate = true; + this.rotateSpeed = 1.0; + + // Set to false to disable panning + this.enablePan = true; + this.panSpeed = 1.0; + this.screenSpacePanning = false; // if true, pan in screen-space + this.keyPanSpeed = 7.0; // pixels moved per arrow key push + + // Set to true to automatically rotate around the target + // If auto-rotate is enabled, you must call controls.update() in your animation loop + this.autoRotate = false; + this.autoRotateSpeed = 2.0; // 30 seconds per round when fps is 60 + + // Set to false to disable use of the keys + this.enableKeys = true; + + // The four arrow keys + this.keys = { LEFT: 37, UP: 38, RIGHT: 39, BOTTOM: 40 }; + + // Mouse buttons + this.mouseButtons = { ORBIT: THREE.MOUSE.LEFT, ZOOM: THREE.MOUSE.MIDDLE, PAN: THREE.MOUSE.RIGHT }; + + // for reset + this.target0 = this.target.clone(); + this.position0 = this.object.position.clone(); + this.zoom0 = this.object.zoom; + + // + // public methods + // + + this.getPolarAngle = function () { + + return spherical.phi; + + }; + + this.getAzimuthalAngle = function () { + + return spherical.theta; + + }; + + this.saveState = function () { + + scope.target0.copy( scope.target ); + scope.position0.copy( scope.object.position ); + scope.zoom0 = scope.object.zoom; + + }; + + this.reset = function () { + + scope.target.copy( scope.target0 ); + scope.object.position.copy( scope.position0 ); + scope.object.zoom = scope.zoom0; + + scope.object.updateProjectionMatrix(); + scope.dispatchEvent( changeEvent ); + + scope.update(); + + state = STATE.NONE; + + }; + + // this method is exposed, but perhaps it would be better if we can make it private... + this.update = function () { + + var offset = new THREE.Vector3(); + + // so camera.up is the orbit axis + var quat = new THREE.Quaternion().setFromUnitVectors( object.up, new THREE.Vector3( 0, 1, 0 ) ); + var quatInverse = quat.clone().inverse(); + + var lastPosition = new THREE.Vector3(); + var lastQuaternion = new THREE.Quaternion(); + + return function update() { + + var position = scope.object.position; + + offset.copy( position ).sub( scope.target ); + + // rotate offset to "y-axis-is-up" space + offset.applyQuaternion( quat ); + + // angle from z-axis around y-axis + spherical.setFromVector3( offset ); + + if ( scope.autoRotate && state === STATE.NONE ) { + + rotateLeft( getAutoRotationAngle() ); + + } + + spherical.theta += sphericalDelta.theta; + spherical.phi += sphericalDelta.phi; + + // restrict theta to be between desired limits + spherical.theta = Math.max( scope.minAzimuthAngle, Math.min( scope.maxAzimuthAngle, spherical.theta ) ); + + // restrict phi to be between desired limits + spherical.phi = Math.max( scope.minPolarAngle, Math.min( scope.maxPolarAngle, spherical.phi ) ); + + spherical.makeSafe(); + + + spherical.radius *= scale; + + // restrict radius to be between desired limits + spherical.radius = Math.max( scope.minDistance, Math.min( scope.maxDistance, spherical.radius ) ); + + // move target to panned location + scope.target.add( panOffset ); + + offset.setFromSpherical( spherical ); + + // rotate offset back to "camera-up-vector-is-up" space + offset.applyQuaternion( quatInverse ); + + position.copy( scope.target ).add( offset ); + + scope.object.lookAt( scope.target ); + + if ( scope.enableDamping === true ) { + + sphericalDelta.theta *= ( 1 - scope.dampingFactor ); + sphericalDelta.phi *= ( 1 - scope.dampingFactor ); + + panOffset.multiplyScalar( 1 - scope.dampingFactor ); + + } else { + + sphericalDelta.set( 0, 0, 0 ); + + panOffset.set( 0, 0, 0 ); + + } + + scale = 1; + + // update condition is: + // min(camera displacement, camera rotation in radians)^2 > EPS + // using small-angle approximation cos(x/2) = 1 - x^2 / 8 + + if ( zoomChanged || + lastPosition.distanceToSquared( scope.object.position ) > EPS || + 8 * ( 1 - lastQuaternion.dot( scope.object.quaternion ) ) > EPS ) { + + scope.dispatchEvent( changeEvent ); + + lastPosition.copy( scope.object.position ); + lastQuaternion.copy( scope.object.quaternion ); + zoomChanged = false; + + return true; + + } + + return false; + + }; + + }(); + + this.dispose = function () { + + scope.domElement.removeEventListener( 'contextmenu', onContextMenu, false ); + scope.domElement.removeEventListener( 'mousedown', onMouseDown, false ); + scope.domElement.removeEventListener( 'wheel', onMouseWheel, false ); + + scope.domElement.removeEventListener( 'touchstart', onTouchStart, false ); + scope.domElement.removeEventListener( 'touchend', onTouchEnd, false ); + scope.domElement.removeEventListener( 'touchmove', onTouchMove, false ); + + document.removeEventListener( 'mousemove', onMouseMove, false ); + document.removeEventListener( 'mouseup', onMouseUp, false ); + + window.removeEventListener( 'keydown', onKeyDown, false ); + + //scope.dispatchEvent( { type: 'dispose' } ); // should this be added here? + + }; + + // + // internals + // + + var scope = this; + + var changeEvent = { type: 'change' }; + var startEvent = { type: 'start' }; + var endEvent = { type: 'end' }; + + var STATE = { NONE: - 1, ROTATE: 0, DOLLY: 1, PAN: 2, TOUCH_ROTATE: 3, TOUCH_DOLLY_PAN: 4 }; + + var state = STATE.NONE; + + var EPS = 0.000001; + + // current position in spherical coordinates + var spherical = new THREE.Spherical(); + var sphericalDelta = new THREE.Spherical(); + + var scale = 1; + var panOffset = new THREE.Vector3(); + var zoomChanged = false; + + var rotateStart = new THREE.Vector2(); + var rotateEnd = new THREE.Vector2(); + var rotateDelta = new THREE.Vector2(); + + var panStart = new THREE.Vector2(); + var panEnd = new THREE.Vector2(); + var panDelta = new THREE.Vector2(); + + var dollyStart = new THREE.Vector2(); + var dollyEnd = new THREE.Vector2(); + var dollyDelta = new THREE.Vector2(); + + function getAutoRotationAngle() { + + return 2 * Math.PI / 60 / 60 * scope.autoRotateSpeed; + + } + + function getZoomScale() { + + return Math.pow( 0.95, scope.zoomSpeed ); + + } + + function rotateLeft( angle ) { + + sphericalDelta.theta -= angle; + + } + + function rotateUp( angle ) { + + sphericalDelta.phi -= angle; + + } + + var panLeft = function () { + + var v = new THREE.Vector3(); + + return function panLeft( distance, objectMatrix ) { + + v.setFromMatrixColumn( objectMatrix, 0 ); // get X column of objectMatrix + v.multiplyScalar( - distance ); + + panOffset.add( v ); + + }; + + }(); + + var panUp = function () { + + var v = new THREE.Vector3(); + + return function panUp( distance, objectMatrix ) { + + if ( scope.screenSpacePanning === true ) { + + v.setFromMatrixColumn( objectMatrix, 1 ); + + } else { + + v.setFromMatrixColumn( objectMatrix, 0 ); + v.crossVectors( scope.object.up, v ); + + } + + v.multiplyScalar( distance ); + + panOffset.add( v ); + + }; + + }(); + + // deltaX and deltaY are in pixels; right and down are positive + var pan = function () { + + var offset = new THREE.Vector3(); + + return function pan( deltaX, deltaY ) { + + var element = scope.domElement === document ? scope.domElement.body : scope.domElement; + + if ( scope.object.isPerspectiveCamera ) { + + // perspective + var position = scope.object.position; + offset.copy( position ).sub( scope.target ); + var targetDistance = offset.length(); + + // half of the fov is center to top of screen + targetDistance *= Math.tan( ( scope.object.fov / 2 ) * Math.PI / 180.0 ); + + // we use only clientHeight here so aspect ratio does not distort speed + panLeft( 2 * deltaX * targetDistance / element.clientHeight, scope.object.matrix ); + panUp( 2 * deltaY * targetDistance / element.clientHeight, scope.object.matrix ); + + } else if ( scope.object.isOrthographicCamera ) { + + // orthographic + panLeft( deltaX * ( scope.object.right - scope.object.left ) / scope.object.zoom / element.clientWidth, scope.object.matrix ); + panUp( deltaY * ( scope.object.top - scope.object.bottom ) / scope.object.zoom / element.clientHeight, scope.object.matrix ); + + } else { + + // camera neither orthographic nor perspective + console.warn( 'WARNING: OrbitControls.js encountered an unknown camera type - pan disabled.' ); + scope.enablePan = false; + + } + + }; + + }(); + + function dollyIn( dollyScale ) { + + if ( scope.object.isPerspectiveCamera ) { + + scale /= dollyScale; + + } else if ( scope.object.isOrthographicCamera ) { + + scope.object.zoom = Math.max( scope.minZoom, Math.min( scope.maxZoom, scope.object.zoom * dollyScale ) ); + scope.object.updateProjectionMatrix(); + zoomChanged = true; + + } else { + + console.warn( 'WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled.' ); + scope.enableZoom = false; + + } + + } + + function dollyOut( dollyScale ) { + + if ( scope.object.isPerspectiveCamera ) { + + scale *= dollyScale; + + } else if ( scope.object.isOrthographicCamera ) { + + scope.object.zoom = Math.max( scope.minZoom, Math.min( scope.maxZoom, scope.object.zoom / dollyScale ) ); + scope.object.updateProjectionMatrix(); + zoomChanged = true; + + } else { + + console.warn( 'WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled.' ); + scope.enableZoom = false; + + } + + } + + // + // event callbacks - update the object state + // + + function handleMouseDownRotate( event ) { + + //console.log( 'handleMouseDownRotate' ); + + rotateStart.set( event.clientX, event.clientY ); + + } + + function handleMouseDownDolly( event ) { + + //console.log( 'handleMouseDownDolly' ); + + dollyStart.set( event.clientX, event.clientY ); + + } + + function handleMouseDownPan( event ) { + + //console.log( 'handleMouseDownPan' ); + + panStart.set( event.clientX, event.clientY ); + + } + + function handleMouseMoveRotate( event ) { + + //console.log( 'handleMouseMoveRotate' ); + + rotateEnd.set( event.clientX, event.clientY ); + + rotateDelta.subVectors( rotateEnd, rotateStart ).multiplyScalar( scope.rotateSpeed ); + + var element = scope.domElement === document ? scope.domElement.body : scope.domElement; + + // rotating across whole screen goes 360 degrees around + rotateLeft( 2 * Math.PI * rotateDelta.x / element.clientWidth ); + + // rotating up and down along whole screen attempts to go 360, but limited to 180 + rotateUp( 2 * Math.PI * rotateDelta.y / element.clientHeight ); + + rotateStart.copy( rotateEnd ); + + scope.update(); + + } + + function handleMouseMoveDolly( event ) { + + //console.log( 'handleMouseMoveDolly' ); + + dollyEnd.set( event.clientX, event.clientY ); + + dollyDelta.subVectors( dollyEnd, dollyStart ); + + if ( dollyDelta.y > 0 ) { + + dollyIn( getZoomScale() ); + + } else if ( dollyDelta.y < 0 ) { + + dollyOut( getZoomScale() ); + + } + + dollyStart.copy( dollyEnd ); + + scope.update(); + + } + + function handleMouseMovePan( event ) { + + //console.log( 'handleMouseMovePan' ); + + panEnd.set( event.clientX, event.clientY ); + + panDelta.subVectors( panEnd, panStart ).multiplyScalar( scope.panSpeed ); + + pan( panDelta.x, panDelta.y ); + + panStart.copy( panEnd ); + + scope.update(); + + } + + function handleMouseUp( event ) { + + // console.log( 'handleMouseUp' ); + + } + + function handleMouseWheel( event ) { + + // console.log( 'handleMouseWheel' ); + + if ( event.deltaY < 0 ) { + + dollyOut( getZoomScale() ); + + } else if ( event.deltaY > 0 ) { + + dollyIn( getZoomScale() ); + + } + + scope.update(); + + } + + function handleKeyDown( event ) { + + //console.log( 'handleKeyDown' ); + + switch ( event.keyCode ) { + + case scope.keys.UP: + pan( 0, scope.keyPanSpeed ); + scope.update(); + break; + + case scope.keys.BOTTOM: + pan( 0, - scope.keyPanSpeed ); + scope.update(); + break; + + case scope.keys.LEFT: + pan( scope.keyPanSpeed, 0 ); + scope.update(); + break; + + case scope.keys.RIGHT: + pan( - scope.keyPanSpeed, 0 ); + scope.update(); + break; + + } + + } + + function handleTouchStartRotate( event ) { + + //console.log( 'handleTouchStartRotate' ); + + rotateStart.set( event.touches[ 0 ].pageX, event.touches[ 0 ].pageY ); + + } + + function handleTouchStartDollyPan( event ) { + + //console.log( 'handleTouchStartDollyPan' ); + + if ( scope.enableZoom ) { + + var dx = event.touches[ 0 ].pageX - event.touches[ 1 ].pageX; + var dy = event.touches[ 0 ].pageY - event.touches[ 1 ].pageY; + + var distance = Math.sqrt( dx * dx + dy * dy ); + + dollyStart.set( 0, distance ); + + } + + if ( scope.enablePan ) { + + var x = 0.5 * ( event.touches[ 0 ].pageX + event.touches[ 1 ].pageX ); + var y = 0.5 * ( event.touches[ 0 ].pageY + event.touches[ 1 ].pageY ); + + panStart.set( x, y ); + + } + + } + + function handleTouchMoveRotate( event ) { + + //console.log( 'handleTouchMoveRotate' ); + + rotateEnd.set( event.touches[ 0 ].pageX, event.touches[ 0 ].pageY ); + + rotateDelta.subVectors( rotateEnd, rotateStart ).multiplyScalar( scope.rotateSpeed ); + + var element = scope.domElement === document ? scope.domElement.body : scope.domElement; + + // rotating across whole screen goes 360 degrees around + rotateLeft( 2 * Math.PI * rotateDelta.x / element.clientWidth ); + + // rotating up and down along whole screen attempts to go 360, but limited to 180 + rotateUp( 2 * Math.PI * rotateDelta.y / element.clientHeight ); + + rotateStart.copy( rotateEnd ); + + scope.update(); + + } + + function handleTouchMoveDollyPan( event ) { + + //console.log( 'handleTouchMoveDollyPan' ); + + if ( scope.enableZoom ) { + + var dx = event.touches[ 0 ].pageX - event.touches[ 1 ].pageX; + var dy = event.touches[ 0 ].pageY - event.touches[ 1 ].pageY; + + var distance = Math.sqrt( dx * dx + dy * dy ); + + dollyEnd.set( 0, distance ); + + dollyDelta.set( 0, Math.pow( dollyEnd.y / dollyStart.y, scope.zoomSpeed ) ); + + dollyIn( dollyDelta.y ); + + dollyStart.copy( dollyEnd ); + + } + + if ( scope.enablePan ) { + + var x = 0.5 * ( event.touches[ 0 ].pageX + event.touches[ 1 ].pageX ); + var y = 0.5 * ( event.touches[ 0 ].pageY + event.touches[ 1 ].pageY ); + + panEnd.set( x, y ); + + panDelta.subVectors( panEnd, panStart ).multiplyScalar( scope.panSpeed ); + + pan( panDelta.x, panDelta.y ); + + panStart.copy( panEnd ); + + } + + scope.update(); + + } + + function handleTouchEnd( event ) { + + //console.log( 'handleTouchEnd' ); + + } + + // + // event handlers - FSM: listen for events and reset state + // + + function onMouseDown( event ) { + + if ( scope.enabled === false ) return; + + event.preventDefault(); + + switch ( event.button ) { + + case scope.mouseButtons.ORBIT: + + if ( scope.enableRotate === false ) return; + + handleMouseDownRotate( event ); + + state = STATE.ROTATE; + + break; + + case scope.mouseButtons.ZOOM: + + if ( scope.enableZoom === false ) return; + + handleMouseDownDolly( event ); + + state = STATE.DOLLY; + + break; + + case scope.mouseButtons.PAN: + + if ( scope.enablePan === false ) return; + + handleMouseDownPan( event ); + + state = STATE.PAN; + + break; + + } + + if ( state !== STATE.NONE ) { + + document.addEventListener( 'mousemove', onMouseMove, false ); + document.addEventListener( 'mouseup', onMouseUp, false ); + + scope.dispatchEvent( startEvent ); + + } + + } + + function onMouseMove( event ) { + + if ( scope.enabled === false ) return; + + event.preventDefault(); + + switch ( state ) { + + case STATE.ROTATE: + + if ( scope.enableRotate === false ) return; + + handleMouseMoveRotate( event ); + + break; + + case STATE.DOLLY: + + if ( scope.enableZoom === false ) return; + + handleMouseMoveDolly( event ); + + break; + + case STATE.PAN: + + if ( scope.enablePan === false ) return; + + handleMouseMovePan( event ); + + break; + + } + + } + + function onMouseUp( event ) { + + if ( scope.enabled === false ) return; + + handleMouseUp( event ); + + document.removeEventListener( 'mousemove', onMouseMove, false ); + document.removeEventListener( 'mouseup', onMouseUp, false ); + + scope.dispatchEvent( endEvent ); + + state = STATE.NONE; + + } + + function onMouseWheel( event ) { + + if ( scope.enabled === false || scope.enableZoom === false || ( state !== STATE.NONE && state !== STATE.ROTATE ) ) return; + + event.preventDefault(); + event.stopPropagation(); + + scope.dispatchEvent( startEvent ); + + handleMouseWheel( event ); + + scope.dispatchEvent( endEvent ); + + } + + function onKeyDown( event ) { + + if ( scope.enabled === false || scope.enableKeys === false || scope.enablePan === false ) return; + + handleKeyDown( event ); + + } + + function onTouchStart( event ) { + + if ( scope.enabled === false ) return; + + event.preventDefault(); + + switch ( event.touches.length ) { + + case 1: // one-fingered touch: rotate + + if ( scope.enableRotate === false ) return; + + handleTouchStartRotate( event ); + + state = STATE.TOUCH_ROTATE; + + break; + + case 2: // two-fingered touch: dolly-pan + + if ( scope.enableZoom === false && scope.enablePan === false ) return; + + handleTouchStartDollyPan( event ); + + state = STATE.TOUCH_DOLLY_PAN; + + break; + + default: + + state = STATE.NONE; + + } + + if ( state !== STATE.NONE ) { + + scope.dispatchEvent( startEvent ); + + } + + } + + function onTouchMove( event ) { + + if ( scope.enabled === false ) return; + + event.preventDefault(); + event.stopPropagation(); + + switch ( event.touches.length ) { + + case 1: // one-fingered touch: rotate + + if ( scope.enableRotate === false ) return; + if ( state !== STATE.TOUCH_ROTATE ) return; // is this needed? + + handleTouchMoveRotate( event ); + + break; + + case 2: // two-fingered touch: dolly-pan + + if ( scope.enableZoom === false && scope.enablePan === false ) return; + if ( state !== STATE.TOUCH_DOLLY_PAN ) return; // is this needed? + + handleTouchMoveDollyPan( event ); + + break; + + default: + + state = STATE.NONE; + + } + + } + + function onTouchEnd( event ) { + + if ( scope.enabled === false ) return; + + handleTouchEnd( event ); + + scope.dispatchEvent( endEvent ); + + state = STATE.NONE; + + } + + function onContextMenu( event ) { + + if ( scope.enabled === false ) return; + + event.preventDefault(); + + } + + // + + scope.domElement.addEventListener( 'contextmenu', onContextMenu, false ); + + scope.domElement.addEventListener( 'mousedown', onMouseDown, false ); + scope.domElement.addEventListener( 'wheel', onMouseWheel, false ); + + scope.domElement.addEventListener( 'touchstart', onTouchStart, false ); + scope.domElement.addEventListener( 'touchend', onTouchEnd, false ); + scope.domElement.addEventListener( 'touchmove', onTouchMove, false ); + + window.addEventListener( 'keydown', onKeyDown, false ); + + // force an update at start + + this.update(); + +}; + +THREE.OrbitControls.prototype = Object.create( THREE.EventDispatcher.prototype ); +THREE.OrbitControls.prototype.constructor = THREE.OrbitControls; + +Object.defineProperties( THREE.OrbitControls.prototype, { + + center: { + + get: function () { + + console.warn( 'THREE.OrbitControls: .center has been renamed to .target' ); + return this.target; + + } + + }, + + // backward compatibility + + noZoom: { + + get: function () { + + console.warn( 'THREE.OrbitControls: .noZoom has been deprecated. Use .enableZoom instead.' ); + return ! this.enableZoom; + + }, + + set: function ( value ) { + + console.warn( 'THREE.OrbitControls: .noZoom has been deprecated. Use .enableZoom instead.' ); + this.enableZoom = ! value; + + } + + }, + + noRotate: { + + get: function () { + + console.warn( 'THREE.OrbitControls: .noRotate has been deprecated. Use .enableRotate instead.' ); + return ! this.enableRotate; + + }, + + set: function ( value ) { + + console.warn( 'THREE.OrbitControls: .noRotate has been deprecated. Use .enableRotate instead.' ); + this.enableRotate = ! value; + + } + + }, + + noPan: { + + get: function () { + + console.warn( 'THREE.OrbitControls: .noPan has been deprecated. Use .enablePan instead.' ); + return ! this.enablePan; + + }, + + set: function ( value ) { + + console.warn( 'THREE.OrbitControls: .noPan has been deprecated. Use .enablePan instead.' ); + this.enablePan = ! value; + + } + + }, + + noKeys: { + + get: function () { + + console.warn( 'THREE.OrbitControls: .noKeys has been deprecated. Use .enableKeys instead.' ); + return ! this.enableKeys; + + }, + + set: function ( value ) { + + console.warn( 'THREE.OrbitControls: .noKeys has been deprecated. Use .enableKeys instead.' ); + this.enableKeys = ! value; + + } + + }, + + staticMoving: { + + get: function () { + + console.warn( 'THREE.OrbitControls: .staticMoving has been deprecated. Use .enableDamping instead.' ); + return ! this.enableDamping; + + }, + + set: function ( value ) { + + console.warn( 'THREE.OrbitControls: .staticMoving has been deprecated. Use .enableDamping instead.' ); + this.enableDamping = ! value; + + } + + }, + + dynamicDampingFactor: { + + get: function () { + + console.warn( 'THREE.OrbitControls: .dynamicDampingFactor has been renamed. Use .dampingFactor instead.' ); + return this.dampingFactor; + + }, + + set: function ( value ) { + + console.warn( 'THREE.OrbitControls: .dynamicDampingFactor has been renamed. Use .dampingFactor instead.' ); + this.dampingFactor = value; + + } + + } + +} ); diff --git a/app/templates/volumetric_catalog/Raycaster.js b/app/templates/volumetric_catalog/Raycaster.js new file mode 100644 index 0000000..30ca4d9 --- /dev/null +++ b/app/templates/volumetric_catalog/Raycaster.js @@ -0,0 +1,134 @@ +import { Ray } from '../math/Ray.js'; + +/** + * @author mrdoob / http://mrdoob.com/ + * @author bhouston / http://clara.io/ + * @author stephomi / http://stephaneginier.com/ + */ + +function Raycaster( origin, direction, near, far ) { + + this.ray = new Ray( origin, direction ); + // direction is assumed to be normalized (for accurate distance calculations) + + this.near = near || 0; + this.far = far || Infinity; + + this.params = { + Mesh: {}, + Line: {}, + LOD: {}, + Points: { threshold: 1 }, + Sprite: {} + }; + + Object.defineProperties( this.params, { + PointCloud: { + get: function () { + + console.warn( 'THREE.Raycaster: params.PointCloud has been renamed to params.Points.' ); + return this.Points; + + } + } + } ); + +} + +function ascSort( a, b ) { + + return a.distance - b.distance; + +} + +function intersectObject( object, raycaster, intersects, recursive ) { + + if ( object.visible === false ) return; + + object.raycast( raycaster, intersects ); + + if ( recursive === true ) { + + var children = object.children; + + for ( var i = 0, l = children.length; i < l; i ++ ) { + + intersectObject( children[ i ], raycaster, intersects, true ); + + } + + } + +} + +Object.assign( Raycaster.prototype, { + + linePrecision: 1, + + set: function ( origin, direction ) { + + // direction is assumed to be normalized (for accurate distance calculations) + + this.ray.set( origin, direction ); + + }, + + setFromCamera: function ( coords, camera ) { + + if ( ( camera && camera.isPerspectiveCamera ) ) { + + this.ray.origin.setFromMatrixPosition( camera.matrixWorld ); + this.ray.direction.set( coords.x, coords.y, 0.5 ).unproject( camera ).sub( this.ray.origin ).normalize(); + + } else if ( ( camera && camera.isOrthographicCamera ) ) { + + this.ray.origin.set( coords.x, coords.y, ( camera.near + camera.far ) / ( camera.near - camera.far ) ).unproject( camera ); // set origin in plane of camera + this.ray.direction.set( 0, 0, - 1 ).transformDirection( camera.matrixWorld ); + + } else { + + console.error( 'THREE.Raycaster: Unsupported camera type.' ); + + } + + }, + + intersectObject: function ( object, recursive, optionalTarget ) { + + var intersects = optionalTarget || []; + + intersectObject( object, this, intersects, recursive ); + + intersects.sort( ascSort ); + + return intersects; + + }, + + intersectObjects: function ( objects, recursive, optionalTarget ) { + + var intersects = optionalTarget || []; + + if ( Array.isArray( objects ) === false ) { + + console.warn( 'THREE.Raycaster.intersectObjects: objects is not an Array.' ); + return intersects; + + } + + for ( var i = 0, l = objects.length; i < l; i ++ ) { + + intersectObject( objects[ i ], this, intersects, recursive ); + + } + + intersects.sort( ascSort ); + + return intersects; + + } + +} ); + + +export { Raycaster }; diff --git a/app/templates/volumetric_catalog/ascii_json_js_4.html b/app/templates/volumetric_catalog/ascii_json_js_4.html new file mode 100644 index 0000000..a942e8b --- /dev/null +++ b/app/templates/volumetric_catalog/ascii_json_js_4.html @@ -0,0 +1,81 @@ + + + + Collection + + + + + + + + \ No newline at end of file diff --git a/app/templates/volumetric_catalog/books9_final.html b/app/templates/volumetric_catalog/books9_final.html new file mode 100644 index 0000000..3978284 --- /dev/null +++ b/app/templates/volumetric_catalog/books9_final.html @@ -0,0 +1,382 @@ + + + + + XPPL VOLUMETRIC CATALOGUE + + + + + + +
XPPL VOLUMETRIC CATALOGUE

Feel free to move around and explore the content of the library by clicking on the volumetric shapes
+
+ + + + + + + + + + + \ No newline at end of file diff --git a/app/templates/volumetric_catalog/books9_final_a 2.html b/app/templates/volumetric_catalog/books9_final_a 2.html new file mode 100644 index 0000000..bc3c677 --- /dev/null +++ b/app/templates/volumetric_catalog/books9_final_a 2.html @@ -0,0 +1,458 @@ + + + + + XPPL VOLUMETRIC CATALOGUE + + + + + + + +
+ + + + + + + + + + diff --git a/app/templates/volumetric_catalog/books9_final_a.html b/app/templates/volumetric_catalog/books9_final_a.html new file mode 100644 index 0000000..29301e2 --- /dev/null +++ b/app/templates/volumetric_catalog/books9_final_a.html @@ -0,0 +1,459 @@ + + + + + XPPL VOLUMETRIC CATALOGUE + + + + + + +
XPPL VOLUMETRIC CATALOGUE

Feel free to move around and explore the content of the library by clicking on the volumetric shapes
+
+ + + + + + + + + + diff --git a/app/templates/volumetric_catalog/export.json b/app/templates/volumetric_catalog/export.json new file mode 100644 index 0000000..6fbb825 --- /dev/null +++ b/app/templates/volumetric_catalog/export.json @@ -0,0 +1,3179 @@ +{ + "books": [ + [ + { + "authors": [ + { + "author_name": "Dave Sill", + "id": 1 + } + ], + "category": "Technical", + "cover": "", + "file": "", + "fileformat": "pdf", + "html": null, + "id": 1, + "stacks": [], + "title": "The Qmail Handbook", + "year_published": null + }, + { + "authors": [ + { + "author_name": "Wes Noonan", + "id": 2 + } + ], + "category": "Technical", + "cover": "", + "file": "", + "fileformat": "chm, pdf", + "html": null, + "id": 2, + "stacks": [], + "title": "Hardening Network Infrastructure: Bulletproof Your Systems Before You Are Hacked!", + "year_published": null + }, + { + "authors": [ + { + "author_name": "Dave Sill", + "id": 1 + } + ], + "category": "Technical", + "cover": "", + "file": "", + "fileformat": "pdf", + "html": null, + "id": 3, + "stacks": [], + "title": "The Qmail Handbook", + "year_published": null + }, + { + "authors": [ + { + "author_name": "Wes Noonan", + "id": 2 + } + ], + "category": "Technical", + "cover": "", + "file": "", + "fileformat": "chm, pdf", + "html": null, + "id": 4, + "stacks": [], + "title": "Hardening Network Infrastructure: Bulletproof Your Systems Before You Are Hacked!", + "year_published": null + }, + { + "authors": [ + { + "author_name": "Dave Sill", + "id": 1 + } + ], + "category": "Technical", + "cover": "", + "file": "", + "fileformat": "pdf", + "html": null, + "id": 5, + "stacks": [], + "title": "The Qmail Handbook", + "year_published": null + }, + { + "authors": [ + { + "author_name": "Wes Noonan", + "id": 2 + } + ], + "category": "Technical", + "cover": "", + "file": "", + "fileformat": "chm, pdf", + "html": null, + "id": 6, + "stacks": [ + { + "id": 1, + "stack_description": null, + "stack_name": "Make a library" + } + ], + "title": "Hardening Network Infrastructure: Bulletproof Your Systems Before You Are Hacked!", + "year_published": null + }, + { + "authors": [ + { + "author_name": "Aaron Hillegaas", + "id": 3 + } + ], + "category": "Technical", + "cover": "", + "file": "", + "fileformat": "pdf", + "html": null, + "id": 7, + "stacks": [], + "title": "Cocoa Programming for Mac OS X Second Edition", + "year_published": null + }, + { + "authors": [ + { + "author_name": "Gerald Carter", + "id": 4 + } + ], + "category": "Technical", + "cover": "", + "file": "", + "fileformat": "pdf", + "html": null, + "id": 8, + "stacks": [], + "title": "LDAP System Administration", + "year_published": null + }, + { + "authors": [ + { + "author_name": "Dave Taylor", + "id": 5 + }, + { + "author_name": "Jerry Peek", + "id": 6 + } + ], + "category": "Technical", + "cover": "", + "file": "", + "fileformat": "pdf", + "html": null, + "id": 9, + "stacks": [], + "title": "Learning Unix for Mac OS X", + "year_published": null + }, + { + "authors": [ + { + "author_name": "Brian Jepson", + "id": 7 + }, + { + "author_name": "Ernest E. Rothman", + "id": 8 + } + ], + "category": "Technical", + "cover": "", + "file": "", + "fileformat": "chm, pdf", + "html": null, + "id": 10, + "stacks": [], + "title": "Mac OS X Panther for Unix Geeks", + "year_published": null + }, + { + "authors": [ + { + "author_name": "Tom Adelstein", + "id": 9 + }, + { + "author_name": "Bill Lubanovic", + "id": 10 + } + ], + "category": "Technical", + "cover": "", + "file": "", + "fileformat": "pdf", + "html": null, + "id": 11, + "stacks": [], + "title": "Linux System Administration", + "year_published": null + }, + { + "authors": [ + { + "author_name": "Tim King", + "id": 11 + }, + { + "author_name": "George Reese", + "id": 12 + }, + { + "author_name": "Randy Yarger", + "id": 13 + }, + { + "author_name": "Hugh E. Williams", + "id": 14 + }, + { + "author_name": "Randy Jay Yarger", + "id": 15 + } + ], + "category": "Technical", + "cover": "", + "file": "", + "fileformat": "chm, pdf", + "html": null, + "id": 12, + "stacks": [], + "title": "Managing and Using MYSQL", + "year_published": null + }, + { + "authors": [ + { + "author_name": "Russell Dyer", + "id": 16 + } + ], + "category": "Technical", + "cover": "", + "file": "", + "fileformat": "pdf", + "html": null, + "id": 13, + "stacks": [ + { + "id": 1, + "stack_description": null, + "stack_name": "Make a library" + } + ], + "title": "MYSQL In a Nutshell", + "year_published": null + }, + { + "authors": [ + { + "author_name": "Colin Moock", + "id": 17 + } + ], + "category": "Technical", + "cover": "", + "file": "", + "fileformat": "pdf", + "html": null, + "id": 14, + "stacks": [], + "title": "Actionscript for Flash MX: The Definitive Guide", + "year_published": null + }, + { + "authors": [ + { + "author_name": "Kenneth C Feldt", + "id": 18 + } + ], + "category": "Technical", + "cover": "", + "file": "", + "fileformat": "pdf", + "html": null, + "id": 15, + "stacks": [], + "title": "Programming Firefox", + "year_published": null + }, + { + "authors": [ + { + "author_name": "Michele E Davis", + "id": 19 + } + ], + "category": " Jon A Phillips", + "cover": "", + "file": "", + "fileformat": "Technical", + "html": null, + "id": 16, + "stacks": [], + "title": "Learning PHP and MYSQL", + "year_published": null + }, + { + "authors": [ + { + "author_name": "Cameron Newham", + "id": 20 + }, + { + "author_name": "Bill Rosenblatt", + "id": 21 + } + ], + "category": "Technical", + "cover": "", + "file": "", + "fileformat": "pdf", + "html": null, + "id": 17, + "stacks": [], + "title": "Learning the Bash Shell", + "year_published": null + }, + { + "authors": [ + { + "author_name": "Debra Cameron", + "id": 22 + } + ], + "category": "Technical", + "cover": "", + "file": "", + "fileformat": "pdf", + "html": null, + "id": 18, + "stacks": [], + "title": "GNU Emacs Pocket Reference", + "year_published": null + }, + { + "authors": [ + { + "author_name": "Jonathan Gennick", + "id": 23 + } + ], + "category": "Technical", + "cover": "", + "file": "", + "fileformat": "pdf", + "html": null, + "id": 19, + "stacks": [], + "title": "SQL Pocket Guide", + "year_published": null + }, + { + "authors": [ + { + "author_name": "Jennifer Niederst Robbins", + "id": 24 + } + ], + "category": "Technical", + "cover": "", + "file": "", + "fileformat": "pdf", + "html": null, + "id": 20, + "stacks": [], + "title": "HTML Pocket Reference", + "year_published": null + }, + { + "authors": [ + { + "author_name": "Tony Stubblebine", + "id": 25 + } + ], + "category": "Technical", + "cover": "", + "file": "", + "fileformat": "chm, pdf", + "html": null, + "id": 21, + "stacks": [], + "title": "Regular Expression Pocket Reference", + "year_published": null + }, + { + "authors": [ + { + "author_name": "Andrew Ford", + "id": 26 + } + ], + "category": "Technical", + "cover": "", + "file": "", + "fileformat": "", + "html": null, + "id": 22, + "stacks": [], + "title": "Apache 2 Pocket Reference", + "year_published": null + }, + { + "authors": [ + { + "author_name": "Eric A. Meyer", + "id": 27 + } + ], + "category": "Technical", + "cover": "", + "file": "", + "fileformat": "pdf", + "html": null, + "id": 23, + "stacks": [], + "title": "CSS Pocket Reference", + "year_published": null + }, + { + "authors": [ + { + "author_name": "Arnold Robbins", + "id": 28 + } + ], + "category": "Technical", + "cover": "", + "file": "", + "fileformat": "epub, pdf", + "html": null, + "id": 24, + "stacks": [], + "title": "vi Editor Pocket Reference", + "year_published": null + }, + { + "authors": [ + { + "author_name": "Dmitry Kirsanov", + "id": 29 + } + ], + "category": "Technical", + "cover": "", + "file": "", + "fileformat": "pdf", + "html": null, + "id": 25, + "stacks": [], + "title": "The Book of Inkscape", + "year_published": null + }, + { + "authors": [ + { + "author_name": "Yaron Koren", + "id": 30 + } + ], + "category": "Technical", + "cover": "", + "file": "", + "fileformat": "pdf", + "html": null, + "id": 26, + "stacks": [], + "title": "Working with Mediawiki", + "year_published": null + }, + { + "authors": [ + { + "author_name": "Will McGugan", + "id": 31 + } + ], + "category": "Technical", + "cover": "", + "file": "", + "fileformat": "pdf", + "html": null, + "id": 27, + "stacks": [], + "title": "Beginning Game Development with Python and Pygame", + "year_published": null + }, + { + "authors": [ + { + "author_name": "Gutschmidt T.", + "id": 32 + } + ], + "category": "Technical", + "cover": "", + "file": "", + "fileformat": "pdf", + "html": null, + "id": 28, + "stacks": [], + "title": "Game Programming with Python, Lua, and Ruby 1 edition", + "year_published": null + }, + { + "authors": [ + { + "author_name": "Sharon Allen", + "id": 33 + } + ], + "category": "Technical", + "cover": "", + "file": "", + "fileformat": "", + "html": null, + "id": 29, + "stacks": [], + "title": "Data Modeling for Everyone", + "year_published": null + }, + { + "authors": [ + { + "author_name": "Hewlett-Packard", + "id": 34 + } + ], + "category": "Technical", + "cover": "", + "file": "", + "fileformat": "", + "html": null, + "id": 30, + "stacks": [], + "title": "The Ultimate Guide to the Vi and Ex Text Editors", + "year_published": null + }, + { + "authors": [ + { + "author_name": "Tom Lubin", + "id": 35 + } + ], + "category": "Technical", + "cover": "", + "file": "", + "fileformat": "", + "html": null, + "id": 31, + "stacks": [], + "title": "Getting Gread Sounds: The Microphone Book", + "year_published": null + }, + { + "authors": [ + { + "author_name": "Allen B. Downey", + "id": 36 + }, + { + "author_name": "Jeffrey Elkner", + "id": 37 + }, + { + "author_name": "Chris Meyers", + "id": 38 + } + ], + "category": "Technical", + "cover": "", + "file": "", + "fileformat": "pdf", + "html": null, + "id": 32, + "stacks": [ + { + "id": 2, + "stack_description": null, + "stack_name": "Intro to PZI" + } + ], + "title": "How to Think Like a Computer Scientist", + "year_published": null + }, + { + "authors": [ + { + "author_name": "Mark Lutz", + "id": 39 + } + ], + "category": "Technical", + "cover": "", + "file": "", + "fileformat": "pdf", + "html": null, + "id": 33, + "stacks": [], + "title": "Python Pocket Reference", + "year_published": null + }, + { + "authors": [ + { + "author_name": "Lorraine Daston (Editor)", + "id": 40 + } + ], + "category": "Science/History", + "cover": "", + "file": "", + "fileformat": "", + "html": null, + "id": 34, + "stacks": [], + "title": "Things That Talk", + "year_published": null + }, + { + "authors": [ + { + "author_name": "Hankins & Silverman", + "id": 41 + } + ], + "category": "Science/History", + "cover": "", + "file": "", + "fileformat": "", + "html": null, + "id": 35, + "stacks": [], + "title": "Instruments and the Imagination", + "year_published": null + }, + { + "authors": [ + { + "author_name": "Robert Nadeau", + "id": 42 + } + ], + "category": "Science/History", + "cover": "", + "file": "", + "fileformat": "", + "html": null, + "id": 36, + "stacks": [], + "title": "Mind, Machines and Human Consciousness", + "year_published": null + }, + { + "authors": [ + { + "author_name": "Jon Ronson", + "id": 43 + } + ], + "category": "Science/History", + "cover": "", + "file": "", + "fileformat": "pdf", + "html": null, + "id": 37, + "stacks": [], + "title": "The Psychopath Test", + "year_published": null + }, + { + "authors": [ + { + "author_name": "Richard Dawkins", + "id": 44 + } + ], + "category": "Science/History", + "cover": "", + "file": "", + "fileformat": "pdf", + "html": null, + "id": 38, + "stacks": [], + "title": "The Selfish Gene", + "year_published": null + }, + { + "authors": [ + { + "author_name": "Bruno Latour", + "id": 45 + } + ], + "category": "Science/History", + "cover": "", + "file": "", + "fileformat": "pdf", + "html": null, + "id": 39, + "stacks": [], + "title": "Pandora's Hope", + "year_published": null + }, + { + "authors": [ + { + "author_name": "Luc Boltanski & Eve Chiapello", + "id": 46 + } + ], + "category": "Science/History", + "cover": "", + "file": "", + "fileformat": "pdf", + "html": null, + "id": 40, + "stacks": [], + "title": "The New Spirit of Capitalism", + "year_published": null + }, + { + "authors": [ + { + "author_name": "Pierre Bourdieu", + "id": 47 + } + ], + "category": "Science/History", + "cover": "", + "file": "", + "fileformat": "", + "html": null, + "id": 41, + "stacks": [], + "title": "Distinction: A Social Critique of the Judgement of Taste", + "year_published": null + }, + { + "authors": [ + { + "author_name": "Robert W. McChesney", + "id": 48 + } + ], + "category": "Science/History", + "cover": "", + "file": "", + "fileformat": "", + "html": null, + "id": 42, + "stacks": [], + "title": "The Political Economy of Media: Enduring Issues, Emerging Dilemmas", + "year_published": null + }, + { + "authors": [ + { + "author_name": "Greil Marcus", + "id": 49 + } + ], + "category": "Science/History", + "cover": "", + "file": "", + "fileformat": "", + "html": null, + "id": 43, + "stacks": [], + "title": "The Dustbin of History", + "year_published": null + }, + { + "authors": [ + { + "author_name": "Matthew Sweet", + "id": 50 + } + ], + "category": "Science/History", + "cover": "", + "file": "", + "fileformat": "", + "html": null, + "id": 44, + "stacks": [], + "title": "Inventing The Victorians", + "year_published": null + }, + { + "authors": [ + { + "author_name": "Eric Hobsbawm", + "id": 51 + } + ], + "category": "Science/History", + "cover": "", + "file": "", + "fileformat": "pdf", + "html": null, + "id": 45, + "stacks": [], + "title": "Age of the Extremes: The Short Twentieth Century 1914-1991", + "year_published": null + }, + { + "authors": [ + { + "author_name": "Greil Marcus", + "id": 49 + } + ], + "category": "Science/History", + "cover": "", + "file": "", + "fileformat": "", + "html": null, + "id": 46, + "stacks": [ + { + "id": 3, + "stack_description": null, + "stack_name": "Bed Chair Table" + } + ], + "title": "Lipstick Traces", + "year_published": null + }, + { + "authors": [ + { + "author_name": "John Gray", + "id": 52 + } + ], + "category": "Science/History", + "cover": "", + "file": "", + "fileformat": "epub", + "html": null, + "id": 47, + "stacks": [], + "title": "False Dawn: The Delusions of Global Capitalism", + "year_published": null + }, + { + "authors": [ + { + "author_name": "David Graeber", + "id": 53 + } + ], + "category": "Science/History", + "cover": "", + "file": "", + "fileformat": "", + "html": null, + "id": 48, + "stacks": [], + "title": "Debt: The First 5000 Years", + "year_published": null + }, + { + "authors": [ + { + "author_name": "Michel Surya", + "id": 54 + } + ], + "category": "Science/History", + "cover": "", + "file": "", + "fileformat": "", + "html": null, + "id": 49, + "stacks": [], + "title": "Georges Bataille: An Intellectual Biography", + "year_published": null + }, + { + "authors": [], + "category": "Science/History", + "cover": "", + "file": "", + "fileformat": "", + "html": null, + "id": 50, + "stacks": [], + "title": "The Enlightenment Reader", + "year_published": null + }, + { + "authors": [ + { + "author_name": "Alain Badiou", + "id": 55 + } + ], + "category": "Science/History", + "cover": "", + "file": "", + "fileformat": "pdf", + "html": null, + "id": 51, + "stacks": [], + "title": "The Century", + "year_published": null + }, + { + "authors": [ + { + "author_name": "Karppinen", + "id": 56 + } + ], + "category": "Science/History", + "cover": "", + "file": "", + "fileformat": "", + "html": null, + "id": 52, + "stacks": [], + "title": "Rethinking Media Pluralism", + "year_published": null + }, + { + "authors": [ + { + "author_name": "Ernst Cassirer", + "id": 57 + } + ], + "category": "Science/History", + "cover": "", + "file": "", + "fileformat": "pdf", + "html": null, + "id": 53, + "stacks": [], + "title": "The Philosophy of Symbolic Forms", + "year_published": null + }, + { + "authors": [ + { + "author_name": "Olsen", + "id": 58 + }, + { + "author_name": "Shanks", + "id": 59 + }, + { + "author_name": "Webmoor", + "id": 60 + }, + { + "author_name": "Witmore", + "id": 61 + } + ], + "category": "Science/History", + "cover": "", + "file": "", + "fileformat": "", + "html": null, + "id": 54, + "stacks": [], + "title": "Archaeology", + "year_published": null + }, + { + "authors": [ + { + "author_name": "Noam Chomsky", + "id": 62 + }, + { + "author_name": "James Peck (Editor)", + "id": 63 + } + ], + "category": "Science/History", + "cover": "", + "file": "", + "fileformat": "epub", + "html": null, + "id": 55, + "stacks": [], + "title": "The Chomsky Reader", + "year_published": null + }, + { + "authors": [ + { + "author_name": "Marvin Minsky", + "id": 64 + } + ], + "category": "Science/History", + "cover": "", + "file": "", + "fileformat": "pdf", + "html": null, + "id": 56, + "stacks": [], + "title": "The Society of Mind", + "year_published": null + }, + { + "authors": [ + { + "author_name": "Richard Merrick", + "id": 65 + } + ], + "category": "Science/History", + "cover": "", + "file": "", + "fileformat": "", + "html": null, + "id": 57, + "stacks": [], + "title": "Interference: A Grand Scientific Musical Theory", + "year_published": null + }, + { + "authors": [ + { + "author_name": "Gillian Doyle", + "id": 66 + } + ], + "category": "Media studies", + "cover": "", + "file": "", + "fileformat": "pdf", + "html": null, + "id": 58, + "stacks": [], + "title": "Understanding media economics", + "year_published": null + }, + { + "authors": [ + { + "author_name": "Henry Jenkins", + "id": 67 + } + ], + "category": "Media studies", + "cover": "", + "file": "", + "fileformat": "pdf", + "html": null, + "id": 59, + "stacks": [], + "title": "Convergence culture", + "year_published": null + }, + { + "authors": [ + { + "author_name": "Trebor Scholz", + "id": 68 + } + ], + "category": "Media studies", + "cover": "", + "file": "", + "fileformat": "pdf", + "html": null, + "id": 60, + "stacks": [], + "title": "Digital Labor", + "year_published": null + }, + { + "authors": [ + { + "author_name": "Jose van Dijck", + "id": 69 + } + ], + "category": "Media studies", + "cover": "", + "file": "", + "fileformat": "pdf", + "html": null, + "id": 61, + "stacks": [], + "title": "The culture of connectivity", + "year_published": null + }, + { + "authors": [ + { + "author_name": "Florian Cramer", + "id": 70 + } + ], + "category": "Media studies", + "cover": "", + "file": "", + "fileformat": "", + "html": null, + "id": 62, + "stacks": [], + "title": "Anti-Media", + "year_published": null + }, + { + "authors": [ + { + "author_name": "Albert Borgman", + "id": 71 + } + ], + "category": "Media studies", + "cover": "", + "file": "", + "fileformat": "pdf", + "html": null, + "id": 63, + "stacks": [], + "title": "Holding On to Reality: The Nature of Information at the Turn of the Millennium", + "year_published": null + }, + { + "authors": [ + { + "author_name": "Ned Rossiter", + "id": 72 + } + ], + "category": "Media studies", + "cover": "", + "file": "", + "fileformat": "pdf", + "html": null, + "id": 64, + "stacks": [], + "title": "Organized Networks", + "year_published": null + }, + { + "authors": [ + { + "author_name": "Arjen Mulder", + "id": 73 + } + ], + "category": "Media studies", + "cover": "", + "file": "", + "fileformat": "", + "html": null, + "id": 65, + "stacks": [], + "title": "Over Mediatheorie", + "year_published": null + }, + { + "authors": [ + { + "author_name": "Matthew d'Ancona", + "id": 74 + } + ], + "category": "Media studies", + "cover": "", + "file": "", + "fileformat": "", + "html": null, + "id": 66, + "stacks": [], + "title": "Post Truth", + "year_published": null + }, + { + "authors": [ + { + "author_name": "Cathy O'Neil", + "id": 75 + } + ], + "category": "Media studies", + "cover": "", + "file": "", + "fileformat": "EPUB", + "html": null, + "id": 67, + "stacks": [], + "title": "Weapons of Math Destruction", + "year_published": null + }, + { + "authors": [ + { + "author_name": "Matthew Fuller", + "id": 76 + } + ], + "category": "Media studies", + "cover": "", + "file": "", + "fileformat": "pdf", + "html": null, + "id": 68, + "stacks": [], + "title": "Media Ecologies: Materialist Energies in Art and Technoculture", + "year_published": null + }, + { + "authors": [ + { + "author_name": "Andrew Keen", + "id": 77 + } + ], + "category": "Media studies", + "cover": "", + "file": "", + "fileformat": "pdf", + "html": null, + "id": 69, + "stacks": [], + "title": "The Internet Is Not The Answer", + "year_published": null + }, + { + "authors": [ + { + "author_name": "P. W. Singer", + "id": 78 + } + ], + "category": "Media studies", + "cover": "", + "file": "", + "fileformat": "EPUB", + "html": null, + "id": 70, + "stacks": [], + "title": "Wired for war - Robotics revolution and conflict in the 21st century", + "year_published": null + }, + { + "authors": [ + { + "author_name": "Steven Johnson", + "id": 79 + } + ], + "category": "Media studies", + "cover": "", + "file": "", + "fileformat": "pdf", + "html": null, + "id": 71, + "stacks": [], + "title": "Interface Culture", + "year_published": null + }, + { + "authors": [ + { + "author_name": "Alexander R. Galloway", + "id": 80 + } + ], + "category": "Media studies", + "cover": "", + "file": "", + "fileformat": "pdf", + "html": null, + "id": 72, + "stacks": [], + "title": "The Interface Effect", + "year_published": null + }, + { + "authors": [ + { + "author_name": "Douglas Rushkoff", + "id": 81 + } + ], + "category": "Media studies", + "cover": "", + "file": "", + "fileformat": "EPUB", + "html": null, + "id": 73, + "stacks": [], + "title": "Present Shock: When Everything Happens Now", + "year_published": null + }, + { + "authors": [ + { + "author_name": "Mirko Tobias Sch\u00e4fer", + "id": 82 + } + ], + "category": "Media studies", + "cover": "", + "file": "", + "fileformat": "pdf", + "html": null, + "id": 74, + "stacks": [], + "title": "Bastard Culture!: How User Participation Transforms Cultural Production", + "year_published": null + }, + { + "authors": [ + { + "author_name": "Douglas Rushkoff", + "id": 81 + } + ], + "category": "Media studies", + "cover": "", + "file": "", + "fileformat": "pdf", + "html": null, + "id": 75, + "stacks": [], + "title": "Media Virus! Hidden Agendas in Popular Culture", + "year_published": null + }, + { + "authors": [ + { + "author_name": "John McGrath", + "id": 83 + } + ], + "category": "Media studies", + "cover": "", + "file": "", + "fileformat": "pdf", + "html": null, + "id": 76, + "stacks": [], + "title": "Loving Big Brother: Surveillance Culture and Performance Space", + "year_published": null + }, + { + "authors": [ + { + "author_name": "Antonio Gramsci", + "id": 84 + } + ], + "category": "Media studies", + "cover": "", + "file": "", + "fileformat": "", + "html": null, + "id": 77, + "stacks": [], + "title": "Selections from Cultural Writings", + "year_published": null + }, + { + "authors": [ + { + "author_name": "Jane Mayer", + "id": 85 + } + ], + "category": "Media studies", + "cover": "", + "file": "", + "fileformat": "EPUB", + "html": null, + "id": 78, + "stacks": [], + "title": "Dark Money: The Hidden History of the Billionairs behind the Rise of the Radical Right", + "year_published": null + }, + { + "authors": [ + { + "author_name": "Howard Caygill", + "id": 86 + }, + { + "author_name": "Alex Coles", + "id": 87 + }, + { + "author_name": "Richard Appignanesi", + "id": 88 + } + ], + "category": "Media studies", + "cover": "", + "file": "", + "fileformat": "", + "html": null, + "id": 79, + "stacks": [], + "title": "Walter Benjamin for beginners", + "year_published": null + }, + { + "authors": [ + { + "author_name": "James Harkin", + "id": 89 + } + ], + "category": "Media studies", + "cover": "", + "file": "", + "fileformat": "", + "html": null, + "id": 80, + "stacks": [], + "title": "Cyburbia", + "year_published": null + }, + { + "authors": [ + { + "author_name": "Matthew Fuller +", + "id": 90 + }, + { + "author_name": "S\u00eenziana P\u0103ltineanu +", + "id": 91 + }, + { + "author_name": "Michael Murtaugh +", + "id": 92 + }, + { + "author_name": "Dennis Pohl +", + "id": 93 + }, + { + "author_name": "ShinJoung Yeo +", + "id": 94 + }, + { + "author_name": "Femke Snelting +", + "id": 95 + }, + { + "author_name": "Natacha Roussel +", + "id": 96 + }, + { + "author_name": "Dick Reckard +", + "id": 97 + }, + { + "author_name": "Geraldine Ju\u00e1rez +", + "id": 98 + }, + { + "author_name": "Tomislav Medak +", + "id": 99 + }, + { + "author_name": "Marcell Mars +", + "id": 100 + }, + { + "author_name": "Du\u0161an Barok + and Alexia de Visscher +", + "id": 101 + } + ], + "category": "Media studies", + "cover": "", + "file": "", + "fileformat": "pdf", + "html": null, + "id": 81, + "stacks": [], + "title": "Mondoth\u00e8que::a radiated book/un livre irradiant/een irradi\u00ebrend boek", + "year_published": null + }, + { + "authors": [ + { + "author_name": "Thomas Walskaar", + "id": 102 + } + ], + "category": "Media studies", + "cover": "", + "file": "", + "fileformat": "pdf", + "html": null, + "id": 82, + "stacks": [], + "title": "Save and Forget", + "year_published": null + }, + { + "authors": [ + { + "author_name": "Erick Beltran", + "id": 103 + } + ], + "category": "Media studies", + "cover": "", + "file": "", + "fileformat": "", + "html": null, + "id": 83, + "stacks": [], + "title": "The World Explained", + "year_published": null + }, + { + "authors": [ + { + "author_name": "Sarah Cook", + "id": 104 + } + ], + "category": "Media studies", + "cover": "", + "file": "", + "fileformat": "", + "html": null, + "id": 84, + "stacks": [], + "title": "Information - Documents of Contemporary Art", + "year_published": null + }, + { + "authors": [ + { + "author_name": "Gilles Deleuze", + "id": 105 + } + ], + "category": "Media studies", + "cover": "", + "file": "", + "fileformat": "pdf", + "html": null, + "id": 85, + "stacks": [], + "title": "Postscript on the Societies of Control ", + "year_published": null + }, + { + "authors": [ + { + "author_name": "Michel Foucault", + "id": 106 + } + ], + "category": "Media studies", + "cover": "", + "file": "", + "fileformat": "pdf", + "html": null, + "id": 86, + "stacks": [], + "title": "Ethics Subjectivity and Truth", + "year_published": null + }, + { + "authors": [ + { + "author_name": "Maurice Blanchot", + "id": 107 + } + ], + "category": "Media studies", + "cover": "", + "file": "", + "fileformat": "pdf", + "html": null, + "id": 87, + "stacks": [], + "title": "The Infinite Conversation", + "year_published": null + }, + { + "authors": [ + { + "author_name": "Martin Heidegger", + "id": 108 + } + ], + "category": "Media studies", + "cover": "", + "file": "", + "fileformat": "pdf", + "html": null, + "id": 88, + "stacks": [], + "title": "Identity and Difference", + "year_published": null + }, + { + "authors": [ + { + "author_name": "Timothy J. Casey (ed.)", + "id": 109 + } + ], + "category": "Media studies", + "cover": "", + "file": "", + "fileformat": "", + "html": null, + "id": 89, + "stacks": [], + "title": "Jean Paul A Reader", + "year_published": null + }, + { + "authors": [ + { + "author_name": "Jaques Derrida", + "id": 110 + } + ], + "category": "Media studies", + "cover": "", + "file": "", + "fileformat": "pdf", + "html": null, + "id": 90, + "stacks": [], + "title": "The Ear of the Other", + "year_published": null + }, + { + "authors": [ + { + "author_name": "Michaelis Pichler", + "id": 111 + } + ], + "category": "Media studies", + "cover": "", + "file": "", + "fileformat": "", + "html": null, + "id": 91, + "stacks": [], + "title": "Statements on Appropriation (London Version)", + "year_published": null + }, + { + "authors": [ + { + "author_name": "Antony Flew", + "id": 112 + } + ], + "category": "Philosophy", + "cover": "", + "file": "", + "fileformat": "", + "html": null, + "id": 92, + "stacks": [], + "title": "An Introduction to Western Philosophy", + "year_published": null + }, + { + "authors": [ + { + "author_name": "Best Kellner", + "id": 113 + } + ], + "category": "Philosophy", + "cover": "", + "file": "", + "fileformat": "", + "html": null, + "id": 93, + "stacks": [], + "title": "The Postmodern Turn", + "year_published": null + }, + { + "authors": [ + { + "author_name": "Terry Eagleton", + "id": 114 + } + ], + "category": "Philosophy", + "cover": "", + "file": "", + "fileformat": "pdf", + "html": null, + "id": 94, + "stacks": [], + "title": "Ideology", + "year_published": null + }, + { + "authors": [ + { + "author_name": "Ray Monk", + "id": 115 + } + ], + "category": "Philosophy", + "cover": "", + "file": "", + "fileformat": "pdf", + "html": null, + "id": 95, + "stacks": [], + "title": "Ludwig Wittgenstein", + "year_published": null + }, + { + "authors": [ + { + "author_name": "Hannah Arendt", + "id": 116 + } + ], + "category": "Philosophy", + "cover": "", + "file": "", + "fileformat": "pdf", + "html": null, + "id": 96, + "stacks": [], + "title": "The Human Condition", + "year_published": null + }, + { + "authors": [ + { + "author_name": "Chris Horrocks", + "id": 117 + }, + { + "author_name": "Zoran Jevtic", + "id": 118 + } + ], + "category": "Philosophy", + "cover": "", + "file": "", + "fileformat": "pdf", + "html": null, + "id": 97, + "stacks": [], + "title": "Introducing Foucault", + "year_published": null + }, + { + "authors": [ + { + "author_name": "David Mcey", + "id": 119 + } + ], + "category": "Philosophy", + "cover": "", + "file": "", + "fileformat": "pdf", + "html": null, + "id": 98, + "stacks": [], + "title": "The Lives of Michel Foucault", + "year_published": null + }, + { + "authors": [ + { + "author_name": "Michel Foucault", + "id": 106 + } + ], + "category": "Philosophy", + "cover": "", + "file": "", + "fileformat": "pdf", + "html": null, + "id": 99, + "stacks": [], + "title": "Discipline and Punish", + "year_published": null + }, + { + "authors": [ + { + "author_name": "Popper K.", + "id": 120 + } + ], + "category": "Philosophy", + "cover": "", + "file": "", + "fileformat": "pdf", + "html": null, + "id": 100, + "stacks": [], + "title": "Logic of Scientific Discovery", + "year_published": null + }, + { + "authors": [ + { + "author_name": "Manuel DeLanda", + "id": 121 + } + ], + "category": "Philosophy", + "cover": "", + "file": "", + "fileformat": "pdf", + "html": null, + "id": 101, + "stacks": [], + "title": "Intensive Science and Virtual Philosophy", + "year_published": null + }, + { + "authors": [ + { + "author_name": "Umberto Eco", + "id": 122 + }, + { + "author_name": "Alastair McEwen", + "id": 123 + } + ], + "category": "Philosophy", + "cover": "", + "file": "", + "fileformat": "pdf", + "html": null, + "id": 102, + "stacks": [], + "title": "Kant and the Platypus: Essays on Language and Cognition", + "year_published": null + }, + { + "authors": [ + { + "author_name": "Umberto Eco", + "id": 122 + } + ], + "category": "Philosophy", + "cover": "", + "file": "", + "fileformat": "", + "html": null, + "id": 103, + "stacks": [], + "title": "Turning Back the Clock", + "year_published": null + }, + { + "authors": [ + { + "author_name": "Umberto Eco", + "id": 122 + }, + { + "author_name": "William Weave", + "id": 124 + } + ], + "category": "Philosophy", + "cover": "", + "file": "", + "fileformat": "pdf", + "html": null, + "id": 104, + "stacks": [], + "title": "Travels in hyper reality : essays", + "year_published": null + }, + { + "authors": [ + { + "author_name": "Hannah Arendt", + "id": 116 + } + ], + "category": "Philosophy", + "cover": "", + "file": "", + "fileformat": "pdf", + "html": null, + "id": 105, + "stacks": [], + "title": "On revolution", + "year_published": null + }, + { + "authors": [ + { + "author_name": "Christopher Want", + "id": 125 + } + ], + "category": " Andrzej Klimowski", + "cover": "", + "file": "", + "fileformat": "Philosophy", + "html": null, + "id": 106, + "stacks": [], + "title": "Introducing Kant", + "year_published": null + }, + { + "authors": [ + { + "author_name": "Jean Baudrillard", + "id": 126 + } + ], + "category": "Philosophy", + "cover": "", + "file": "", + "fileformat": "pdf", + "html": null, + "id": 107, + "stacks": [], + "title": "The Perfect Crime", + "year_published": null + }, + { + "authors": [ + { + "author_name": "Chris Horrocks", + "id": 117 + }, + { + "author_name": "Zoran Jevtic", + "id": 118 + } + ], + "category": "Philosophy", + "cover": "", + "file": "", + "fileformat": "pdf", + "html": null, + "id": 108, + "stacks": [], + "title": "Introducing Baudrillard", + "year_published": null + }, + { + "authors": [ + { + "author_name": "Thomas S. Kuhn", + "id": 127 + } + ], + "category": "Philosophy", + "cover": "", + "file": "", + "fileformat": "pdf", + "html": null, + "id": 109, + "stacks": [], + "title": "The structure of scientific revolutions", + "year_published": null + }, + { + "authors": [ + { + "author_name": "Christopher Hill", + "id": 128 + } + ], + "category": "Philosophy", + "cover": "", + "file": "", + "fileformat": "pdf", + "html": null, + "id": 110, + "stacks": [], + "title": "The World Turned Upside Down: Radical Ideas During the English Revolution", + "year_published": null + }, + { + "authors": [ + { + "author_name": "Charles Baudelaire", + "id": 129 + } + ], + "category": "Philosophy", + "cover": "", + "file": "", + "fileformat": "", + "html": null, + "id": 111, + "stacks": [], + "title": "On Wine and Hishish", + "year_published": null + }, + { + "authors": [ + { + "author_name": "Phillip Hill", + "id": 130 + }, + { + "author_name": "David Leach", + "id": 131 + } + ], + "category": "Philosophy", + "cover": "", + "file": "", + "fileformat": "pdf", + "html": null, + "id": 112, + "stacks": [], + "title": "Lacan For Beginners", + "year_published": null + }, + { + "authors": [ + { + "author_name": "Frederic Jameson", + "id": 132 + } + ], + "category": "Philosophy", + "cover": "", + "file": "", + "fileformat": "", + "html": null, + "id": 113, + "stacks": [], + "title": "Late Marxism", + "year_published": null + }, + { + "authors": [ + { + "author_name": "Martin Jay", + "id": 133 + } + ], + "category": "Philosophy", + "cover": "", + "file": "", + "fileformat": "", + "html": null, + "id": 114, + "stacks": [], + "title": "Adorno", + "year_published": null + }, + { + "authors": [ + { + "author_name": "Max Horkheimer", + "id": 134 + }, + { + "author_name": "Theodor Adorno", + "id": 135 + }, + { + "author_name": "Gunzelin Noeri", + "id": 136 + }, + { + "author_name": "Edmund Jephcott", + "id": 137 + } + ], + "category": "Philosophy", + "cover": "", + "file": "", + "fileformat": "pdf", + "html": null, + "id": 115, + "stacks": [], + "title": "Dialectic of Enlightenment", + "year_published": null + }, + { + "authors": [ + { + "author_name": "Momme Brodersen", + "id": 138 + } + ], + "category": "Philosophy", + "cover": "", + "file": "", + "fileformat": "", + "html": null, + "id": 116, + "stacks": [], + "title": "Walter Benjamin: A Biography", + "year_published": null + }, + { + "authors": [ + { + "author_name": "Manuel De Landa", + "id": 139 + } + ], + "category": "Philosophy", + "cover": "", + "file": "", + "fileformat": "pdf", + "html": null, + "id": 117, + "stacks": [], + "title": "A Thousand Years of Nonlinear History", + "year_published": null + }, + { + "authors": [ + { + "author_name": "Roland Barthes", + "id": 140 + } + ], + "category": "Philosophy", + "cover": "", + "file": "", + "fileformat": "", + "html": null, + "id": 118, + "stacks": [], + "title": "Barthes: Selected Writings", + "year_published": null + }, + { + "authors": [ + { + "author_name": "Roland Barthes", + "id": 140 + } + ], + "category": "Philosophy", + "cover": "", + "file": "", + "fileformat": "pdf", + "html": null, + "id": 119, + "stacks": [], + "title": "Camera Lucida: Reflections on Photography", + "year_published": null + }, + { + "authors": [ + { + "author_name": "Jim Powell", + "id": 141 + }, + { + "author_name": "Van Howell", + "id": 142 + } + ], + "category": "Philosophy", + "cover": "", + "file": "", + "fileformat": "pdf", + "html": null, + "id": 120, + "stacks": [], + "title": "Derrida For Beginners", + "year_published": null + }, + { + "authors": [ + { + "author_name": "Christopher Johnson", + "id": 143 + } + ], + "category": "Philosophy", + "cover": "", + "file": "", + "fileformat": "pdf", + "html": null, + "id": 121, + "stacks": [], + "title": "System and Writing in the Philosophy of Jacques Derrida", + "year_published": null + }, + { + "authors": [ + { + "author_name": "H. Dooremalen", + "id": 144 + }, + { + "author_name": "H. de Regt", + "id": 145 + }, + { + "author_name": "MP Schouten", + "id": 146 + } + ], + "category": "Philosophy", + "cover": "", + "file": "", + "fileformat": "", + "html": null, + "id": 122, + "stacks": [], + "title": "Exploring Humans", + "year_published": null + }, + { + "authors": [ + { + "author_name": "Valie Djordjevic / Robert A. Gehring / Volker Grassmuck / Till Kreutzer / Matthias Spielkamp (Hrsg.)", + "id": 147 + } + ], + "category": "Computer culture", + "cover": "", + "file": "", + "fileformat": "", + "html": null, + "id": 123, + "stacks": [], + "title": "Urheberrecht im Alltag: Kopieren, bearbeiten, selber machen", + "year_published": null + }, + { + "authors": [ + { + "author_name": "Joasia Krysa", + "id": 148 + }, + { + "author_name": "Geoff Cox (editors)", + "id": 149 + } + ], + "category": "Computer culture", + "cover": "", + "file": "", + "fileformat": "pdf", + "html": null, + "id": 124, + "stacks": [], + "title": "DATA browser 02: Engineering Culture", + "year_published": null + }, + { + "authors": [ + { + "author_name": "Joasia Krysa", + "id": 148 + }, + { + "author_name": "Geoff Cox (editors)", + "id": 149 + } + ], + "category": "Computer culture", + "cover": "", + "file": "", + "fileformat": "pdf", + "html": null, + "id": 125, + "stacks": [], + "title": "DATA browser 01: Economising Culture", + "year_published": null + }, + { + "authors": [ + { + "author_name": "Alessandro Ludovico", + "id": 150 + }, + { + "author_name": "Nat Muller (editors)", + "id": 151 + } + ], + "category": "Computer culture", + "cover": "", + "file": "", + "fileformat": "pdf", + "html": null, + "id": 126, + "stacks": [], + "title": "The Mag.net reader 3, Processual Publishing. Actual Gesture", + "year_published": null + }, + { + "authors": [ + { + "author_name": "Mark Tribe", + "id": 152 + }, + { + "author_name": "Reena Jana", + "id": 153 + } + ], + "category": "Computer culture", + "cover": "", + "file": "", + "fileformat": "", + "html": null, + "id": 127, + "stacks": [], + "title": "New Media Art", + "year_published": null + }, + { + "authors": [ + { + "author_name": "Carolyn Guertin", + "id": 154 + } + ], + "category": "Computer culture", + "cover": "", + "file": "", + "fileformat": "pdf", + "html": null, + "id": 128, + "stacks": [], + "title": "Digital Prohibition", + "year_published": null + }, + { + "authors": [ + { + "author_name": "Eric Raymond", + "id": 155 + } + ], + "category": "Computer culture", + "cover": "", + "file": "", + "fileformat": "pdf", + "html": null, + "id": 129, + "stacks": [], + "title": "The Cathedral & The Bazaar", + "year_published": null + }, + { + "authors": [ + { + "author_name": "Simon Singh", + "id": 156 + } + ], + "category": "Computer culture", + "cover": "", + "file": "", + "fileformat": "pdf", + "html": null, + "id": 130, + "stacks": [], + "title": "The Code Book", + "year_published": null + }, + { + "authors": [ + { + "author_name": "Betti Marenko", + "id": 157 + }, + { + "author_name": "Leon C6", + "id": 158 + } + ], + "category": "Computer culture", + "cover": "", + "file": "", + "fileformat": "pdf", + "html": null, + "id": 131, + "stacks": [], + "title": "DiY Survival // There is No Subculture Only Subversion", + "year_published": null + }, + { + "authors": [ + { + "author_name": "Lawrence Liang", + "id": 159 + } + ], + "category": "Computer culture", + "cover": "", + "file": "", + "fileformat": "pdf", + "html": null, + "id": 132, + "stacks": [], + "title": "Guide to Open Content Licenses", + "year_published": null + }, + { + "authors": [ + { + "author_name": "Joasia Krysa (editor)", + "id": 160 + } + ], + "category": "Computer culture", + "cover": "", + "file": "", + "fileformat": "pdf", + "html": null, + "id": 133, + "stacks": [], + "title": "DATA browser 3: Curating Immateriality", + "year_published": null + }, + { + "authors": [ + { + "author_name": "Gendolla", + "id": 161 + }, + { + "author_name": "Schmirz", + "id": 162 + }, + { + "author_name": "Schneider", + "id": 163 + }, + { + "author_name": "Spangenberg (Hg)", + "id": 164 + } + ], + "category": "Computer culture", + "cover": "", + "file": "", + "fileformat": "pdf", + "html": null, + "id": 134, + "stacks": [], + "title": "Formen interaktiver Medienkunst", + "year_published": null + }, + { + "authors": [ + { + "author_name": "Harry Mathews", + "id": 165 + }, + { + "author_name": "Alastair Brotchie", + "id": 166 + } + ], + "category": "design / writing / publishing", + "cover": "", + "file": "", + "fileformat": "", + "html": null, + "id": 135, + "stacks": [], + "title": "Oulipo Compendium", + "year_published": null + }, + { + "authors": [], + "category": "Computer culture", + "cover": "", + "file": "", + "fileformat": "", + "html": null, + "id": 136, + "stacks": [], + "title": "Convergence: The International Journal of Research into New Media Technologies - Volume 12 Number 3 August 2004", + "year_published": null + }, + { + "authors": [], + "category": "Computer culture", + "cover": "", + "file": "", + "fileformat": "", + "html": null, + "id": 137, + "stacks": [], + "title": "Perl for Web Site Management", + "year_published": null + }, + { + "authors": [], + "category": "design / writing / publishing", + "cover": "", + "file": "", + "fileformat": "", + "html": null, + "id": 138, + "stacks": [], + "title": "Seven Hundred Penguins", + "year_published": null + }, + { + "authors": [ + { + "author_name": "Andr\u00e9 Castro", + "id": 167 + }, + { + "author_name": "S\u00eenziana P\u0103ltineanu", + "id": 168 + }, + { + "author_name": "Dennis Pohl", + "id": 169 + }, + { + "author_name": "Dick Reckard", + "id": 170 + }, + { + "author_name": "Natacha Roussel", + "id": 171 + }, + { + "author_name": "Femke Snelting", + "id": 172 + }, + { + "author_name": "Alexia de Visscher", + "id": 173 + } + ], + "category": "Computer culture", + "cover": "", + "file": "", + "fileformat": "pdf", + "html": null, + "id": 139, + "stacks": [], + "title": "Mondotheque: a radiated book / un livre irradiant / een iradierend boek", + "year_published": null + }, + { + "authors": [ + { + "author_name": "James Sutton", + "id": 174 + }, + { + "author_name": "Alan Bartram", + "id": 175 + } + ], + "category": "design / writing / publishing", + "cover": "", + "file": "", + "fileformat": "", + "html": null, + "id": 140, + "stacks": [], + "title": "An Atlas of Typeforms", + "year_published": null + }, + { + "authors": [ + { + "author_name": "Keith Smith", + "id": 176 + } + ], + "category": "design / writing / publishing", + "cover": "", + "file": "", + "fileformat": "", + "html": null, + "id": 141, + "stacks": [], + "title": "Structure of the Visual Book", + "year_published": null + }, + { + "authors": [ + { + "author_name": "Richard Hoggart", + "id": 177 + } + ], + "category": "design / writing / publishing", + "cover": "", + "file": "", + "fileformat": "pdf", + "html": null, + "id": 142, + "stacks": [], + "title": "The Uses of Literacy", + "year_published": null + }, + { + "authors": [ + { + "author_name": "Wendy Hui Kyong Chun", + "id": 178 + } + ], + "category": "desk", + "cover": "", + "file": "", + "fileformat": "pdf", + "html": null, + "id": 143, + "stacks": [], + "title": "Control and Freedom: Power and Paranoia in the Age of Fiber Optics", + "year_published": null + }, + { + "authors": [ + { + "author_name": "Noah Wardrip-Fruin", + "id": 179 + }, + { + "author_name": "Nick Montfort (editors)", + "id": 180 + } + ], + "category": "desk", + "cover": "", + "file": "", + "fileformat": "pdf", + "html": null, + "id": 144, + "stacks": [], + "title": "The New Media Reader", + "year_published": null + }, + { + "authors": [ + { + "author_name": "Edward A. Shanken", + "id": 181 + } + ], + "category": "Art", + "cover": "", + "file": "", + "fileformat": "", + "html": null, + "id": 145, + "stacks": [], + "title": "Art and Electronic Media", + "year_published": null + }, + { + "authors": [ + { + "author_name": "Simon Sadler", + "id": 182 + } + ], + "category": "Art", + "cover": "", + "file": "", + "fileformat": "pdf", + "html": null, + "id": 146, + "stacks": [], + "title": "The Situationist City", + "year_published": null + }, + { + "authors": [], + "category": "Art", + "cover": "", + "file": "", + "fileformat": "", + "html": null, + "id": 147, + "stacks": [], + "title": "The Absolute Report: Time Space Code Memory", + "year_published": null + }, + { + "authors": [ + { + "author_name": "Susanne Kriemann", + "id": 183 + } + ], + "category": "Art", + "cover": "", + "file": "", + "fileformat": "", + "html": null, + "id": 148, + "stacks": [], + "title": "Ashes and Broken Brickwork of a Logical Theory", + "year_published": null + }, + { + "authors": [ + { + "author_name": "Mary Ann Caws", + "id": 184 + } + ], + "category": "Art", + "cover": "", + "file": "", + "fileformat": "", + "html": null, + "id": 149, + "stacks": [], + "title": "Surrealist Painters and Poets: An Anthology", + "year_published": null + }, + { + "authors": [ + { + "author_name": "Tom McDonough", + "id": 185 + } + ], + "category": "Art", + "cover": "", + "file": "", + "fileformat": "", + "html": null, + "id": 150, + "stacks": [], + "title": "Guy Debord and the Situationists International", + "year_published": null + }, + { + "authors": [ + { + "author_name": "Natasha Berting", + "id": 186 + }, + { + "author_name": "Angeliki Diakrousi", + "id": 187 + }, + { + "author_name": "Joca van der Horst", + "id": 188 + }, + { + "author_name": "Alexander Roidl", + "id": 189 + }, + { + "author_name": "Alice Strete", + "id": 190 + }, + { + "author_name": "Zalan Szakacs", + "id": 191 + } + ], + "category": "Special Issue", + "cover": "", + "file": "", + "fileformat": "", + "html": null, + "id": 151, + "stacks": [ + { + "id": 3, + "stack_description": null, + "stack_name": "Bed Chair Table" + } + ], + "title": "A Bed a Chair and a Table", + "year_published": null + }, + { + "authors": [ + { + "author_name": "Matthew Fuller", + "id": 76 + } + ], + "category": "Desk", + "cover": "", + "file": "", + "fileformat": "pdf", + "html": null, + "id": 152, + "stacks": [], + "title": "Software Studies \\ a lexicon", + "year_published": null + }, + { + "authors": [ + { + "author_name": "Manuel Castells", + "id": 192 + } + ], + "category": "Desk", + "cover": "", + "file": "", + "fileformat": "epub, pdf", + "html": null, + "id": 153, + "stacks": [], + "title": "The Rise of the Network Society, With a New Preface: Volume I: The Information Age: Economy, Society, and Culture (Information Age Series)", + "year_published": null + }, + { + "authors": [ + { + "author_name": "Andrew Blauvelt (Author)", + "id": 193 + }, + { + "author_name": "Mieke Gerritzen (Editor)", + "id": 194 + }, + { + "author_name": "Geert Lovink (Editor)", + "id": 195 + }, + { + "author_name": "Minke Kampman (Editor)", + "id": 196 + } + ], + "category": "Desk", + "cover": "", + "file": "", + "fileformat": "pdf", + "html": null, + "id": 154, + "stacks": [], + "title": "I Read Where I Am: Exploring New Information Cultures", + "year_published": null + }, + { + "authors": [ + { + "author_name": "Ursula Frohne", + "id": 197 + }, + { + "author_name": "Mona Schieren", + "id": 198 + }, + { + "author_name": "Jean-Fran\u00e7ois Guiton (eds.)", + "id": 199 + } + ], + "category": "Desk", + "cover": "", + "file": "", + "fileformat": "pdf", + "html": null, + "id": 155, + "stacks": [], + "title": "\u00bbPresent Continuous Past(s)\u00ab: Media Art. Strategies of Presentation, Mediation and Dissemination", + "year_published": null + }, + { + "authors": [ + { + "author_name": "exquisite_code collective", + "id": 200 + } + ], + "category": "Desk", + "cover": "", + "file": "", + "fileformat": "book", + "html": null, + "id": 156, + "stacks": [], + "title": "exquisite_code", + "year_published": null + }, + { + "authors": [ + { + "author_name": "Kenneth Goldsmith", + "id": 201 + } + ], + "category": "Digital (Steve Trim 2 reading)", + "cover": "", + "file": "", + "fileformat": "epub", + "html": null, + "id": 157, + "stacks": [], + "title": "Uncreative Writing", + "year_published": null + }, + { + "authors": [ + { + "author_name": "William Burroughs", + "id": 202 + } + ], + "category": "Digital (Steve Trim 2 reading)", + "cover": "", + "file": "", + "fileformat": "pdf", + "html": null, + "id": 158, + "stacks": [], + "title": "The Electronic Revolution", + "year_published": null + }, + { + "authors": [ + { + "author_name": "William Burroughs", + "id": 202 + } + ], + "category": "Digital (Steve Trim 2 reading)", + "cover": "", + "file": "", + "fileformat": "pdf", + "html": null, + "id": 159, + "stacks": [], + "title": "The Invisible Generation", + "year_published": null + }, + { + "authors": [ + { + "author_name": "Italo Calvino", + "id": 203 + } + ], + "category": "Digital (Steve Trim 2 reading)", + "cover": "", + "file": "", + "fileformat": "pdf", + "html": null, + "id": 160, + "stacks": [], + "title": "Cybernetics & Ghosts", + "year_published": null + }, + { + "authors": [ + { + "author_name": "Charlie Gere", + "id": 204 + } + ], + "category": "Digital (Steve Trim 2 reading)", + "cover": "", + "file": "", + "fileformat": "pdf", + "html": null, + "id": 161, + "stacks": [], + "title": "Digital Culture", + "year_published": null + }, + { + "authors": [ + { + "author_name": "Eric Havelock", + "id": 205 + } + ], + "category": "Digital (Steve Trim 2 reading)", + "cover": "", + "file": "", + "fileformat": "pdf", + "html": null, + "id": 162, + "stacks": [], + "title": "A Preface to Plato", + "year_published": null + }, + { + "authors": [ + { + "author_name": "Katherine Hayles", + "id": 206 + } + ], + "category": "Digital (Steve Trim 2 reading)", + "cover": "", + "file": "", + "fileformat": "pdf", + "html": null, + "id": 163, + "stacks": [], + "title": "Writing Machines", + "year_published": null + }, + { + "authors": [ + { + "author_name": "Friedrich Kittler", + "id": 207 + } + ], + "category": "Digital (Steve Trim 2 reading)", + "cover": "", + "file": "", + "fileformat": "pdf", + "html": null, + "id": 164, + "stacks": [], + "title": "Gramophone, Film, Typewriter", + "year_published": null + }, + { + "authors": [ + { + "author_name": "Friedrich Kittler", + "id": 207 + } + ], + "category": "Digital (Steve Trim 2 reading)", + "cover": "", + "file": "", + "fileformat": "pdf", + "html": null, + "id": 165, + "stacks": [], + "title": "Literature Media", + "year_published": null + }, + { + "authors": [ + { + "author_name": "Lydia Liu", + "id": 208 + } + ], + "category": "Digital (Steve Trim 2 reading)", + "cover": "", + "file": "", + "fileformat": "pdf", + "html": null, + "id": 166, + "stacks": [], + "title": "iSpace: Printed English after Joyce, Shannon, Derrida", + "year_published": null + }, + { + "authors": [ + { + "author_name": "Walter Ong", + "id": 209 + } + ], + "category": "Digital (Steve Trim 2 reading)", + "cover": "", + "file": "", + "fileformat": "epub", + "html": null, + "id": 167, + "stacks": [], + "title": "Orality and Literacy", + "year_published": null + }, + { + "authors": [ + { + "author_name": "Otto Neurath", + "id": 210 + } + ], + "category": "Digital (Steve Trim 2 reading)", + "cover": "", + "file": "", + "fileformat": "pdf", + "html": null, + "id": 168, + "stacks": [], + "title": "International Picture Language", + "year_published": null + }, + { + "authors": [ + { + "author_name": "Alexander R. Galloway", + "id": 80 + } + ], + "category": "Media studies", + "cover": "", + "file": "", + "fileformat": "pdf", + "html": null, + "id": 169, + "stacks": [], + "title": "Protocol", + "year_published": null + }, + { + "authors": [ + { + "author_name": "Tung-Hui Hu", + "id": 211 + } + ], + "category": "Media Studies (Femke Trim 3)", + "cover": "", + "file": "", + "fileformat": "pdf", + "html": null, + "id": 170, + "stacks": [], + "title": "A Prehistory of the Cloud", + "year_published": null + }, + { + "authors": [ + { + "author_name": "Gerard Genette", + "id": 212 + } + ], + "category": "Literature, Culture, Theory ", + "cover": "", + "file": "", + "fileformat": "pdf", + "html": null, + "id": 171, + "stacks": [], + "title": "Paratexts: Thresholds of Interpretation", + "year_published": null + } + ], + {} + ] +} diff --git a/app/templates/volumetric_catalog/index.html b/app/templates/volumetric_catalog/index.html new file mode 100644 index 0000000..4982ae8 --- /dev/null +++ b/app/templates/volumetric_catalog/index.html @@ -0,0 +1,474 @@ + + + + + XPPL VOLUMETRIC CATALOGUE + + + + + + +
back to library

XPPL VOLUMETRIC CATALOGUE

Feel free to move around and explore the content of the library by clicking on the volumetric shapes
+
+ + + + + + + + + + diff --git a/app/templates/volumetric_catalog/three.min.js b/app/templates/volumetric_catalog/three.min.js new file mode 100644 index 0000000..a955ba1 --- /dev/null +++ b/app/templates/volumetric_catalog/three.min.js @@ -0,0 +1,993 @@ +// threejs.org/license +'use strict';var THREE={REVISION:"79"};"function"===typeof define&&define.amd?define("three",THREE):"undefined"!==typeof exports&&"undefined"!==typeof module&&(module.exports=THREE);void 0===Number.EPSILON&&(Number.EPSILON=Math.pow(2,-52));void 0===Math.sign&&(Math.sign=function(a){return 0>a?-1:0>16&255)/255;this.g=(a>>8&255)/255;this.b=(a&255)/255;return this},setRGB:function(a,b,c){this.r=a;this.g=b;this.b=c;return this},setHSL:function(){function a(a,c,d){0>d&&(d+=1);1d?c:d<2/3?a+6*(c-a)*(2/3-d):a}return function(b,c,d){b=THREE.Math.euclideanModulo(b,1);c=THREE.Math.clamp(c,0,1);d=THREE.Math.clamp(d,0,1);0===c?this.r=this.g=this.b=d:(c=.5>=d?d*(1+c):d+c-d*c,d=2*d-c,this.r=a(d,c,b+1/3),this.g=a(d,c,b),this.b=a(d,c,b-1/3));return this}}(),setStyle:function(a){function b(b){void 0!==b&&1>parseFloat(b)&&console.warn("THREE.Color: Alpha component of "+a+" will be ignored.")}var c;if(c=/^((?:rgb|hsl)a?)\(\s*([^\)]*)\)/.exec(a)){var d=c[2];switch(c[1]){case "rgb":case "rgba":if(c= +/^(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(d))return this.r=Math.min(255,parseInt(c[1],10))/255,this.g=Math.min(255,parseInt(c[2],10))/255,this.b=Math.min(255,parseInt(c[3],10))/255,b(c[5]),this;if(c=/^(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(d))return this.r=Math.min(100,parseInt(c[1],10))/100,this.g=Math.min(100,parseInt(c[2],10))/100,this.b=Math.min(100,parseInt(c[3],10))/100,b(c[5]),this;break;case "hsl":case "hsla":if(c=/^([0-9]*\.?[0-9]+)\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(d)){var d= +parseFloat(c[1])/360,e=parseInt(c[2],10)/100,f=parseInt(c[3],10)/100;b(c[5]);return this.setHSL(d,e,f)}}}else if(c=/^\#([A-Fa-f0-9]+)$/.exec(a)){c=c[1];d=c.length;if(3===d)return this.r=parseInt(c.charAt(0)+c.charAt(0),16)/255,this.g=parseInt(c.charAt(1)+c.charAt(1),16)/255,this.b=parseInt(c.charAt(2)+c.charAt(2),16)/255,this;if(6===d)return this.r=parseInt(c.charAt(0)+c.charAt(1),16)/255,this.g=parseInt(c.charAt(2)+c.charAt(3),16)/255,this.b=parseInt(c.charAt(4)+c.charAt(5),16)/255,this}a&&0=h?k/(e+f):k/(2-e-f);switch(e){case b:g=(c-d)/k+(cf&&c>b?(c=2*Math.sqrt(1+c-f-b),this._w=(k-g)/c,this._x=.25*c,this._y=(a+e)/c,this._z=(d+h)/c):f>b?(c=2*Math.sqrt(1+f-c-b),this._w=(d-h)/c,this._x=(a+e)/c,this._y= +.25*c,this._z=(g+k)/c):(c=2*Math.sqrt(1+b-c-f),this._w=(e-a)/c,this._x=(d+h)/c,this._y=(g+k)/c,this._z=.25*c);this.onChangeCallback();return this},setFromUnitVectors:function(){var a,b;return function(c,d){void 0===a&&(a=new THREE.Vector3);b=c.dot(d)+1;1E-6>b?(b=0,Math.abs(c.x)>Math.abs(c.z)?a.set(-c.y,c.x,0):a.set(0,-c.z,c.y)):a.crossVectors(c,d);this._x=a.x;this._y=a.y;this._z=a.z;this._w=b;return this.normalize()}}(),inverse:function(){return this.conjugate().normalize()},conjugate:function(){this._x*= +-1;this._y*=-1;this._z*=-1;this.onChangeCallback();return this},dot:function(a){return this._x*a._x+this._y*a._y+this._z*a._z+this._w*a._w},lengthSq:function(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w},length:function(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)},normalize:function(){var a=this.length();0===a?(this._z=this._y=this._x=0,this._w=1):(a=1/a,this._x*=a,this._y*=a,this._z*=a,this._w*=a);this.onChangeCallback();return this}, +multiply:function(a,b){return void 0!==b?(console.warn("THREE.Quaternion: .multiply() now only accepts one argument. Use .multiplyQuaternions( a, b ) instead."),this.multiplyQuaternions(a,b)):this.multiplyQuaternions(this,a)},premultiply:function(a){return this.multiplyQuaternions(a,this)},multiplyQuaternions:function(a,b){var c=a._x,d=a._y,e=a._z,f=a._w,g=b._x,h=b._y,k=b._z,l=b._w;this._x=c*l+f*g+d*k-e*h;this._y=d*l+f*h+e*g-c*k;this._z=e*l+f*k+c*h-d*g;this._w=f*l-c*g-d*h-e*k;this.onChangeCallback(); +return this},slerp:function(a,b){if(0===b)return this;if(1===b)return this.copy(a);var c=this._x,d=this._y,e=this._z,f=this._w,g=f*a._w+c*a._x+d*a._y+e*a._z;0>g?(this._w=-a._w,this._x=-a._x,this._y=-a._y,this._z=-a._z,g=-g):this.copy(a);if(1<=g)return this._w=f,this._x=c,this._y=d,this._z=e,this;var h=Math.sqrt(1-g*g);if(.001>Math.abs(h))return this._w=.5*(f+this._w),this._x=.5*(c+this._x),this._y=.5*(d+this._y),this._z=.5*(e+this._z),this;var k=Math.atan2(h,g),g=Math.sin((1-b)*k)/h,h=Math.sin(b* +k)/h;this._w=f*g+this._w*h;this._x=c*g+this._x*h;this._y=d*g+this._y*h;this._z=e*g+this._z*h;this.onChangeCallback();return this},equals:function(a){return a._x===this._x&&a._y===this._y&&a._z===this._z&&a._w===this._w},fromArray:function(a,b){void 0===b&&(b=0);this._x=a[b];this._y=a[b+1];this._z=a[b+2];this._w=a[b+3];this.onChangeCallback();return this},toArray:function(a,b){void 0===a&&(a=[]);void 0===b&&(b=0);a[b]=this._x;a[b+1]=this._y;a[b+2]=this._z;a[b+3]=this._w;return a},onChange:function(a){this.onChangeCallback= +a;return this},onChangeCallback:function(){}}; +Object.assign(THREE.Quaternion,{slerp:function(a,b,c,d){return c.copy(a).slerp(b,d)},slerpFlat:function(a,b,c,d,e,f,g){var h=c[d+0],k=c[d+1],l=c[d+2];c=c[d+3];d=e[f+0];var m=e[f+1],p=e[f+2];e=e[f+3];if(c!==e||h!==d||k!==m||l!==p){f=1-g;var n=h*d+k*m+l*p+c*e,q=0<=n?1:-1,r=1-n*n;r>Number.EPSILON&&(r=Math.sqrt(r),n=Math.atan2(r,n*q),f=Math.sin(f*n)/r,g=Math.sin(g*n)/r);q*=g;h=h*f+d*q;k=k*f+m*q;l=l*f+p*q;c=c*f+e*q;f===1-g&&(g=1/Math.sqrt(h*h+k*k+l*l+c*c),h*=g,k*=g,l*=g,c*=g)}a[b]=h;a[b+1]=k;a[b+2]=l; +a[b+3]=c}});THREE.Vector2=function(a,b){this.x=a||0;this.y=b||0}; +THREE.Vector2.prototype={constructor:THREE.Vector2,get width(){return this.x},set width(a){this.x=a},get height(){return this.y},set height(a){this.y=a},set:function(a,b){this.x=a;this.y=b;return this},setScalar:function(a){this.y=this.x=a;return this},setX:function(a){this.x=a;return this},setY:function(a){this.y=a;return this},setComponent:function(a,b){switch(a){case 0:this.x=b;break;case 1:this.y=b;break;default:throw Error("index is out of range: "+a);}},getComponent:function(a){switch(a){case 0:return this.x; +case 1:return this.y;default:throw Error("index is out of range: "+a);}},clone:function(){return new this.constructor(this.x,this.y)},copy:function(a){this.x=a.x;this.y=a.y;return this},add:function(a,b){if(void 0!==b)return console.warn("THREE.Vector2: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(a,b);this.x+=a.x;this.y+=a.y;return this},addScalar:function(a){this.x+=a;this.y+=a;return this},addVectors:function(a,b){this.x=a.x+b.x;this.y=a.y+b.y;return this}, +addScaledVector:function(a,b){this.x+=a.x*b;this.y+=a.y*b;return this},sub:function(a,b){if(void 0!==b)return console.warn("THREE.Vector2: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(a,b);this.x-=a.x;this.y-=a.y;return this},subScalar:function(a){this.x-=a;this.y-=a;return this},subVectors:function(a,b){this.x=a.x-b.x;this.y=a.y-b.y;return this},multiply:function(a){this.x*=a.x;this.y*=a.y;return this},multiplyScalar:function(a){isFinite(a)?(this.x*=a, +this.y*=a):this.y=this.x=0;return this},divide:function(a){this.x/=a.x;this.y/=a.y;return this},divideScalar:function(a){return this.multiplyScalar(1/a)},min:function(a){this.x=Math.min(this.x,a.x);this.y=Math.min(this.y,a.y);return this},max:function(a){this.x=Math.max(this.x,a.x);this.y=Math.max(this.y,a.y);return this},clamp:function(a,b){this.x=Math.max(a.x,Math.min(b.x,this.x));this.y=Math.max(a.y,Math.min(b.y,this.y));return this},clampScalar:function(){var a,b;return function(c,d){void 0=== +a&&(a=new THREE.Vector2,b=new THREE.Vector2);a.set(c,c);b.set(d,d);return this.clamp(a,b)}}(),clampLength:function(a,b){var c=this.length();return this.multiplyScalar(Math.max(a,Math.min(b,c))/c)},floor:function(){this.x=Math.floor(this.x);this.y=Math.floor(this.y);return this},ceil:function(){this.x=Math.ceil(this.x);this.y=Math.ceil(this.y);return this},round:function(){this.x=Math.round(this.x);this.y=Math.round(this.y);return this},roundToZero:function(){this.x=0>this.x?Math.ceil(this.x):Math.floor(this.x); +this.y=0>this.y?Math.ceil(this.y):Math.floor(this.y);return this},negate:function(){this.x=-this.x;this.y=-this.y;return this},dot:function(a){return this.x*a.x+this.y*a.y},lengthSq:function(){return this.x*this.x+this.y*this.y},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},lengthManhattan:function(){return Math.abs(this.x)+Math.abs(this.y)},normalize:function(){return this.divideScalar(this.length())},angle:function(){var a=Math.atan2(this.y,this.x);0>a&&(a+=2*Math.PI);return a}, +distanceTo:function(a){return Math.sqrt(this.distanceToSquared(a))},distanceToSquared:function(a){var b=this.x-a.x;a=this.y-a.y;return b*b+a*a},distanceToManhattan:function(a){return Math.abs(this.x-a.x)+Math.abs(this.y-a.y)},setLength:function(a){return this.multiplyScalar(a/this.length())},lerp:function(a,b){this.x+=(a.x-this.x)*b;this.y+=(a.y-this.y)*b;return this},lerpVectors:function(a,b,c){return this.subVectors(b,a).multiplyScalar(c).add(a)},equals:function(a){return a.x===this.x&&a.y===this.y}, +fromArray:function(a,b){void 0===b&&(b=0);this.x=a[b];this.y=a[b+1];return this},toArray:function(a,b){void 0===a&&(a=[]);void 0===b&&(b=0);a[b]=this.x;a[b+1]=this.y;return a},fromAttribute:function(a,b,c){void 0===c&&(c=0);b=b*a.itemSize+c;this.x=a.array[b];this.y=a.array[b+1];return this},rotateAround:function(a,b){var c=Math.cos(b),d=Math.sin(b),e=this.x-a.x,f=this.y-a.y;this.x=e*c-f*d+a.x;this.y=e*d+f*c+a.y;return this}};THREE.Vector3=function(a,b,c){this.x=a||0;this.y=b||0;this.z=c||0}; +THREE.Vector3.prototype={constructor:THREE.Vector3,set:function(a,b,c){this.x=a;this.y=b;this.z=c;return this},setScalar:function(a){this.z=this.y=this.x=a;return this},setX:function(a){this.x=a;return this},setY:function(a){this.y=a;return this},setZ:function(a){this.z=a;return this},setComponent:function(a,b){switch(a){case 0:this.x=b;break;case 1:this.y=b;break;case 2:this.z=b;break;default:throw Error("index is out of range: "+a);}},getComponent:function(a){switch(a){case 0:return this.x;case 1:return this.y; +case 2:return this.z;default:throw Error("index is out of range: "+a);}},clone:function(){return new this.constructor(this.x,this.y,this.z)},copy:function(a){this.x=a.x;this.y=a.y;this.z=a.z;return this},add:function(a,b){if(void 0!==b)return console.warn("THREE.Vector3: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(a,b);this.x+=a.x;this.y+=a.y;this.z+=a.z;return this},addScalar:function(a){this.x+=a;this.y+=a;this.z+=a;return this},addVectors:function(a, +b){this.x=a.x+b.x;this.y=a.y+b.y;this.z=a.z+b.z;return this},addScaledVector:function(a,b){this.x+=a.x*b;this.y+=a.y*b;this.z+=a.z*b;return this},sub:function(a,b){if(void 0!==b)return console.warn("THREE.Vector3: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(a,b);this.x-=a.x;this.y-=a.y;this.z-=a.z;return this},subScalar:function(a){this.x-=a;this.y-=a;this.z-=a;return this},subVectors:function(a,b){this.x=a.x-b.x;this.y=a.y-b.y;this.z=a.z-b.z;return this}, +multiply:function(a,b){if(void 0!==b)return console.warn("THREE.Vector3: .multiply() now only accepts one argument. Use .multiplyVectors( a, b ) instead."),this.multiplyVectors(a,b);this.x*=a.x;this.y*=a.y;this.z*=a.z;return this},multiplyScalar:function(a){isFinite(a)?(this.x*=a,this.y*=a,this.z*=a):this.z=this.y=this.x=0;return this},multiplyVectors:function(a,b){this.x=a.x*b.x;this.y=a.y*b.y;this.z=a.z*b.z;return this},applyEuler:function(){var a;return function(b){!1===b instanceof THREE.Euler&& +console.error("THREE.Vector3: .applyEuler() now expects an Euler rotation rather than a Vector3 and order.");void 0===a&&(a=new THREE.Quaternion);return this.applyQuaternion(a.setFromEuler(b))}}(),applyAxisAngle:function(){var a;return function(b,c){void 0===a&&(a=new THREE.Quaternion);return this.applyQuaternion(a.setFromAxisAngle(b,c))}}(),applyMatrix3:function(a){var b=this.x,c=this.y,d=this.z;a=a.elements;this.x=a[0]*b+a[3]*c+a[6]*d;this.y=a[1]*b+a[4]*c+a[7]*d;this.z=a[2]*b+a[5]*c+a[8]*d;return this}, +applyMatrix4:function(a){var b=this.x,c=this.y,d=this.z;a=a.elements;this.x=a[0]*b+a[4]*c+a[8]*d+a[12];this.y=a[1]*b+a[5]*c+a[9]*d+a[13];this.z=a[2]*b+a[6]*c+a[10]*d+a[14];return this},applyProjection:function(a){var b=this.x,c=this.y,d=this.z;a=a.elements;var e=1/(a[3]*b+a[7]*c+a[11]*d+a[15]);this.x=(a[0]*b+a[4]*c+a[8]*d+a[12])*e;this.y=(a[1]*b+a[5]*c+a[9]*d+a[13])*e;this.z=(a[2]*b+a[6]*c+a[10]*d+a[14])*e;return this},applyQuaternion:function(a){var b=this.x,c=this.y,d=this.z,e=a.x,f=a.y,g=a.z;a= +a.w;var h=a*b+f*d-g*c,k=a*c+g*b-e*d,l=a*d+e*c-f*b,b=-e*b-f*c-g*d;this.x=h*a+b*-e+k*-g-l*-f;this.y=k*a+b*-f+l*-e-h*-g;this.z=l*a+b*-g+h*-f-k*-e;return this},project:function(){var a;return function(b){void 0===a&&(a=new THREE.Matrix4);a.multiplyMatrices(b.projectionMatrix,a.getInverse(b.matrixWorld));return this.applyProjection(a)}}(),unproject:function(){var a;return function(b){void 0===a&&(a=new THREE.Matrix4);a.multiplyMatrices(b.matrixWorld,a.getInverse(b.projectionMatrix));return this.applyProjection(a)}}(), +transformDirection:function(a){var b=this.x,c=this.y,d=this.z;a=a.elements;this.x=a[0]*b+a[4]*c+a[8]*d;this.y=a[1]*b+a[5]*c+a[9]*d;this.z=a[2]*b+a[6]*c+a[10]*d;return this.normalize()},divide:function(a){this.x/=a.x;this.y/=a.y;this.z/=a.z;return this},divideScalar:function(a){return this.multiplyScalar(1/a)},min:function(a){this.x=Math.min(this.x,a.x);this.y=Math.min(this.y,a.y);this.z=Math.min(this.z,a.z);return this},max:function(a){this.x=Math.max(this.x,a.x);this.y=Math.max(this.y,a.y);this.z= +Math.max(this.z,a.z);return this},clamp:function(a,b){this.x=Math.max(a.x,Math.min(b.x,this.x));this.y=Math.max(a.y,Math.min(b.y,this.y));this.z=Math.max(a.z,Math.min(b.z,this.z));return this},clampScalar:function(){var a,b;return function(c,d){void 0===a&&(a=new THREE.Vector3,b=new THREE.Vector3);a.set(c,c,c);b.set(d,d,d);return this.clamp(a,b)}}(),clampLength:function(a,b){var c=this.length();return this.multiplyScalar(Math.max(a,Math.min(b,c))/c)},floor:function(){this.x=Math.floor(this.x);this.y= +Math.floor(this.y);this.z=Math.floor(this.z);return this},ceil:function(){this.x=Math.ceil(this.x);this.y=Math.ceil(this.y);this.z=Math.ceil(this.z);return this},round:function(){this.x=Math.round(this.x);this.y=Math.round(this.y);this.z=Math.round(this.z);return this},roundToZero:function(){this.x=0>this.x?Math.ceil(this.x):Math.floor(this.x);this.y=0>this.y?Math.ceil(this.y):Math.floor(this.y);this.z=0>this.z?Math.ceil(this.z):Math.floor(this.z);return this},negate:function(){this.x=-this.x;this.y= +-this.y;this.z=-this.z;return this},dot:function(a){return this.x*a.x+this.y*a.y+this.z*a.z},lengthSq:function(){return this.x*this.x+this.y*this.y+this.z*this.z},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)},lengthManhattan:function(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)},normalize:function(){return this.divideScalar(this.length())},setLength:function(a){return this.multiplyScalar(a/this.length())},lerp:function(a,b){this.x+=(a.x-this.x)*b;this.y+= +(a.y-this.y)*b;this.z+=(a.z-this.z)*b;return this},lerpVectors:function(a,b,c){return this.subVectors(b,a).multiplyScalar(c).add(a)},cross:function(a,b){if(void 0!==b)return console.warn("THREE.Vector3: .cross() now only accepts one argument. Use .crossVectors( a, b ) instead."),this.crossVectors(a,b);var c=this.x,d=this.y,e=this.z;this.x=d*a.z-e*a.y;this.y=e*a.x-c*a.z;this.z=c*a.y-d*a.x;return this},crossVectors:function(a,b){var c=a.x,d=a.y,e=a.z,f=b.x,g=b.y,h=b.z;this.x=d*h-e*g;this.y=e*f-c*h; +this.z=c*g-d*f;return this},projectOnVector:function(a){var b=a.dot(this)/a.lengthSq();return this.copy(a).multiplyScalar(b)},projectOnPlane:function(){var a;return function(b){void 0===a&&(a=new THREE.Vector3);a.copy(this).projectOnVector(b);return this.sub(a)}}(),reflect:function(){var a;return function(b){void 0===a&&(a=new THREE.Vector3);return this.sub(a.copy(b).multiplyScalar(2*this.dot(b)))}}(),angleTo:function(a){a=this.dot(a)/Math.sqrt(this.lengthSq()*a.lengthSq());return Math.acos(THREE.Math.clamp(a, +-1,1))},distanceTo:function(a){return Math.sqrt(this.distanceToSquared(a))},distanceToSquared:function(a){var b=this.x-a.x,c=this.y-a.y;a=this.z-a.z;return b*b+c*c+a*a},distanceToManhattan:function(a){return Math.abs(this.x-a.x)+Math.abs(this.y-a.y)+Math.abs(this.z-a.z)},setFromSpherical:function(a){var b=Math.sin(a.phi)*a.radius;this.x=b*Math.sin(a.theta);this.y=Math.cos(a.phi)*a.radius;this.z=b*Math.cos(a.theta);return this},setFromMatrixPosition:function(a){return this.setFromMatrixColumn(a,3)}, +setFromMatrixScale:function(a){var b=this.setFromMatrixColumn(a,0).length(),c=this.setFromMatrixColumn(a,1).length();a=this.setFromMatrixColumn(a,2).length();this.x=b;this.y=c;this.z=a;return this},setFromMatrixColumn:function(a,b){if("number"===typeof a){console.warn("THREE.Vector3: setFromMatrixColumn now expects ( matrix, index ).");var c=a;a=b;b=c}return this.fromArray(a.elements,4*b)},equals:function(a){return a.x===this.x&&a.y===this.y&&a.z===this.z},fromArray:function(a,b){void 0===b&&(b=0); +this.x=a[b];this.y=a[b+1];this.z=a[b+2];return this},toArray:function(a,b){void 0===a&&(a=[]);void 0===b&&(b=0);a[b]=this.x;a[b+1]=this.y;a[b+2]=this.z;return a},fromAttribute:function(a,b,c){void 0===c&&(c=0);b=b*a.itemSize+c;this.x=a.array[b];this.y=a.array[b+1];this.z=a.array[b+2];return this}};THREE.Vector4=function(a,b,c,d){this.x=a||0;this.y=b||0;this.z=c||0;this.w=void 0!==d?d:1}; +THREE.Vector4.prototype={constructor:THREE.Vector4,set:function(a,b,c,d){this.x=a;this.y=b;this.z=c;this.w=d;return this},setScalar:function(a){this.w=this.z=this.y=this.x=a;return this},setX:function(a){this.x=a;return this},setY:function(a){this.y=a;return this},setZ:function(a){this.z=a;return this},setW:function(a){this.w=a;return this},setComponent:function(a,b){switch(a){case 0:this.x=b;break;case 1:this.y=b;break;case 2:this.z=b;break;case 3:this.w=b;break;default:throw Error("index is out of range: "+ +a);}},getComponent:function(a){switch(a){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw Error("index is out of range: "+a);}},clone:function(){return new this.constructor(this.x,this.y,this.z,this.w)},copy:function(a){this.x=a.x;this.y=a.y;this.z=a.z;this.w=void 0!==a.w?a.w:1;return this},add:function(a,b){if(void 0!==b)return console.warn("THREE.Vector4: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(a,b); +this.x+=a.x;this.y+=a.y;this.z+=a.z;this.w+=a.w;return this},addScalar:function(a){this.x+=a;this.y+=a;this.z+=a;this.w+=a;return this},addVectors:function(a,b){this.x=a.x+b.x;this.y=a.y+b.y;this.z=a.z+b.z;this.w=a.w+b.w;return this},addScaledVector:function(a,b){this.x+=a.x*b;this.y+=a.y*b;this.z+=a.z*b;this.w+=a.w*b;return this},sub:function(a,b){if(void 0!==b)return console.warn("THREE.Vector4: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(a,b);this.x-= +a.x;this.y-=a.y;this.z-=a.z;this.w-=a.w;return this},subScalar:function(a){this.x-=a;this.y-=a;this.z-=a;this.w-=a;return this},subVectors:function(a,b){this.x=a.x-b.x;this.y=a.y-b.y;this.z=a.z-b.z;this.w=a.w-b.w;return this},multiplyScalar:function(a){isFinite(a)?(this.x*=a,this.y*=a,this.z*=a,this.w*=a):this.w=this.z=this.y=this.x=0;return this},applyMatrix4:function(a){var b=this.x,c=this.y,d=this.z,e=this.w;a=a.elements;this.x=a[0]*b+a[4]*c+a[8]*d+a[12]*e;this.y=a[1]*b+a[5]*c+a[9]*d+a[13]*e;this.z= +a[2]*b+a[6]*c+a[10]*d+a[14]*e;this.w=a[3]*b+a[7]*c+a[11]*d+a[15]*e;return this},divideScalar:function(a){return this.multiplyScalar(1/a)},setAxisAngleFromQuaternion:function(a){this.w=2*Math.acos(a.w);var b=Math.sqrt(1-a.w*a.w);1E-4>b?(this.x=1,this.z=this.y=0):(this.x=a.x/b,this.y=a.y/b,this.z=a.z/b);return this},setAxisAngleFromRotationMatrix:function(a){var b,c,d;a=a.elements;var e=a[0];d=a[4];var f=a[8],g=a[1],h=a[5],k=a[9];c=a[2];b=a[6];var l=a[10];if(.01>Math.abs(d-g)&&.01>Math.abs(f-c)&&.01> +Math.abs(k-b)){if(.1>Math.abs(d+g)&&.1>Math.abs(f+c)&&.1>Math.abs(k+b)&&.1>Math.abs(e+h+l-3))return this.set(1,0,0,0),this;a=Math.PI;e=(e+1)/2;h=(h+1)/2;l=(l+1)/2;d=(d+g)/4;f=(f+c)/4;k=(k+b)/4;e>h&&e>l?.01>e?(b=0,d=c=.707106781):(b=Math.sqrt(e),c=d/b,d=f/b):h>l?.01>h?(b=.707106781,c=0,d=.707106781):(c=Math.sqrt(h),b=d/c,d=k/c):.01>l?(c=b=.707106781,d=0):(d=Math.sqrt(l),b=f/d,c=k/d);this.set(b,c,d,a);return this}a=Math.sqrt((b-k)*(b-k)+(f-c)*(f-c)+(g-d)*(g-d));.001>Math.abs(a)&&(a=1);this.x=(b-k)/ +a;this.y=(f-c)/a;this.z=(g-d)/a;this.w=Math.acos((e+h+l-1)/2);return this},min:function(a){this.x=Math.min(this.x,a.x);this.y=Math.min(this.y,a.y);this.z=Math.min(this.z,a.z);this.w=Math.min(this.w,a.w);return this},max:function(a){this.x=Math.max(this.x,a.x);this.y=Math.max(this.y,a.y);this.z=Math.max(this.z,a.z);this.w=Math.max(this.w,a.w);return this},clamp:function(a,b){this.x=Math.max(a.x,Math.min(b.x,this.x));this.y=Math.max(a.y,Math.min(b.y,this.y));this.z=Math.max(a.z,Math.min(b.z,this.z)); +this.w=Math.max(a.w,Math.min(b.w,this.w));return this},clampScalar:function(){var a,b;return function(c,d){void 0===a&&(a=new THREE.Vector4,b=new THREE.Vector4);a.set(c,c,c,c);b.set(d,d,d,d);return this.clamp(a,b)}}(),floor:function(){this.x=Math.floor(this.x);this.y=Math.floor(this.y);this.z=Math.floor(this.z);this.w=Math.floor(this.w);return this},ceil:function(){this.x=Math.ceil(this.x);this.y=Math.ceil(this.y);this.z=Math.ceil(this.z);this.w=Math.ceil(this.w);return this},round:function(){this.x= +Math.round(this.x);this.y=Math.round(this.y);this.z=Math.round(this.z);this.w=Math.round(this.w);return this},roundToZero:function(){this.x=0>this.x?Math.ceil(this.x):Math.floor(this.x);this.y=0>this.y?Math.ceil(this.y):Math.floor(this.y);this.z=0>this.z?Math.ceil(this.z):Math.floor(this.z);this.w=0>this.w?Math.ceil(this.w):Math.floor(this.w);return this},negate:function(){this.x=-this.x;this.y=-this.y;this.z=-this.z;this.w=-this.w;return this},dot:function(a){return this.x*a.x+this.y*a.y+this.z* +a.z+this.w*a.w},lengthSq:function(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)},lengthManhattan:function(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)},normalize:function(){return this.divideScalar(this.length())},setLength:function(a){return this.multiplyScalar(a/this.length())},lerp:function(a,b){this.x+=(a.x-this.x)*b;this.y+=(a.y-this.y)*b;this.z+=(a.z- +this.z)*b;this.w+=(a.w-this.w)*b;return this},lerpVectors:function(a,b,c){return this.subVectors(b,a).multiplyScalar(c).add(a)},equals:function(a){return a.x===this.x&&a.y===this.y&&a.z===this.z&&a.w===this.w},fromArray:function(a,b){void 0===b&&(b=0);this.x=a[b];this.y=a[b+1];this.z=a[b+2];this.w=a[b+3];return this},toArray:function(a,b){void 0===a&&(a=[]);void 0===b&&(b=0);a[b]=this.x;a[b+1]=this.y;a[b+2]=this.z;a[b+3]=this.w;return a},fromAttribute:function(a,b,c){void 0===c&&(c=0);b=b*a.itemSize+ +c;this.x=a.array[b];this.y=a.array[b+1];this.z=a.array[b+2];this.w=a.array[b+3];return this}};THREE.Euler=function(a,b,c,d){this._x=a||0;this._y=b||0;this._z=c||0;this._order=d||THREE.Euler.DefaultOrder};THREE.Euler.RotationOrders="XYZ YZX ZXY XZY YXZ ZYX".split(" ");THREE.Euler.DefaultOrder="XYZ"; +THREE.Euler.prototype={constructor:THREE.Euler,get x(){return this._x},set x(a){this._x=a;this.onChangeCallback()},get y(){return this._y},set y(a){this._y=a;this.onChangeCallback()},get z(){return this._z},set z(a){this._z=a;this.onChangeCallback()},get order(){return this._order},set order(a){this._order=a;this.onChangeCallback()},set:function(a,b,c,d){this._x=a;this._y=b;this._z=c;this._order=d||this._order;this.onChangeCallback();return this},clone:function(){return new this.constructor(this._x, +this._y,this._z,this._order)},copy:function(a){this._x=a._x;this._y=a._y;this._z=a._z;this._order=a._order;this.onChangeCallback();return this},setFromRotationMatrix:function(a,b,c){var d=THREE.Math.clamp,e=a.elements;a=e[0];var f=e[4],g=e[8],h=e[1],k=e[5],l=e[9],m=e[2],p=e[6],e=e[10];b=b||this._order;"XYZ"===b?(this._y=Math.asin(d(g,-1,1)),.99999>Math.abs(g)?(this._x=Math.atan2(-l,e),this._z=Math.atan2(-f,a)):(this._x=Math.atan2(p,k),this._z=0)):"YXZ"===b?(this._x=Math.asin(-d(l,-1,1)),.99999>Math.abs(l)? +(this._y=Math.atan2(g,e),this._z=Math.atan2(h,k)):(this._y=Math.atan2(-m,a),this._z=0)):"ZXY"===b?(this._x=Math.asin(d(p,-1,1)),.99999>Math.abs(p)?(this._y=Math.atan2(-m,e),this._z=Math.atan2(-f,k)):(this._y=0,this._z=Math.atan2(h,a))):"ZYX"===b?(this._y=Math.asin(-d(m,-1,1)),.99999>Math.abs(m)?(this._x=Math.atan2(p,e),this._z=Math.atan2(h,a)):(this._x=0,this._z=Math.atan2(-f,k))):"YZX"===b?(this._z=Math.asin(d(h,-1,1)),.99999>Math.abs(h)?(this._x=Math.atan2(-l,k),this._y=Math.atan2(-m,a)):(this._x= +0,this._y=Math.atan2(g,e))):"XZY"===b?(this._z=Math.asin(-d(f,-1,1)),.99999>Math.abs(f)?(this._x=Math.atan2(p,k),this._y=Math.atan2(g,a)):(this._x=Math.atan2(-l,e),this._y=0)):console.warn("THREE.Euler: .setFromRotationMatrix() given unsupported order: "+b);this._order=b;if(!1!==c)this.onChangeCallback();return this},setFromQuaternion:function(){var a;return function(b,c,d){void 0===a&&(a=new THREE.Matrix4);a.makeRotationFromQuaternion(b);return this.setFromRotationMatrix(a,c,d)}}(),setFromVector3:function(a, +b){return this.set(a.x,a.y,a.z,b||this._order)},reorder:function(){var a=new THREE.Quaternion;return function(b){a.setFromEuler(this);return this.setFromQuaternion(a,b)}}(),equals:function(a){return a._x===this._x&&a._y===this._y&&a._z===this._z&&a._order===this._order},fromArray:function(a){this._x=a[0];this._y=a[1];this._z=a[2];void 0!==a[3]&&(this._order=a[3]);this.onChangeCallback();return this},toArray:function(a,b){void 0===a&&(a=[]);void 0===b&&(b=0);a[b]=this._x;a[b+1]=this._y;a[b+2]=this._z; +a[b+3]=this._order;return a},toVector3:function(a){return a?a.set(this._x,this._y,this._z):new THREE.Vector3(this._x,this._y,this._z)},onChange:function(a){this.onChangeCallback=a;return this},onChangeCallback:function(){}};THREE.Line3=function(a,b){this.start=void 0!==a?a:new THREE.Vector3;this.end=void 0!==b?b:new THREE.Vector3}; +THREE.Line3.prototype={constructor:THREE.Line3,set:function(a,b){this.start.copy(a);this.end.copy(b);return this},clone:function(){return(new this.constructor).copy(this)},copy:function(a){this.start.copy(a.start);this.end.copy(a.end);return this},center:function(a){return(a||new THREE.Vector3).addVectors(this.start,this.end).multiplyScalar(.5)},delta:function(a){return(a||new THREE.Vector3).subVectors(this.end,this.start)},distanceSq:function(){return this.start.distanceToSquared(this.end)},distance:function(){return this.start.distanceTo(this.end)}, +at:function(a,b){var c=b||new THREE.Vector3;return this.delta(c).multiplyScalar(a).add(this.start)},closestPointToPointParameter:function(){var a=new THREE.Vector3,b=new THREE.Vector3;return function(c,d){a.subVectors(c,this.start);b.subVectors(this.end,this.start);var e=b.dot(b),e=b.dot(a)/e;d&&(e=THREE.Math.clamp(e,0,1));return e}}(),closestPointToPoint:function(a,b,c){a=this.closestPointToPointParameter(a,b);c=c||new THREE.Vector3;return this.delta(c).multiplyScalar(a).add(this.start)},applyMatrix4:function(a){this.start.applyMatrix4(a); +this.end.applyMatrix4(a);return this},equals:function(a){return a.start.equals(this.start)&&a.end.equals(this.end)}};THREE.Box2=function(a,b){this.min=void 0!==a?a:new THREE.Vector2(Infinity,Infinity);this.max=void 0!==b?b:new THREE.Vector2(-Infinity,-Infinity)}; +THREE.Box2.prototype={constructor:THREE.Box2,set:function(a,b){this.min.copy(a);this.max.copy(b);return this},setFromPoints:function(a){this.makeEmpty();for(var b=0,c=a.length;bthis.max.x||a.ythis.max.y?!1:!0},containsBox:function(a){return this.min.x<=a.min.x&&a.max.x<=this.max.x&&this.min.y<=a.min.y&&a.max.y<=this.max.y?!0:!1},getParameter:function(a,b){return(b||new THREE.Vector2).set((a.x-this.min.x)/(this.max.x-this.min.x),(a.y-this.min.y)/(this.max.y-this.min.y))},intersectsBox:function(a){return a.max.xthis.max.x||a.max.y +this.max.y?!1:!0},clampPoint:function(a,b){return(b||new THREE.Vector2).copy(a).clamp(this.min,this.max)},distanceToPoint:function(){var a=new THREE.Vector2;return function(b){return a.copy(b).clamp(this.min,this.max).sub(b).length()}}(),intersect:function(a){this.min.max(a.min);this.max.min(a.max);return this},union:function(a){this.min.min(a.min);this.max.max(a.max);return this},translate:function(a){this.min.add(a);this.max.add(a);return this},equals:function(a){return a.min.equals(this.min)&& +a.max.equals(this.max)}};THREE.Box3=function(a,b){this.min=void 0!==a?a:new THREE.Vector3(Infinity,Infinity,Infinity);this.max=void 0!==b?b:new THREE.Vector3(-Infinity,-Infinity,-Infinity)}; +THREE.Box3.prototype={constructor:THREE.Box3,set:function(a,b){this.min.copy(a);this.max.copy(b);return this},setFromArray:function(a){for(var b=Infinity,c=Infinity,d=Infinity,e=-Infinity,f=-Infinity,g=-Infinity,h=0,k=a.length;he&&(e=l);m>f&&(f=m);p>g&&(g=p)}this.min.set(b,c,d);this.max.set(e,f,g)},setFromPoints:function(a){this.makeEmpty();for(var b=0,c=a.length;bthis.max.x||a.ythis.max.y||a.zthis.max.z?!1:!0},containsBox:function(a){return this.min.x<=a.min.x&&a.max.x<=this.max.x&&this.min.y<=a.min.y&&a.max.y<=this.max.y&&this.min.z<=a.min.z&&a.max.z<=this.max.z?!0:!1},getParameter:function(a,b){return(b||new THREE.Vector3).set((a.x-this.min.x)/(this.max.x-this.min.x),(a.y-this.min.y)/(this.max.y-this.min.y),(a.z-this.min.z)/(this.max.z-this.min.z))},intersectsBox:function(a){return a.max.xthis.max.x|| +a.max.ythis.max.y||a.max.zthis.max.z?!1:!0},intersectsSphere:function(){var a;return function(b){void 0===a&&(a=new THREE.Vector3);this.clampPoint(b.center,a);return a.distanceToSquared(b.center)<=b.radius*b.radius}}(),intersectsPlane:function(a){var b,c;0=a.constant},clampPoint:function(a,b){return(b||new THREE.Vector3).copy(a).clamp(this.min,this.max)},distanceToPoint:function(){var a=new THREE.Vector3;return function(b){return a.copy(b).clamp(this.min,this.max).sub(b).length()}}(),getBoundingSphere:function(){var a=new THREE.Vector3;return function(b){b=b||new THREE.Sphere;b.center= +this.center();b.radius=.5*this.size(a).length();return b}}(),intersect:function(a){this.min.max(a.min);this.max.min(a.max);this.isEmpty()&&this.makeEmpty();return this},union:function(a){this.min.min(a.min);this.max.max(a.max);return this},applyMatrix4:function(){var a=[new THREE.Vector3,new THREE.Vector3,new THREE.Vector3,new THREE.Vector3,new THREE.Vector3,new THREE.Vector3,new THREE.Vector3,new THREE.Vector3];return function(b){if(this.isEmpty())return this;a[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(b); +a[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(b);a[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(b);a[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(b);a[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(b);a[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(b);a[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(b);a[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(b);this.setFromPoints(a);return this}}(),translate:function(a){this.min.add(a);this.max.add(a); +return this},equals:function(a){return a.min.equals(this.min)&&a.max.equals(this.max)}};THREE.Matrix3=function(){this.elements=new Float32Array([1,0,0,0,1,0,0,0,1]);0this.determinant()&&(g=-g);c.x=f[12];c.y=f[13];c.z=f[14];b.elements.set(this.elements);c=1/g;var f=1/h,l=1/k;b.elements[0]*=c;b.elements[1]*=c; +b.elements[2]*=c;b.elements[4]*=f;b.elements[5]*=f;b.elements[6]*=f;b.elements[8]*=l;b.elements[9]*=l;b.elements[10]*=l;d.setFromRotationMatrix(b);e.x=g;e.y=h;e.z=k;return this}}(),makeFrustum:function(a,b,c,d,e,f){var g=this.elements;g[0]=2*e/(b-a);g[4]=0;g[8]=(b+a)/(b-a);g[12]=0;g[1]=0;g[5]=2*e/(d-c);g[9]=(d+c)/(d-c);g[13]=0;g[2]=0;g[6]=0;g[10]=-(f+e)/(f-e);g[14]=-2*f*e/(f-e);g[3]=0;g[7]=0;g[11]=-1;g[15]=0;return this},makePerspective:function(a,b,c,d){a=c*Math.tan(THREE.Math.DEG2RAD*a*.5);var e= +-a;return this.makeFrustum(e*b,a*b,e,a,c,d)},makeOrthographic:function(a,b,c,d,e,f){var g=this.elements,h=1/(b-a),k=1/(c-d),l=1/(f-e);g[0]=2*h;g[4]=0;g[8]=0;g[12]=-((b+a)*h);g[1]=0;g[5]=2*k;g[9]=0;g[13]=-((c+d)*k);g[2]=0;g[6]=0;g[10]=-2*l;g[14]=-((f+e)*l);g[3]=0;g[7]=0;g[11]=0;g[15]=1;return this},equals:function(a){var b=this.elements;a=a.elements;for(var c=0;16>c;c++)if(b[c]!==a[c])return!1;return!0},fromArray:function(a){this.elements.set(a);return this},toArray:function(a,b){void 0===a&&(a=[]); +void 0===b&&(b=0);var c=this.elements;a[b]=c[0];a[b+1]=c[1];a[b+2]=c[2];a[b+3]=c[3];a[b+4]=c[4];a[b+5]=c[5];a[b+6]=c[6];a[b+7]=c[7];a[b+8]=c[8];a[b+9]=c[9];a[b+10]=c[10];a[b+11]=c[11];a[b+12]=c[12];a[b+13]=c[13];a[b+14]=c[14];a[b+15]=c[15];return a}};THREE.Ray=function(a,b){this.origin=void 0!==a?a:new THREE.Vector3;this.direction=void 0!==b?b:new THREE.Vector3}; +THREE.Ray.prototype={constructor:THREE.Ray,set:function(a,b){this.origin.copy(a);this.direction.copy(b);return this},clone:function(){return(new this.constructor).copy(this)},copy:function(a){this.origin.copy(a.origin);this.direction.copy(a.direction);return this},at:function(a,b){return(b||new THREE.Vector3).copy(this.direction).multiplyScalar(a).add(this.origin)},lookAt:function(a){this.direction.copy(a).sub(this.origin).normalize();return this},recast:function(){var a=new THREE.Vector3;return function(b){this.origin.copy(this.at(b, +a));return this}}(),closestPointToPoint:function(a,b){var c=b||new THREE.Vector3;c.subVectors(a,this.origin);var d=c.dot(this.direction);return 0>d?c.copy(this.origin):c.copy(this.direction).multiplyScalar(d).add(this.origin)},distanceToPoint:function(a){return Math.sqrt(this.distanceSqToPoint(a))},distanceSqToPoint:function(){var a=new THREE.Vector3;return function(b){var c=a.subVectors(b,this.origin).dot(this.direction);if(0>c)return this.origin.distanceToSquared(b);a.copy(this.direction).multiplyScalar(c).add(this.origin); +return a.distanceToSquared(b)}}(),distanceSqToSegment:function(){var a=new THREE.Vector3,b=new THREE.Vector3,c=new THREE.Vector3;return function(d,e,f,g){a.copy(d).add(e).multiplyScalar(.5);b.copy(e).sub(d).normalize();c.copy(this.origin).sub(a);var h=.5*d.distanceTo(e),k=-this.direction.dot(b),l=c.dot(this.direction),m=-c.dot(b),p=c.lengthSq(),n=Math.abs(1-k*k),q;0=-q?e<=q?(h=1/n,d*=h,e*=h,k=d*(d+k*e+2*l)+e*(k*d+e+2*m)+p):(e=h,d=Math.max(0,-(k*e+l)),k=-d*d+e*(e+2* +m)+p):(e=-h,d=Math.max(0,-(k*e+l)),k=-d*d+e*(e+2*m)+p):e<=-q?(d=Math.max(0,-(-k*h+l)),e=0f)return null;f=Math.sqrt(f-e);e=d-f;d+=f;return 0>e&&0>d?null:0>e?this.at(d,c):this.at(e,c)}}(),intersectsSphere:function(a){return this.distanceToPoint(a.center)<=a.radius},distanceToPlane:function(a){var b=a.normal.dot(this.direction);if(0===b)return 0===a.distanceToPoint(this.origin)?0:null;a=-(this.origin.dot(a.normal)+a.constant)/b;return 0<=a?a:null},intersectPlane:function(a,b){var c= +this.distanceToPlane(a);return null===c?null:this.at(c,b)},intersectsPlane:function(a){var b=a.distanceToPoint(this.origin);return 0===b||0>a.normal.dot(this.direction)*b?!0:!1},intersectBox:function(a,b){var c,d,e,f,g;d=1/this.direction.x;f=1/this.direction.y;g=1/this.direction.z;var h=this.origin;0<=d?(c=(a.min.x-h.x)*d,d*=a.max.x-h.x):(c=(a.max.x-h.x)*d,d*=a.min.x-h.x);0<=f?(e=(a.min.y-h.y)*f,f*=a.max.y-h.y):(e=(a.max.y-h.y)*f,f*=a.min.y-h.y);if(c>f||e>d)return null;if(e>c||c!==c)c=e;if(fg||e>d)return null;if(e>c||c!==c)c=e;if(gd?null:this.at(0<=c?c:d,b)},intersectsBox:function(){var a=new THREE.Vector3;return function(b){return null!==this.intersectBox(b,a)}}(),intersectTriangle:function(){var a=new THREE.Vector3,b=new THREE.Vector3,c=new THREE.Vector3,d=new THREE.Vector3;return function(e,f,g,h,k){b.subVectors(f,e);c.subVectors(g,e);d.crossVectors(b,c);f=this.direction.dot(d); +if(0f)h=-1,f=-f;else return null;a.subVectors(this.origin,e);e=h*this.direction.dot(c.crossVectors(a,c));if(0>e)return null;g=h*this.direction.dot(b.cross(a));if(0>g||e+g>f)return null;e=-h*a.dot(d);return 0>e?null:this.at(e/f,k)}}(),applyMatrix4:function(a){this.direction.add(this.origin).applyMatrix4(a);this.origin.applyMatrix4(a);this.direction.sub(this.origin);this.direction.normalize();return this},equals:function(a){return a.origin.equals(this.origin)&&a.direction.equals(this.direction)}}; +THREE.Sphere=function(a,b){this.center=void 0!==a?a:new THREE.Vector3;this.radius=void 0!==b?b:0}; +THREE.Sphere.prototype={constructor:THREE.Sphere,set:function(a,b){this.center.copy(a);this.radius=b;return this},setFromPoints:function(){var a=new THREE.Box3;return function(b,c){var d=this.center;void 0!==c?d.copy(c):a.setFromPoints(b).center(d);for(var e=0,f=0,g=b.length;f=this.radius},containsPoint:function(a){return a.distanceToSquared(this.center)<=this.radius*this.radius},distanceToPoint:function(a){return a.distanceTo(this.center)-this.radius},intersectsSphere:function(a){var b=this.radius+a.radius;return a.center.distanceToSquared(this.center)<=b*b},intersectsBox:function(a){return a.intersectsSphere(this)},intersectsPlane:function(a){return Math.abs(this.center.dot(a.normal)-a.constant)<=this.radius},clampPoint:function(a,b){var c= +this.center.distanceToSquared(a),d=b||new THREE.Vector3;d.copy(a);c>this.radius*this.radius&&(d.sub(this.center).normalize(),d.multiplyScalar(this.radius).add(this.center));return d},getBoundingBox:function(a){a=a||new THREE.Box3;a.set(this.center,this.center);a.expandByScalar(this.radius);return a},applyMatrix4:function(a){this.center.applyMatrix4(a);this.radius*=a.getMaxScaleOnAxis();return this},translate:function(a){this.center.add(a);return this},equals:function(a){return a.center.equals(this.center)&& +a.radius===this.radius}};THREE.Frustum=function(a,b,c,d,e,f){this.planes=[void 0!==a?a:new THREE.Plane,void 0!==b?b:new THREE.Plane,void 0!==c?c:new THREE.Plane,void 0!==d?d:new THREE.Plane,void 0!==e?e:new THREE.Plane,void 0!==f?f:new THREE.Plane]}; +THREE.Frustum.prototype={constructor:THREE.Frustum,set:function(a,b,c,d,e,f){var g=this.planes;g[0].copy(a);g[1].copy(b);g[2].copy(c);g[3].copy(d);g[4].copy(e);g[5].copy(f);return this},clone:function(){return(new this.constructor).copy(this)},copy:function(a){for(var b=this.planes,c=0;6>c;c++)b[c].copy(a.planes[c]);return this},setFromMatrix:function(a){var b=this.planes,c=a.elements;a=c[0];var d=c[1],e=c[2],f=c[3],g=c[4],h=c[5],k=c[6],l=c[7],m=c[8],p=c[9],n=c[10],q=c[11],r=c[12],s=c[13],v=c[14], +c=c[15];b[0].setComponents(f-a,l-g,q-m,c-r).normalize();b[1].setComponents(f+a,l+g,q+m,c+r).normalize();b[2].setComponents(f+d,l+h,q+p,c+s).normalize();b[3].setComponents(f-d,l-h,q-p,c-s).normalize();b[4].setComponents(f-e,l-k,q-n,c-v).normalize();b[5].setComponents(f+e,l+k,q+n,c+v).normalize();return this},intersectsObject:function(){var a=new THREE.Sphere;return function(b){var c=b.geometry;null===c.boundingSphere&&c.computeBoundingSphere();a.copy(c.boundingSphere).applyMatrix4(b.matrixWorld);return this.intersectsSphere(a)}}(), +intersectsSprite:function(){var a=new THREE.Sphere;return function(b){a.center.set(0,0,0);a.radius=.7071067811865476;a.applyMatrix4(b.matrixWorld);return this.intersectsSphere(a)}}(),intersectsSphere:function(a){var b=this.planes,c=a.center;a=-a.radius;for(var d=0;6>d;d++)if(b[d].distanceToPoint(c)e;e++){var f=d[e];a.x=0g&&0>f)return!1}return!0}}(),containsPoint:function(a){for(var b=this.planes,c=0;6>c;c++)if(0>b[c].distanceToPoint(a))return!1;return!0}};THREE.Plane=function(a,b){this.normal=void 0!==a?a:new THREE.Vector3(1,0,0);this.constant=void 0!==b?b:0}; +THREE.Plane.prototype={constructor:THREE.Plane,set:function(a,b){this.normal.copy(a);this.constant=b;return this},setComponents:function(a,b,c,d){this.normal.set(a,b,c);this.constant=d;return this},setFromNormalAndCoplanarPoint:function(a,b){this.normal.copy(a);this.constant=-b.dot(this.normal);return this},setFromCoplanarPoints:function(){var a=new THREE.Vector3,b=new THREE.Vector3;return function(c,d,e){d=a.subVectors(e,d).cross(b.subVectors(c,d)).normalize();this.setFromNormalAndCoplanarPoint(d, +c);return this}}(),clone:function(){return(new this.constructor).copy(this)},copy:function(a){this.normal.copy(a.normal);this.constant=a.constant;return this},normalize:function(){var a=1/this.normal.length();this.normal.multiplyScalar(a);this.constant*=a;return this},negate:function(){this.constant*=-1;this.normal.negate();return this},distanceToPoint:function(a){return this.normal.dot(a)+this.constant},distanceToSphere:function(a){return this.distanceToPoint(a.center)-a.radius},projectPoint:function(a, +b){return this.orthoPoint(a,b).sub(a).negate()},orthoPoint:function(a,b){var c=this.distanceToPoint(a);return(b||new THREE.Vector3).copy(this.normal).multiplyScalar(c)},intersectLine:function(){var a=new THREE.Vector3;return function(b,c){var d=c||new THREE.Vector3,e=b.delta(a),f=this.normal.dot(e);if(0===f){if(0===this.distanceToPoint(b.start))return d.copy(b.start)}else return f=-(b.start.dot(this.normal)+this.constant)/f,0>f||1b&&0a&&0e;e++)8===e||13===e||18===e||23===e?b[e]="-":14===e?b[e]="4":(2>=c&&(c=33554432+16777216*Math.random()|0),d=c&15,c>>=4,b[e]=a[19===e?d&3|8:d]);return b.join("")}}(),clamp:function(a,b,c){return Math.max(b,Math.min(c,a))},euclideanModulo:function(a,b){return(a%b+b)%b},mapLinear:function(a,b,c, +d,e){return d+(a-b)*(e-d)/(c-b)},smoothstep:function(a,b,c){if(a<=b)return 0;if(a>=c)return 1;a=(a-b)/(c-b);return a*a*(3-2*a)},smootherstep:function(a,b,c){if(a<=b)return 0;if(a>=c)return 1;a=(a-b)/(c-b);return a*a*a*(a*(6*a-15)+10)},random16:function(){console.warn("THREE.Math.random16() has been deprecated. Use Math.random() instead.");return Math.random()},randInt:function(a,b){return a+Math.floor(Math.random()*(b-a+1))},randFloat:function(a,b){return a+Math.random()*(b-a)},randFloatSpread:function(a){return a* +(.5-Math.random())},degToRad:function(a){return a*THREE.Math.DEG2RAD},radToDeg:function(a){return a*THREE.Math.RAD2DEG},isPowerOfTwo:function(a){return 0===(a&a-1)&&0!==a},nearestPowerOfTwo:function(a){return Math.pow(2,Math.round(Math.log(a)/Math.LN2))},nextPowerOfTwo:function(a){a--;a|=a>>1;a|=a>>2;a|=a>>4;a|=a>>8;a|=a>>16;a++;return a}}; +THREE.Spline=function(a){function b(a,b,c,d,e,f,g){a=.5*(c-a);d=.5*(d-b);return(2*(b-c)+a+d)*g+(-3*(b-c)-2*a-d)*f+a*e+b}this.points=a;var c=[],d={x:0,y:0,z:0},e,f,g,h,k,l,m,p,n;this.initFromArray=function(a){this.points=[];for(var b=0;bthis.points.length-2?this.points.length-1:f+1;c[3]=f>this.points.length-3?this.points.length-1:f+ +2;l=this.points[c[0]];m=this.points[c[1]];p=this.points[c[2]];n=this.points[c[3]];h=g*g;k=g*h;d.x=b(l.x,m.x,p.x,n.x,g,h,k);d.y=b(l.y,m.y,p.y,n.y,g,h,k);d.z=b(l.z,m.z,p.z,n.z,g,h,k);return d};this.getControlPointsArray=function(){var a,b,c=this.points.length,d=[];for(a=0;a=b.x+b.y}}(); +THREE.Triangle.prototype={constructor:THREE.Triangle,set:function(a,b,c){this.a.copy(a);this.b.copy(b);this.c.copy(c);return this},setFromPointsAndIndices:function(a,b,c,d){this.a.copy(a[b]);this.b.copy(a[c]);this.c.copy(a[d]);return this},clone:function(){return(new this.constructor).copy(this)},copy:function(a){this.a.copy(a.a);this.b.copy(a.b);this.c.copy(a.c);return this},area:function(){var a=new THREE.Vector3,b=new THREE.Vector3;return function(){a.subVectors(this.c,this.b);b.subVectors(this.a, +this.b);return.5*a.cross(b).length()}}(),midpoint:function(a){return(a||new THREE.Vector3).addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)},normal:function(a){return THREE.Triangle.normal(this.a,this.b,this.c,a)},plane:function(a){return(a||new THREE.Plane).setFromCoplanarPoints(this.a,this.b,this.c)},barycoordFromPoint:function(a,b){return THREE.Triangle.barycoordFromPoint(a,this.a,this.b,this.c,b)},containsPoint:function(a){return THREE.Triangle.containsPoint(a,this.a,this.b,this.c)}, +closestPointToPoint:function(){var a,b,c,d;return function(e,f){void 0===a&&(a=new THREE.Plane,b=[new THREE.Line3,new THREE.Line3,new THREE.Line3],c=new THREE.Vector3,d=new THREE.Vector3);var g=f||new THREE.Vector3,h=Infinity;a.setFromCoplanarPoints(this.a,this.b,this.c);a.projectPoint(e,c);if(!0===this.containsPoint(c))g.copy(c);else{b[0].set(this.a,this.b);b[1].set(this.b,this.c);b[2].set(this.c,this.a);for(var k=0;k=e)break a;else{f=b[1];a=e)break b}d= +c;c=0}}for(;c>>1,ad;d++)if(e[d]===e[(d+1)%3]){a.push(f);break}for(f=a.length-1;0<=f;f--)for(e=a[f],this.faces.splice(e, +1),c=0,g=this.faceVertexUvs.length;cb||0===c)return;this._startTime=null;b*=c}b*=this._updateTimeScale(a);c=this._updateTime(b);a=this._updateWeight(a);if(0c.parameterPositions[1]&&(this.stopFading(),0===d&&(this.enabled=!1))}}return this._effectiveWeight=b},_updateTimeScale:function(a){var b=0;if(!this.paused){var b=this.timeScale,c=this._timeScaleInterpolant;if(null!==c){var d=c.evaluate(a)[0],b=b*d;a>c.parameterPositions[1]&&(this.stopWarping(),0===b?this.paused=!0: +this.timeScale=b)}}return this._effectiveTimeScale=b},_updateTime:function(a){var b=this.time+a;if(0===a)return b;var c=this._clip.duration,d=this.loop,e=this._loopCount;if(d===THREE.LoopOnce)a:{if(-1===e&&(this.loopCount=0,this._setEndings(!0,!0,!1)),b>=c)b=c;else if(0>b)b=0;else break a;this.clampWhenFinished?this.paused=!0:this.enabled=!1;this._mixer.dispatchEvent({type:"finished",action:this,direction:0>a?-1:1})}else{d=d===THREE.LoopPingPong;-1===e&&(0<=a?(e=0,this._setEndings(!0,0===this.repetitions, +d)):this._setEndings(0===this.repetitions,!0,d));if(b>=c||0>b){var f=Math.floor(b/c),b=b-c*f,e=e+Math.abs(f),g=this.repetitions-e;0>g?(this.clampWhenFinished?this.paused=!0:this.enabled=!1,b=0a,this._setEndings(a,!a,d)):this._setEndings(!1,!1,d),this._loopCount=e,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:f}))}if(d&&1===(e&1))return this.time=b,c-b}return this.time=b},_setEndings:function(a, +b,c){var d=this._interpolantSettings;c?(d.endingStart=THREE.ZeroSlopeEnding,d.endingEnd=THREE.ZeroSlopeEnding):(d.endingStart=a?this.zeroSlopeAtStart?THREE.ZeroSlopeEnding:THREE.ZeroCurvatureEnding:THREE.WrapAroundEnding,d.endingEnd=b?this.zeroSlopeAtEnd?THREE.ZeroSlopeEnding:THREE.ZeroCurvatureEnding:THREE.WrapAroundEnding)},_scheduleFading:function(a,b,c){var d=this._mixer,e=d.time,f=this._weightInterpolant;null===f&&(this._weightInterpolant=f=d._lendControlInterpolant());d=f.parameterPositions; +f=f.sampleValues;d[0]=e;f[0]=b;d[1]=e+a;f[1]=c;return this}};THREE.AnimationClip=function(a,b,c){this.name=a;this.tracks=c;this.duration=void 0!==b?b:-1;this.uuid=THREE.Math.generateUUID();0>this.duration&&this.resetDuration();this.trim();this.optimize()}; +THREE.AnimationClip.prototype={constructor:THREE.AnimationClip,resetDuration:function(){for(var a=0,b=0,c=this.tracks.length;b!==c;++b)var d=this.tracks[b],a=Math.max(a,d.times[d.times.length-1]);this.duration=a},trim:function(){for(var a=0;a=c){var p=c++,n=b[p];d[n.uuid]= +m;b[m]=n;d[l]=p;b[p]=k;k=0;for(l=f;k!==l;++k){var n=e[k],q=n[m];n[m]=n[p];n[p]=q}}}this.nCachedObjects_=c},uncache:function(a){for(var b=this._objects,c=b.length,d=this.nCachedObjects_,e=this._indicesByUUID,f=this._bindings,g=f.length,h=0,k=arguments.length;h!==k;++h){var l=arguments[h].uuid,m=e[l];if(void 0!==m)if(delete e[l],mb;)--f;++f;if(0!==e||f!==d)e>=f&&(f=Math.max(f,1),e=f-1),d=this.getValueSize(),this.times=THREE.AnimationUtils.arraySlice(c,e,f),this.values=THREE.AnimationUtils.arraySlice(this.values,e*d,f*d);return this},validate:function(){var a=!0,b=this.getValueSize();0!==b-Math.floor(b)&&(console.error("invalid value size in track", +this),a=!1);var c=this.times,b=this.values,d=c.length;0===d&&(console.error("track is empty",this),a=!1);for(var e=null,f=0;f!==d;f++){var g=c[f];if("number"===typeof g&&isNaN(g)){console.error("time is not a valid number",this,f,g);a=!1;break}if(null!==e&&e>g){console.error("out of order keys",this,f,g,e);a=!1;break}e=g}if(void 0!==b&&THREE.AnimationUtils.isTypedArray(b))for(f=0,c=b.length;f!==c;++f)if(d=b[f],isNaN(d)){console.error("value is not a valid number",this,f,d);a=!1;break}return a},optimize:function(){for(var a= +this.times,b=this.values,c=this.getValueSize(),d=1,e=1,f=a.length-1;e<=f;++e){var g=!1,h=a[e];if(h!==a[e+1]&&(1!==e||h!==h[0]))for(var k=e*c,l=k-c,m=k+c,h=0;h!==c;++h){var p=b[k+h];if(p!==b[l+h]||p!==b[m+h]){g=!0;break}}if(g){if(e!==d)for(a[d]=a[e],g=e*c,k=d*c,h=0;h!==c;++h)b[k+h]=b[g+h];++d}}d!==a.length&&(this.times=THREE.AnimationUtils.arraySlice(a,0,d),this.values=THREE.AnimationUtils.arraySlice(b,0,d*c));return this}}; +Object.assign(THREE.KeyframeTrack,{parse:function(a){if(void 0===a.type)throw Error("track type undefined, can not parse");var b=THREE.KeyframeTrack._getTrackTypeForValueTypeName(a.type);if(void 0===a.times){var c=[],d=[];THREE.AnimationUtils.flattenJSON(a.keys,c,d,"value");a.times=c;a.values=d}return void 0!==b.parse?b.parse(a):new b(a.name,a.times,a.values,a.interpolation)},toJSON:function(a){var b=a.constructor;if(void 0!==b.toJSON)b=b.toJSON(a);else{var b={name:a.name,times:THREE.AnimationUtils.convertArray(a.times, +Array),values:THREE.AnimationUtils.convertArray(a.values,Array)},c=a.getInterpolation();c!==a.DefaultInterpolation&&(b.interpolation=c)}b.type=a.ValueTypeName;return b},_getTrackTypeForValueTypeName:function(a){switch(a.toLowerCase()){case "scalar":case "double":case "float":case "number":case "integer":return THREE.NumberKeyframeTrack;case "vector":case "vector2":case "vector3":case "vector4":return THREE.VectorKeyframeTrack;case "color":return THREE.ColorKeyframeTrack;case "quaternion":return THREE.QuaternionKeyframeTrack; +case "bool":case "boolean":return THREE.BooleanKeyframeTrack;case "string":return THREE.StringKeyframeTrack}throw Error("Unsupported typeName: "+a);}});THREE.PropertyBinding=function(a,b,c){this.path=b;this.parsedPath=c||THREE.PropertyBinding.parseTrackName(b);this.node=THREE.PropertyBinding.findNode(a,this.parsedPath.nodeName)||a;this.rootNode=a}; +THREE.PropertyBinding.prototype={constructor:THREE.PropertyBinding,getValue:function(a,b){this.bind();this.getValue(a,b)},setValue:function(a,b){this.bind();this.setValue(a,b)},bind:function(){var a=this.node,b=this.parsedPath,c=b.objectName,d=b.propertyName,e=b.propertyIndex;a||(this.node=a=THREE.PropertyBinding.findNode(this.rootNode,b.nodeName)||this.rootNode);this.getValue=this._getValue_unavailable;this.setValue=this._setValue_unavailable;if(a){if(c){var f=b.objectIndex;switch(c){case "materials":if(!a.material){console.error(" can not bind to material as node does not have a material", +this);return}if(!a.material.materials){console.error(" can not bind to material.materials as node.material does not have a materials array",this);return}a=a.material.materials;break;case "bones":if(!a.skeleton){console.error(" can not bind to bones as node does not have a skeleton",this);return}a=a.skeleton.bones;for(c=0;cd&&this._mixBufferRegion(c,a,3*b,1-d,b);for(var d=b,f=b+b;d!==f;++d)if(c[d]!==c[d+b]){e.setValue(c,a); +break}},saveOriginalState:function(){var a=this.buffer,b=this.valueSize,c=3*b;this.binding.getValue(a,c);for(var d=b;d!==c;++d)a[d]=a[c+d%b];this.cumulativeWeight=0},restoreOriginalState:function(){this.binding.setValue(this.buffer,3*this.valueSize)},_select:function(a,b,c,d,e){if(.5<=d)for(d=0;d!==e;++d)a[b+d]=a[c+d]},_slerp:function(a,b,c,d,e){THREE.Quaternion.slerpFlat(a,b,a,b,a,c,d)},_lerp:function(a,b,c,d,e){for(var f=1-d,g=0;g!==e;++g){var h=b+g;a[h]=a[h]*f+a[c+g]*d}}}; +THREE.BooleanKeyframeTrack=function(a,b,c){THREE.KeyframeTrack.call(this,a,b,c)};THREE.BooleanKeyframeTrack.prototype=Object.assign(Object.create(THREE.KeyframeTrack.prototype),{constructor:THREE.BooleanKeyframeTrack,ValueTypeName:"bool",ValueBufferType:Array,DefaultInterpolation:THREE.InterpolateDiscrete,InterpolantFactoryMethodLinear:void 0,InterpolantFactoryMethodSmooth:void 0});THREE.ColorKeyframeTrack=function(a,b,c,d){THREE.KeyframeTrack.call(this,a,b,c,d)}; +THREE.ColorKeyframeTrack.prototype=Object.assign(Object.create(THREE.KeyframeTrack.prototype),{constructor:THREE.ColorKeyframeTrack,ValueTypeName:"color"});THREE.NumberKeyframeTrack=function(a,b,c,d){THREE.KeyframeTrack.call(this,a,b,c,d)};THREE.NumberKeyframeTrack.prototype=Object.assign(Object.create(THREE.KeyframeTrack.prototype),{constructor:THREE.NumberKeyframeTrack,ValueTypeName:"number"});THREE.QuaternionKeyframeTrack=function(a,b,c,d){THREE.KeyframeTrack.call(this,a,b,c,d)}; +THREE.QuaternionKeyframeTrack.prototype=Object.assign(Object.create(THREE.KeyframeTrack.prototype),{constructor:THREE.QuaternionKeyframeTrack,ValueTypeName:"quaternion",DefaultInterpolation:THREE.InterpolateLinear,InterpolantFactoryMethodLinear:function(a){return new THREE.QuaternionLinearInterpolant(this.times,this.values,this.getValueSize(),a)},InterpolantFactoryMethodSmooth:void 0});THREE.StringKeyframeTrack=function(a,b,c,d){THREE.KeyframeTrack.call(this,a,b,c,d)}; +THREE.StringKeyframeTrack.prototype=Object.assign(Object.create(THREE.KeyframeTrack.prototype),{constructor:THREE.StringKeyframeTrack,ValueTypeName:"string",ValueBufferType:Array,DefaultInterpolation:THREE.InterpolateDiscrete,InterpolantFactoryMethodLinear:void 0,InterpolantFactoryMethodSmooth:void 0});THREE.VectorKeyframeTrack=function(a,b,c,d){THREE.KeyframeTrack.call(this,a,b,c,d)}; +THREE.VectorKeyframeTrack.prototype=Object.assign(Object.create(THREE.KeyframeTrack.prototype),{constructor:THREE.VectorKeyframeTrack,ValueTypeName:"vector"}); +THREE.Audio=function(a){THREE.Object3D.call(this);this.type="Audio";this.context=a.context;this.source=this.context.createBufferSource();this.source.onended=this.onEnded.bind(this);this.gain=this.context.createGain();this.gain.connect(a.getInput());this.autoplay=!1;this.startTime=0;this.playbackRate=1;this.isPlaying=!1;this.hasPlaybackControl=!0;this.sourceType="empty";this.filters=[]}; +THREE.Audio.prototype=Object.assign(Object.create(THREE.Object3D.prototype),{constructor:THREE.Audio,getOutput:function(){return this.gain},setNodeSource:function(a){this.hasPlaybackControl=!1;this.sourceType="audioNode";this.source=a;this.connect();return this},setBuffer:function(a){this.source.buffer=a;this.sourceType="buffer";this.autoplay&&this.play();return this},play:function(){if(!0===this.isPlaying)console.warn("THREE.Audio: Audio is already playing.");else if(!1===this.hasPlaybackControl)console.warn("THREE.Audio: this Audio has no playback control."); +else{var a=this.context.createBufferSource();a.buffer=this.source.buffer;a.loop=this.source.loop;a.onended=this.source.onended;a.start(0,this.startTime);a.playbackRate.value=this.playbackRate;this.isPlaying=!0;this.source=a;return this.connect()}},pause:function(){if(!1===this.hasPlaybackControl)console.warn("THREE.Audio: this Audio has no playback control.");else return this.source.stop(),this.startTime=this.context.currentTime,this.isPlaying=!1,this},stop:function(){if(!1===this.hasPlaybackControl)console.warn("THREE.Audio: this Audio has no playback control."); +else return this.source.stop(),this.startTime=0,this.isPlaying=!1,this},connect:function(){if(0k.opacity&&(k.transparent=!0);c.setTextures(h); +return c.parse(k)}}()};THREE.Loader.Handlers={handlers:[],add:function(a,b){this.handlers.push(a,b)},get:function(a){for(var b=this.handlers,c=0,d=b.length;cg;g++)n=u[k++],t=v[2*n],n=v[2*n+1],t=new THREE.Vector2(t,n),2!==g&&c.faceVertexUvs[d][h].push(t), +0!==g&&c.faceVertexUvs[d][h+1].push(t);p&&(p=3*u[k++],q.normal.set(D[p++],D[p++],D[p]),s.normal.copy(q.normal));if(r)for(d=0;4>d;d++)p=3*u[k++],r=new THREE.Vector3(D[p++],D[p++],D[p]),2!==d&&q.vertexNormals.push(r),0!==d&&s.vertexNormals.push(r);m&&(m=u[k++],m=w[m],q.color.setHex(m),s.color.setHex(m));if(b)for(d=0;4>d;d++)m=u[k++],m=w[m],2!==d&&q.vertexColors.push(new THREE.Color(m)),0!==d&&s.vertexColors.push(new THREE.Color(m));c.faces.push(q);c.faces.push(s)}else{q=new THREE.Face3;q.a=u[k++];q.b= +u[k++];q.c=u[k++];h&&(h=u[k++],q.materialIndex=h);h=c.faces.length;if(d)for(d=0;dg;g++)n=u[k++],t=v[2*n],n=v[2*n+1],t=new THREE.Vector2(t,n),c.faceVertexUvs[d][h].push(t);p&&(p=3*u[k++],q.normal.set(D[p++],D[p++],D[p]));if(r)for(d=0;3>d;d++)p=3*u[k++],r=new THREE.Vector3(D[p++],D[p++],D[p]),q.vertexNormals.push(r);m&&(m=u[k++],q.color.setHex(w[m]));if(b)for(d=0;3>d;d++)m=u[k++],q.vertexColors.push(new THREE.Color(w[m]));c.faces.push(q)}})(d);(function(){var b= +void 0!==a.influencesPerVertex?a.influencesPerVertex:2;if(a.skinWeights)for(var d=0,g=a.skinWeights.length;dthis.opacity&&(d.opacity=this.opacity);!0===this.transparent&&(d.transparent=this.transparent);0a.x||1a.x?0:1;break;case THREE.MirroredRepeatWrapping:1===Math.abs(Math.floor(a.x)%2)?a.x=Math.ceil(a.x)-a.x:a.x-=Math.floor(a.x)}if(0>a.y||1a.y?0:1;break;case THREE.MirroredRepeatWrapping:1=== +Math.abs(Math.floor(a.y)%2)?a.y=Math.ceil(a.y)-a.y:a.y-=Math.floor(a.y)}this.flipY&&(a.y=1-a.y)}}};Object.assign(THREE.Texture.prototype,THREE.EventDispatcher.prototype);THREE.TextureIdCount=0; +THREE.DepthTexture=function(a,b,c,d,e,f,g,h,k){THREE.Texture.call(this,null,d,e,f,g,h,THREE.DepthFormat,c,k);this.image={width:a,height:b};this.type=void 0!==c?c:THREE.UnsignedShortType;this.magFilter=void 0!==g?g:THREE.NearestFilter;this.minFilter=void 0!==h?h:THREE.NearestFilter;this.generateMipmaps=this.flipY=!1};THREE.DepthTexture.prototype=Object.create(THREE.Texture.prototype);THREE.DepthTexture.prototype.constructor=THREE.DepthTexture; +THREE.CanvasTexture=function(a,b,c,d,e,f,g,h,k){THREE.Texture.call(this,a,b,c,d,e,f,g,h,k);this.needsUpdate=!0};THREE.CanvasTexture.prototype=Object.create(THREE.Texture.prototype);THREE.CanvasTexture.prototype.constructor=THREE.CanvasTexture;THREE.CubeTexture=function(a,b,c,d,e,f,g,h,k,l){a=void 0!==a?a:[];b=void 0!==b?b:THREE.CubeReflectionMapping;THREE.Texture.call(this,a,b,c,d,e,f,g,h,k,l);this.flipY=!1};THREE.CubeTexture.prototype=Object.create(THREE.Texture.prototype); +THREE.CubeTexture.prototype.constructor=THREE.CubeTexture;Object.defineProperty(THREE.CubeTexture.prototype,"images",{get:function(){return this.image},set:function(a){this.image=a}});THREE.CompressedTexture=function(a,b,c,d,e,f,g,h,k,l,m,p){THREE.Texture.call(this,null,f,g,h,k,l,d,e,m,p);this.image={width:b,height:c};this.mipmaps=a;this.generateMipmaps=this.flipY=!1};THREE.CompressedTexture.prototype=Object.create(THREE.Texture.prototype);THREE.CompressedTexture.prototype.constructor=THREE.CompressedTexture; +THREE.DataTexture=function(a,b,c,d,e,f,g,h,k,l,m,p){THREE.Texture.call(this,null,f,g,h,k,l,d,e,m,p);this.image={data:a,width:b,height:c};this.magFilter=void 0!==k?k:THREE.NearestFilter;this.minFilter=void 0!==l?l:THREE.NearestFilter;this.generateMipmaps=this.flipY=!1};THREE.DataTexture.prototype=Object.create(THREE.Texture.prototype);THREE.DataTexture.prototype.constructor=THREE.DataTexture; +THREE.VideoTexture=function(a,b,c,d,e,f,g,h,k){function l(){requestAnimationFrame(l);a.readyState>=a.HAVE_CURRENT_DATA&&(m.needsUpdate=!0)}THREE.Texture.call(this,a,b,c,d,e,f,g,h,k);this.generateMipmaps=!1;var m=this;l()};THREE.VideoTexture.prototype=Object.create(THREE.Texture.prototype);THREE.VideoTexture.prototype.constructor=THREE.VideoTexture;THREE.Group=function(){THREE.Object3D.call(this);this.type="Group"};THREE.Group.prototype=Object.assign(Object.create(THREE.Object3D.prototype),{constructor:THREE.Group}); +THREE.Points=function(a,b){THREE.Object3D.call(this);this.type="Points";this.geometry=void 0!==a?a:new THREE.BufferGeometry;this.material=void 0!==b?b:new THREE.PointsMaterial({color:16777215*Math.random()})}; +THREE.Points.prototype=Object.assign(Object.create(THREE.Object3D.prototype),{constructor:THREE.Points,raycast:function(){var a=new THREE.Matrix4,b=new THREE.Ray,c=new THREE.Sphere;return function(d,e){function f(a,c){var f=b.distanceSqToPoint(a);if(fd.far||e.push({distance:l,distanceToRay:Math.sqrt(f),point:h.clone(),index:c,face:null,object:g})}}var g=this,h=this.geometry,k=this.matrixWorld,l=d.params.Points.threshold; +null===h.boundingSphere&&h.computeBoundingSphere();c.copy(h.boundingSphere);c.applyMatrix4(k);if(!1!==d.ray.intersectsSphere(c)){a.getInverse(k);b.copy(d.ray).applyMatrix4(a);var l=l/((this.scale.x+this.scale.y+this.scale.z)/3),m=l*l,l=new THREE.Vector3;if(h instanceof THREE.BufferGeometry){var p=h.index,h=h.attributes.position.array;if(null!==p)for(var n=p.array,p=0,q=n.length;pf||(m.applyMatrix4(this.matrixWorld),s=d.ray.origin.distanceTo(m),sd.far||e.push({distance:s,point:h.clone().applyMatrix4(this.matrixWorld),index:g,face:null,faceIndex:null,object:this}))}else for(g=0,r= +q.length/3-1;gf||(m.applyMatrix4(this.matrixWorld),s=d.ray.origin.distanceTo(m),sd.far||e.push({distance:s,point:h.clone().applyMatrix4(this.matrixWorld),index:g,face:null,faceIndex:null,object:this}))}else if(g instanceof THREE.Geometry)for(k=g.vertices,l=k.length,g=0;gf||(m.applyMatrix4(this.matrixWorld),s=d.ray.origin.distanceTo(m),sd.far|| +e.push({distance:s,point:h.clone().applyMatrix4(this.matrixWorld),index:g,face:null,faceIndex:null,object:this}))}}}(),clone:function(){return(new this.constructor(this.geometry,this.material)).copy(this)}});THREE.LineSegments=function(a,b){THREE.Line.call(this,a,b);this.type="LineSegments"};THREE.LineSegments.prototype=Object.assign(Object.create(THREE.Line.prototype),{constructor:THREE.LineSegments}); +THREE.Mesh=function(a,b){THREE.Object3D.call(this);this.type="Mesh";this.geometry=void 0!==a?a:new THREE.BufferGeometry;this.material=void 0!==b?b:new THREE.MeshBasicMaterial({color:16777215*Math.random()});this.drawMode=THREE.TrianglesDrawMode;this.updateMorphTargets()}; +THREE.Mesh.prototype=Object.assign(Object.create(THREE.Object3D.prototype),{constructor:THREE.Mesh,setDrawMode:function(a){this.drawMode=a},copy:function(a){THREE.Object3D.prototype.copy.call(this,a);this.drawMode=a.drawMode;return this},updateMorphTargets:function(){if(void 0!==this.geometry.morphTargets&&0b.far?null:{distance:c,point:t.clone(),object:a}}function c(c,d,e,f,l,p,m,s){g.fromArray(f,3*p);h.fromArray(f,3*m);k.fromArray(f,3*s);if(c=b(c,d,e,g,h,k,v))l&&(n.fromArray(l,2*p),q.fromArray(l,2*m),r.fromArray(l,2*s),c.uv=a(v,g,h,k,n,q,r)),c.face=new THREE.Face3(p, +m,s,THREE.Triangle.normal(g,h,k)),c.faceIndex=p;return c}var d=new THREE.Matrix4,e=new THREE.Ray,f=new THREE.Sphere,g=new THREE.Vector3,h=new THREE.Vector3,k=new THREE.Vector3,l=new THREE.Vector3,m=new THREE.Vector3,p=new THREE.Vector3,n=new THREE.Vector2,q=new THREE.Vector2,r=new THREE.Vector2,s=new THREE.Vector3,v=new THREE.Vector3,t=new THREE.Vector3;return function(u,s){var w=this.geometry,t=this.material,z=this.matrixWorld;if(void 0!==t&&(null===w.boundingSphere&&w.computeBoundingSphere(),f.copy(w.boundingSphere), +f.applyMatrix4(z),!1!==u.ray.intersectsSphere(f)&&(d.getInverse(z),e.copy(u.ray).applyMatrix4(d),null===w.boundingBox||!1!==e.intersectsBox(w.boundingBox)))){var y,A;if(w instanceof THREE.BufferGeometry){var G,B,t=w.index,z=w.attributes,w=z.position.array;void 0!==z.uv&&(y=z.uv.array);if(null!==t)for(var z=t.array,F=0,J=z.length;F= +d[e].distance)d[e-1].object.visible=!1,d[e].object.visible=!0;else break;for(;ethis.scale.x*this.scale.y/4||c.push({distance:Math.sqrt(d),point:this.position,face:null,object:this})}}(),clone:function(){return(new this.constructor(this.material)).copy(this)}}); +THREE.LensFlare=function(a,b,c,d,e){THREE.Object3D.call(this);this.lensFlares=[];this.positionScreen=new THREE.Vector3;this.customUpdateCallback=void 0;void 0!==a&&this.add(a,b,c,d,e)}; +THREE.LensFlare.prototype=Object.assign(Object.create(THREE.Object3D.prototype),{constructor:THREE.LensFlare,copy:function(a){THREE.Object3D.prototype.copy.call(this,a);this.positionScreen.copy(a.positionScreen);this.customUpdateCallback=a.customUpdateCallback;for(var b=0,c=a.lensFlares.length;b=ca.maxTextures&&console.warn("WebGLRenderer: trying to use "+a+" texture units while this GPU supports only "+ca.maxTextures); +ga+=1;return a};this.setTexture2D=function(){var a=!1;return function(b,c){b instanceof THREE.WebGLRenderTarget&&(a||(console.warn("THREE.WebGLRenderer.setTexture2D: don't use render targets as textures. Use their .texture property instead."),a=!0),b=b.texture);la.setTexture2D(b,c)}}();this.setTexture=function(){var a=!1;return function(b,c){a||(console.warn("THREE.WebGLRenderer: .setTexture is deprecated, use setTexture2D instead."),a=!0);la.setTexture2D(b,c)}}();this.setTextureCube=function(){var a= +!1;return function(b,c){b instanceof THREE.WebGLRenderTargetCube&&(a||(console.warn("THREE.WebGLRenderer.setTextureCube: don't use cube render targets as textures. Use their .texture property instead."),a=!0),b=b.texture);b instanceof THREE.CubeTexture||Array.isArray(b.image)&&6===b.image.length?la.setTextureCube(b,c):la.setTextureCubeDynamic(b,c)}}();this.getCurrentRenderTarget=function(){return C};this.setRenderTarget=function(a){(C=a)&&void 0===Y.get(a).__webglFramebuffer&&la.setupRenderTarget(a); +var b=a instanceof THREE.WebGLRenderTargetCube,c;a?(c=Y.get(a),c=b?c.__webglFramebuffer[a.activeCubeFace]:c.__webglFramebuffer,X.copy(a.scissor),ea=a.scissorTest,fa.copy(a.viewport)):(c=null,X.copy(ua).multiplyScalar(Z),ea=xa,fa.copy(na).multiplyScalar(Z));L!==c&&(x.bindFramebuffer(x.FRAMEBUFFER,c),L=c);R.scissor(X);R.setScissorTest(ea);R.viewport(fa);b&&(b=Y.get(a.texture),x.framebufferTexture2D(x.FRAMEBUFFER,x.COLOR_ATTACHMENT0,x.TEXTURE_CUBE_MAP_POSITIVE_X+a.activeCubeFace,b.__webglTexture,a.activeMipMapLevel))}; +this.readRenderTargetPixels=function(a,b,c,d,e,g){if(!1===a instanceof THREE.WebGLRenderTarget)console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");else{var f=Y.get(a).__webglFramebuffer;if(f){var h=!1;f!==L&&(x.bindFramebuffer(x.FRAMEBUFFER,f),h=!0);try{var k=a.texture;k.format!==THREE.RGBAFormat&&t(k.format)!==x.getParameter(x.IMPLEMENTATION_COLOR_READ_FORMAT)?console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format."): +k.type===THREE.UnsignedByteType||t(k.type)===x.getParameter(x.IMPLEMENTATION_COLOR_READ_TYPE)||k.type===THREE.FloatType&&U.get("WEBGL_color_buffer_float")||k.type===THREE.HalfFloatType&&U.get("EXT_color_buffer_half_float")?x.checkFramebufferStatus(x.FRAMEBUFFER)===x.FRAMEBUFFER_COMPLETE?0<=b&&b<=a.width-d&&0<=c&&c<=a.height-e&&x.readPixels(b,c,d,e,t(k.format),t(k.type),g):console.error("THREE.WebGLRenderer.readRenderTargetPixels: readPixels from renderTarget failed. Framebuffer not complete."):console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.")}finally{h&& +x.bindFramebuffer(x.FRAMEBUFFER,L)}}}}}; +THREE.WebGLRenderTarget=function(a,b,c){this.uuid=THREE.Math.generateUUID();this.width=a;this.height=b;this.scissor=new THREE.Vector4(0,0,a,b);this.scissorTest=!1;this.viewport=new THREE.Vector4(0,0,a,b);c=c||{};void 0===c.minFilter&&(c.minFilter=THREE.LinearFilter);this.texture=new THREE.Texture(void 0,void 0,c.wrapS,c.wrapT,c.magFilter,c.minFilter,c.format,c.type,c.anisotropy,c.encoding);this.depthBuffer=void 0!==c.depthBuffer?c.depthBuffer:!0;this.stencilBuffer=void 0!==c.stencilBuffer?c.stencilBuffer: +!0;this.depthTexture=null}; +Object.assign(THREE.WebGLRenderTarget.prototype,THREE.EventDispatcher.prototype,{setSize:function(a,b){if(this.width!==a||this.height!==b)this.width=a,this.height=b,this.dispose();this.viewport.set(0,0,a,b);this.scissor.set(0,0,a,b)},clone:function(){return(new this.constructor).copy(this)},copy:function(a){this.width=a.width;this.height=a.height;this.viewport.copy(a.viewport);this.texture=a.texture.clone();this.depthBuffer=a.depthBuffer;this.stencilBuffer=a.stencilBuffer;this.depthTexture=a.depthTexture; +return this},dispose:function(){this.dispatchEvent({type:"dispose"})}});THREE.WebGLRenderTargetCube=function(a,b,c){THREE.WebGLRenderTarget.call(this,a,b,c);this.activeMipMapLevel=this.activeCubeFace=0};THREE.WebGLRenderTargetCube.prototype=Object.create(THREE.WebGLRenderTarget.prototype);THREE.WebGLRenderTargetCube.prototype.constructor=THREE.WebGLRenderTargetCube; +THREE.WebGLBufferRenderer=function(a,b,c){var d;this.setMode=function(a){d=a};this.render=function(b,f){a.drawArrays(d,b,f);c.calls++;c.vertices+=f;d===a.TRIANGLES&&(c.faces+=f/3)};this.renderInstances=function(e){var f=b.get("ANGLE_instanced_arrays");if(null===f)console.error("THREE.WebGLBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");else{var g=e.attributes.position,h=0,h=g instanceof THREE.InterleavedBufferAttribute?g.data.count: +g.count;f.drawArraysInstancedANGLE(d,0,h,e.maxInstancedCount);c.calls++;c.vertices+=h*e.maxInstancedCount;d===a.TRIANGLES&&(c.faces+=e.maxInstancedCount*h/3)}}}; +THREE.WebGLClipping=function(){function a(){l.value!==d&&(l.value=d,l.needsUpdate=0c){var d=b;b=c;c=d}d=a[b];return void 0===d?(a[b]=[c],!0):-1===d.indexOf(c)?(d.push(c),!0):!1}var f=new THREE.WebGLGeometries(a,b,c);this.getAttributeBuffer=function(a){return a instanceof THREE.InterleavedBufferAttribute?b.get(a.data).__webglBuffer:b.get(a).__webglBuffer};this.getWireframeAttribute= +function(c){var f=b.get(c);if(void 0!==f.wireframe)return f.wireframe;var k=[],l=c.index,m=c.attributes;c=m.position;if(null!==l)for(var m={},l=l.array,p=0,n=l.length;p/g,function(a,b){var c=THREE.ShaderChunk[b];if(void 0===c)throw Error("Can not resolve #include <"+ +b+">");return k(c)})}function l(a){return a.replace(/for \( int i \= (\d+)\; i < (\d+)\; i \+\+ \) \{([\s\S]+?)(?=\})\}/g,function(a,b,c,d){a="";for(b=parseInt(b);bb||a.height>b){var c=b/Math.max(a.width,a.height),d=document.createElementNS("http://www.w3.org/1999/xhtml","canvas");d.width=Math.floor(a.width*c);d.height=Math.floor(a.height*c);d.getContext("2d").drawImage(a,0,0,a.width,a.height,0,0,d.width,d.height);console.warn("THREE.WebGLRenderer: image is too big ("+a.width+"x"+a.height+"). Resized to "+d.width+"x"+d.height,a);return d}return a}function k(a){return THREE.Math.isPowerOfTwo(a.width)&&THREE.Math.isPowerOfTwo(a.height)} +function l(b){return b===THREE.NearestFilter||b===THREE.NearestMipMapNearestFilter||b===THREE.NearestMipMapLinearFilter?a.NEAREST:a.LINEAR}function m(b){b=b.target;b.removeEventListener("dispose",m);a:{var c=d.get(b);if(b.image&&c.__image__webglTextureCube)a.deleteTexture(c.__image__webglTextureCube);else{if(void 0===c.__webglInit)break a;a.deleteTexture(c.__webglTexture)}d.delete(b)}v.textures--}function p(b){b=b.target;b.removeEventListener("dispose",p);var c=d.get(b),e=d.get(b.texture);if(b){void 0!== +e.__webglTexture&&a.deleteTexture(e.__webglTexture);b.depthTexture&&b.depthTexture.dispose();if(b instanceof THREE.WebGLRenderTargetCube)for(e=0;6>e;e++)a.deleteFramebuffer(c.__webglFramebuffer[e]),c.__webglDepthbuffer&&a.deleteRenderbuffer(c.__webglDepthbuffer[e]);else a.deleteFramebuffer(c.__webglFramebuffer),c.__webglDepthbuffer&&a.deleteRenderbuffer(c.__webglDepthbuffer);d.delete(b.texture);d.delete(b)}v.textures--}function n(b,g){var l=d.get(b);if(0s;s++)r[s]= +n||p?p?b.image[s].image:b.image[s]:h(b.image[s],e.maxCubemapSize);var t=k(r[0]),B=f(b.format),F=f(b.type);q(a.TEXTURE_CUBE_MAP,b,t);for(s=0;6>s;s++)if(n)for(var J,P=r[s].mipmaps,K=0,H=P.length;Kl;l++)e.__webglFramebuffer[l]=a.createFramebuffer()}else e.__webglFramebuffer=a.createFramebuffer();if(g){c.bindTexture(a.TEXTURE_CUBE_MAP,f.__webglTexture);q(a.TEXTURE_CUBE_MAP,b.texture,h);for(l= +0;6>l;l++)r(e.__webglFramebuffer[l],b,a.COLOR_ATTACHMENT0,a.TEXTURE_CUBE_MAP_POSITIVE_X+l);b.texture.generateMipmaps&&h&&a.generateMipmap(a.TEXTURE_CUBE_MAP);c.bindTexture(a.TEXTURE_CUBE_MAP,null)}else c.bindTexture(a.TEXTURE_2D,f.__webglTexture),q(a.TEXTURE_2D,b.texture,h),r(e.__webglFramebuffer,b,a.COLOR_ATTACHMENT0,a.TEXTURE_2D),b.texture.generateMipmaps&&h&&a.generateMipmap(a.TEXTURE_2D),c.bindTexture(a.TEXTURE_2D,null);if(b.depthBuffer){e=d.get(b);f=b instanceof THREE.WebGLRenderTargetCube;if(b.depthTexture){if(f)throw Error("target.depthTexture not supported in Cube render targets"); +if(b instanceof THREE.WebGLRenderTargetCube)throw Error("Depth Texture with cube render targets is not supported!");a.bindFramebuffer(a.FRAMEBUFFER,e.__webglFramebuffer);if(!(b.depthTexture instanceof THREE.DepthTexture))throw Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture");d.get(b.depthTexture).__webglTexture&&b.depthTexture.image.width===b.width&&b.depthTexture.image.height===b.height||(b.depthTexture.image.width=b.width,b.depthTexture.image.height=b.height,b.depthTexture.needsUpdate= +!0);n(b.depthTexture,0);b=d.get(b.depthTexture).__webglTexture;a.framebufferTexture2D(a.FRAMEBUFFER,a.DEPTH_ATTACHMENT,a.TEXTURE_2D,b,0)}else if(f)for(e.__webglDepthbuffer=[],f=0;6>f;f++)a.bindFramebuffer(a.FRAMEBUFFER,e.__webglFramebuffer[f]),e.__webglDepthbuffer[f]=a.createRenderbuffer(),s(e.__webglDepthbuffer[f],b);else a.bindFramebuffer(a.FRAMEBUFFER,e.__webglFramebuffer),e.__webglDepthbuffer=a.createRenderbuffer(),s(e.__webglDepthbuffer,b);a.bindFramebuffer(a.FRAMEBUFFER,null)}};this.updateRenderTargetMipmap= +function(b){var e=b.texture;e.generateMipmaps&&k(b)&&e.minFilter!==THREE.NearestFilter&&e.minFilter!==THREE.LinearFilter&&(b=b instanceof THREE.WebGLRenderTargetCube?a.TEXTURE_CUBE_MAP:a.TEXTURE_2D,e=d.get(e).__webglTexture,c.bindTexture(b,e),a.generateMipmap(b),c.bindTexture(b,null))}}; +THREE.WebGLUniforms=function(){var a=new THREE.Texture,b=new THREE.CubeTexture,c=[],d=[],e=function(a,b,d){var e=a[0];if(0>=e||0 0 ) {\nfloat depth = gl_FragCoord.z / gl_FragCoord.w;\nfloat fogFactor = 0.0;\nif ( fogType == 1 ) {\nfogFactor = smoothstep( fogNear, fogFar, depth );\n} else {\nconst float LOG2 = 1.442695;\nfogFactor = exp2( - fogDensity * fogDensity * depth * depth * LOG2 );\nfogFactor = 1.0 - clamp( fogFactor, 0.0, 1.0 );\n}\ngl_FragColor = mix( gl_FragColor, vec4( fogColor, gl_FragColor.w ), fogFactor );\n}\n}"].join("\n")); +w.compileShader(M);w.compileShader(O);w.attachShader(H,M);w.attachShader(H,O);w.linkProgram(H);A=H;t=w.getAttribLocation(A,"position");u=w.getAttribLocation(A,"uv");c=w.getUniformLocation(A,"uvOffset");d=w.getUniformLocation(A,"uvScale");e=w.getUniformLocation(A,"rotation");f=w.getUniformLocation(A,"scale");g=w.getUniformLocation(A,"color");h=w.getUniformLocation(A,"map");k=w.getUniformLocation(A,"opacity");l=w.getUniformLocation(A,"modelViewMatrix");m=w.getUniformLocation(A,"projectionMatrix");p= +w.getUniformLocation(A,"fogType");n=w.getUniformLocation(A,"fogDensity");q=w.getUniformLocation(A,"fogNear");r=w.getUniformLocation(A,"fogFar");s=w.getUniformLocation(A,"fogColor");v=w.getUniformLocation(A,"alphaTest");H=document.createElementNS("http://www.w3.org/1999/xhtml","canvas");H.width=8;H.height=8;M=H.getContext("2d");M.fillStyle="white";M.fillRect(0,0,8,8);G=new THREE.Texture(H);G.needsUpdate=!0}w.useProgram(A);I.initAttributes();I.enableAttribute(t);I.enableAttribute(u);I.disableUnusedAttributes(); +I.disable(w.CULL_FACE);I.enable(w.BLEND);w.bindBuffer(w.ARRAY_BUFFER,z);w.vertexAttribPointer(t,2,w.FLOAT,!1,16,0);w.vertexAttribPointer(u,2,w.FLOAT,!1,16,8);w.bindBuffer(w.ELEMENT_ARRAY_BUFFER,y);w.uniformMatrix4fv(m,!1,K.projectionMatrix.elements);I.activeTexture(w.TEXTURE0);w.uniform1i(h,0);M=H=0;(O=P.fog)?(w.uniform3f(s,O.color.r,O.color.g,O.color.b),O instanceof THREE.Fog?(w.uniform1f(q,O.near),w.uniform1f(r,O.far),w.uniform1i(p,1),M=H=1):O instanceof THREE.FogExp2&&(w.uniform1f(n,O.density), +w.uniform1i(p,2),M=H=2)):(w.uniform1i(p,0),M=H=0);for(var O=0,N=b.length;Oc)return null;var d=[],e=[],f=[],g,h,k;if(0=l--){console.warn("THREE.ShapeUtils: Unable to triangulate polygon! in triangulate()");break}g=h;c<=g&&(g=0);h=g+1;c<=h&&(h=0);k=h+1;c<=k&&(k=0);var m;a:{var p= +m=void 0,n=void 0,q=void 0,r=void 0,s=void 0,v=void 0,t=void 0,u=void 0,p=a[e[g]].x,n=a[e[g]].y,q=a[e[h]].x,r=a[e[h]].y,s=a[e[k]].x,v=a[e[k]].y;if(Number.EPSILON>(q-p)*(v-n)-(r-n)*(s-p))m=!1;else{var D=void 0,w=void 0,I=void 0,z=void 0,y=void 0,A=void 0,G=void 0,B=void 0,F=void 0,J=void 0,F=B=G=u=t=void 0,D=s-q,w=v-r,I=p-s,z=n-v,y=q-p,A=r-n;for(m=0;m=-Number.EPSILON&& +B>=-Number.EPSILON&&G>=-Number.EPSILON)){m=!1;break a}m=!0}}if(m){d.push([a[e[g]],a[e[h]],a[e[k]]]);f.push([e[g],e[h],e[k]]);g=h;for(k=h+1;kNumber.EPSILON){if(0G||G>p)return[];k=l*m-k*n;if(0>k||k>p)return[]}else{if(0c?[]:k===c?f?[]:[g]:a<=c?[g,h]:[g,l]}function f(a,b,c,d){var e=b.x-a.x,f=b.y-a.y;b=c.x-a.x;c=c.y-a.y;var g=d.x-a.x;d=d.y-a.y;a=e*c-f*b;e=e*d-f*g;return Math.abs(a)>Number.EPSILON?(b=g*c-d*b,0e&&(e=d);var g=a+1;g>d&&(g=0);d=f(h[a],h[e],h[g],k[b]);if(!d)return!1;d=k.length-1;e=b-1;0>e&&(e=d);g=b+1;g>d&&(g=0);return(d=f(k[b],k[e],k[g],h[a]))?!0:!1}function d(a,b){var c,f;for(c=0;cH){console.log("Infinite Loop! Holes left:"+l.length+", Probably Hole outside Shape!");break}for(n=F;nk;k++)m=l[k].x+":"+l[k].y,m=p[m],void 0!==m&&(l[k]=m);return n.concat()},isClockWise:function(a){return 0>THREE.ShapeUtils.area(a)},b2:function(){return function(a,b,c,d){var e= +1-a;return e*e*b+2*(1-a)*a*c+a*a*d}}(),b3:function(){return function(a,b,c,d,e){var f=1-a,g=1-a;return f*f*f*b+3*g*g*a*c+3*(1-a)*a*a*d+a*a*a*e}}()};THREE.Curve=function(){}; +THREE.Curve.prototype={constructor:THREE.Curve,getPoint:function(a){console.warn("THREE.Curve: Warning, getPoint() not implemented!");return null},getPointAt:function(a){a=this.getUtoTmapping(a);return this.getPoint(a)},getPoints:function(a){a||(a=5);for(var b=[],c=0;c<=a;c++)b.push(this.getPoint(c/a));return b},getSpacedPoints:function(a){a||(a=5);for(var b=[],c=0;c<=a;c++)b.push(this.getPointAt(c/a));return b},getLength:function(){var a=this.getLengths();return a[a.length-1]},getLengths:function(a){a|| +(a=this.__arcLengthDivisions?this.__arcLengthDivisions:200);if(this.cacheArcLengths&&this.cacheArcLengths.length===a+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;var b=[],c,d=this.getPoint(0),e,f=0;b.push(0);for(e=1;e<=a;e++)c=this.getPoint(e/a),f+=c.distanceTo(d),b.push(f),d=c;return this.cacheArcLengths=b},updateArcLengths:function(){this.needsUpdate=!0;this.getLengths()},getUtoTmapping:function(a,b){var c=this.getLengths(),d=0,e=c.length,f;f=b?b:a*c[e-1];for(var g=0,h=e- +1,k;g<=h;)if(d=Math.floor(g+(h-g)/2),k=c[d]-f,0>k)g=d+1;else if(0b&&(b=0);1=b)return b=c[a]-b,a=this.curves[a],c=a.getLength(),a.getPointAt(0===c?0:1-b/c);a++}return null},getLength:function(){var a= +this.getCurveLengths();return a[a.length-1]},updateArcLengths:function(){this.needsUpdate=!0;this.cacheLengths=null;this.getLengths()},getCurveLengths:function(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;for(var a=[],b=0,c=0,d=this.curves.length;cNumber.EPSILON){if(0>l&&(g=b[f],k=-k,h=b[e],l=-l),!(a.yh.y))if(a.y===g.y){if(a.x===g.x)return!0}else{e=l*(a.x-g.x)-k*(a.y-g.y);if(0===e)return!0;0>e||(d=!d)}}else if(a.y===g.y&&(h.x<=a.x&&a.x<=g.x||g.x<=a.x&&a.x<=h.x))return!0}return d}var e=THREE.ShapeUtils.isClockWise,f=this.subPaths;if(0===f.length)return[];if(!0===b)return c(f);var g, +h,k,l=[];if(1===f.length)return h=f[0],k=new THREE.Shape,k.curves=h.curves,l.push(k),l;var m=!e(f[0].getPoints()),m=a?!m:m;k=[];var p=[],n=[],q=0,r;p[q]=void 0;n[q]=[];for(var s=0,v=f.length;sb.length-2?b.length-1:c+1],b=b[c>b.length-3?b.length-1:c+2],c=THREE.CurveUtils.interpolate;return new THREE.Vector2(c(d.x,e.x,f.x,b.x,a),c(d.y,e.y,f.y,b.y,a))}; +THREE.EllipseCurve=function(a,b,c,d,e,f,g,h){this.aX=a;this.aY=b;this.xRadius=c;this.yRadius=d;this.aStartAngle=e;this.aEndAngle=f;this.aClockwise=g;this.aRotation=h||0};THREE.EllipseCurve.prototype=Object.create(THREE.Curve.prototype);THREE.EllipseCurve.prototype.constructor=THREE.EllipseCurve; +THREE.EllipseCurve.prototype.getPoint=function(a){for(var b=2*Math.PI,c=this.aEndAngle-this.aStartAngle,d=Math.abs(c)c;)c+=b;for(;c>b;)c-=b;cb.length-2?b.length-1:c+1],b=b[c>b.length-3?b.length-1:c+2],c=THREE.CurveUtils.interpolate;return new THREE.Vector3(c(d.x,e.x,f.x,b.x,a),c(d.y,e.y,f.y,b.y,a),c(d.z,e.z,f.z,b.z,a))}); +THREE.CatmullRomCurve3=function(){function a(){}var b=new THREE.Vector3,c=new a,d=new a,e=new a;a.prototype.init=function(a,b,c,d){this.c0=a;this.c1=c;this.c2=-3*a+3*b-2*c-d;this.c3=2*a-2*b+c+d};a.prototype.initNonuniformCatmullRom=function(a,b,c,d,e,m,p){a=((b-a)/e-(c-a)/(e+m)+(c-b)/m)*m;d=((c-b)/m-(d-b)/(m+p)+(d-c)/p)*m;this.init(b,c,a,d)};a.prototype.initCatmullRom=function(a,b,c,d,e){this.init(b,c,e*(c-a),e*(d-b))};a.prototype.calc=function(a){var b=a*a;return this.c0+this.c1*a+this.c2*b+this.c3* +b*a};return THREE.Curve.create(function(a){this.points=a||[];this.closed=!1},function(a){var g=this.points,h,k;k=g.length;2>k&&console.log("duh, you need at least 2 points");a*=k-(this.closed?0:1);h=Math.floor(a);a-=h;this.closed?h+=0h&&(h=1);1E-4>k&&(k=h);1E-4>n&&(n=h);c.initNonuniformCatmullRom(l.x,m.x,p.x,g.x,k,h,n);d.initNonuniformCatmullRom(l.y,m.y,p.y,g.y,k,h,n);e.initNonuniformCatmullRom(l.z,m.z,p.z,g.z,k,h,n)}else"catmullrom"===this.type&&(k=void 0!==this.tension?this.tension:.5,c.initCatmullRom(l.x,m.x,p.x,g.x, +k),d.initCatmullRom(l.y,m.y,p.y,g.y,k),e.initCatmullRom(l.z,m.z,p.z,g.z,k));return new THREE.Vector3(c.calc(a),d.calc(a),e.calc(a))})}();THREE.ClosedSplineCurve3=function(a){console.warn("THREE.ClosedSplineCurve3 has been deprecated. Please use THREE.CatmullRomCurve3.");THREE.CatmullRomCurve3.call(this,a);this.type="catmullrom";this.closed=!0};THREE.ClosedSplineCurve3.prototype=Object.create(THREE.CatmullRomCurve3.prototype); +THREE.BoxGeometry=function(a,b,c,d,e,f){THREE.Geometry.call(this);this.type="BoxGeometry";this.parameters={width:a,height:b,depth:c,widthSegments:d,heightSegments:e,depthSegments:f};this.fromBufferGeometry(new THREE.BoxBufferGeometry(a,b,c,d,e,f));this.mergeVertices()};THREE.BoxGeometry.prototype=Object.create(THREE.Geometry.prototype);THREE.BoxGeometry.prototype.constructor=THREE.BoxGeometry;THREE.CubeGeometry=THREE.BoxGeometry; +THREE.BoxBufferGeometry=function(a,b,c,d,e,f){function g(a,b,c,d,e,f,g,k,l,J,P){var K=f/l,H=g/J,M=f/2,O=g/2,N=k/2;g=l+1;for(var Q=J+1,C=f=0,L=new THREE.Vector3,E=0;En;n++){e[0]=p[g[n]];e[1]=p[g[(n+1)%3]];e.sort(c);var q=e.toString();void 0===f[q]?f[q]={vert1:e[0],vert2:e[1],face1:l, +face2:void 0}:f[q].face2=l}e=[];for(q in f)if(g=f[q],void 0===g.face2||h[g.face1].normal.dot(h[g.face2].normal)<=d)l=k[g.vert1],e.push(l.x),e.push(l.y),e.push(l.z),l=k[g.vert2],e.push(l.x),e.push(l.y),e.push(l.z);this.addAttribute("position",new THREE.BufferAttribute(new Float32Array(e),3))};THREE.EdgesGeometry.prototype=Object.create(THREE.BufferGeometry.prototype);THREE.EdgesGeometry.prototype.constructor=THREE.EdgesGeometry; +THREE.ExtrudeGeometry=function(a,b){"undefined"!==typeof a&&(THREE.Geometry.call(this),this.type="ExtrudeGeometry",a=Array.isArray(a)?a:[a],this.addShapeList(a,b),this.computeFaceNormals())};THREE.ExtrudeGeometry.prototype=Object.create(THREE.Geometry.prototype);THREE.ExtrudeGeometry.prototype.constructor=THREE.ExtrudeGeometry;THREE.ExtrudeGeometry.prototype.addShapeList=function(a,b){for(var c=a.length,d=0;dNumber.EPSILON){var k=Math.sqrt(h),l=Math.sqrt(f*f+g*g),h=b.x-e/k;b=b.y+d/k;f=((c.x-g/l-h)*g-(c.y+f/l-b)*f)/(d*g-e*f);c=h+d*f-a.x;a=b+e*f-a.y;d=c*c+a*a;if(2>=d)return new THREE.Vector2(c,a);d=Math.sqrt(d/2)}else a=!1,d>Number.EPSILON? +f>Number.EPSILON&&(a=!0):d<-Number.EPSILON?f<-Number.EPSILON&&(a=!0):Math.sign(e)===Math.sign(g)&&(a=!0),a?(c=-e,a=d,d=Math.sqrt(h)):(c=d,a=e,d=Math.sqrt(h/2));return new THREE.Vector2(c/d,a/d)}function e(a,b){var c,d;for(E=a.length;0<=--E;){c=E;d=E-1;0>d&&(d=a.length-1);for(var e=0,f=q+2*m,e=0;eMath.abs(b.y-c.y)?[new THREE.Vector2(b.x,1-b.z),new THREE.Vector2(c.x,1-c.z),new THREE.Vector2(d.x,1-d.z),new THREE.Vector2(e.x,1-e.z)]:[new THREE.Vector2(b.y,1-b.z),new THREE.Vector2(c.y,1-c.z),new THREE.Vector2(d.y, +1-d.z),new THREE.Vector2(e.y,1-e.z)]}};THREE.ShapeGeometry=function(a,b){THREE.Geometry.call(this);this.type="ShapeGeometry";!1===Array.isArray(a)&&(a=[a]);this.addShapeList(a,b);this.computeFaceNormals()};THREE.ShapeGeometry.prototype=Object.create(THREE.Geometry.prototype);THREE.ShapeGeometry.prototype.constructor=THREE.ShapeGeometry;THREE.ShapeGeometry.prototype.addShapeList=function(a,b){for(var c=0,d=a.length;cNumber.EPSILON&&(h.normalize(),d=Math.acos(THREE.Math.clamp(e[l-1].dot(e[l]),-1,1)),f[l].applyMatrix4(k.makeRotationAxis(h,d))),g[l].crossVectors(e[l],f[l]);if(c)for(d=Math.acos(THREE.Math.clamp(f[0].dot(f[b-1]),-1,1)),d/=b-1,0c&&1===a.x&&(a=new THREE.Vector2(a.x-1,a.y));0===b.x&&0===b.z&&(a=new THREE.Vector2(c/2/Math.PI+.5,a.y)); +return a.clone()}THREE.Geometry.call(this);this.type="PolyhedronGeometry";this.parameters={vertices:a,indices:b,radius:c,detail:d};c=c||1;d=d||0;for(var k=this,l=0,m=a.length;lq&&(.2>d&&(b[0].x+=1),.2>a&&(b[1].x+=1),.2>p&&(b[2].x+=1));l=0;for(m=this.vertices.length;lp;p++){c[0]=m[e[p]];c[1]=m[e[(p+1)%3]];c.sort(b);var n=c.toString();void 0===d[n]&&(k[2*h]=c[0],k[2*h+1]=c[1],d[n]=!0,h++)}c=new Float32Array(6*h);a=0;for(l=h;ap;p++)d=f[k[2*a+p]],h=6*a+3*p,c[h+0]=d.x,c[h+1]=d.y, +c[h+2]=d.z;this.addAttribute("position",new THREE.BufferAttribute(c,3))}else if(a instanceof THREE.BufferGeometry){if(null!==a.index){l=a.index.array;f=a.attributes.position;e=a.groups;h=0;0===e.length&&a.addGroup(0,l.length);k=new Uint32Array(2*l.length);g=0;for(m=e.length;gp;p++)c[0]=l[a+p],c[1]=l[a+(p+1)%3],c.sort(b),n=c.toString(),void 0===d[n]&&(k[2*h]=c[0],k[2*h+1]=c[1],d[n]=!0,h++)}c=new Float32Array(6*h);a=0;for(l=h;a< +l;a++)for(p=0;2>p;p++)h=6*a+3*p,d=k[2*a+p],c[h+0]=f.getX(d),c[h+1]=f.getY(d),c[h+2]=f.getZ(d)}else for(f=a.attributes.position.array,h=f.length/3,k=h/3,c=new Float32Array(6*h),a=0,l=k;ap;p++)h=18*a+6*p,k=9*a+3*p,c[h+0]=f[k],c[h+1]=f[k+1],c[h+2]=f[k+2],d=9*a+(p+1)%3*3,c[h+3]=f[d],c[h+4]=f[d+1],c[h+5]=f[d+2];this.addAttribute("position",new THREE.BufferAttribute(c,3))}};THREE.WireframeGeometry.prototype=Object.create(THREE.BufferGeometry.prototype); +THREE.WireframeGeometry.prototype.constructor=THREE.WireframeGeometry;THREE.AxisHelper=function(a){a=a||1;var b=new Float32Array([0,0,0,a,0,0,0,0,0,0,a,0,0,0,0,0,0,a]),c=new Float32Array([1,0,0,1,.6,0,0,1,0,.6,1,0,0,0,1,0,.6,1]);a=new THREE.BufferGeometry;a.addAttribute("position",new THREE.BufferAttribute(b,3));a.addAttribute("color",new THREE.BufferAttribute(c,3));b=new THREE.LineBasicMaterial({vertexColors:THREE.VertexColors});THREE.LineSegments.call(this,a,b)};THREE.AxisHelper.prototype=Object.create(THREE.LineSegments.prototype); +THREE.AxisHelper.prototype.constructor=THREE.AxisHelper; +THREE.ArrowHelper=function(){var a=new THREE.BufferGeometry;a.addAttribute("position",new THREE.Float32Attribute([0,0,0,0,1,0],3));var b=new THREE.CylinderBufferGeometry(0,.5,1,5,1);b.translate(0,-.5,0);return function(c,d,e,f,g,h){THREE.Object3D.call(this);void 0===f&&(f=16776960);void 0===e&&(e=1);void 0===g&&(g=.2*e);void 0===h&&(h=.2*g);this.position.copy(d);this.line=new THREE.Line(a,new THREE.LineBasicMaterial({color:f}));this.line.matrixAutoUpdate=!1;this.add(this.line);this.cone=new THREE.Mesh(b, +new THREE.MeshBasicMaterial({color:f}));this.cone.matrixAutoUpdate=!1;this.add(this.cone);this.setDirection(c);this.setLength(e,g,h)}}();THREE.ArrowHelper.prototype=Object.create(THREE.Object3D.prototype);THREE.ArrowHelper.prototype.constructor=THREE.ArrowHelper; +THREE.ArrowHelper.prototype.setDirection=function(){var a=new THREE.Vector3,b;return function(c){.99999c.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,b,c){void 0===b&&(b=.2*a);void 0===c&&(c=.2*b);this.line.scale.set(1,Math.max(0,a-b),1);this.line.updateMatrix();this.cone.scale.set(c,b,c);this.cone.position.y=a;this.cone.updateMatrix()}; +THREE.ArrowHelper.prototype.setColor=function(a){this.line.material.color.copy(a);this.cone.material.color.copy(a)};THREE.BoxHelper=function(a,b){void 0===b&&(b=16776960);var c=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]),d=new Float32Array(24),e=new THREE.BufferGeometry;e.setIndex(new THREE.BufferAttribute(c,1));e.addAttribute("position",new THREE.BufferAttribute(d,3));THREE.LineSegments.call(this,e,new THREE.LineBasicMaterial({color:b}));void 0!==a&&this.update(a)}; +THREE.BoxHelper.prototype=Object.create(THREE.LineSegments.prototype);THREE.BoxHelper.prototype.constructor=THREE.BoxHelper; +THREE.BoxHelper.prototype.update=function(){var a=new THREE.Box3;return function(b){b instanceof THREE.Box3?a.copy(b):a.setFromObject(b);if(!a.isEmpty()){b=a.min;var c=a.max,d=this.geometry.attributes.position,e=d.array;e[0]=c.x;e[1]=c.y;e[2]=c.z;e[3]=b.x;e[4]=c.y;e[5]=c.z;e[6]=b.x;e[7]=b.y;e[8]=c.z;e[9]=c.x;e[10]=b.y;e[11]=c.z;e[12]=c.x;e[13]=c.y;e[14]=b.z;e[15]=b.x;e[16]=c.y;e[17]=b.z;e[18]=b.x;e[19]=b.y;e[20]=b.z;e[21]=c.x;e[22]=b.y;e[23]=b.z;d.needsUpdate=!0;this.geometry.computeBoundingSphere()}}}(); +THREE.BoundingBoxHelper=function(a,b){var c=void 0!==b?b:8947848;this.object=a;this.box=new THREE.Box3;THREE.Mesh.call(this,new THREE.BoxGeometry(1,1,1),new THREE.MeshBasicMaterial({color:c,wireframe:!0}))};THREE.BoundingBoxHelper.prototype=Object.create(THREE.Mesh.prototype);THREE.BoundingBoxHelper.prototype.constructor=THREE.BoundingBoxHelper;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.LineSegments.call(this,d,e);this.camera=a;this.camera.updateProjectionMatrix&&this.camera.updateProjectionMatrix();this.matrix=a.matrixWorld;this.matrixAutoUpdate= +!1;this.pointMap=f;this.update()};THREE.CameraHelper.prototype=Object.create(THREE.LineSegments.prototype);THREE.CameraHelper.prototype.constructor=THREE.CameraHelper; +THREE.CameraHelper.prototype.update=function(){function a(a,g,h,k){d.set(g,h,k).unproject(e);a=c[a];if(void 0!==a)for(g=0,h=a.length;gd;d++)c.faces[d].color=this.colors[4>d?0:1];d=new THREE.MeshBasicMaterial({vertexColors:THREE.FaceColors,wireframe:!0});this.lightSphere=new THREE.Mesh(c,d);this.add(this.lightSphere);this.update()}; +THREE.HemisphereLightHelper.prototype=Object.create(THREE.Object3D.prototype);THREE.HemisphereLightHelper.prototype.constructor=THREE.HemisphereLightHelper;THREE.HemisphereLightHelper.prototype.dispose=function(){this.lightSphere.geometry.dispose();this.lightSphere.material.dispose()}; +THREE.HemisphereLightHelper.prototype.update=function(){var a=new THREE.Vector3;return function(){this.colors[0].copy(this.light.color).multiplyScalar(this.light.intensity);this.colors[1].copy(this.light.groundColor).multiplyScalar(this.light.intensity);this.lightSphere.lookAt(a.setFromMatrixPosition(this.light.matrixWorld).negate());this.lightSphere.geometry.colorsNeedUpdate=!0}}(); +THREE.PointLightHelper=function(a,b){this.light=a;this.light.updateMatrixWorld();var c=new THREE.SphereBufferGeometry(b,4,2),d=new THREE.MeshBasicMaterial({wireframe:!0,fog:!1});d.color.copy(this.light.color).multiplyScalar(this.light.intensity);THREE.Mesh.call(this,c,d);this.matrix=this.light.matrixWorld;this.matrixAutoUpdate=!1};THREE.PointLightHelper.prototype=Object.create(THREE.Mesh.prototype);THREE.PointLightHelper.prototype.constructor=THREE.PointLightHelper; +THREE.PointLightHelper.prototype.dispose=function(){this.geometry.dispose();this.material.dispose()};THREE.PointLightHelper.prototype.update=function(){this.material.color.copy(this.light.color).multiplyScalar(this.light.intensity)}; +THREE.SkeletonHelper=function(a){this.bones=this.getBoneList(a);for(var b=new THREE.Geometry,c=0;cc;c++,d++){var e=c/32*Math.PI*2,f=d/32*Math.PI*2;b.push(Math.cos(e),Math.sin(e),1,Math.cos(f),Math.sin(f),1)}a.addAttribute("position",new THREE.Float32Attribute(b,3));b=new THREE.LineBasicMaterial({fog:!1});this.cone=new THREE.LineSegments(a, +b);this.add(this.cone);this.update()};THREE.SpotLightHelper.prototype=Object.create(THREE.Object3D.prototype);THREE.SpotLightHelper.prototype.constructor=THREE.SpotLightHelper;THREE.SpotLightHelper.prototype.dispose=function(){this.cone.geometry.dispose();this.cone.material.dispose()}; +THREE.SpotLightHelper.prototype.update=function(){var a=new THREE.Vector3,b=new THREE.Vector3;return function(){var c=this.light.distance?this.light.distance:1E3,d=c*Math.tan(this.light.angle);this.cone.scale.set(d,d,c);a.setFromMatrixPosition(this.light.matrixWorld);b.setFromMatrixPosition(this.light.target.matrixWorld);this.cone.lookAt(b.sub(a));this.cone.material.color.copy(this.light.color).multiplyScalar(this.light.intensity)}}(); +THREE.VertexNormalsHelper=function(a,b,c,d){this.object=a;this.size=void 0!==b?b:1;a=void 0!==c?c:16711680;d=void 0!==d?d:1;b=0;c=this.object.geometry;c instanceof THREE.Geometry?b=3*c.faces.length:c instanceof THREE.BufferGeometry&&(b=c.attributes.normal.count);c=new THREE.BufferGeometry;b=new THREE.Float32Attribute(6*b,3);c.addAttribute("position",b);THREE.LineSegments.call(this,c,new THREE.LineBasicMaterial({color:a,linewidth:d}));this.matrixAutoUpdate=!1;this.update()}; +THREE.VertexNormalsHelper.prototype=Object.create(THREE.LineSegments.prototype);THREE.VertexNormalsHelper.prototype.constructor=THREE.VertexNormalsHelper; +THREE.VertexNormalsHelper.prototype.update=function(){var a=new THREE.Vector3,b=new THREE.Vector3,c=new THREE.Matrix3;return function(){var d=["a","b","c"];this.object.updateMatrixWorld(!0);c.getNormalMatrix(this.object.matrixWorld);var e=this.object.matrixWorld,f=this.geometry.attributes.position,g=this.object.geometry;if(g instanceof THREE.Geometry)for(var h=g.vertices,k=g.faces,l=g=0,m=k.length;lh.end&&(h.end=f);c||(c=k)}}for(k in d)h=d[k],this.createAnimation(k,h.start,h.end,a);this.firstAnimation=c}; +THREE.MorphBlendMesh.prototype.setAnimationDirectionForward=function(a){if(a=this.animationsMap[a])a.direction=1,a.directionBackwards=!1};THREE.MorphBlendMesh.prototype.setAnimationDirectionBackward=function(a){if(a=this.animationsMap[a])a.direction=-1,a.directionBackwards=!0};THREE.MorphBlendMesh.prototype.setAnimationFPS=function(a,b){var c=this.animationsMap[a];c&&(c.fps=b,c.duration=(c.end-c.start)/c.fps)}; +THREE.MorphBlendMesh.prototype.setAnimationDuration=function(a,b){var c=this.animationsMap[a];c&&(c.duration=b,c.fps=(c.end-c.start)/c.duration)};THREE.MorphBlendMesh.prototype.setAnimationWeight=function(a,b){var c=this.animationsMap[a];c&&(c.weight=b)};THREE.MorphBlendMesh.prototype.setAnimationTime=function(a,b){var c=this.animationsMap[a];c&&(c.time=b)};THREE.MorphBlendMesh.prototype.getAnimationTime=function(a){var b=0;if(a=this.animationsMap[a])b=a.time;return b}; +THREE.MorphBlendMesh.prototype.getAnimationDuration=function(a){var b=-1;if(a=this.animationsMap[a])b=a.duration;return b};THREE.MorphBlendMesh.prototype.playAnimation=function(a){var b=this.animationsMap[a];b?(b.time=0,b.active=!0):console.warn("THREE.MorphBlendMesh: animation["+a+"] undefined in .playAnimation()")};THREE.MorphBlendMesh.prototype.stopAnimation=function(a){if(a=this.animationsMap[a])a.active=!1}; +THREE.MorphBlendMesh.prototype.update=function(a){for(var b=0,c=this.animationsList.length;bd.duration||0>d.time)d.direction*=-1,d.time>d.duration&&(d.time=d.duration,d.directionBackwards=!0),0>d.time&&(d.time=0,d.directionBackwards=!1)}else d.time%=d.duration,0>d.time&&(d.time+=d.duration);var f=d.start+THREE.Math.clamp(Math.floor(d.time/e),0,d.length-1),g=d.weight;f!==d.currentFrame&& +(this.morphTargetInfluences[d.lastFrame]=0,this.morphTargetInfluences[d.currentFrame]=1*g,this.morphTargetInfluences[f]=0,d.lastFrame=d.currentFrame,d.currentFrame=f);e=d.time%e/e;d.directionBackwards&&(e=1-e);d.currentFrame!==d.lastFrame?(this.morphTargetInfluences[d.currentFrame]=e*g,this.morphTargetInfluences[d.lastFrame]=(1-e)*g):this.morphTargetInfluences[d.currentFrame]=g}}}; diff --git a/app/views.py b/app/views.py index 4848d3b..e20ad53 100755 --- a/app/views.py +++ b/app/views.py @@ -151,6 +151,10 @@ def get_updates(): latest_upload = allbooks[-1] return "This is the XPPL ~ Library XPUB ~ Updates / / / / / / / Last viewed: " + userin.info + " / / / / / / / " + str(len(allbooks)) + " Books online "+ " / / / / / / / " + "Latest entry: " + latest_upload.title +@app.route('/volumetric_catalog', methods=['GET']) +def volumetric_catalog(): + return render_template('volumetric_catalog/index.html') + @app.route('/scape', methods=['POST', 'GET']) def scape(): if request.method == 'POST':