language
stringclasses
1 value
owner
stringlengths
2
15
repo
stringlengths
2
21
sha
stringlengths
45
45
message
stringlengths
7
36.3k
path
stringlengths
1
199
patch
stringlengths
15
102k
is_multipart
bool
2 classes
Other
mrdoob
three.js
8375a6f421c3a761b48fa2c26318d92b7fc8fd49.json
Use clamp for clampScalar implementation
src/math/Vector3.js
@@ -404,56 +404,49 @@ THREE.Vector3.prototype = { }, - clampScalar: function ( minVal, maxVal ) { - - if ( this.x < minVal ) { - this.x = minVal; - } else if ( this.x > maxVal ) { - this.x = maxVal; - } - - if ( this.y < minVal ) { - this.y = minVal; - } else if ( this.y > maxVal ) { - this.y = maxVal; - } - - if ( this.z < minVal ) { - this.z = minVal; - } else if ( this.z > maxVal ) { - this.z = maxVal; - } - - return this; - }, - - 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 = (this.x < 0) ? Math.ceil(this.x) : Math.floor(this.x); - this.y = (this.y < 0) ? Math.ceil(this.y) : Math.floor(this.y); - this.z = (this.z < 0) ? Math.ceil(this.z) : Math.floor(this.z); - return this; - }, + clampScalar: ( function () { + var min, max; + + return function ( minVal, maxVal ) { + if ( !min || !max ) { + min = new THREE.Vector3(); + max = new THREE.Vector3(); + } + + min.set(minVal, minVal, minVal); + max.set(maxVal, maxVal, maxVal); + return this.clamp(min, max); + + }; + } )(), + + 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 = (this.x < 0) ? Math.ceil(this.x) : Math.floor(this.x); + this.y = (this.y < 0) ? Math.ceil(this.y) : Math.floor(this.y); + this.z = (this.z < 0) ? Math.ceil(this.z) : Math.floor(this.z); + return this; + }, negate: function () {
true
Other
mrdoob
three.js
8375a6f421c3a761b48fa2c26318d92b7fc8fd49.json
Use clamp for clampScalar implementation
src/math/Vector4.js
@@ -483,34 +483,21 @@ THREE.Vector4.prototype = { }, - clampScalar: function ( minVal, maxVal ) { - - if ( this.x < minVal ) { - this.x = minVal; - } else if ( this.x > maxVal ) { - this.x = maxVal; - } - - if ( this.y < minVal ) { - this.y = minVal; - } else if ( this.y > maxVal ) { - this.y = maxVal; - } - - if ( this.z < minVal ) { - this.z = minVal; - } else if ( this.z > maxVal ) { - this.z = maxVal; - } - - if ( this.w < minVal ) { - this.w = minVal; - } else if ( this.w > maxVal ) { - this.w = maxVal; - } + clampScalar: ( function () { + var min, max; - return this; - }, + return function ( minVal, maxVal ) { + if ( !min || !max ) { + min = new THREE.Vector4(); + max = new THREE.Vector4(); + } + + min.set(minVal, minVal, minVal, minVal); + max.set(maxVal, maxVal, maxVal, maxVal); + return this.clamp(min, max); + + }; + } )(), floor: function() { this.x = Math.floor(this.x);
true
Other
mrdoob
three.js
8375a6f421c3a761b48fa2c26318d92b7fc8fd49.json
Use clamp for clampScalar implementation
test/unit/math/Vector2.js
@@ -124,6 +124,32 @@ test( "min/max/clamp", function() { c.clamp( b, a ); ok( c.x == -x, "Passed!" ); ok( c.y == y, "Passed!" ); + + c.set(-2*x, 2*x); + c.clampScalar( -x, x ); + equal( c.x, -x, "scalar clamp x" ); + equal( c.y, x, "scalar clamp y" ); +}); + +test( "rounding", function() { + deepEqual( new THREE.Vector2( -0.1, 0.1 ).floor(), new THREE.Vector2( -1, 0 ), "floor .1" ); + deepEqual( new THREE.Vector2( -0.5, 0.5 ).floor(), new THREE.Vector2( -1, 0 ), "floor .5" ); + deepEqual( new THREE.Vector2( -0.9, 0.9 ).floor(), new THREE.Vector2( -1, 0 ), "floor .9" ); + + deepEqual( new THREE.Vector2( -0.1, 0.1 ).ceil(), new THREE.Vector2( 0, 1 ), "ceil .1" ); + deepEqual( new THREE.Vector2( -0.5, 0.5 ).ceil(), new THREE.Vector2( 0, 1 ), "ceil .5" ); + deepEqual( new THREE.Vector2( -0.9, 0.9 ).ceil(), new THREE.Vector2( 0, 1 ), "ceil .9" ); + + deepEqual( new THREE.Vector2( -0.1, 0.1 ).round(), new THREE.Vector2( 0, 0 ), "round .1" ); + deepEqual( new THREE.Vector2( -0.5, 0.5 ).round(), new THREE.Vector2( 0, 1 ), "round .5" ); + deepEqual( new THREE.Vector2( -0.9, 0.9 ).round(), new THREE.Vector2( -1, 1 ), "round .9" ); + + deepEqual( new THREE.Vector2( -0.1, 0.1 ).roundToZero(), new THREE.Vector2( 0, 0 ), "roundToZero .1" ); + deepEqual( new THREE.Vector2( -0.5, 0.5 ).roundToZero(), new THREE.Vector2( 0, 0 ), "roundToZero .5" ); + deepEqual( new THREE.Vector2( -0.9, 0.9 ).roundToZero(), new THREE.Vector2( 0, 0 ), "roundToZero .9" ); + deepEqual( new THREE.Vector2( -1.1, 1.1 ).roundToZero(), new THREE.Vector2( -1, 1 ), "roundToZero 1.1" ); + deepEqual( new THREE.Vector2( -1.5, 1.5 ).roundToZero(), new THREE.Vector2( -1, 1 ), "roundToZero 1.5" ); + deepEqual( new THREE.Vector2( -1.9, 1.9 ).roundToZero(), new THREE.Vector2( -1, 1 ), "roundToZero 1.9" ); }); test( "negate", function() {
true
Other
mrdoob
three.js
f491e4b956716d6275c12ac7083eea4dd963b2f7.json
Use tabs instead of spaces for whitespace
src/loaders/JSONLoader.js
@@ -453,12 +453,13 @@ THREE.JSONLoader.prototype.parse = function ( json, texturePath ) { geometry.bones = json.bones; - if ( (geometry.bones.length > 0) && ( - (geometry.skinWeights.length != geometry.skinIndices.length) || - (geometry.skinWeights.length != geometry.vertices.length) ) ) { - console.warn('When skinning, number of vertices (' + geometry.vertices.length + '), skinIndices (' + - geometry.skinIndices.length + '), and skinWeights (' + geometry.skinWeights.length + ') should match.'); - } + if ( (geometry.bones.length > 0) && ( + (geometry.skinWeights.length != geometry.skinIndices.length) || + (geometry.skinIndices.length != geometry.vertices.length) ) ) { + console.warn('When skinning, number of vertices (' + geometry.vertices.length + '), skinIndices (' + + geometry.skinIndices.length + '), and skinWeights (' + geometry.skinWeights.length + ') should match.'); + } + // could change this to json.animations[0] or remove completely geometry.animation = json.animation;
false
Other
mrdoob
three.js
60d83cc52de32a3bbeb838b0febc94bc4f9a4063.json
fix constructor fix #4894 @benbro noticed this mistake
examples/js/loaders/PDBLoader.js
@@ -10,7 +10,7 @@ THREE.PDBLoader = function ( manager ) { THREE.PDBLoader.prototype = { - constructor: THREE.OBJLoader, + constructor: THREE.PDBLoader, load: function ( url, onLoad ) {
false
Other
mrdoob
three.js
c8cfa5d6344aa0e097ad45e1fffe2bba8ebe3c2e.json
Remove unused local variable 'child' in Bone.js
src/objects/Bone.js
@@ -45,7 +45,7 @@ THREE.Bone.prototype.update = function ( parentSkinMatrix, forceUpdate ) { // update children - var child, i, l = this.children.length; + var i, l = this.children.length; for ( i = 0; i < l; i ++ ) {
false
Other
mrdoob
three.js
babf70e7735bc8f44a6fe31ec0134497c1f935cb.json
Avoid ambiguity with 'software renderer'
docs/api/renderers/CanvasRenderer.html
@@ -9,7 +9,8 @@ <body> <h1>[name]</h1> - <div class="desc">The Canvas renderer displays your beautifully crafted scenes <em>not</em> using WebGL, but with a software renderer.</div> + <div class="desc">The Canvas renderer displays your beautifully crafted scenes <em>not</em> using WebGL, + but draws it using the (slower) <a href="http://www.w3.org/html/wg/drafts/2dcontext/html5_canvas/">Canvas 2D Context</a> API.</div> <div class="desc">This renderer can be a nice fallback from [page:WebGLRenderer] for simple scenes:</div> <code> if (window.WebGLRenderingContext) @@ -19,7 +20,7 @@ <h1>[name]</h1> </code> <div class="desc"> Note: both WebGLRenderer and CanvasRenderer are embedded in the web page using an HTML5 &lt;canvas&gt; tag. - The "Canvas" in CanvasRenderer means it uses Canvas2D instead of WebGL.<br /> + The "Canvas" in CanvasRenderer means it uses Canvas 2D instead of WebGL.<br /> Don't confuse either CanvasRenderer with the SoftwareRenderer example, which simulates a screen buffer in a Javascript array. </div>
false
Other
mrdoob
three.js
e9a07c9e38a998b0061cff53371b125bb0135e14.json
Add a simple test for ray-segment intersection.
test/unit/math/Ray.js
@@ -174,4 +174,19 @@ test( "applyMatrix4", function() { }); +test( "distanceSqAndPointToSegment4", function() { + var a = new THREE.Ray( one3.clone(), new THREE.Vector3( 0, 0, 1 ) ); + var v0 = new THREE.Vector3( 3, 5, 50 ); + var v1 = new THREE.Vector3( 50, 50, 50 ); // just a far away point + var ptOnLine = new THREE.Vector3(); + var ptOnSegment = new THREE.Vector3(); + var distSqr = a.distanceSqAndPointToSegment( v0, v1, ptOnLine, ptOnSegment ); + var m = new THREE.Matrix4(); + + ok( ptOnSegment.distanceTo( v0 ) < 0.0001, "Passed!" ); + ok( ptOnLine.distanceTo( new THREE.Vector3(1, 1, 50) ) < 0.0001, "Passed!" ); + // ((3-1) * (3-1) + (5-1) * (5-1) = 4 + 16 = 20 + ok( distSqr === 20, "Passed!" ); +}); +
false
Other
mrdoob
three.js
84da87ab461eefcb8510d3fa0ce9e175a3489163.json
Add test example with interactive lines.
examples/webgl_interactive_lines.html
@@ -0,0 +1,190 @@ +<!DOCTYPE html> +<html lang="en"> + <head> + <title>three.js webgl - interactive lines</title> + <meta charset="utf-8"> + <meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0"> + <style> + body { + font-family: Monospace; + background-color: #f0f0f0; + margin: 0px; + overflow: hidden; + } + </style> + </head> + <body> + + <script src="../build/three.js"></script> + + <script src="js/libs/stats.min.js"></script> + + <script> + + var container, stats; + var camera, scene, projector, raycaster, renderer, parentTransform, sphereInter; + + var mouse = new THREE.Vector2(); + var radius = 100, theta = 0; + + init(); + animate(); + + function init() { + + container = document.createElement( 'div' ); + document.body.appendChild( container ); + + var info = document.createElement( 'div' ); + info.style.position = 'absolute'; + info.style.top = '10px'; + info.style.width = '100%'; + info.style.textAlign = 'center'; + info.innerHTML = '<a href="http://threejs.org" target="_blank">three.js</a> webgl - interactive cubes'; + container.appendChild( info ); + + camera = new THREE.PerspectiveCamera( 70, window.innerWidth / window.innerHeight, 1, 10000 ); + + scene = new THREE.Scene(); + + var light = new THREE.DirectionalLight( 0xffffff, 2 ); + light.position.set( 1, 1, 1 ).normalize(); + scene.add( light ); + + var light = new THREE.DirectionalLight( 0xffffff ); + light.position.set( -1, -1, -1 ).normalize(); + scene.add( light ); + + var sphereGeometry = new THREE.SphereGeometry(3); + sphereInter = new THREE.Mesh( sphereGeometry, new THREE.MeshLambertMaterial( { color: 0xff0000 } ) ); + sphereInter.visible = false; + scene.add( sphereInter ); + + var geometry = new THREE.Geometry(); + geometry.vertices.push( new THREE.Vector3( 0, 0, 0 ) ); + geometry.vertices.push( new THREE.Vector3( 15, 15, 15 ) ); + + parentTransform = new THREE.Mesh(); + parentTransform.position.x = Math.random() * 800 - 400; + parentTransform.position.y = Math.random() * 800 - 400; + parentTransform.position.z = Math.random() * 800 - 400; + + parentTransform.rotation.x = Math.random() * 2 * Math.PI; + parentTransform.rotation.y = Math.random() * 2 * Math.PI; + parentTransform.rotation.z = Math.random() * 2 * Math.PI; + + // parentTransform.scale.x = Math.random() + 0.5; + // parentTransform.scale.y = Math.random() + 0.5; + // parentTransform.scale.z = Math.random() + 0.5; + + for ( var i = 0; i < 1000; i ++ ) { + + var object = new THREE.Line( geometry, new THREE.LineBasicMaterial( { color: Math.random() * 0xffffff, linewidth: 2 } ) ); + + object.position.x = Math.random() * 800 - 400; + object.position.y = Math.random() * 800 - 400; + object.position.z = Math.random() * 800 - 400; + + object.rotation.x = Math.random() * 2 * Math.PI; + object.rotation.y = Math.random() * 2 * Math.PI; + object.rotation.z = Math.random() * 2 * Math.PI; + + // object.scale.x = Math.random() + 0.5; + // object.scale.y = Math.random() + 0.5; + // object.scale.z = Math.random() + 0.5; + + parentTransform.add( object ); + + } + + scene.add(parentTransform); + + projector = new THREE.Projector(); + raycaster = new THREE.Raycaster(); + raycaster.linePrecision = 5; + + renderer = new THREE.WebGLRenderer(); + renderer.sortObjects = false; + renderer.setSize( window.innerWidth, window.innerHeight ); + + container.appendChild(renderer.domElement); + + stats = new Stats(); + stats.domElement.style.position = 'absolute'; + stats.domElement.style.top = '0px'; + container.appendChild( stats.domElement ); + + document.addEventListener( 'mousemove', onDocumentMouseMove, false ); + + // + + window.addEventListener( 'resize', onWindowResize, false ); + + } + + function onWindowResize() { + + camera.aspect = window.innerWidth / window.innerHeight; + camera.updateProjectionMatrix(); + + renderer.setSize( window.innerWidth, window.innerHeight ); + + } + + function onDocumentMouseMove( event ) { + + event.preventDefault(); + + mouse.x = ( event.clientX / window.innerWidth ) * 2 - 1; + mouse.y = - ( event.clientY / window.innerHeight ) * 2 + 1; + + } + + // + + function animate() { + + requestAnimationFrame( animate ); + + render(); + stats.update(); + + } + + function render() { + + theta += 0.1; + + camera.position.x = radius * Math.sin( THREE.Math.degToRad( theta ) ); + camera.position.y = radius * Math.sin( THREE.Math.degToRad( theta ) ); + camera.position.z = radius * Math.cos( THREE.Math.degToRad( theta ) ); + camera.lookAt( scene.position ); + + // find intersections + + var vector = new THREE.Vector3( mouse.x, mouse.y, 1 ); + projector.unprojectVector( vector, camera ); + + raycaster.set( camera.position, vector.sub( camera.position ).normalize() ); + + var intersects = raycaster.intersectObjects( parentTransform.children, true); + + if ( intersects.length > 0 ) { + + sphereInter.visible = true; + sphereInter.position = (intersects[0].point).clone(); + + } else { + + sphereInter.visible = false; + + } + + renderer.render( scene, camera ); + + } + + </script> + + </body> +</html>
false
Other
mrdoob
three.js
4e36b7b64c86dd1457cf584b6b367dc2bb3d947f.json
Add optionalTarget argument to Color#getHSL()
src/math/Color.js
@@ -223,10 +223,12 @@ THREE.Color.prototype = { }, - getHSL: function () { + getHSL: function ( optionalTarget ) { // h,s,l ranges are in 0.0 - 1.0 + var hsl = optionalTarget || { h: 0, s: 0, l: 0 }; + var r = this.r, g = this.g, b = this.b; var max = Math.max( r, g, b ); @@ -258,11 +260,11 @@ THREE.Color.prototype = { } - return { - h: hue, - s: saturation, - l: lightness - }; + hsl.h = hue; + hsl.s = saturation; + hsl.l = lightness; + + return hsl; },
false
Other
mrdoob
three.js
7eac0a724b4cacc040e4ec2de8441c56eeb90992.json
Add depth of field post-process with bokeh shader
examples/js/postprocessing/BokehPass.js
@@ -0,0 +1,96 @@ +/** + * Depth-of-field post-process with bokeh shader + */ + + +THREE.BokehPass = function ( scene, camera, params ) { + + this.scene = scene; + this.camera = camera; + + var focus = ( params.focus !== undefined ) ? params.focus : 1.0; + var aspect = ( params.aspect !== undefined ) ? params.aspect : camera.aspect; + var aperture = ( params.aperture !== undefined ) ? params.aperture : 0.025; + var maxblur = ( params.maxblur !== undefined ) ? params.maxblur : 1.0; + + // render targets + + var width = params.width || window.innerWidth || 1; + var height = params.height || window.innerHeight || 1; + + this.renderTargetColor = new THREE.WebGLRenderTarget( width, height, { + minFilter: THREE.LinearFilter, + magFilter: THREE.LinearFilter, + format: THREE.RGBFormat + } ); + + this.renderTargetDepth = this.renderTargetColor.clone(); + + // depth material + + this.materialDepth = new THREE.MeshDepthMaterial(); + + // bokeh material + + if ( THREE.BokehShader === undefined ) { + console.error( "THREE.BokehPass relies on THREE.BokehShader" ); + } + + var bokehShader = THREE.BokehShader; + var bokehUniforms = THREE.UniformsUtils.clone( bokehShader.uniforms ); + + bokehUniforms[ "tDepth" ].value = this.renderTargetDepth; + + bokehUniforms[ "focus" ].value = focus; + bokehUniforms[ "aspect" ].value = aspect; + bokehUniforms[ "aperture" ].value = aperture; + bokehUniforms[ "maxblur" ].value = maxblur; + + this.materialBokeh = new THREE.ShaderMaterial({ + uniforms: bokehUniforms, + vertexShader: bokehShader.vertexShader, + fragmentShader: bokehShader.fragmentShader + }); + + this.uniforms = bokehUniforms; + this.enabled = true; + this.needsSwap = false; + this.renderToScreen = false; + this.clear = false; + +}; + +THREE.BokehPass.prototype = { + + render: function ( renderer, writeBuffer, readBuffer, delta, maskActive ) { + + var composer = THREE.EffectComposer; + + composer.quad.material = this.materialBokeh; + + // Render depth into texture + + this.scene.overrideMaterial = this.materialDepth; + + renderer.render( this.scene, this.camera, this.renderTargetDepth, true ); + + // Render bokeh composite + + this.uniforms[ "tColor" ].value = readBuffer; + + if ( this.renderToScreen ) { + + renderer.render( composer.scene, composer.camera ); + + } else { + + renderer.render( composer.scene, composer.camera, writeBuffer, this.clear ); + + } + + this.scene.overrideMaterial = null; + + } + +}; +
false
Other
mrdoob
three.js
7211281df0df47bb0604367b1a4ff72dd1d78fd3.json
Add the layer attribute to a node element
examples/js/loaders/ColladaLoader.js
@@ -1101,6 +1101,7 @@ THREE.ColladaLoader = function () { } obj.name = node.name || node.id || ""; + obj.layer = node.layer || ""; obj.matrix = node.matrix; obj.matrix.decompose( obj.position, obj.quaternion, obj.scale ); @@ -2060,6 +2061,7 @@ THREE.ColladaLoader = function () { this.sid = element.getAttribute('sid'); this.name = element.getAttribute('name'); this.type = element.getAttribute('type'); + this.layer = element.getAttribute('layer'); this.type = this.type == 'JOINT' ? this.type : 'NODE';
false
Other
mrdoob
three.js
fab25f9fea0cc3739c0de6b11399134ff325696a.json
Fix typo getNormalVector() -> getTangent()
src/extras/core/CurvePath.js
@@ -312,7 +312,7 @@ THREE.CurvePath.prototype.getWrapPoints = function ( oldPts, path ) { // check for out of bounds? var pathPt = path.getPoint( xNorm ); - var normal = path.getNormalVector( xNorm ); + var normal = path.getTangent( xNorm ); normal.set( -normal.y, normal.x ).multiplyScalar( oldY ); p.x = pathPt.x + normal.x;
false
Other
mrdoob
three.js
f7a9e1f2b92472892b0e8d9d1903f3142cb57ad6.json
Add clone method to THREE.LOD
src/objects/LOD.js
@@ -95,8 +95,18 @@ THREE.LOD.prototype.update = function () { }(); -THREE.LOD.prototype.clone = function () { +THREE.LOD.prototype.clone = function ( object ) { - // TODO + if ( object === undefined ) object = new THREE.LOD(); + + THREE.Object3D.prototype.clone.call( this, object ); + + for ( var i = 0, l = this.objects.length; i < l; i ++ ) { + var x = this.objects[i].object.clone(); + x.visible = i === 0; + object.addLevel( x, this.objects[i].distance ); + } + + return object; };
false
Other
mrdoob
three.js
b5fdfca9dc1304a9844e13ab5955dad5640c489b.json
Fix DOM width retrieval See https://github.com/mrdoob/three.js/issues/3778#issuecomment-22919229
examples/js/controls/OrbitControls.js
@@ -164,14 +164,20 @@ THREE.OrbitControls = function ( object, domElement ) { // half of the fov is center to top of screen targetDistance *= Math.tan( (scope.object.fov/2) * Math.PI / 180.0 ); // we actually don't use screenWidth, since perspective camera is fixed to screen height - scope.panLeft( 2 * delta.x * targetDistance / scope.domElement.height ); - scope.panUp( 2 * delta.y * targetDistance / scope.domElement.height ); + var height = ( scope.domElement.height !== undefined ) ? + scope.domElement.height : scope.domElement.body.clientHeight; + scope.panLeft( 2 * delta.x * targetDistance / height ); + scope.panUp( 2 * delta.y * targetDistance / height ); } else if ( scope.object.top !== undefined ) { // orthographic - scope.panLeft( delta.x * (scope.object.right - scope.object.left) / scope.domElement.width ); - scope.panUp( delta.y * (scope.object.top - scope.object.bottom) / scope.domElement.height ); + var width = ( scope.domElement.width !== undefined ) ? + scope.domElement.width : scope.domElement.body.clientWidth; + var height = ( scope.domElement.height !== undefined ) ? + scope.domElement.height : scope.domElement.body.clientHeight; + scope.panLeft( delta.x * (scope.object.right - scope.object.left) / width ); + scope.panUp( delta.y * (scope.object.top - scope.object.bottom) / height ); } else { @@ -322,10 +328,14 @@ THREE.OrbitControls = function ( object, domElement ) { rotateEnd.set( event.clientX, event.clientY ); rotateDelta.subVectors( rotateEnd, rotateStart ); + var width = ( scope.domElement.width !== undefined ) ? + scope.domElement.width : scope.domElement.body.clientWidth; + var height = ( scope.domElement.height !== undefined ) ? + scope.domElement.height : scope.domElement.body.clientHeight; // rotating across whole screen goes 360 degrees around - scope.rotateLeft( 2 * Math.PI * rotateDelta.x / scope.domElement.width * scope.rotateSpeed ); + scope.rotateLeft( 2 * Math.PI * rotateDelta.x / width * scope.rotateSpeed ); // rotating up and down along whole screen attempts to go 360, but limited to 180 - scope.rotateUp( 2 * Math.PI * rotateDelta.y / scope.domElement.height * scope.rotateSpeed ); + scope.rotateUp( 2 * Math.PI * rotateDelta.y / height * scope.rotateSpeed ); rotateStart.copy( rotateEnd ); @@ -497,10 +507,14 @@ THREE.OrbitControls = function ( object, domElement ) { rotateEnd.set( event.touches[ 0 ].pageX, event.touches[ 0 ].pageY ); rotateDelta.subVectors( rotateEnd, rotateStart ); + var width = ( scope.domElement.width !== undefined ) ? + scope.domElement.width : scope.domElement.body.clientWidth; + var height = ( scope.domElement.height !== undefined ) ? + scope.domElement.height : scope.domElement.body.clientHeight; // rotating across whole screen goes 360 degrees around - scope.rotateLeft( 2 * Math.PI * rotateDelta.x / scope.domElement.width * scope.rotateSpeed ); + scope.rotateLeft( 2 * Math.PI * rotateDelta.x / width * scope.rotateSpeed ); // rotating up and down along whole screen attempts to go 360, but limited to 180 - scope.rotateUp( 2 * Math.PI * rotateDelta.y / scope.domElement.height * scope.rotateSpeed ); + scope.rotateUp( 2 * Math.PI * rotateDelta.y / height * scope.rotateSpeed ); rotateStart.copy( rotateEnd ); break;
false
Other
mrdoob
three.js
7b4d0af5fd8cfa6ea613f20e843e81032fac2d48.json
Add support for CommonJS
utils/build/build.py
@@ -46,7 +46,7 @@ def main(argv=None): sources = [] if args.amd: - tmp.write('( function ( root, factory ) {\n\n\tif ( typeof define === \'function\' && define.amd ) {\n\n\t\tdefine( factory );\n\n\t} else {\n\n\t\troot.THREE = factory();\n\n\t}\n\n}( this, function () {\n\n') + tmp.write('( function ( root, factory ) {\n\n\tif ( typeof define === \'function\' && define.amd ) {\n\n\t\tdefine( [\'exports\'], factory );\n\n\t} else if (typeof exports === \'object\') {\n\n\t\tfactory(exports);\n\n\t} else {\n\n\t\tfactory(root);\n\n\t}\n\n}( this, function (exports) {\n\n') for include in args.include: with open('includes/' + include + '.json','r') as f: @@ -59,7 +59,7 @@ def main(argv=None): tmp.write('\n') if args.amd: - tmp.write('return THREE;\n\n} ) );') + tmp.write('exports.THREE = THREE;\n\n} ) );') tmp.close()
false
Other
mrdoob
three.js
037c5d51abb1b630a2c46c198c234708d2199268.json
Fix some issues with THREE.Animation
src/extras/animation/Animation.js
@@ -19,9 +19,6 @@ THREE.Animation = function ( root, name ) { this.interpolationType = THREE.AnimationHandler.LINEAR; - this.points = []; - this.target = new THREE.Vector3(); - }; THREE.Animation.prototype.play = function ( startTime ) { @@ -102,182 +99,189 @@ THREE.Animation.prototype.reset = function () { }; -THREE.Animation.prototype.update = function ( delta ) { - - if ( this.isPlaying === false ) return; - - this.currentTime += delta * this.timeScale; - - // - - var vector; - var types = [ "pos", "rot", "scl" ]; - - var duration = this.data.length; - - if ( this.loop === true && this.currentTime > duration ) { - - this.currentTime %= duration; - this.reset(); - - } - - this.currentTime = Math.min( this.currentTime, duration ); - - for ( var h = 0, hl = this.hierarchy.length; h < hl; h ++ ) { - - var object = this.hierarchy[ h ]; - var animationCache = object.animationCache; - - // loop through pos/rot/scl - - for ( var t = 0; t < 3; t ++ ) { - - // get keys - - var type = types[ t ]; - var prevKey = animationCache.prevKey[ type ]; - var nextKey = animationCache.nextKey[ type ]; - - if ( nextKey.time <= this.currentTime ) { - - prevKey = this.data.hierarchy[ h ].keys[ 0 ]; - nextKey = this.getNextKeyWith( type, h, 1 ); - - while ( nextKey.time < this.currentTime && nextKey.index > prevKey.index ) { - - prevKey = nextKey; - nextKey = this.getNextKeyWith( type, h, nextKey.index + 1 ); - +THREE.Animation.prototype.update = (function(){ + + var points = []; + var target = new THREE.Vector3(); + + // Catmull-Rom spline + + var interpolateCatmullRom = function ( points, scale ) { + + var c = [], v3 = [], + point, intPoint, weight, w2, w3, + pa, pb, pc, pd; + + point = ( points.length - 1 ) * scale; + intPoint = Math.floor( point ); + weight = point - intPoint; + + c[ 0 ] = intPoint === 0 ? intPoint : intPoint - 1; + c[ 1 ] = intPoint; + c[ 2 ] = intPoint > points.length - 2 ? intPoint : intPoint + 1; + c[ 3 ] = intPoint > points.length - 3 ? intPoint : intPoint + 2; + + pa = points[ c[ 0 ] ]; + pb = points[ c[ 1 ] ]; + pc = points[ c[ 2 ] ]; + pd = points[ c[ 3 ] ]; + + w2 = weight * weight; + w3 = weight * w2; + + v3[ 0 ] = interpolate( pa[ 0 ], pb[ 0 ], pc[ 0 ], pd[ 0 ], weight, w2, w3 ); + v3[ 1 ] = interpolate( pa[ 1 ], pb[ 1 ], pc[ 1 ], pd[ 1 ], weight, w2, w3 ); + v3[ 2 ] = interpolate( pa[ 2 ], pb[ 2 ], pc[ 2 ], pd[ 2 ], weight, w2, w3 ); + + return v3; + + }; + + var interpolate = function ( p0, p1, p2, p3, t, t2, t3 ) { + + var v0 = ( p2 - p0 ) * 0.5, + v1 = ( p3 - p1 ) * 0.5; + + return ( 2 * ( p1 - p2 ) + v0 + v1 ) * t3 + ( - 3 * ( p1 - p2 ) - 2 * v0 - v1 ) * t2 + v0 * t + p1; + + }; + + return function ( delta ) { + if ( this.isPlaying === false ) return; + + this.currentTime += delta * this.timeScale; + + // + + var vector; + var types = [ "pos", "rot", "scl" ]; + + var duration = this.data.length; + + if ( this.loop === true && this.currentTime > duration ) { + + this.currentTime %= duration; + this.reset(); + + } else if ( this.loop === false && this.currentTime > duration ) { + + this.stop(); + return; + + } + + this.currentTime = Math.min( this.currentTime, duration ); + + for ( var h = 0, hl = this.hierarchy.length; h < hl; h ++ ) { + + var object = this.hierarchy[ h ]; + var animationCache = object.animationCache; + + // loop through pos/rot/scl + + for ( var t = 0; t < 3; t ++ ) { + + // get keys + + var type = types[ t ]; + var prevKey = animationCache.prevKey[ type ]; + var nextKey = animationCache.nextKey[ type ]; + + if ( nextKey.time <= this.currentTime ) { + + prevKey = this.data.hierarchy[ h ].keys[ 0 ]; + nextKey = this.getNextKeyWith( type, h, 1 ); + + while ( nextKey.time < this.currentTime && nextKey.index > prevKey.index ) { + + prevKey = nextKey; + nextKey = this.getNextKeyWith( type, h, nextKey.index + 1 ); + + } + + animationCache.prevKey[ type ] = prevKey; + animationCache.nextKey[ type ] = nextKey; + } - - animationCache.prevKey[ type ] = prevKey; - animationCache.nextKey[ type ] = nextKey; - - } - - object.matrixAutoUpdate = true; - object.matrixWorldNeedsUpdate = true; - - var scale = ( this.currentTime - prevKey.time ) / ( nextKey.time - prevKey.time ); - - var prevXYZ = prevKey[ type ]; - var nextXYZ = nextKey[ type ]; - - if ( scale < 0 ) scale = 0; - if ( scale > 1 ) scale = 1; - - // interpolate - - if ( type === "pos" ) { - - vector = object.position; - - if ( this.interpolationType === THREE.AnimationHandler.LINEAR ) { - + + object.matrixAutoUpdate = true; + object.matrixWorldNeedsUpdate = true; + + var scale = ( this.currentTime - prevKey.time ) / ( nextKey.time - prevKey.time ); + + var prevXYZ = prevKey[ type ]; + var nextXYZ = nextKey[ type ]; + + if ( scale < 0 ) scale = 0; + if ( scale > 1 ) scale = 1; + + // interpolate + + if ( type === "pos" ) { + + vector = object.position; + + if ( this.interpolationType === THREE.AnimationHandler.LINEAR ) { + + vector.x = prevXYZ[ 0 ] + ( nextXYZ[ 0 ] - prevXYZ[ 0 ] ) * scale; + vector.y = prevXYZ[ 1 ] + ( nextXYZ[ 1 ] - prevXYZ[ 1 ] ) * scale; + vector.z = prevXYZ[ 2 ] + ( nextXYZ[ 2 ] - prevXYZ[ 2 ] ) * scale; + + } else if ( this.interpolationType === THREE.AnimationHandler.CATMULLROM || + this.interpolationType === THREE.AnimationHandler.CATMULLROM_FORWARD ) { + + points[ 0 ] = this.getPrevKeyWith( "pos", h, prevKey.index - 1 )[ "pos" ]; + points[ 1 ] = prevXYZ; + points[ 2 ] = nextXYZ; + points[ 3 ] = this.getNextKeyWith( "pos", h, nextKey.index + 1 )[ "pos" ]; + + scale = scale * 0.33 + 0.33; + + var currentPoint = interpolateCatmullRom( points, scale ); + + vector.x = currentPoint[ 0 ]; + vector.y = currentPoint[ 1 ]; + vector.z = currentPoint[ 2 ]; + + if ( this.interpolationType === THREE.AnimationHandler.CATMULLROM_FORWARD ) { + + var forwardPoint = interpolateCatmullRom( points, scale * 1.01 ); + + target.set( forwardPoint[ 0 ], forwardPoint[ 1 ], forwardPoint[ 2 ] ); + target.sub( vector ); + target.y = 0; + target.normalize(); + + var angle = Math.atan2( target.x, target.z ); + object.rotation.set( 0, angle, 0 ); + + } + + } + + } else if ( type === "rot" ) { + + THREE.Quaternion.slerp( prevXYZ, nextXYZ, object.quaternion, scale ); + + } else if ( type === "scl" ) { + + vector = object.scale; + vector.x = prevXYZ[ 0 ] + ( nextXYZ[ 0 ] - prevXYZ[ 0 ] ) * scale; vector.y = prevXYZ[ 1 ] + ( nextXYZ[ 1 ] - prevXYZ[ 1 ] ) * scale; vector.z = prevXYZ[ 2 ] + ( nextXYZ[ 2 ] - prevXYZ[ 2 ] ) * scale; - - } else if ( this.interpolationType === THREE.AnimationHandler.CATMULLROM || - this.interpolationType === THREE.AnimationHandler.CATMULLROM_FORWARD ) { - - this.points[ 0 ] = this.getPrevKeyWith( "pos", h, prevKey.index - 1 )[ "pos" ]; - this.points[ 1 ] = prevXYZ; - this.points[ 2 ] = nextXYZ; - this.points[ 3 ] = this.getNextKeyWith( "pos", h, nextKey.index + 1 )[ "pos" ]; - - scale = scale * 0.33 + 0.33; - - var currentPoint = this.interpolateCatmullRom( this.points, scale ); - - vector.x = currentPoint[ 0 ]; - vector.y = currentPoint[ 1 ]; - vector.z = currentPoint[ 2 ]; - - if ( this.interpolationType === THREE.AnimationHandler.CATMULLROM_FORWARD ) { - - var forwardPoint = this.interpolateCatmullRom( this.points, scale * 1.01 ); - - this.target.set( forwardPoint[ 0 ], forwardPoint[ 1 ], forwardPoint[ 2 ] ); - this.target.sub( vector ); - this.target.y = 0; - this.target.normalize(); - - var angle = Math.atan2( this.target.x, this.target.z ); - object.rotation.set( 0, angle, 0 ); - - } - + } - - } else if ( type === "rot" ) { - - THREE.Quaternion.slerp( prevXYZ, nextXYZ, object.quaternion, scale ); - - } else if ( type === "scl" ) { - - vector = object.scale; - - vector.x = prevXYZ[ 0 ] + ( nextXYZ[ 0 ] - prevXYZ[ 0 ] ) * scale; - vector.y = prevXYZ[ 1 ] + ( nextXYZ[ 1 ] - prevXYZ[ 1 ] ) * scale; - vector.z = prevXYZ[ 2 ] + ( nextXYZ[ 2 ] - prevXYZ[ 2 ] ) * scale; - + } - + } - } + }; - if ( this.loop === false && this.currentTime > duration ) { +})(); - this.stop(); - } - -}; - -// Catmull-Rom spline - -THREE.Animation.prototype.interpolateCatmullRom = function ( points, scale ) { - - var c = [], v3 = [], - point, intPoint, weight, w2, w3, - pa, pb, pc, pd; - - point = ( points.length - 1 ) * scale; - intPoint = Math.floor( point ); - weight = point - intPoint; - - c[ 0 ] = intPoint === 0 ? intPoint : intPoint - 1; - c[ 1 ] = intPoint; - c[ 2 ] = intPoint > points.length - 2 ? intPoint : intPoint + 1; - c[ 3 ] = intPoint > points.length - 3 ? intPoint : intPoint + 2; - - pa = points[ c[ 0 ] ]; - pb = points[ c[ 1 ] ]; - pc = points[ c[ 2 ] ]; - pd = points[ c[ 3 ] ]; - - w2 = weight * weight; - w3 = weight * w2; - - v3[ 0 ] = this.interpolate( pa[ 0 ], pb[ 0 ], pc[ 0 ], pd[ 0 ], weight, w2, w3 ); - v3[ 1 ] = this.interpolate( pa[ 1 ], pb[ 1 ], pc[ 1 ], pd[ 1 ], weight, w2, w3 ); - v3[ 2 ] = this.interpolate( pa[ 2 ], pb[ 2 ], pc[ 2 ], pd[ 2 ], weight, w2, w3 ); - - return v3; - -}; - -THREE.Animation.prototype.interpolate = function ( p0, p1, p2, p3, t, t2, t3 ) { - - var v0 = ( p2 - p0 ) * 0.5, - v1 = ( p3 - p1 ) * 0.5; - - return ( 2 * ( p1 - p2 ) + v0 + v1 ) * t3 + ( - 3 * ( p1 - p2 ) - 2 * v0 - v1 ) * t2 + v0 * t + p1; - -};
false
Other
mrdoob
three.js
e216c173c78af1e0302da1a7d3b422c32a079481.json
Use Shader Defines for Bokeh Shader 2 - from `THREE.BokehShader.generate(rings, samples);` - to `material.defines = {RINGS: rings, SAMPLES}` - thanks to @gyro3 suggestion in #3182
examples/js/shaders/BokehShader2.js
@@ -4,6 +4,8 @@ * Depth-of-field shader with bokeh * ported from GLSL shader by Martins Upitis * http://blenderartists.org/forum/showthread.php?237488-GLSL-depth-of-field-with-bokeh-v2-4-(update) + * + * Requires #define RINGS and SAMPLES integers */ @@ -91,8 +93,8 @@ THREE.BokehShader = { "//------------------------------------------", "//user variables", - "const int samples = #SAMPLES#; //samples on the first ring", - "const int rings = #RINGS#; //ring count", + "const int samples = SAMPLES; //samples on the first ring", + "const int rings = RINGS; //ring count", "const int maxringsamples = rings * samples;", @@ -371,35 +373,6 @@ THREE.BokehShader = { "gl_FragColor.a = 1.0;", "} " - ].join("\n"), - - generate: function(rings, samples) { - - var frag = THREE.BokehShader.fragmentShader; - frag = frag - .replace(/#RINGS#/, rings) - .replace(/#SAMPLES#/, samples); - - /* - var unboxing = false; - if (unboxing) { - var codegen = []; - for (var i=1;i<=rings;i++) { - var ringsamples = i * samples; - var a = 'if (i==?) {'.replace('?', i); - codegen.push( i == 1 ? a : ' ' + a); //else - codegen.push('for (int j = 0 ; j < ?; j++) '.replace('?', ringsamples)); - codegen.push('\ts += gather(float(i), float(j), ?, col, w, h, blur);'.replace('?', ringsamples)) - codegen.push('}'); - } - - codegen = codegen.join('\n'); - - frag = frag.replace(/\/[*]unboxstart[*]\/([\s\S]*)\/[*]unboxend[*]\//m, codegen); - } - */ - - return frag; - } + ].join("\n") };
true
Other
mrdoob
three.js
e216c173c78af1e0302da1a7d3b422c32a079481.json
Use Shader Defines for Bokeh Shader 2 - from `THREE.BokehShader.generate(rings, samples);` - to `material.defines = {RINGS: rings, SAMPLES}` - thanks to @gyro3 suggestion in #3182
examples/webgl_postprocessing_dof2.html
@@ -432,7 +432,6 @@ postprocessing.rtTextureColor = new THREE.WebGLRenderTarget( window.innerWidth, height, pars ); - var fragmentShader = THREE.BokehShader.generate(shaderSettings.rings, shaderSettings.samples); var bokeh_shader = THREE.BokehShader; @@ -449,7 +448,11 @@ uniforms: postprocessing.bokeh_uniforms, vertexShader: bokeh_shader.vertexShader, - fragmentShader: fragmentShader + fragmentShader: bokeh_shader.fragmentShader, + defines: { + RINGS: shaderSettings.rings, + SAMPLES: shaderSettings.samples + } } ); @@ -460,9 +463,9 @@ } function shaderUpdate() { - var fragmentShader = THREE.BokehShader.generate(shaderSettings.rings, shaderSettings.samples); + postprocessing.materialBokeh.defines.RINGS = shaderSettings.rings; + postprocessing.materialBokeh.defines.SAMPLES = shaderSettings.samples; - postprocessing.materialBokeh.fragmentShader = fragmentShader; postprocessing.materialBokeh.needsUpdate = true; }
true
Other
mrdoob
three.js
64d37bbffaf0be2fcb2b468bb26f9061b4914244.json
Add a THREE loader for PLY ASCII files.
examples/js/loaders/PLYLoader.js
@@ -0,0 +1,172 @@ +/** + * @author Wei Meng / http://about.me/menway + * + * Description: A THREE loader for PLY ASCII files (known as the Polygon File Format or the Stanford Triangle Format). + * + * Currently only supports ASCII encoded files. + * + * Limitations: ASCII decoding assumes file is UTF-8. + * + * Usage: + * var loader = new THREE.PLYLoader(); + * loader.addEventListener( 'load', function ( event ) { + * + * var geometry = event.content; + * scene.add( new THREE.Mesh( geometry ) ); + * + * } ); + * loader.load( './models/ply/ascii/dolphins.ply' ); + */ + + +THREE.PLYLoader = function () { + + THREE.EventDispatcher.call( this ); + +}; + +THREE.PLYLoader.prototype = { + + constructor: THREE.PLYLoader, + + load: function ( url, callback ) { + + var scope = this; + var request = new XMLHttpRequest(); + + request.addEventListener( 'load', function ( event ) { + + var geometry; + geometry = scope.parse( event.target.response ); + + scope.dispatchEvent( { type: 'load', content: geometry } ); + + if ( callback ) callback( geometry ); + + }, false ); + + request.addEventListener( 'progress', function ( event ) { + + scope.dispatchEvent( { type: 'progress', loaded: event.loaded, total: event.total } ); + + }, false ); + + request.addEventListener( 'error', function () { + + scope.dispatchEvent( { type: 'error', message: 'Couldn\'t load URL [' + url + ']' } ); + + }, false ); + + request.open( 'GET', url, true ); + request.responseType = "arraybuffer"; + request.send( null ); + + }, + + bin2str: function (buf) { + + var array_buffer = new Uint8Array(buf); + var str = ''; + for(var i = 0; i < buf.byteLength; i++) { + str += String.fromCharCode(array_buffer[i]); // implicitly assumes little-endian + } + + return str; + + }, + + isASCII: function(buf){ + + // currently only supports ASCII encoded files. + return true; + + }, + + parse: function (buf) { + + if( this.isASCII(buf) ) { + var str = this.bin2str(buf); + return this.parseASCII(str); + } else { + return this.parseBinary(buf); + } + + }, + + parseASCII: function ( data ) { + + // PLY ascii format specification, as per http://en.wikipedia.org/wiki/PLY_(file_format) + + var geometry = new THREE.Geometry(); + + var result; + + var patternHeader = /ply([\s\S]*)end_header/; + var header = ""; + if ( ( result = patternHeader.exec( data ) ) != null ) { + header = result [ 1 ]; + } + + var patternBody = /end_header([\s\S]*)$/; + var body = ""; + if ( ( result = patternBody.exec( data ) ) != null ) { + body = result [ 1 ]; + } + + var patternVertexCount = /element[\s]+vertex[\s]+(\d+)/g; + var vertexCount = 0; + if ( ( result = patternVertexCount.exec( header ) ) != null ) { + vertexCount = parseInt( result[ 1 ] ); + } + + var patternFaceCount = /element[\s]+face[\s]+(\d+)/g; + var faceCount = 0; + if ( ( result = patternFaceCount.exec( header ) ) != null ) { + faceCount = parseInt( result[ 1 ] ); + } + + if ( vertexCount != 0 && faceCount != 0 ) { + // Vertex + // assume x y z + var patternVertex = /([-+]?[0-9]+\.?[0-9]*([eE][-+]?[0-9]+)?)+[\s]+([-+]?[0-9]*\.?[0-9]+([eE][-+]?[0-9]+)?)+[\s]+([-+]?[0-9]*\.?[0-9]+([eE][-+]?[0-9]+)?)+/g; + for ( var i = 0; i < vertexCount; i++) { + if ( ( result = patternVertex.exec( body ) ) != null ) { + geometry.vertices.push( new THREE.Vector3( parseFloat( result[ 1 ] ), parseFloat( result[ 3 ] ), parseFloat( result[ 5 ] ) ) ); + } else { + console.error('Vertex error: vertex count mismatch.'); + return geometry; + } + } + + // Face + // assume 3 index0 index1 index2 + var patternFace = /3[\s]+([-+]?[0-9]+)[\s]+([-+]?[0-9]+)[\s]+([-+]?[0-9]+)/g; + for (var i = 0; i < faceCount; i++) { + if ( ( result = patternFace.exec( body ) ) != null ) { + geometry.faces.push( new THREE.Face3( parseInt( result[ 1 ] ), parseInt( result[ 2 ] ), parseInt( result[ 3 ] ) ) ); + } else { + console.error('Face error: vertex count mismatch.'); + return geometry; + } + } + + } else { + console.error( 'Header error: vertexCount(' + vertexCount + '), faceCount(' + faceCount + ').' ); + } + + geometry.computeCentroids(); + geometry.computeBoundingSphere(); + + return geometry; + + }, + + parseBinary: function (buf) { + + // not supported yet + console.error('Not supported yet.'); + + } + + +};
true
Other
mrdoob
three.js
64d37bbffaf0be2fcb2b468bb26f9061b4914244.json
Add a THREE loader for PLY ASCII files.
examples/models/ply/ascii/dolphins.ply
@@ -0,0 +1,2553 @@ +ply +format ascii 1.0 +element vertex 855 +property float32 x +property float32 y +property float32 z +element face 1689 +property list uint8 int32 vertex_indices +end_header +13.6601 0 548.364 +-24.9399 0 513.564 +-19.6099 -8.13 512.804 +21.2801 -6.1 547.094 +46.6801 0 564.364 +49.9901 -3.56 561.324 +78.1801 0 566.654 +79.9601 -1.27 562.334 +96.2101 0 561.824 +88.8501 0 496.294 +78.1801 0 521.184 +78.6901 -9.91 503.154 +39.0601 -11.68 511.024 +54.0501 -6.1 532.364 +64.7201 -3.56 544.044 +-201.22 0 402.574 +-196.14 -7.62 406.384 +-190.81 0 414.254 +-173.28 0 430.004 +-177.09 -13.97 423.654 +-113.59 0 472.924 +-147.63 0 449.304 +-152.45 -5.33 444.484 +-114.61 -18.29 466.834 +-151.44 -13.97 442.444 +-70.9199 0 493.504 +-71.6799 -22.35 488.164 +-22.6599 -24.64 497.824 +35.5101 -26.67 496.294 +91.6401 -20.32 484.354 +157.94 -11.68 448.294 +159.21 0 452.354 +199.85 0 417.304 +192.23 -14.73 408.154 +217.88 0 393.684 +207.97 -11.94 381.234 +230.33 0 369.804 +220.93 -7.87 358.374 +236.42 0 349.734 +230.83 -9.65 342.374 +232.61 0 330.944 +228.55 -7.37 334.754 +-153.98 -22.35 436.094 +-137.72 -32.77 434.824 +-108.26 -29.97 452.864 +-71.1699 -32 469.374 +-22.6599 -35.81 480.044 +27.8901 -34.04 478.774 +88.3401 -28.45 470.894 +154.63 -18.29 441.434 +-159.56 -31.75 423.394 +-149.4 -36.58 421.874 +-167.18 -27.43 416.284 +-183.44 -20.83 399.264 +-197.66 -10.16 385.044 +-158.04 -30.99 416.284 +-147.12 -35.81 411.964 +-199.44 -13.97 377.424 +-224.33 -7.37 346.944 +-219.25 -7.37 344.654 +-192.58 -14.99 367.774 +-206.81 0 376.154 +-230.43 0 344.654 +-229.16 -4.06 343.134 +-204.01 -5.08 378.444 +-160.58 -30.73 410.444 +-167.95 -30.48 402.574 +-166.93 -30.73 399.774 +-180.39 -26.42 395.204 +-177.09 -25.91 389.874 +-188.77 -16.26 363.964 +-212.9 -8.38 343.644 +-170.49 -25.91 378.944 +-161.6 -34.54 394.184 +-138.74 -34.8 386.314 +-167.95 -27.43 373.364 +-156.52 -34.8 399.524 +-154.48 -34.54 408.664 +-140.77 -38.61 397.994 +-209.09 -10.92 340.844 +-187.25 -18.29 358.884 +-150.67 -31.75 381.234 +-163.88 -17.02 351.774 +-128.32 -22.35 361.164 +-181.41 -10.16 351.004 +-186.74 -17.27 355.324 +-99.8699 -43.18 382.504 +-98.0999 -35.05 372.594 +-136.45 -40.39 399.014 +-96.8299 -49.28 412.734 +-131.37 -40.13 416.794 +-130.35 -36.58 429.744 +-100.13 -42.67 436.354 +-68.6299 -46.23 446.004 +-56.6899 -51.05 420.854 +-18.0899 -48.01 448.294 +-13.0099 -51.05 429.494 +29.9201 -46.23 453.374 +31.9501 -49.02 429.744 +85.8001 -43.94 447.274 +85.2901 -44.7 420.354 +144.98 -33.02 422.384 +134.82 -28.45 400.034 +180.29 -23.37 397.494 +165.56 -21.84 377.674 +198.07 -13.97 373.364 +187.4 -14.22 362.434 +210.01 -9.91 356.854 +199.34 -10.67 349.994 +224.23 -18.29 338.564 +-61.0099 -41.15 388.094 +-11.4799 -37.59 395.454 +26.3601 -38.1 397.494 +74.6201 -30.99 394.954 +124.41 -17.27 381.484 +157.94 -9.65 361.424 +178.76 -7.11 353.044 +199.85 -5.59 336.024 +209.24 -11.94 327.894 +-71.6799 -73.66 357.354 +-72.4399 -71.37 354.564 +-49.5799 -64.52 368.534 +-25.9599 -77.22 353.294 +-40.1799 -80.77 350.504 +-60.4999 -80.01 353.044 +-15.0399 0 382.254 +-58.4699 0 372.344 +72.3401 0 384.024 +127.71 0 377.174 +175.21 0 350.504 +199.59 0 333.994 +-123.75 0 358.624 +-88.9499 0 365.744 +-156.01 0 348.974 +-178.61 0 348.974 +-206.55 -7.87 337.804 +-203.51 0 336.534 +-220.02 -4.57 330.684 +-222.3 0 328.404 +234.9 -63.25 286.494 +221.44 -73.15 304.524 +236.17 -86.61 277.854 +228.04 -16.51 324.334 +233.63 -9.65 310.114 +232.1 0 318.244 +238.2 -5.84 301.224 +234.39 0 308.334 +222.45 -24.13 336.024 +-227.13 0 338.054 +-226.62 -3.81 337.804 +-224.84 -4.83 332.724 +-226.62 0 331.954 +-59.9999 -78.23 350.244 +-39.9299 -79.25 349.234 +87.5801 0 542.014 +99.2601 0 553.704 +28.1401 0 385.804 +154.89 0 360.664 +209.5 0 325.354 +214.58 -52.32 317.734 +219.66 -73.15 302.744 +217.63 -52.32 320.784 +236.42 -21.59 294.364 +-150.93 0 447.274 +21.2801 6.1 547.094 +-19.6099 8.13 512.804 +49.9901 3.56 561.324 +79.9601 1.27 562.334 +78.6901 9.91 503.154 +54.0501 6.1 532.364 +39.0601 11.68 511.024 +64.7201 3.56 544.044 +-196.14 7.62 406.384 +-177.09 13.97 423.654 +-152.45 5.33 444.484 +-151.44 13.97 442.444 +-114.61 18.29 466.834 +-71.6799 22.35 488.164 +-22.6599 24.64 497.824 +35.5101 26.67 496.294 +91.6401 20.32 484.354 +157.94 11.68 448.294 +192.23 14.73 408.154 +207.97 11.94 381.234 +220.93 7.87 358.374 +230.83 9.65 342.374 +228.55 7.37 334.754 +-153.98 22.35 436.094 +-137.72 32.77 434.824 +-108.26 29.97 452.864 +-71.1699 32 469.374 +-22.6599 35.81 480.044 +27.8901 34.04 478.774 +88.3401 28.45 470.894 +154.63 18.29 441.434 +-149.4 36.58 421.874 +-159.56 31.75 423.394 +-167.18 27.43 416.284 +-183.44 20.83 399.264 +-197.66 10.16 385.044 +-147.12 35.81 411.964 +-158.04 30.99 416.284 +-199.44 13.97 377.424 +-219.25 7.37 344.654 +-224.33 7.37 346.944 +-192.58 14.99 367.774 +-204.01 5.08 378.444 +-229.16 4.06 343.134 +-160.58 30.73 410.444 +-166.93 30.73 399.774 +-167.95 30.48 402.574 +-180.39 26.42 395.204 +-177.09 25.91 389.874 +-188.77 16.26 363.964 +-212.9 8.38 343.644 +-170.49 25.91 378.944 +-161.6 34.54 394.184 +-138.74 34.8 386.314 +-167.95 27.43 373.364 +-156.52 34.8 399.524 +-154.48 34.54 408.664 +-140.77 38.61 397.994 +-209.09 10.92 340.844 +-187.25 18.29 358.884 +-163.88 17.02 351.774 +-150.67 31.75 381.234 +-128.32 22.35 361.164 +-181.41 10.16 351.004 +-186.74 17.27 355.324 +-99.8699 43.18 382.504 +-98.0999 35.05 372.594 +-136.45 40.39 399.014 +-96.8299 49.28 412.734 +-131.37 40.13 416.794 +-130.35 36.58 429.744 +-100.13 42.67 436.354 +-68.6299 46.23 446.004 +-56.6899 51.05 420.854 +-18.0899 48.01 448.294 +-13.0099 51.05 429.494 +29.9201 46.23 453.374 +31.9501 49.02 429.744 +85.8001 43.94 447.274 +85.2901 44.7 420.354 +144.98 33.02 422.384 +134.82 28.45 400.034 +180.29 23.37 397.494 +165.56 21.84 377.674 +198.07 13.97 373.364 +187.4 14.22 362.434 +210.01 9.91 356.854 +199.34 10.67 349.994 +224.23 18.29 338.564 +-61.0099 41.15 388.094 +-11.4799 37.59 395.454 +26.3601 38.1 397.494 +74.6201 30.99 394.954 +124.41 17.27 381.484 +157.94 9.65 361.424 +178.76 7.11 353.044 +199.85 5.59 336.024 +209.24 11.94 327.894 +-71.6799 73.66 357.354 +-72.4399 71.37 354.564 +-49.5799 64.52 368.534 +-25.9599 77.22 353.294 +-60.4999 80.01 353.044 +-40.1799 80.77 350.504 +-206.55 7.87 337.804 +-220.02 4.57 330.684 +236.17 86.61 277.854 +221.44 73.15 304.524 +234.9 63.25 286.494 +228.04 16.51 324.334 +233.63 9.65 310.114 +238.2 5.84 301.224 +222.45 24.13 336.024 +-226.62 3.81 337.804 +-224.84 4.83 332.724 +-39.9299 79.25 349.234 +-59.9999 78.23 350.244 +219.66 73.15 302.744 +214.58 52.32 317.734 +217.63 52.32 320.784 +236.42 21.59 294.364 +-226.812 0 232.62 +-265.411 0 197.82 +-260.082 -8.13 197.06 +-219.191 -6.1 231.35 +-193.792 0 248.62 +-190.482 -3.56 245.58 +-162.292 0 250.91 +-160.512 -1.27 246.59 +-144.262 0 246.08 +-151.622 0 180.55 +-162.292 0 205.44 +-161.782 -9.91 187.41 +-201.411 -11.68 195.28 +-186.422 -6.1 216.62 +-175.751 -3.56 228.3 +-443.296 0 110.65 +-437.918 -7.62 114.026 +-431.955 0 121.428 +-413.181 0 135.672 +-417.503 -13.97 129.659 +-350.141 0 173.502 +-386.02 0 152.782 +-391.223 -5.33 148.377 +-351.662 -18.29 167.517 +-390.385 -13.97 146.261 +-305.914 0 190.478 +-307.113 -22.35 185.219 +-263.132 -24.64 182.08 +-204.962 -26.67 180.55 +-148.832 -20.32 168.61 +-93.9607 -11.68 156.706 +-94.249 0 160.947 +-53.2208 0 148.077 +-53.8795 -14.73 136.347 +-28.599 0 139.466 +-27.6869 -11.94 123.685 +-5.11479 0 130.218 +-3.27847 -7.87 115.57 +13.5002 0 121.323 +15.5502 -9.65 112.299 +25.9516 0 106.637 +20.0443 -7.37 105.697 +-393.443 -22.35 140.143 +-377.343 -32.77 137.531 +-346.491 -29.97 153.069 +-308.161 -32 166.451 +-263.132 -35.81 164.3 +-212.582 -34.04 163.03 +-152.132 -28.45 155.15 +-94.3022 -18.29 149.11 +-400.055 -31.75 127.949 +-390.056 -36.58 125.592 +-408.238 -27.43 121.494 +-425.851 -20.83 105.879 +-441.2 -10.16 92.8853 +-399.129 -30.99 120.737 +-388.604 -35.81 115.528 +-443.605 -13.97 85.4389 +-470.933 -7.37 57.1247 +-466.06 -7.37 54.4219 +-437.567 -14.99 75.254 +-451.055 0 84.7835 +-477.202 0 55.3477 +-476.062 -4.06 53.7277 +-448.074 -5.08 86.8338 +-402.144 -30.73 115.128 +-410.14 -30.48 107.895 +-409.356 -30.73 105.02 +-423.148 -26.42 101.58 +-420.301 -25.91 95.9954 +-434.086 -16.26 71.1415 +-459.816 -8.38 52.8895 +-414.628 -25.91 84.5564 +-404.507 -34.54 99.0079 +-382.377 -34.8 89.2719 +-412.559 -27.43 78.7852 +-399.002 -34.8 103.909 +-396.212 -34.54 112.849 +-383.433 -38.61 101.08 +-456.251 -10.92 49.7836 +-432.992 -18.29 65.9531 +-394.687 -31.75 85.1973 +-410.291 -17.02 56.9323 +-374.075 -22.35 63.3454 +-427.824 -10.16 57.6166 +-432.778 -17.27 62.3631 +-343.956 -43.18 82.2562 +-343.013 -35.05 72.2337 +-379.043 -40.39 101.739 +-338.423 -49.28 112.131 +-372.508 -40.13 119.037 +-370.419 -36.58 131.858 +-339.756 -42.67 135.943 +-307.565 -46.23 142.951 +-297.749 -51.05 116.899 +-258.562 -48.01 132.55 +-253.482 -51.05 113.75 +-210.551 -46.23 137.63 +-208.521 -49.02 114 +-154.672 -43.94 131.53 +-155.182 -44.7 104.61 +-95.8451 -33.02 127.853 +-97.1407 -28.45 103.346 +-57.3849 -23.37 121.064 +-59.4882 -21.84 96.521 +-30.0968 -13.97 111.396 +-31.8031 -14.22 96.2092 +-10.0972 -9.91 106.796 +-13.6219 -10.67 94.4402 +13.9583 -18.29 104.714 +-304.767 -41.15 84.6091 +-251.952 -37.59 79.7098 +-214.112 -38.1 81.7498 +-165.852 -30.99 79.2098 +-100.528 -17.27 82.3284 +-57.8264 -9.65 78.6461 +-33.3411 -7.11 83.4557 +-3.05347 -5.59 84.6762 +10.9947 -11.94 86.1008 +-317.945 -73.66 69.0449 +-318.934 -71.37 67.2508 +-294.996 -64.52 75.1924 +-272.719 -77.22 63.8741 +-287.121 -80.77 62.8159 +-307.161 -80.01 65.598 +-255.512 0 66.5098 +-303.54 0 68.7029 +-168.132 0 68.2798 +-95.5019 0 79.4587 +-34.955 0 79.2651 +-1.74321 0 83.0497 +-369.731 0 60.4357 +-334.461 0 64.6495 +-402.68 0 53.4902 +-425.202 0 55.3617 +-453.971 -7.87 46.5438 +-451.047 0 45.0264 +-467.984 -4.57 40.5636 +-470.445 0 38.4802 +67.3042 -63.25 84.656 +40.4659 -73.15 81.6897 +76.6564 -86.61 81.9515 +28.2489 -16.51 98.899 +44.5047 -9.65 95.526 +36.3058 0 98.7424 +55.7289 -5.84 94.9715 +46.6273 0 95.235 +14.6811 -24.13 101.688 +-474.46 0 48.4971 +-473.972 -3.81 48.2057 +-472.619 -4.83 42.9957 +-474.457 0 42.3758 +-306.894 -78.23 63.7284 +-286.977 -79.25 61.9666 +-152.892 0 226.27 +-141.212 0 237.96 +-212.332 0 70.0598 +-60.3815 0 76.4308 +13.2402 0 84.6209 +23.6031 -52.32 83.7838 +40.6611 -73.15 79.116 +23.4522 -52.32 88.1758 +60.8854 -21.59 89.8955 +-389.477 0 151.032 +-219.191 6.1 231.35 +-260.082 8.13 197.06 +-190.482 3.56 245.58 +-160.512 1.27 246.59 +-161.782 9.91 187.41 +-186.422 6.1 216.62 +-201.411 11.68 195.28 +-175.751 3.56 228.3 +-437.918 7.62 114.026 +-417.503 13.97 129.659 +-391.223 5.33 148.377 +-390.385 13.97 146.261 +-351.662 18.29 167.517 +-307.113 22.35 185.219 +-263.132 24.64 182.08 +-204.962 26.67 180.55 +-148.832 20.32 168.61 +-93.9607 11.68 156.706 +-53.8795 14.73 136.347 +-27.6869 11.94 123.685 +-3.27847 7.87 115.57 +15.5502 9.65 112.299 +20.0443 7.37 105.697 +-393.443 22.35 140.143 +-377.343 32.77 137.531 +-346.491 29.97 153.069 +-308.161 32 166.451 +-263.132 35.81 164.3 +-212.582 34.04 163.03 +-152.132 28.45 155.15 +-94.3022 18.29 149.11 +-390.056 36.58 125.592 +-400.055 31.75 127.949 +-408.238 27.43 121.494 +-425.851 20.83 105.879 +-441.2 10.16 92.8853 +-388.604 35.81 115.528 +-399.129 30.99 120.737 +-443.605 13.97 85.4389 +-466.06 7.37 54.4219 +-470.933 7.37 57.1247 +-437.567 14.99 75.254 +-448.074 5.08 86.8338 +-476.062 4.06 53.7277 +-402.144 30.73 115.128 +-409.356 30.73 105.02 +-410.14 30.48 107.895 +-423.148 26.42 101.58 +-420.301 25.91 95.9954 +-434.086 16.26 71.1415 +-459.816 8.38 52.8895 +-414.628 25.91 84.5564 +-404.507 34.54 99.0079 +-382.377 34.8 89.2719 +-412.559 27.43 78.7852 +-399.002 34.8 103.909 +-396.212 34.54 112.849 +-383.433 38.61 101.08 +-456.251 10.92 49.7836 +-432.992 18.29 65.9531 +-410.291 17.02 56.9323 +-394.687 31.75 85.1973 +-374.075 22.35 63.3454 +-427.824 10.16 57.6166 +-432.778 17.27 62.3631 +-343.956 43.18 82.2562 +-343.013 35.05 72.2337 +-379.043 40.39 101.739 +-338.423 49.28 112.131 +-372.508 40.13 119.037 +-370.419 36.58 131.858 +-339.756 42.67 135.943 +-307.565 46.23 142.951 +-297.749 51.05 116.899 +-258.562 48.01 132.55 +-253.482 51.05 113.75 +-210.551 46.23 137.63 +-208.521 49.02 114 +-154.672 43.94 131.53 +-155.182 44.7 104.61 +-95.8451 33.02 127.853 +-97.1407 28.45 103.346 +-57.3849 23.37 121.064 +-59.4882 21.84 96.521 +-30.0968 13.97 111.396 +-31.8031 14.22 96.2092 +-10.0972 9.91 106.796 +-13.6219 10.67 94.4402 +13.9583 18.29 104.714 +-304.767 41.15 84.6091 +-251.952 37.59 79.7098 +-214.112 38.1 81.7498 +-165.852 30.99 79.2098 +-100.528 17.27 82.3284 +-57.8264 9.65 78.6461 +-33.3411 7.11 83.4557 +-3.05347 5.59 84.6762 +10.9947 11.94 86.1008 +-317.945 73.66 69.0449 +-318.934 71.37 67.2508 +-294.996 64.52 75.1924 +-272.719 77.22 63.8741 +-307.161 80.01 65.598 +-287.121 80.77 62.8159 +-453.971 7.87 46.5438 +-467.984 4.57 40.5636 +76.6564 86.61 81.9515 +40.4659 73.15 81.6897 +67.3042 63.25 84.656 +28.2489 16.51 98.899 +44.5047 9.65 95.526 +55.7289 5.84 94.9715 +14.6811 24.13 101.688 +-473.972 3.81 48.2057 +-472.619 4.83 42.9957 +-286.977 79.25 61.9666 +-306.894 78.23 63.7284 +40.6611 73.15 79.116 +23.6031 52.32 83.7838 +23.4522 52.32 88.1758 +60.8854 21.59 89.8955 +60.3909 0 -14.267 +21.7909 0 -49.0671 +27.1209 -8.13 -49.827 +68.0109 -6.1 -15.5371 +93.4109 0 1.73289 +96.7209 -3.56 -1.30702 +124.911 0 4.02293 +126.691 -1.27 -0.297073 +142.941 0 -0.807022 +135.581 0 -66.3371 +124.911 0 -41.447 +125.421 -9.91 -59.4771 +85.7909 -11.68 -51.6071 +100.781 -6.1 -30.267 +111.451 -3.56 -18.5871 +-155.829 0 -105.688 +-149.806 -7.62 -103.701 +-142.33 0 -97.8861 +-121.27 0 -88.0264 +-126.647 -13.97 -93.0152 +-55.682 0 -61.1221 +-92.3232 0 -76.2877 +-98 -5.33 -79.7238 +-57.8645 -18.29 -66.8608 +-97.5808 -13.97 -81.9538 +-13.146 0 -48.7491 +-14.648 -22.35 -53.8977 +24.0709 -24.64 -64.8071 +82.2409 -26.67 -66.3371 +138.371 -20.32 -78.2771 +186.158 -11.68 -81.2166 +185.2 0 -77.0929 +220.899 0 -79.2334 +224.718 -14.73 -90.2981 +243.424 0 -77.0948 +251.86 -11.94 -90.2856 +265.535 0 -72.7003 +275.528 -7.87 -83.2222 +283.87 0 -68.0132 +291.213 -9.65 -73.1992 +302.109 0 -69.5868 +298.799 -7.37 -74.661 +-101.583 -22.35 -87.4271 +-86.6068 -32.77 -92.7643 +-54.8287 -29.97 -81.8477 +-17.0994 -32 -72.5196 +24.0709 -35.81 -82.5871 +74.6209 -34.04 -83.8571 +135.071 -28.45 -91.7371 +187.212 -18.29 -88.7372 +-110.201 -31.75 -98.1805 +-100.949 -36.58 -102.346 +-119.391 -27.43 -102.907 +-139.916 -20.83 -114.412 +-158.108 -10.16 -123.431 +-110.68 -30.99 -105.435 +-101.342 -35.81 -112.507 +-162.339 -13.97 -130.052 +-197.49 -7.37 -149.936 +-193.283 -7.37 -153.939 +-158.784 -14.99 -141.428 +-169.935 0 -128.784 +-204.388 0 -149.785 +-203.703 -4.06 -151.676 +-166.443 -5.08 -127.569 +-114.712 -30.73 -110.356 +-124.024 -30.48 -115.833 +-123.842 -30.73 -118.808 +-138.214 -26.42 -119.208 +-136.626 -25.91 -125.288 +-156.248 -16.26 -146.274 +-187.302 -8.38 -157.182 +-133.434 -25.91 -137.698 +-120.252 -34.54 -125.685 +-99.8194 -34.8 -139.458 +-132.58 -27.43 -143.784 +-113.8 -34.8 -121.973 +-109.325 -34.54 -113.734 +-98.7887 -38.61 -127.648 +-184.476 -10.92 -161.164 +-156.383 -18.29 -151.579 +-113.087 -31.75 -141.172 +-134.962 -17.02 -165.628 +-95.8002 -22.35 -166.454 +-153.051 -10.16 -160.931 +-157.031 -17.27 -155.117 +-61.5124 -43.18 -152.391 +-61.8778 -35.05 -162.451 +-94.2744 -40.39 -127.765 +-52.0421 -49.28 -123.469 +-84.9024 -40.13 -111.795 +-80.8243 -36.58 -99.4687 +-50.4567 -42.67 -99.6724 +-18.4438 -46.23 -95.9878 +-10.8055 -51.05 -122.734 +28.6409 -48.01 -114.337 +33.7209 -51.05 -133.137 +76.6509 -46.23 -109.257 +78.6809 -49.02 -132.887 +132.531 -43.94 -115.357 +132.021 -44.7 -142.277 +189.676 -33.02 -109.892 +192.987 -28.45 -134.216 +227.424 -23.37 -105.712 +234.832 -21.84 -129.226 +256.038 -13.97 -102.08 +262.305 -14.22 -116.033 +275.432 -9.91 -94.4293 +279.807 -10.67 -106.572 +295.199 -18.29 -79.8126 +-20.5883 -41.15 -154.358 +35.2509 -37.59 -167.177 +73.0909 -38.1 -165.137 +121.351 -30.99 -167.677 +193.14 -17.27 -155.554 +243.877 -9.65 -144.922 +267.513 -7.11 -127.824 +295.087 -5.59 -106.996 +305.738 -11.94 -95.4139 +-35.8993 -73.66 -157.12 +-37.1344 -71.37 -158.801 +-11.1361 -64.52 -153.047 +11.7804 -77.22 -165.713 +-3.68383 -80.77 -165.948 +-24.8163 -80.01 -161.601 +31.6909 0 -180.377 +-20.6941 0 -170.311 +119.071 0 -178.607 +199.757 0 -157.293 +268.094 0 -132.355 +297.281 0 -107.278 +-91.7303 0 -170.067 +-53.8658 0 -171.081 +-127.72 0 -170.631 +-150.86 0 -163.751 +-182.992 -7.87 -164.915 +-180.358 0 -167.178 +-199.213 -4.57 -166.68 +-202.374 0 -167.949 +342.92 -63.25 -47.1378 +330.172 -73.15 -73.6594 +349.473 -86.61 -39.3583 +309.174 -16.51 -73.0276 +321.927 -9.65 -61.7793 +314.496 0 -66.6421 +328.67 -5.84 -52.3222 +323.395 0 -60.1321 +297.777 -24.13 -81.4629 +-203.597 0 -157.16 +-203.182 -3.81 -157.585 +-203.311 -4.83 -162.977 +-205.392 0 -163.02 +-24.7063 -78.23 -163.487 +-3.58835 -79.25 -166.805 +134.311 0 -20.6171 +145.991 0 -8.92708 +74.8709 0 -176.827 +241.924 0 -148.121 +308.539 0 -94.71 +316.986 -52.32 -86.8887 +332.318 -73.15 -75.031 +313.656 -52.32 -84.0655 +335.432 -21.59 -50.4412 +-95.8842 0 -77.4169 +68.0109 6.1 -15.5371 +27.1209 8.13 -49.827 +96.7209 3.56 -1.30702 +126.691 1.27 -0.297073 +125.421 9.91 -59.4771 +100.781 6.1 -30.267 +85.7909 11.68 -51.6071 +111.451 3.56 -18.5871 +-149.806 7.62 -103.701 +-126.647 13.97 -93.0152 +-98 5.33 -79.7238 +-97.5808 13.97 -81.9538 +-57.8645 18.29 -66.8608 +-14.648 22.35 -53.8977 +24.0709 24.64 -64.8071 +82.2409 26.67 -66.3371 +138.371 20.32 -78.2771 +186.158 11.68 -81.2166 +224.718 14.73 -90.2981 +251.86 11.94 -90.2856 +275.528 7.87 -83.2222 +291.213 9.65 -73.1992 +298.799 7.37 -74.661 +-101.583 22.35 -87.4271 +-86.6068 32.77 -92.7643 +-54.8287 29.97 -81.8477 +-17.0994 32 -72.5196 +24.0709 35.81 -82.5871 +74.6209 34.04 -83.8571 +135.071 28.45 -91.7371 +187.212 18.29 -88.7372 +-100.949 36.58 -102.346 +-110.201 31.75 -98.1805 +-119.391 27.43 -102.907 +-139.916 20.83 -114.412 +-158.108 10.16 -123.431 +-101.342 35.81 -112.507 +-110.68 30.99 -105.435 +-162.339 13.97 -130.052 +-193.283 7.37 -153.939 +-197.49 7.37 -149.936 +-158.784 14.99 -141.428 +-166.443 5.08 -127.569 +-203.703 4.06 -151.676 +-114.712 30.73 -110.356 +-123.842 30.73 -118.808 +-124.024 30.48 -115.833 +-138.214 26.42 -119.208 +-136.626 25.91 -125.288 +-156.248 16.26 -146.274 +-187.302 8.38 -157.182 +-133.434 25.91 -137.698 +-120.252 34.54 -125.685 +-99.8194 34.8 -139.458 +-132.58 27.43 -143.784 +-113.8 34.8 -121.973 +-109.325 34.54 -113.734 +-98.7887 38.61 -127.648 +-184.476 10.92 -161.164 +-156.383 18.29 -151.579 +-134.962 17.02 -165.628 +-113.087 31.75 -141.172 +-95.8002 22.35 -166.454 +-153.051 10.16 -160.931 +-157.031 17.27 -155.117 +-61.5124 43.18 -152.391 +-61.8778 35.05 -162.451 +-94.2744 40.39 -127.765 +-52.0421 49.28 -123.469 +-84.9024 40.13 -111.795 +-80.8243 36.58 -99.4687 +-50.4567 42.67 -99.6724 +-18.4438 46.23 -95.9878 +-10.8055 51.05 -122.734 +28.6409 48.01 -114.337 +33.7209 51.05 -133.137 +76.6509 46.23 -109.257 +78.6809 49.02 -132.887 +132.531 43.94 -115.357 +132.021 44.7 -142.277 +189.676 33.02 -109.892 +192.987 28.45 -134.216 +227.424 23.37 -105.712 +234.832 21.84 -129.226 +256.038 13.97 -102.08 +262.305 14.22 -116.033 +275.432 9.91 -94.4293 +279.807 10.67 -106.572 +295.199 18.29 -79.8126 +-20.5883 41.15 -154.358 +35.2509 37.59 -167.177 +73.0909 38.1 -165.137 +121.351 30.99 -167.677 +193.14 17.27 -155.554 +243.877 9.65 -144.922 +267.513 7.11 -127.824 +295.087 5.59 -106.996 +305.738 11.94 -95.4139 +-35.8993 73.66 -157.12 +-37.1344 71.37 -158.801 +-11.1361 64.52 -153.047 +11.7804 77.22 -165.713 +-24.8163 80.01 -161.601 +-3.68383 80.77 -165.948 +-182.992 7.87 -164.915 +-199.213 4.57 -166.68 +349.473 86.61 -39.3583 +330.172 73.15 -73.6594 +342.92 63.25 -47.1378 +309.174 16.51 -73.0276 +321.927 9.65 -61.7793 +328.67 5.84 -52.3222 +297.777 24.13 -81.4629 +-203.182 3.81 -157.585 +-203.311 4.83 -162.977 +-3.58835 79.25 -166.805 +-24.7063 78.23 -163.487 +332.318 73.15 -75.031 +316.986 52.32 -86.8887 +313.656 52.32 -84.0655 +335.432 21.59 -50.4412 +3 0 1 2 +3 2 3 0 +3 4 0 3 +3 3 5 4 +3 6 4 5 +3 5 7 6 +3 8 6 7 +3 9 10 11 +3 3 2 12 +3 12 13 3 +3 5 3 13 +3 13 14 5 +3 7 5 14 +3 15 16 17 +3 18 17 16 +3 16 19 18 +3 20 21 22 +3 22 23 20 +3 23 22 24 +3 25 20 23 +3 23 26 25 +3 1 25 26 +3 26 2 1 +3 27 2 26 +3 12 2 27 +3 27 28 12 +3 11 12 28 +3 28 29 11 +3 9 11 29 +3 9 29 30 +3 30 31 9 +3 32 31 30 +3 30 33 32 +3 34 32 33 +3 33 35 34 +3 36 34 35 +3 35 37 36 +3 38 36 37 +3 37 39 38 +3 40 38 39 +3 39 41 40 +3 24 19 42 +3 24 42 43 +3 24 43 44 +3 44 23 24 +3 26 23 44 +3 44 45 26 +3 27 26 45 +3 45 46 27 +3 28 27 46 +3 46 47 28 +3 29 28 47 +3 47 48 29 +3 30 29 48 +3 48 49 30 +3 33 30 49 +3 50 51 43 +3 43 42 50 +3 52 50 42 +3 42 19 52 +3 53 52 19 +3 19 16 53 +3 54 53 16 +3 55 56 51 +3 51 50 55 +3 52 55 50 +3 54 57 53 +3 58 59 60 +3 60 57 58 +3 61 62 63 +3 63 64 61 +3 64 54 16 +3 16 15 64 +3 61 64 15 +3 65 52 66 +3 66 67 65 +3 52 53 68 +3 68 66 52 +3 67 66 68 +3 68 69 67 +3 69 68 57 +3 57 60 69 +3 70 60 59 +3 59 71 70 +3 69 60 70 +3 70 72 69 +3 73 67 69 +3 74 73 72 +3 72 75 74 +3 57 54 64 +3 65 67 76 +3 77 65 76 +3 56 77 76 +3 78 56 76 +3 73 78 76 +3 67 73 76 +3 71 79 80 +3 80 70 71 +3 70 80 75 +3 75 72 70 +3 81 75 82 +3 82 74 81 +3 74 82 83 +3 84 82 75 +3 75 85 84 +3 86 74 83 +3 83 87 86 +3 88 74 86 +3 86 89 88 +3 88 78 74 +3 56 78 88 +3 88 90 56 +3 43 51 56 +3 56 91 43 +3 91 56 90 +3 92 90 88 +3 88 89 92 +3 93 92 89 +3 89 94 93 +3 95 93 94 +3 94 96 95 +3 97 95 96 +3 96 98 97 +3 99 97 98 +3 98 100 99 +3 101 99 100 +3 100 102 101 +3 103 101 102 +3 102 104 103 +3 105 103 104 +3 104 106 105 +3 107 105 106 +3 106 108 107 +3 91 90 92 +3 44 91 92 +3 43 91 44 +3 45 44 92 +3 92 93 45 +3 46 45 93 +3 93 95 46 +3 47 46 95 +3 95 97 47 +3 48 47 97 +3 97 99 48 +3 49 48 99 +3 99 101 49 +3 33 49 101 +3 101 103 33 +3 35 33 103 +3 103 105 35 +3 37 35 105 +3 105 107 37 +3 39 37 107 +3 107 109 39 +3 41 39 109 +3 94 89 86 +3 86 110 94 +3 96 94 110 +3 110 111 96 +3 98 96 111 +3 111 112 98 +3 100 98 112 +3 112 113 100 +3 102 100 113 +3 113 114 102 +3 104 102 114 +3 114 115 104 +3 106 104 115 +3 115 116 106 +3 108 106 116 +3 116 117 108 +3 118 108 117 +3 119 86 87 +3 87 120 119 +3 110 86 119 +3 119 121 110 +3 122 121 119 +3 119 123 122 +3 123 119 124 +3 125 111 110 +3 110 126 125 +3 114 113 127 +3 127 128 114 +3 117 116 129 +3 129 130 117 +3 87 83 131 +3 131 132 87 +3 110 87 132 +3 132 126 110 +3 83 82 133 +3 133 131 83 +3 82 84 134 +3 134 133 82 +3 84 135 136 +3 136 134 84 +3 84 85 135 +3 137 138 136 +3 136 135 137 +3 139 140 141 +3 41 142 143 +3 143 144 41 +3 144 143 145 +3 145 146 144 +3 147 109 107 +3 107 108 147 +3 118 147 108 +3 58 57 64 +3 64 63 58 +3 148 149 63 +3 63 62 148 +3 58 63 149 +3 149 59 58 +3 75 80 85 +3 79 135 85 +3 85 80 79 +3 135 79 137 +3 150 137 79 +3 79 71 150 +3 149 150 71 +3 71 59 149 +3 138 137 150 +3 150 151 138 +3 149 148 151 +3 151 150 149 +3 55 52 65 +3 77 56 55 +3 74 78 73 +3 57 68 53 +3 65 77 55 +3 152 153 123 +3 123 124 152 +3 124 119 120 +3 120 152 124 +3 122 123 153 +3 121 120 87 +3 87 110 121 +3 122 153 152 +3 152 121 122 +3 121 152 120 +3 10 13 12 +3 12 11 10 +3 10 154 14 +3 14 13 10 +3 154 155 8 +3 8 14 154 +3 14 8 7 +3 113 112 156 +3 156 127 113 +3 156 112 111 +3 111 125 156 +3 129 116 115 +3 115 157 129 +3 128 157 115 +3 115 114 128 +3 117 130 158 +3 158 118 117 +3 159 160 140 +3 140 161 159 +3 161 147 118 +3 118 159 161 +3 141 140 160 +3 41 144 40 +3 118 158 146 +3 146 145 162 +3 162 118 146 +3 118 162 159 +3 162 139 160 +3 160 159 162 +3 160 139 141 +3 140 139 162 +3 162 161 140 +3 162 145 143 +3 143 161 162 +3 161 143 142 +3 161 142 147 +3 142 41 109 +3 109 147 142 +3 21 163 22 +3 19 22 163 +3 163 18 19 +3 19 24 22 +3 1 0 164 +3 164 165 1 +3 0 4 166 +3 166 164 0 +3 4 6 167 +3 167 166 4 +3 167 6 8 +3 168 10 9 +3 165 164 169 +3 169 170 165 +3 164 166 171 +3 171 169 164 +3 171 166 167 +3 17 172 15 +3 17 18 173 +3 173 172 17 +3 174 21 20 +3 20 175 174 +3 175 20 176 +3 20 25 177 +3 177 176 20 +3 25 1 165 +3 165 177 25 +3 177 165 178 +3 165 170 179 +3 179 178 165 +3 170 168 180 +3 180 179 170 +3 180 168 9 +3 180 9 31 +3 31 181 180 +3 31 32 182 +3 182 181 31 +3 32 34 183 +3 183 182 32 +3 34 36 184 +3 184 183 34 +3 36 38 185 +3 185 184 36 +3 38 40 186 +3 186 185 38 +3 187 173 175 +3 188 187 175 +3 188 175 176 +3 176 189 188 +3 176 177 190 +3 190 189 176 +3 177 178 191 +3 191 190 177 +3 178 179 192 +3 192 191 178 +3 179 180 193 +3 193 192 179 +3 180 181 194 +3 194 193 180 +3 194 181 182 +3 195 196 187 +3 187 188 195 +3 196 197 173 +3 173 187 196 +3 173 197 198 +3 198 172 173 +3 172 198 199 +3 200 201 196 +3 196 195 200 +3 196 201 197 +3 198 202 199 +3 203 204 202 +3 202 205 203 +3 62 61 206 +3 206 207 62 +3 199 206 15 +3 15 172 199 +3 15 206 61 +3 197 208 209 +3 209 210 197 +3 198 197 210 +3 210 211 198 +3 210 209 212 +3 212 211 210 +3 211 212 205 +3 205 202 211 +3 205 213 214 +3 214 203 205 +3 205 212 215 +3 215 213 205 +3 212 209 216 +3 216 217 218 +3 218 215 216 +3 206 199 202 +3 219 209 208 +3 219 208 220 +3 219 220 200 +3 219 200 221 +3 219 221 216 +3 219 216 209 +3 222 214 213 +3 213 223 222 +3 223 213 215 +3 215 218 223 +3 224 218 225 +3 225 226 224 +3 226 225 217 +3 224 227 228 +3 228 218 224 +3 217 229 230 +3 230 226 217 +3 217 231 232 +3 232 229 217 +3 217 221 231 +3 221 200 233 +3 233 231 221 +3 200 195 188 +3 188 233 200 +3 233 188 234 +3 233 235 232 +3 232 231 233 +3 235 236 237 +3 237 232 235 +3 236 238 239 +3 239 237 236 +3 238 240 241 +3 241 239 238 +3 240 242 243 +3 243 241 240 +3 242 244 245 +3 245 243 242 +3 244 246 247 +3 247 245 244 +3 246 248 249 +3 249 247 246 +3 248 250 251 +3 251 249 248 +3 235 233 234 +3 235 234 189 +3 189 234 188 +3 189 190 236 +3 236 235 189 +3 190 191 238 +3 238 236 190 +3 191 192 240 +3 240 238 191 +3 192 193 242 +3 242 240 192 +3 193 194 244 +3 244 242 193 +3 194 182 246 +3 246 244 194 +3 182 183 248 +3 248 246 182 +3 183 184 250 +3 250 248 183 +3 184 185 252 +3 252 250 184 +3 252 185 186 +3 232 237 253 +3 253 229 232 +3 237 239 254 +3 254 253 237 +3 239 241 255 +3 255 254 239 +3 241 243 256 +3 256 255 241 +3 243 245 257 +3 257 256 243 +3 245 247 258 +3 258 257 245 +3 247 249 259 +3 259 258 247 +3 249 251 260 +3 260 259 249 +3 260 251 261 +3 229 262 263 +3 263 230 229 +3 229 253 264 +3 264 262 229 +3 262 264 265 +3 265 266 262 +3 266 265 267 +3 254 125 126 +3 126 253 254 +3 256 257 128 +3 128 127 256 +3 259 260 130 +3 130 129 259 +3 226 230 132 +3 132 131 226 +3 230 253 126 +3 126 132 230 +3 224 226 131 +3 131 133 224 +3 227 224 133 +3 133 134 227 +3 268 227 134 +3 134 136 268 +3 268 228 227 +3 138 269 268 +3 268 136 138 +3 270 271 272 +3 273 186 144 +3 144 274 273 +3 274 144 146 +3 146 275 274 +3 252 276 251 +3 251 250 252 +3 251 276 261 +3 202 204 207 +3 207 206 202 +3 277 148 62 +3 62 207 277 +3 207 204 203 +3 203 277 207 +3 228 223 218 +3 268 222 223 +3 223 228 268 +3 269 222 268 +3 269 278 214 +3 214 222 269 +3 278 277 203 +3 203 214 278 +3 269 138 151 +3 151 278 269 +3 148 277 278 +3 278 151 148 +3 208 197 201 +3 201 200 220 +3 216 221 217 +3 198 211 202 +3 201 220 208 +3 279 280 266 +3 266 267 279 +3 262 266 280 +3 280 263 262 +3 279 267 265 +3 263 264 253 +3 253 230 263 +3 280 279 265 +3 265 263 280 +3 263 265 264 +3 169 10 168 +3 168 170 169 +3 154 10 169 +3 169 171 154 +3 154 167 8 +3 167 154 171 +3 255 256 127 +3 127 156 255 +3 255 156 125 +3 125 254 255 +3 259 129 157 +3 157 258 259 +3 157 128 257 +3 257 258 157 +3 130 260 261 +3 261 158 130 +3 281 282 283 +3 283 271 281 +3 276 283 282 +3 282 261 276 +3 281 271 270 +3 40 144 186 +3 146 158 261 +3 284 275 146 +3 146 282 284 +3 282 146 261 +3 272 284 282 +3 282 281 272 +3 270 272 281 +3 272 271 283 +3 283 284 272 +3 275 284 283 +3 283 274 275 +3 273 274 283 +3 276 273 283 +3 186 273 276 +3 276 252 186 +3 174 163 21 +3 174 173 18 +3 18 163 174 +3 174 175 173 +3 216 215 212 +3 69 72 73 +3 285 286 287 +3 287 288 285 +3 289 285 288 +3 288 290 289 +3 291 289 290 +3 290 292 291 +3 293 291 292 +3 294 295 296 +3 288 287 297 +3 297 298 288 +3 290 288 298 +3 298 299 290 +3 292 290 299 +3 300 301 302 +3 303 302 301 +3 301 304 303 +3 305 306 307 +3 307 308 305 +3 308 307 309 +3 310 305 308 +3 308 311 310 +3 286 310 311 +3 311 287 286 +3 312 287 311 +3 297 287 312 +3 312 313 297 +3 296 297 313 +3 313 314 296 +3 294 296 314 +3 294 314 315 +3 315 316 294 +3 317 316 315 +3 315 318 317 +3 319 317 318 +3 318 320 319 +3 321 319 320 +3 320 322 321 +3 323 321 322 +3 322 324 323 +3 325 323 324 +3 324 326 325 +3 309 304 327 +3 309 327 328 +3 309 328 329 +3 329 308 309 +3 311 308 329 +3 329 330 311 +3 312 311 330 +3 330 331 312 +3 313 312 331 +3 331 332 313 +3 314 313 332 +3 332 333 314 +3 315 314 333 +3 333 334 315 +3 318 315 334 +3 335 336 328 +3 328 327 335 +3 337 335 327 +3 327 304 337 +3 338 337 304 +3 304 301 338 +3 339 338 301 +3 340 341 336 +3 336 335 340 +3 337 340 335 +3 339 342 338 +3 343 344 345 +3 345 342 343 +3 346 347 348 +3 348 349 346 +3 349 339 301 +3 301 300 349 +3 346 349 300 +3 350 337 351 +3 351 352 350 +3 337 338 353 +3 353 351 337 +3 352 351 353 +3 353 354 352 +3 354 353 342 +3 342 345 354 +3 355 345 344 +3 344 356 355 +3 354 345 355 +3 355 357 354 +3 358 352 354 +3 359 358 357 +3 357 360 359 +3 342 339 349 +3 350 352 361 +3 362 350 361 +3 341 362 361 +3 363 341 361 +3 358 363 361 +3 352 358 361 +3 356 364 365 +3 365 355 356 +3 355 365 360 +3 360 357 355 +3 366 360 367 +3 367 359 366 +3 359 367 368 +3 369 367 360 +3 360 370 369 +3 371 359 368 +3 368 372 371 +3 373 359 371 +3 371 374 373 +3 373 363 359 +3 341 363 373 +3 373 375 341 +3 328 336 341 +3 341 376 328 +3 376 341 375 +3 377 375 373 +3 373 374 377 +3 378 377 374 +3 374 379 378 +3 380 378 379 +3 379 381 380 +3 382 380 381 +3 381 383 382 +3 384 382 383 +3 383 385 384 +3 386 384 385 +3 385 387 386 +3 388 386 387 +3 387 389 388 +3 390 388 389 +3 389 391 390 +3 392 390 391 +3 391 393 392 +3 376 375 377 +3 329 376 377 +3 328 376 329 +3 330 329 377 +3 377 378 330 +3 331 330 378 +3 378 380 331 +3 332 331 380 +3 380 382 332 +3 333 332 382 +3 382 384 333 +3 334 333 384 +3 384 386 334 +3 318 334 386 +3 386 388 318 +3 320 318 388 +3 388 390 320 +3 322 320 390 +3 390 392 322 +3 324 322 392 +3 392 394 324 +3 326 324 394 +3 379 374 371 +3 371 395 379 +3 381 379 395 +3 395 396 381 +3 383 381 396 +3 396 397 383 +3 385 383 397 +3 397 398 385 +3 387 385 398 +3 398 399 387 +3 389 387 399 +3 399 400 389 +3 391 389 400 +3 400 401 391 +3 393 391 401 +3 401 402 393 +3 403 393 402 +3 404 371 372 +3 372 405 404 +3 395 371 404 +3 404 406 395 +3 407 406 404 +3 404 408 407 +3 408 404 409 +3 410 396 395 +3 395 411 410 +3 399 398 412 +3 412 413 399 +3 402 401 414 +3 414 415 402 +3 372 368 416 +3 416 417 372 +3 395 372 417 +3 417 411 395 +3 368 367 418 +3 418 416 368 +3 367 369 419 +3 419 418 367 +3 369 420 421 +3 421 419 369 +3 369 370 420 +3 422 423 421 +3 421 420 422 +3 424 425 426 +3 326 427 428 +3 428 429 326 +3 429 428 430 +3 430 431 429 +3 432 394 392 +3 392 393 432 +3 403 432 393 +3 343 342 349 +3 349 348 343 +3 433 434 348 +3 348 347 433 +3 343 348 434 +3 434 344 343 +3 360 365 370 +3 364 420 370 +3 370 365 364 +3 420 364 422 +3 435 422 364 +3 364 356 435 +3 434 435 356 +3 356 344 434 +3 423 422 435 +3 435 436 423 +3 434 433 436 +3 436 435 434 +3 340 337 350 +3 362 341 340 +3 359 363 358 +3 342 353 338 +3 350 362 340 +3 437 438 408 +3 408 409 437 +3 409 404 405 +3 405 437 409 +3 407 408 438 +3 406 405 372 +3 372 395 406 +3 407 438 437 +3 437 406 407 +3 406 437 405 +3 295 298 297 +3 297 296 295 +3 295 439 299 +3 299 298 295 +3 439 440 293 +3 293 299 439 +3 299 293 292 +3 398 397 441 +3 441 412 398 +3 441 397 396 +3 396 410 441 +3 414 401 400 +3 400 442 414 +3 413 442 400 +3 400 399 413 +3 402 415 443 +3 443 403 402 +3 444 445 425 +3 425 446 444 +3 446 432 403 +3 403 444 446 +3 426 425 445 +3 326 429 325 +3 403 443 431 +3 431 430 447 +3 447 403 431 +3 403 447 444 +3 447 424 445 +3 445 444 447 +3 445 424 426 +3 425 424 447 +3 447 446 425 +3 447 430 428 +3 428 446 447 +3 446 428 427 +3 446 427 432 +3 427 326 394 +3 394 432 427 +3 306 448 307 +3 304 307 448 +3 448 303 304 +3 304 309 307 +3 286 285 449 +3 449 450 286 +3 285 289 451 +3 451 449 285 +3 289 291 452 +3 452 451 289 +3 452 291 293 +3 453 295 294 +3 450 449 454 +3 454 455 450 +3 449 451 456 +3 456 454 449 +3 456 451 452 +3 302 457 300 +3 302 303 458 +3 458 457 302 +3 459 306 305 +3 305 460 459 +3 460 305 461 +3 305 310 462 +3 462 461 305 +3 310 286 450 +3 450 462 310 +3 462 450 463 +3 450 455 464 +3 464 463 450 +3 455 453 465 +3 465 464 455 +3 465 453 294 +3 465 294 316 +3 316 466 465 +3 316 317 467 +3 467 466 316 +3 317 319 468 +3 468 467 317 +3 319 321 469 +3 469 468 319 +3 321 323 470 +3 470 469 321 +3 323 325 471 +3 471 470 323 +3 472 458 460 +3 473 472 460 +3 473 460 461 +3 461 474 473 +3 461 462 475 +3 475 474 461 +3 462 463 476 +3 476 475 462 +3 463 464 477 +3 477 476 463 +3 464 465 478 +3 478 477 464 +3 465 466 479 +3 479 478 465 +3 479 466 467 +3 480 481 472 +3 472 473 480 +3 481 482 458 +3 458 472 481 +3 458 482 483 +3 483 457 458 +3 457 483 484 +3 485 486 481 +3 481 480 485 +3 481 486 482 +3 483 487 484 +3 488 489 487 +3 487 490 488 +3 347 346 491 +3 491 492 347 +3 484 491 300 +3 300 457 484 +3 300 491 346 +3 482 493 494 +3 494 495 482 +3 483 482 495 +3 495 496 483 +3 495 494 497 +3 497 496 495 +3 496 497 490 +3 490 487 496 +3 490 498 499 +3 499 488 490 +3 490 497 500 +3 500 498 490 +3 497 494 501 +3 501 502 503 +3 503 500 501 +3 491 484 487 +3 504 494 493 +3 504 493 505 +3 504 505 485 +3 504 485 506 +3 504 506 501 +3 504 501 494 +3 507 499 498 +3 498 508 507 +3 508 498 500 +3 500 503 508 +3 509 503 510 +3 510 511 509 +3 511 510 502 +3 509 512 513 +3 513 503 509 +3 502 514 515 +3 515 511 502 +3 502 516 517 +3 517 514 502 +3 502 506 516 +3 506 485 518 +3 518 516 506 +3 485 480 473 +3 473 518 485 +3 518 473 519 +3 518 520 517 +3 517 516 518 +3 520 521 522 +3 522 517 520 +3 521 523 524 +3 524 522 521 +3 523 525 526 +3 526 524 523 +3 525 527 528 +3 528 526 525 +3 527 529 530 +3 530 528 527 +3 529 531 532 +3 532 530 529 +3 531 533 534 +3 534 532 531 +3 533 535 536 +3 536 534 533 +3 520 518 519 +3 520 519 474 +3 474 519 473 +3 474 475 521 +3 521 520 474 +3 475 476 523 +3 523 521 475 +3 476 477 525 +3 525 523 476 +3 477 478 527 +3 527 525 477 +3 478 479 529 +3 529 527 478 +3 479 467 531 +3 531 529 479 +3 467 468 533 +3 533 531 467 +3 468 469 535 +3 535 533 468 +3 469 470 537 +3 537 535 469 +3 537 470 471 +3 517 522 538 +3 538 514 517 +3 522 524 539 +3 539 538 522 +3 524 526 540 +3 540 539 524 +3 526 528 541 +3 541 540 526 +3 528 530 542 +3 542 541 528 +3 530 532 543 +3 543 542 530 +3 532 534 544 +3 544 543 532 +3 534 536 545 +3 545 544 534 +3 545 536 546 +3 514 547 548 +3 548 515 514 +3 514 538 549 +3 549 547 514 +3 547 549 550 +3 550 551 547 +3 551 550 552 +3 539 410 411 +3 411 538 539 +3 541 542 413 +3 413 412 541 +3 544 545 415 +3 415 414 544 +3 511 515 417 +3 417 416 511 +3 515 538 411 +3 411 417 515 +3 509 511 416 +3 416 418 509 +3 512 509 418 +3 418 419 512 +3 553 512 419 +3 419 421 553 +3 553 513 512 +3 423 554 553 +3 553 421 423 +3 555 556 557 +3 558 471 429 +3 429 559 558 +3 559 429 431 +3 431 560 559 +3 537 561 536 +3 536 535 537 +3 536 561 546 +3 487 489 492 +3 492 491 487 +3 562 433 347 +3 347 492 562 +3 492 489 488 +3 488 562 492 +3 513 508 503 +3 553 507 508 +3 508 513 553 +3 554 507 553 +3 554 563 499 +3 499 507 554 +3 563 562 488 +3 488 499 563 +3 554 423 436 +3 436 563 554 +3 433 562 563 +3 563 436 433 +3 493 482 486 +3 486 485 505 +3 501 506 502 +3 483 496 487 +3 486 505 493 +3 564 565 551 +3 551 552 564 +3 547 551 565 +3 565 548 547 +3 564 552 550 +3 548 549 538 +3 538 515 548 +3 565 564 550 +3 550 548 565 +3 548 550 549 +3 454 295 453 +3 453 455 454 +3 439 295 454 +3 454 456 439 +3 439 452 293 +3 452 439 456 +3 540 541 412 +3 412 441 540 +3 540 441 410 +3 410 539 540 +3 544 414 442 +3 442 543 544 +3 442 413 542 +3 542 543 442 +3 415 545 546 +3 546 443 415 +3 566 567 568 +3 568 556 566 +3 561 568 567 +3 567 546 561 +3 566 556 555 +3 325 429 471 +3 431 443 546 +3 569 560 431 +3 431 567 569 +3 567 431 546 +3 557 569 567 +3 567 566 557 +3 555 557 566 +3 557 556 568 +3 568 569 557 +3 560 569 568 +3 568 559 560 +3 558 559 568 +3 561 558 568 +3 471 558 561 +3 561 537 471 +3 459 448 306 +3 459 458 303 +3 303 448 459 +3 459 460 458 +3 501 500 497 +3 354 357 358 +3 570 571 572 +3 572 573 570 +3 574 570 573 +3 573 575 574 +3 576 574 575 +3 575 577 576 +3 578 576 577 +3 579 580 581 +3 573 572 582 +3 582 583 573 +3 575 573 583 +3 583 584 575 +3 577 575 584 +3 585 586 587 +3 588 587 586 +3 586 589 588 +3 590 591 592 +3 592 593 590 +3 593 592 594 +3 595 590 593 +3 593 596 595 +3 571 595 596 +3 596 572 571 +3 597 572 596 +3 582 572 597 +3 597 598 582 +3 581 582 598 +3 598 599 581 +3 579 581 599 +3 579 599 600 +3 600 601 579 +3 602 601 600 +3 600 603 602 +3 604 602 603 +3 603 605 604 +3 606 604 605 +3 605 607 606 +3 608 606 607 +3 607 609 608 +3 610 608 609 +3 609 611 610 +3 594 589 612 +3 594 612 613 +3 594 613 614 +3 614 593 594 +3 596 593 614 +3 614 615 596 +3 597 596 615 +3 615 616 597 +3 598 597 616 +3 616 617 598 +3 599 598 617 +3 617 618 599 +3 600 599 618 +3 618 619 600 +3 603 600 619 +3 620 621 613 +3 613 612 620 +3 622 620 612 +3 612 589 622 +3 623 622 589 +3 589 586 623 +3 624 623 586 +3 625 626 621 +3 621 620 625 +3 622 625 620 +3 624 627 623 +3 628 629 630 +3 630 627 628 +3 631 632 633 +3 633 634 631 +3 634 624 586 +3 586 585 634 +3 631 634 585 +3 635 622 636 +3 636 637 635 +3 622 623 638 +3 638 636 622 +3 637 636 638 +3 638 639 637 +3 639 638 627 +3 627 630 639 +3 640 630 629 +3 629 641 640 +3 639 630 640 +3 640 642 639 +3 643 637 639 +3 644 643 642 +3 642 645 644 +3 627 624 634 +3 635 637 646 +3 647 635 646 +3 626 647 646 +3 648 626 646 +3 643 648 646 +3 637 643 646 +3 641 649 650 +3 650 640 641 +3 640 650 645 +3 645 642 640 +3 651 645 652 +3 652 644 651 +3 644 652 653 +3 654 652 645 +3 645 655 654 +3 656 644 653 +3 653 657 656 +3 658 644 656 +3 656 659 658 +3 658 648 644 +3 626 648 658 +3 658 660 626 +3 613 621 626 +3 626 661 613 +3 661 626 660 +3 662 660 658 +3 658 659 662 +3 663 662 659 +3 659 664 663 +3 665 663 664 +3 664 666 665 +3 667 665 666 +3 666 668 667 +3 669 667 668 +3 668 670 669 +3 671 669 670 +3 670 672 671 +3 673 671 672 +3 672 674 673 +3 675 673 674 +3 674 676 675 +3 677 675 676 +3 676 678 677 +3 661 660 662 +3 614 661 662 +3 613 661 614 +3 615 614 662 +3 662 663 615 +3 616 615 663 +3 663 665 616 +3 617 616 665 +3 665 667 617 +3 618 617 667 +3 667 669 618 +3 619 618 669 +3 669 671 619 +3 603 619 671 +3 671 673 603 +3 605 603 673 +3 673 675 605 +3 607 605 675 +3 675 677 607 +3 609 607 677 +3 677 679 609 +3 611 609 679 +3 664 659 656 +3 656 680 664 +3 666 664 680 +3 680 681 666 +3 668 666 681 +3 681 682 668 +3 670 668 682 +3 682 683 670 +3 672 670 683 +3 683 684 672 +3 674 672 684 +3 684 685 674 +3 676 674 685 +3 685 686 676 +3 678 676 686 +3 686 687 678 +3 688 678 687 +3 689 656 657 +3 657 690 689 +3 680 656 689 +3 689 691 680 +3 692 691 689 +3 689 693 692 +3 693 689 694 +3 695 681 680 +3 680 696 695 +3 684 683 697 +3 697 698 684 +3 687 686 699 +3 699 700 687 +3 657 653 701 +3 701 702 657 +3 680 657 702 +3 702 696 680 +3 653 652 703 +3 703 701 653 +3 652 654 704 +3 704 703 652 +3 654 705 706 +3 706 704 654 +3 654 655 705 +3 707 708 706 +3 706 705 707 +3 709 710 711 +3 611 712 713 +3 713 714 611 +3 714 713 715 +3 715 716 714 +3 717 679 677 +3 677 678 717 +3 688 717 678 +3 628 627 634 +3 634 633 628 +3 718 719 633 +3 633 632 718 +3 628 633 719 +3 719 629 628 +3 645 650 655 +3 649 705 655 +3 655 650 649 +3 705 649 707 +3 720 707 649 +3 649 641 720 +3 719 720 641 +3 641 629 719 +3 708 707 720 +3 720 721 708 +3 719 718 721 +3 721 720 719 +3 625 622 635 +3 647 626 625 +3 644 648 643 +3 627 638 623 +3 635 647 625 +3 722 723 693 +3 693 694 722 +3 694 689 690 +3 690 722 694 +3 692 693 723 +3 691 690 657 +3 657 680 691 +3 692 723 722 +3 722 691 692 +3 691 722 690 +3 580 583 582 +3 582 581 580 +3 580 724 584 +3 584 583 580 +3 724 725 578 +3 578 584 724 +3 584 578 577 +3 683 682 726 +3 726 697 683 +3 726 682 681 +3 681 695 726 +3 699 686 685 +3 685 727 699 +3 698 727 685 +3 685 684 698 +3 687 700 728 +3 728 688 687 +3 729 730 710 +3 710 731 729 +3 731 717 688 +3 688 729 731 +3 711 710 730 +3 611 714 610 +3 688 728 716 +3 716 715 732 +3 732 688 716 +3 688 732 729 +3 732 709 730 +3 730 729 732 +3 730 709 711 +3 710 709 732 +3 732 731 710 +3 732 715 713 +3 713 731 732 +3 731 713 712 +3 731 712 717 +3 712 611 679 +3 679 717 712 +3 591 733 592 +3 589 592 733 +3 733 588 589 +3 589 594 592 +3 571 570 734 +3 734 735 571 +3 570 574 736 +3 736 734 570 +3 574 576 737 +3 737 736 574 +3 737 576 578 +3 738 580 579 +3 735 734 739 +3 739 740 735 +3 734 736 741 +3 741 739 734 +3 741 736 737 +3 587 742 585 +3 587 588 743 +3 743 742 587 +3 744 591 590 +3 590 745 744 +3 745 590 746 +3 590 595 747 +3 747 746 590 +3 595 571 735 +3 735 747 595 +3 747 735 748 +3 735 740 749 +3 749 748 735 +3 740 738 750 +3 750 749 740 +3 750 738 579 +3 750 579 601 +3 601 751 750 +3 601 602 752 +3 752 751 601 +3 602 604 753 +3 753 752 602 +3 604 606 754 +3 754 753 604 +3 606 608 755 +3 755 754 606 +3 608 610 756 +3 756 755 608 +3 757 743 745 +3 758 757 745 +3 758 745 746 +3 746 759 758 +3 746 747 760 +3 760 759 746 +3 747 748 761 +3 761 760 747 +3 748 749 762 +3 762 761 748 +3 749 750 763 +3 763 762 749 +3 750 751 764 +3 764 763 750 +3 764 751 752 +3 765 766 757 +3 757 758 765 +3 766 767 743 +3 743 757 766 +3 743 767 768 +3 768 742 743 +3 742 768 769 +3 770 771 766 +3 766 765 770 +3 766 771 767 +3 768 772 769 +3 773 774 772 +3 772 775 773 +3 632 631 776 +3 776 777 632 +3 769 776 585 +3 585 742 769 +3 585 776 631 +3 767 778 779 +3 779 780 767 +3 768 767 780 +3 780 781 768 +3 780 779 782 +3 782 781 780 +3 781 782 775 +3 775 772 781 +3 775 783 784 +3 784 773 775 +3 775 782 785 +3 785 783 775 +3 782 779 786 +3 786 787 788 +3 788 785 786 +3 776 769 772 +3 789 779 778 +3 789 778 790 +3 789 790 770 +3 789 770 791 +3 789 791 786 +3 789 786 779 +3 792 784 783 +3 783 793 792 +3 793 783 785 +3 785 788 793 +3 794 788 795 +3 795 796 794 +3 796 795 787 +3 794 797 798 +3 798 788 794 +3 787 799 800 +3 800 796 787 +3 787 801 802 +3 802 799 787 +3 787 791 801 +3 791 770 803 +3 803 801 791 +3 770 765 758 +3 758 803 770 +3 803 758 804 +3 803 805 802 +3 802 801 803 +3 805 806 807 +3 807 802 805 +3 806 808 809 +3 809 807 806 +3 808 810 811 +3 811 809 808 +3 810 812 813 +3 813 811 810 +3 812 814 815 +3 815 813 812 +3 814 816 817 +3 817 815 814 +3 816 818 819 +3 819 817 816 +3 818 820 821 +3 821 819 818 +3 805 803 804 +3 805 804 759 +3 759 804 758 +3 759 760 806 +3 806 805 759 +3 760 761 808 +3 808 806 760 +3 761 762 810 +3 810 808 761 +3 762 763 812 +3 812 810 762 +3 763 764 814 +3 814 812 763 +3 764 752 816 +3 816 814 764 +3 752 753 818 +3 818 816 752 +3 753 754 820 +3 820 818 753 +3 754 755 822 +3 822 820 754 +3 822 755 756 +3 802 807 823 +3 823 799 802 +3 807 809 824 +3 824 823 807 +3 809 811 825 +3 825 824 809 +3 811 813 826 +3 826 825 811 +3 813 815 827 +3 827 826 813 +3 815 817 828 +3 828 827 815 +3 817 819 829 +3 829 828 817 +3 819 821 830 +3 830 829 819 +3 830 821 831 +3 799 832 833 +3 833 800 799 +3 799 823 834 +3 834 832 799 +3 832 834 835 +3 835 836 832 +3 836 835 837 +3 824 695 696 +3 696 823 824 +3 826 827 698 +3 698 697 826 +3 829 830 700 +3 700 699 829 +3 796 800 702 +3 702 701 796 +3 800 823 696 +3 696 702 800 +3 794 796 701 +3 701 703 794 +3 797 794 703 +3 703 704 797 +3 838 797 704 +3 704 706 838 +3 838 798 797 +3 708 839 838 +3 838 706 708 +3 840 841 842 +3 843 756 714 +3 714 844 843 +3 844 714 716 +3 716 845 844 +3 822 846 821 +3 821 820 822 +3 821 846 831 +3 772 774 777 +3 777 776 772 +3 847 718 632 +3 632 777 847 +3 777 774 773 +3 773 847 777 +3 798 793 788 +3 838 792 793 +3 793 798 838 +3 839 792 838 +3 839 848 784 +3 784 792 839 +3 848 847 773 +3 773 784 848 +3 839 708 721 +3 721 848 839 +3 718 847 848 +3 848 721 718 +3 778 767 771 +3 771 770 790 +3 786 791 787 +3 768 781 772 +3 771 790 778 +3 849 850 836 +3 836 837 849 +3 832 836 850 +3 850 833 832 +3 849 837 835 +3 833 834 823 +3 823 800 833 +3 850 849 835 +3 835 833 850 +3 833 835 834 +3 739 580 738 +3 738 740 739 +3 724 580 739 +3 739 741 724 +3 724 737 578 +3 737 724 741 +3 825 826 697 +3 697 726 825 +3 825 726 695 +3 695 824 825 +3 829 699 727 +3 727 828 829 +3 727 698 827 +3 827 828 727 +3 700 830 831 +3 831 728 700 +3 851 852 853 +3 853 841 851 +3 846 853 852 +3 852 831 846 +3 851 841 840 +3 610 714 756 +3 716 728 831 +3 854 845 716 +3 716 852 854 +3 852 716 831 +3 842 854 852 +3 852 851 842 +3 840 842 851 +3 842 841 853 +3 853 854 842 +3 845 854 853 +3 853 844 845 +3 843 844 853 +3 846 843 853 +3 756 843 846 +3 846 822 756 +3 744 733 591 +3 744 743 588 +3 588 733 744 +3 744 745 743 +3 786 785 782 +3 639 642 643
true
Other
mrdoob
three.js
64d37bbffaf0be2fcb2b468bb26f9061b4914244.json
Add a THREE loader for PLY ASCII files.
examples/webgl_loader_ply.html
@@ -0,0 +1,203 @@ +<!DOCTYPE html> +<html lang="en"> + <head> + <title>three.js webgl - PLY</title> + <meta charset="utf-8"> + <meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0"> + <style> + body { + font-family: Monospace; + background-color: #000000; + margin: 0px; + overflow: hidden; + } + + #info { + color: #fff; + position: absolute; + top: 10px; + width: 100%; + text-align: center; + z-index: 100; + display:block; + + } + + a { color: skyblue } + .button { background:#999; color:#eee; padding:0.2em 0.5em; cursor:pointer } + .highlight { background:orange; color:#fff; } + + span { + display: inline-block; + width: 60px; + float: left; + text-align: center; + } + + </style> + </head> + <body> + <div id="info"> + <a href="http://threejs.org" target="_blank">three.js</a> - + PLY loader test by <a href="https://github.com/menway">Wei Meng</a>. Image from <a href="http://people.sc.fsu.edu/~jburkardt/data/ply/ply.html">John Burkardt</a> + </div> + + <script src="../build/three.min.js"></script> + + <script src="js/loaders/PLYLoader.js"></script> + + <script src="js/Detector.js"></script> + <script src="js/libs/stats.min.js"></script> + + <script> + + if ( ! Detector.webgl ) Detector.addGetWebGLMessage(); + + var container, stats; + + var camera, cameraTarget, scene, renderer; + + init(); + animate(); + + function init() { + + container = document.createElement( 'div' ); + document.body.appendChild( container ); + + camera = new THREE.PerspectiveCamera( 35, window.innerWidth / window.innerHeight, 1, 15 ); + camera.position.set( 3, 0.15, 3 ); + + cameraTarget = new THREE.Vector3( 0, -0.25, 0 ); + + scene = new THREE.Scene(); + scene.fog = new THREE.Fog( 0x72645b, 2, 15 ); + + + // Ground + + var plane = new THREE.Mesh( new THREE.PlaneGeometry( 40, 40 ), new THREE.MeshPhongMaterial( { ambient: 0x999999, color: 0x999999, specular: 0x101010 } ) ); + plane.rotation.x = -Math.PI/2; + plane.position.y = -0.5; + scene.add( plane ); + + plane.receiveShadow = true; + + + // PLY file + + var loader = new THREE.PLYLoader(); + loader.addEventListener( 'load', function ( event ) { + + var geometry = event.content; + var material = new THREE.MeshPhongMaterial( { ambient: 0x0055ff, color: 0x0055ff, specular: 0x111111, shininess: 200 } ); + var mesh = new THREE.Mesh( geometry, material ); + + mesh.position.set( 0, - 0.25, 0 ); + mesh.rotation.set( 0, - Math.PI / 2, 0 ); + mesh.scale.set( 0.001, 0.001, 0.001 ); + + mesh.castShadow = true; + mesh.receiveShadow = true; + + scene.add( mesh ); + + } ); + loader.load( './models/ply/ascii/dolphins.ply' ); + + // Lights + + scene.add( new THREE.AmbientLight( 0x777777 ) ); + + addShadowedLight( 1, 1, 1, 0xffffff, 1.35 ); + addShadowedLight( 0.5, 1, -1, 0xffaa00, 1 ); + + // renderer + + renderer = new THREE.WebGLRenderer( { antialias: true, alpha: false } ); + renderer.setSize( window.innerWidth, window.innerHeight ); + + renderer.setClearColor( scene.fog.color, 1 ); + + renderer.gammaInput = true; + renderer.gammaOutput = true; + renderer.physicallyBasedShading = true; + + renderer.shadowMapEnabled = true; + renderer.shadowMapCullFace = THREE.CullFaceBack; + + container.appendChild( renderer.domElement ); + + // stats + + stats = new Stats(); + stats.domElement.style.position = 'absolute'; + stats.domElement.style.top = '0px'; + container.appendChild( stats.domElement ); + + // resize + + window.addEventListener( 'resize', onWindowResize, false ); + + } + + function addShadowedLight( x, y, z, color, intensity ) { + + var directionalLight = new THREE.DirectionalLight( color, intensity ); + directionalLight.position.set( x, y, z ) + scene.add( directionalLight ); + + directionalLight.castShadow = true; + // directionalLight.shadowCameraVisible = true; + + var d = 1; + directionalLight.shadowCameraLeft = -d; + directionalLight.shadowCameraRight = d; + directionalLight.shadowCameraTop = d; + directionalLight.shadowCameraBottom = -d; + + directionalLight.shadowCameraNear = 1; + directionalLight.shadowCameraFar = 4; + + directionalLight.shadowMapWidth = 1024; + directionalLight.shadowMapHeight = 1024; + + directionalLight.shadowBias = -0.005; + directionalLight.shadowDarkness = 0.15; + + } + + function onWindowResize() { + + camera.aspect = window.innerWidth / window.innerHeight; + camera.updateProjectionMatrix(); + + renderer.setSize( window.innerWidth, window.innerHeight ); + + } + + function animate() { + + requestAnimationFrame( animate ); + + render(); + stats.update(); + + } + + function render() { + + var timer = Date.now() * 0.0005; + + camera.position.x = Math.sin( timer ) * 3; + camera.position.z = Math.cos( timer ) * 3; + + camera.lookAt( cameraTarget ); + + renderer.render( scene, camera ); + + } + + </script> + </body> +</html>
true
Other
mrdoob
three.js
fcff3438ce0ccc4a719f87ef9d2f2b267283bdc0.json
Update several math documentation pages. Added some info regarding the quaternion object, its applications and the purpose of its functions. Added some info regarding the box2 object and its functions.
docs/api/math/Box2.html
@@ -9,19 +9,19 @@ <body> <h1>[name]</h1> - <div class="desc">todo</div> + <div class="desc">Represents a boundary box in 2D space.</div> <h2>Constructor</h2> - <h3>[name]([page:todo min], [page:todo max])</h3> + <h3>[name]([page:Vector2 min], [page:Vector2 max])</h3> <div> - min -- todo <br /> - max -- todo + min -- Lower (x, y) boundary of the box.<br /> + max -- Upper (x, y) boundary of the box. </div> <div> - todo + Creates a box bounded by min and max. </div> @@ -31,186 +31,199 @@ <h2>Properties</h2> <h3>.[page:Vector2 max]</h3> <div> - todo + Upper (x, y) boundary of this box. </div> <h3>.[page:Vector2 min]</h3> <div> - todo + Lower (x, y) boundary of this box. </div> <h2>Methods</h2> - <h3>.set([page:todo min], [page:todo max]) [page:todo]</h3> + <h3>.set([page:Vector2 min], [page:Vector2 max]) [page:todo]</h3> <div> - min -- todo <br /> - max -- todo + min -- Lower (x, y) boundary of the box. <br /> + max -- Upper (x, y) boundary of the box. </div> <div> - todo + Sets the lower and upper (x, y) boundaries of this box. </div> - <h3>.expandByPoint([page:todo point]) [page:todo]</h3> + <h3>.expandByPoint([page:Vector2 point]) [page:Box2]</h3> <div> - point -- todo + point -- Point that should be included in the box. </div> <div> - todo + Expands the boundaries of this box to include *point*. </div> - <h3>.clampPoint([page:todo point], [page:todo optionalTarget]) [page:todo]</h3> + <h3>.clampPoint([page:Vector2 point], [page:Vector2 optionalTarget]) [page:Vector2]</h3> <div> - point -- todo <br /> - optionalTarget -- todo + point -- Position to clamp. <br /> + optionalTarget -- If specified, the clamped result will be copied here. </div> <div> - todo + Clamps *point* within the bounds of this box. </div> - <h3>.isIntersectionBox([page:todo box]) [page:todo]</h3> + <h3>.isIntersectionBox([page:Box2 box]) [page:Boolean]</h3> <div> - box -- todo + box -- Box to check for intersection against. </div> <div> - todo + Determines whether or not this box intersects *box*. </div> - <h3>.setFromPoints([page:todo points]) [page:todo]</h3> + <h3>.setFromPoints([page:Array points]) [page:Box2]</h3> <div> - points -- todo + points -- Set of points that the resulting box will envelop. </div> <div> - todo + Sets the upper and lower bounds of this box to include all of the points in *points*. </div> - <h3>.size([page:todo optionalTarget]) [page:todo]</h3> + <h3>.size([page:Vector2 optionalTarget]) [page:Vector2]</h3> <div> - optionalTarget -- todo + optionalTarget -- If specified, the result will be copied here. </div> <div> - todo + Returns the width and height of this box. </div> - <h3>.union([page:todo box]) [page:todo]</h3> + <h3>.union([page:Box2 box]) [page:Box2]</h3> <div> - box -- todo + box -- Box that will be unioned with this box. </div> <div> - todo + Unions this box with *box* setting the upper bound of this box to the greater of the + two boxes' upper bounds and the lower bound of this box to the lesser of the two boxes' + lower bounds. </div> - <h3>.getParameter([page:todo point]) [page:todo]</h3> + <h3>.getParameter([page:Vector2 point]) [page:Vector2]</h3> <div> - point -- todo + point -- Point to parametrize. </div> <div> - todo + Returns point as a proportion of this box's width and height. </div> - <h3>.expandByScalar([page:todo scalar]) [page:todo]</h3> + <h3>.expandByScalar([page:float scalar]) [page:Box2]</h3> <div> - scalar -- todo + scalar -- Distance to expand. </div> <div> - todo + Expands each dimension of the box by *scalar*. If negative, the dimensions of the box </br> + will be contracted. </div> - <h3>.intersect([page:todo box]) [page:todo]</h3> + <h3>.intersect([page:Box2 box]) [page:Box2]</h3> <div> - box -- todo + box -- Box to intersect with. </div> <div> - todo + Returns the intersection of this and *box*, setting the upper bound of this box to the lesser </br> + of the two boxes' upper bounds and the lower bound of this box to the greater of the two boxes' </br> + lower bounds. </div> - <h3>.containsBox([page:todo box]) [page:todo]</h3> + <h3>.containsBox([page:Box2 box]) [page:Boolean]</h3> <div> - box -- todo + box -- Box to test for inclusion. </div> <div> - todo + Returns true if this box includes the entirety of *box*. If this and *box* overlap exactly,</br> + this function also returns true. </div> - <h3>.translate([page:todo offset]) [page:todo]</h3> + <h3>.translate([page:Vector2 offset]) [page:Box2]</h3> <div> - offset -- todo + offset -- Direction and distance of offset. </div> <div> - todo + Adds *offset* to both the upper and lower bounds of this box, effectively moving this box </br> + *offset* units in 2D space. </div> - <h3>.empty() [page:todo]</h3> + <h3>.empty() [page:Boolean]</h3> <div> - todo + Returns true if this box includes zero points within its bounds.</br> + Note that a box with equal lower and upper bounds still includes one point, the + one both bounds share. </div> - <h3>.clone() [page:todo]</h3> + <h3>.clone() [page:Box2]</h3> <div> - todo + Returns a copy of this box. </div> - <h3>.equals([page:todo box]) [page:todo]</h3> + <h3>.equals([page:Box2 box]) [page:Boolean]</h3> <div> - box -- todo + box -- Box to compare. </div> <div> - todo + Returns true if this box and *box* share the same lower and upper bounds. </div> - <h3>.expandByVector([page:todo vector]) [page:todo]</h3> + <h3>.expandByVector([page:Vector2 vector]) [page:Box2]</h3> <div> - vector -- todo + vector -- Amount to expand this box in each dimension. </div> <div> - todo + Expands this box equilaterally by *vector*. The width of this box will be + expanded by the x component of *vector* in both directions. The height of + this box will be expanded by the y component of *vector* in both directions. </div> - <h3>.copy([page:todo box]) [page:todo]</h3> + <h3>.copy([page:Box2 box]) [page:Box2]</h3> <div> - box -- todo + box -- Box to copy. </div> <div> - todo + Copies the values of *box* to this box. </div> - <h3>.makeEmpty() [page:todo]</h3> + <h3>.makeEmpty() [page:Box2]</h3> <div> - todo + Makes this box empty. </div> - <h3>.center([page:todo optionalTarget]) [page:todo]</h3> + <h3>.center([page:Vector2 optionalTarget]) [page:Vector2]</h3> <div> - optionalTarget -- todo + optionalTarget -- If specified, the result will be copied here. </div> <div> - todo + Returns the center point of this box. </div> - <h3>.distanceToPoint([page:todo point]) [page:todo]</h3> + <h3>.distanceToPoint([page:Vector2 point]) [page:Float]</h3> <div> - point -- todo + point -- Point to measure distance to. </div> <div> - todo + Returns the distance from any edge of this box to the specified point. </br> + If the point lies inside of this box, the distance will be 0. </div> - <h3>.containsPoint([page:todo point]) [page:todo]</h3> + <h3>.containsPoint([page:Vector2 point]) [page:Boolean]</h3> <div> - point -- todo + point -- Point to check for inclusion. </div> <div> - todo + Returns true if the specified point lies within the boundaries of this box. </div> - <h3>.setFromCenterAndSize([page:todo center], [page:todo size]) [page:todo]</h3> + <h3>.setFromCenterAndSize([page:Vector2 center], [page:Vector2 size]) [page:Box2]</h3> <div> - center -- todo <br /> - size -- todo + center -- Desired center position of the box. <br /> + size -- Desired x and y dimensions of the box. </div> <div> - todo + Centers this box on *center* and sets this box's width and height to the values specified + in *size*. </div> <h2>Source</h2>
true
Other
mrdoob
three.js
fcff3438ce0ccc4a719f87ef9d2f2b267283bdc0.json
Update several math documentation pages. Added some info regarding the quaternion object, its applications and the purpose of its functions. Added some info regarding the box2 object and its functions.
docs/api/math/Quaternion.html
@@ -121,44 +121,48 @@ <h3>.slerp( [page:Quaternion qa], [page:Quaternion qb], [page:Quaternion qm], [p </div> - <h3>.slerp([page:todo qb], [page:todo t]) [page:todo]</h3> + <h3>.slerp([page:Quaternion qb], [page:float t]) [page:Quaternion]</h3> <div> - qb -- todo <br /> - t -- todo + qb -- Target quaternion rotation.<br /> + t -- Normalized [0..1] interpolation factor. </div> <div> - todo + Handles the spherical linear interpolation between this quaternion's configuration + and that of *qb*. *t* represents how close to the current (0) or target (1) rotation the + result should be. </div> - <h3>.toArray() [page:todo]</h3> + <h3>.toArray() [page: Array]</h3> <div> - todo + Returns the numerical elements of this quaternion in an array of format (x, y, z, w). </div> - <h3>.equals([page:todo v]) [page:todo]</h3> + <h3>.equals([page:Quaternion v]) [page:Boolean]</h3> <div> - v -- todo + v -- Quaternion that this quaternion will be compared to. </div> <div> - todo + Compares each component of *v* to each component of this quaternion to determine if they + represent the same rotation. </div> - <h3>.lengthSq() [page:todo]</h3> + <h3>.lengthSq() [page:Float]</h3> <div> - todo + Calculates the squared length of the quaternion. </div> - <h3>.fromArray([page:todo array]) [page:todo]</h3> + <h3>.fromArray([page:Array array]) [page:Quaternion]</h3> <div> - array -- todo + array -- Array of format (x, y, z, w) used to construct the quaternion. </div> <div> - todo + Sets this quaternion's component values from an array. </div> - <h3>.conjugate() [page:todo]</h3> + <h3>.conjugate() [page:Quaternion]</h3> <div> - todo + Returns the rotational conjugate of this quaternion. The conjugate of a quaternion + represents the same rotation in the opposite direction about the rotational axis. </div> <h2>Source</h2>
true
Other
mrdoob
three.js
4ff095945027b61090b7980d83fb2e559e3c99dd.json
add draft for Euler3.clamp().
src/math/Euler3.js
@@ -223,6 +223,12 @@ THREE.Euler3.prototype = { }, + clamp: function() { + + // todo + + }, + reorder: function( newOrder ) { // todo. @@ -232,7 +238,7 @@ THREE.Euler3.prototype = { alternativeSolution: function() { // todo. - + }, equals: function ( e ) {
false
Other
mrdoob
three.js
0986dce98996a7e405d0dc60a792b9af634986b3.json
add the stuff for buffergeometry
src/renderers/WebGLRenderer.js
@@ -2645,8 +2645,20 @@ THREE.WebGLRenderer = function ( parameters ) { } // render indexed triangles - - _gl.drawElements( _gl.TRIANGLES, offsets[ i ].count, _gl.UNSIGNED_SHORT, offsets[ i ].start * 2 ); // 2 bytes per Uint16 + var type,size; + + if (_glExtensionElementIndexUint && index.array instanceof Uint32Array){ + + type = _gl.UNSIGNED_INT; + size = 4; + + } else { + + type = _gl.UNSIGNED_SHORT; + size = 2; + + } + _gl.drawElements( _gl.TRIANGLES, offsets[ i ].count, type, offsets[ i ].start * size ); // 2 bytes per Uint16 _this.info.render.calls ++; _this.info.render.vertices += offsets[ i ].count; // not really true, here vertices can be shared @@ -2791,8 +2803,21 @@ THREE.WebGLRenderer = function ( parameters ) { } // render indexed lines - - _gl.drawElements( _gl.LINES, offsets[ i ].count, _gl.UNSIGNED_SHORT, offsets[ i ].start * 2 ); // 2 bytes per Uint16Array + var type,size; + + if (_glExtensionElementIndexUint && index.array instanceof Uint32Array){ + + type = _gl.UNSIGNED_INT; + size = 4; + + } else { + + type = _gl.UNSIGNED_SHORT; + size = 2; + + } + + _gl.drawElements( _gl.LINES, offsets[ i ].count, type, offsets[ i ].start * size ); // 2 bytes per Uint16Array _this.info.render.calls ++; _this.info.render.vertices += offsets[ i ].count; // not really true, here vertices can be shared @@ -3004,18 +3029,18 @@ THREE.WebGLRenderer = function ( parameters ) { // wireframe + var type = _glExtensionElementIndexUint ? _gl.UNSIGNED_INT : _gl.UNSIGNED_SHORT; + if ( material.wireframe ) { setLineWidth( material.wireframeLinewidth ); - var type = _glExtensionElementIndexUint ? _gl.UNSIGNED_INT : _gl.UNSIGNED_SHORT; if ( updateBuffers ) _gl.bindBuffer( _gl.ELEMENT_ARRAY_BUFFER, geometryGroup.__webglLineBuffer ); _gl.drawElements( _gl.LINES, geometryGroup.__webglLineCount, type, 0 ); // triangles } else { - var type = _glExtensionElementIndexUint ? _gl.UNSIGNED_INT : _gl.UNSIGNED_SHORT; if ( updateBuffers ) _gl.bindBuffer( _gl.ELEMENT_ARRAY_BUFFER, geometryGroup.__webglFaceBuffer ); _gl.drawElements( _gl.TRIANGLES, geometryGroup.__webglFaceCount, type, 0 );
false
Other
mrdoob
three.js
be10e32247650143a82f8e3b38097eb656d5f38f.json
Improve code style in light uniform optimization
src/renderers/WebGLRenderer.js
@@ -4306,7 +4306,7 @@ THREE.WebGLRenderer = function ( parameters ) { if ( material.id !== _currentMaterialId ) { - refreshLights = ( refreshLights || _currentMaterialId === - 1 ); + if ( _currentMaterialId === -1 ) refreshLights = true; _currentMaterialId = material.id; refreshMaterial = true; @@ -4412,19 +4412,18 @@ THREE.WebGLRenderer = function ( parameters ) { material instanceof THREE.MeshLambertMaterial || material.lights ) { - refreshLights = ( refreshLights || _lightsNeedUpdate ); - if ( _lightsNeedUpdate ) { + refreshLights = true; setupLights( lights ); _lightsNeedUpdate = false; } if ( refreshLights ) { refreshUniformsLights( m_uniforms, _lights ); - markUniformsLightsClean( m_uniforms, false ); + markUniformsLightsSkipUpdate( m_uniforms, false ); } else { - markUniformsLightsClean( m_uniforms, true ); + markUniformsLightsSkipUpdate( m_uniforms, true ); } } @@ -4708,27 +4707,27 @@ THREE.WebGLRenderer = function ( parameters ) { // If uniforms are marked as clean, they don't need to be loaded to the GPU. - function markUniformsLightsClean ( uniforms, clean ) { + function markUniformsLightsSkipUpdate ( uniforms, boolean ) { - uniforms.ambientLightColor.clean = clean; + uniforms.ambientLightColor.skipUpdate = boolean; - uniforms.directionalLightColor.clean = clean; - uniforms.directionalLightDirection.clean = clean; + uniforms.directionalLightColor.skipUpdate = boolean; + uniforms.directionalLightDirection.skipUpdate = boolean; - uniforms.pointLightColor.clean = clean; - uniforms.pointLightPosition.clean = clean; - uniforms.pointLightDistance.clean = clean; + uniforms.pointLightColor.skipUpdate = boolean; + uniforms.pointLightPosition.skipUpdate = boolean; + uniforms.pointLightDistance.skipUpdate = boolean; - uniforms.spotLightColor.clean = clean; - uniforms.spotLightPosition.clean = clean; - uniforms.spotLightDistance.clean = clean; - uniforms.spotLightDirection.clean = clean; - uniforms.spotLightAngleCos.clean = clean; - uniforms.spotLightExponent.clean = clean; + uniforms.spotLightColor.skipUpdate = boolean; + uniforms.spotLightPosition.skipUpdate = boolean; + uniforms.spotLightDistance.skipUpdate = boolean; + uniforms.spotLightDirection.skipUpdate = boolean; + uniforms.spotLightAngleCos.skipUpdate = boolean; + uniforms.spotLightExponent.skipUpdate = boolean; - uniforms.hemisphereLightSkyColor.clean = clean; - uniforms.hemisphereLightGroundColor.clean = clean; - uniforms.hemisphereLightDirection.clean = clean; + uniforms.hemisphereLightSkyColor.skipUpdate = boolean; + uniforms.hemisphereLightGroundColor.skipUpdate = boolean; + uniforms.hemisphereLightDirection.skipUpdate = boolean; }; @@ -4806,7 +4805,7 @@ THREE.WebGLRenderer = function ( parameters ) { var uniform = uniforms[ j ][ 0 ]; - if ( uniform.clean ) continue; + if ( uniform.skipUpdate ) continue; var type = uniform.type; var value = uniform.value;
false
Other
mrdoob
three.js
c2c20da0ea6a522f0b0933e1203203f73bd968f7.json
Remove unused argument
src/objects/Skeleton.js
@@ -118,7 +118,7 @@ THREE.Skeleton.prototype.addBone = function ( bone ) { }; -THREE.Skeleton.prototype.calculateInverses = function ( bone ) { +THREE.Skeleton.prototype.calculateInverses = function () { this.boneInverses = [];
false
Other
mrdoob
three.js
f9fd416f6529e539fe73925e4d5f0ac5a0248c04.json
Update camera uniforms only when really necessary This saves redundantly setting some uniforms when changing materials that share the same program, reducing CPU usage. This can give a significant performance boost on devices which have a higher-performance GPU compared to the CPU, such as Tegra K1.
src/renderers/WebGLRenderer.js
@@ -3255,6 +3255,7 @@ THREE.WebGLRenderer = function ( parameters ) { // reset caching for this frame _currentMaterialId = - 1; + _currentCamera = null; _lightsNeedUpdate = true; // update scene graph @@ -4278,6 +4279,7 @@ THREE.WebGLRenderer = function ( parameters ) { } + var refreshProgram = false; var refreshMaterial = false; var program = material.program, @@ -4289,6 +4291,7 @@ THREE.WebGLRenderer = function ( parameters ) { _gl.useProgram( program.program ); _currentProgram = program.id; + refreshProgram = true; refreshMaterial = true; } @@ -4300,7 +4303,7 @@ THREE.WebGLRenderer = function ( parameters ) { } - if ( refreshMaterial || camera !== _currentCamera ) { + if ( refreshProgram || camera !== _currentCamera ) { _gl.uniformMatrix4fv( p_uniforms.projectionMatrix, false, camera.projectionMatrix.elements ); @@ -4313,6 +4316,35 @@ THREE.WebGLRenderer = function ( parameters ) { if ( camera !== _currentCamera ) _currentCamera = camera; + // load material specific uniforms + // (shader material also gets them for the sake of genericity) + + if ( material instanceof THREE.ShaderMaterial || + material instanceof THREE.MeshPhongMaterial || + material.envMap ) { + + if ( p_uniforms.cameraPosition !== null ) { + + _vector3.setFromMatrixPosition( camera.matrixWorld ); + _gl.uniform3f( p_uniforms.cameraPosition, _vector3.x, _vector3.y, _vector3.z ); + + } + + } + + if ( material instanceof THREE.MeshPhongMaterial || + material instanceof THREE.MeshLambertMaterial || + material instanceof THREE.ShaderMaterial || + material.skinning ) { + + if ( p_uniforms.viewMatrix !== null ) { + + _gl.uniformMatrix4fv( p_uniforms.viewMatrix, false, camera.matrixWorldInverse.elements ); + + } + + } + } // skinning uniforms must be set even if material didn't change @@ -4434,35 +4466,6 @@ THREE.WebGLRenderer = function ( parameters ) { loadUniformsGeneric( program, material.uniformsList ); - // load material specific uniforms - // (shader material also gets them for the sake of genericity) - - if ( material instanceof THREE.ShaderMaterial || - material instanceof THREE.MeshPhongMaterial || - material.envMap ) { - - if ( p_uniforms.cameraPosition !== null ) { - - _vector3.setFromMatrixPosition( camera.matrixWorld ); - _gl.uniform3f( p_uniforms.cameraPosition, _vector3.x, _vector3.y, _vector3.z ); - - } - - } - - if ( material instanceof THREE.MeshPhongMaterial || - material instanceof THREE.MeshLambertMaterial || - material instanceof THREE.ShaderMaterial || - material.skinning ) { - - if ( p_uniforms.viewMatrix !== null ) { - - _gl.uniformMatrix4fv( p_uniforms.viewMatrix, false, camera.matrixWorldInverse.elements ); - - } - - } - } loadUniformsMatrices( p_uniforms, object );
false
Other
mrdoob
three.js
06522053e208bbba7ac00c41b244100c977c86b8.json
Update Loader.js texture double slash fix previous was : var fullPath = texturePath + "/" + sourceFile; but texturePath may already have a slash (see extractUrlBase function) changed slash to texturePath.slice(-1) === '/' : '' : '/'
src/loaders/Loader.js
@@ -146,7 +146,8 @@ THREE.Loader.prototype = { function create_texture( where, name, sourceFile, repeat, offset, wrap, anisotropy ) { var isCompressed = /\.dds$/i.test( sourceFile ); - var fullPath = texturePath + "/" + sourceFile; + + var fullPath = texturePath + texturePath.slice(-1) === '/' : '' : '/' + sourceFile; if ( isCompressed ) {
false
Other
mrdoob
three.js
57ec1a12545d26a3e076571f10918b33077a2257.json
Fix spelling error.
docs/api/core/Geometry.html
@@ -242,7 +242,7 @@ <h3>.clone()</h3> <h3>.dispose()</h3> <div> Removes The object from memory. <br /> - Don't forget to call this method when you remove an geometry because it can cuase meomory leaks. + Don't forget to call this method when you remove an geometry because it can cause meomory leaks. </div> <h3>.computeLineDistances()</h3>
false
Other
mrdoob
three.js
f74d036a1ab6aa16976dd7c0d65d9589f4a54d08.json
Update Object3D rotation type in docs to Euler
docs/api/core/Object3D.html
@@ -48,7 +48,7 @@ <h3>.[page:Vector3 position]</h3> Object's local position. </div> - <h3>.[page:Vector3 rotation]</h3> + <h3>.[page:Euler rotation]</h3> <div> Object's local rotation (<a href="https://en.wikipedia.org/wiki/Euler_angles" target="_blank">Euler angles</a>), in radians. </div>
false
Other
mrdoob
three.js
3c4ec1d1bdc1f04f02d00244a7b44611c67de61d.json
Update GPGPU example - Position textures require alpha channel to store bird's phase - Rendertarget type should match texture size - I don't remmeber when the birds get clotted into balls previous :S Position texture requires alpha channel for bird phase
examples/js/SimulatorRenderer.js
@@ -95,10 +95,10 @@ function SimulatorRenderer(WIDTH, renderer) { var dtPosition = generatePositionTexture(); var dtVelocity = generateVelocityTexture(); - rtPosition1 = getRenderTarget(); + rtPosition1 = getRenderTarget( THREE.RGBAFormat ); rtPosition2 = rtPosition1.clone(); - rtVelocity1 = rtPosition1.clone(); - rtVelocity2 = rtPosition1.clone(); + rtVelocity1 = getRenderTarget( THREE.RGBFormat ); + rtVelocity2 = rtVelocity1.clone(); simulator.renderTexture(dtPosition, rtPosition1); simulator.renderTexture(rtPosition1, rtPosition2); @@ -111,13 +111,13 @@ function SimulatorRenderer(WIDTH, renderer) { this.init = init; - function getRenderTarget() { + function getRenderTarget( type ) { var renderTarget = new THREE.WebGLRenderTarget(WIDTH, WIDTH, { wrapS: THREE.RepeatWrapping, wrapT: THREE.RepeatWrapping, minFilter: THREE.NearestFilter, magFilter: THREE.NearestFilter, - format: THREE.RGBAFormat, + format: type, type: THREE.FloatType, stencilBuffer: false }); @@ -173,9 +173,9 @@ function SimulatorRenderer(WIDTH, renderer) { function generatePositionTexture() { - var a = new Float32Array( PARTICLES * 3 ); + var a = new Float32Array( PARTICLES * 4 ); - for ( var k = 0; k < PARTICLES; k += 3 ) { + for ( var k = 0; k < PARTICLES; k += 4 ) { var x = Math.random() * BOUNDS - BOUNDS_HALF; var y = Math.random() * BOUNDS - BOUNDS_HALF; @@ -184,10 +184,11 @@ function SimulatorRenderer(WIDTH, renderer) { a[ k + 0 ] = x; a[ k + 1 ] = y; a[ k + 2 ] = z; + a[ k + 3 ] = 1; } - var texture = new THREE.DataTexture( a, WIDTH, WIDTH, THREE.RGBFormat, THREE.FloatType ); + var texture = new THREE.DataTexture( a, WIDTH, WIDTH, THREE.RGBAFormat, THREE.FloatType ); texture.minFilter = THREE.NearestFilter; texture.magFilter = THREE.NearestFilter; texture.needsUpdate = true;
false
Other
mrdoob
three.js
5ea0d096d5abbd8d340ee55f3d99ddfb09470587.json
Add start and end events to OrbitControls This mirrors the changes in github PR gh-4097 for Trackball controls.
examples/js/controls/OrbitControls.js
@@ -106,6 +106,8 @@ THREE.OrbitControls = function ( object, domElement ) { // events var changeEvent = { type: 'change' }; + var startEvent = { type: 'start'}; + var endEvent = { type: 'end'}; this.rotateLeft = function ( angle ) { @@ -319,6 +321,7 @@ THREE.OrbitControls = function ( object, domElement ) { scope.domElement.addEventListener( 'mousemove', onMouseMove, false ); scope.domElement.addEventListener( 'mouseup', onMouseUp, false ); + scope.dispatchEvent( startEvent ); } @@ -387,7 +390,7 @@ THREE.OrbitControls = function ( object, domElement ) { scope.domElement.removeEventListener( 'mousemove', onMouseMove, false ); scope.domElement.removeEventListener( 'mouseup', onMouseUp, false ); - + scope.dispatchEvent( endEvent ); state = STATE.NONE; } @@ -421,6 +424,8 @@ THREE.OrbitControls = function ( object, domElement ) { } scope.update(); + scope.dispatchEvent( startEvent ); + scope.dispatchEvent( endEvent ); } @@ -496,6 +501,8 @@ THREE.OrbitControls = function ( object, domElement ) { } + scope.dispatchEvent( startEvent ); + } function touchmove( event ) { @@ -581,6 +588,7 @@ THREE.OrbitControls = function ( object, domElement ) { if ( scope.enabled === false ) return; + scope.dispatchEvent( endEvent ); state = STATE.NONE; }
false
Other
mrdoob
three.js
2e7400d2c7f68dff0bf89ffcc58a80415953da71.json
Normalize indentation in Blender exporter Making the exporter for Blender 2.66 producing consistent indentation (all tabs rather than mixed tabs and spaces).
utils/exporters/blender/2.66/scripts/addons/io_mesh_threejs/export_threejs.py
@@ -267,7 +267,7 @@ "skinWeights" : [%(weights)s], - "animations" : [%(animations)s] + "animations" : [%(animations)s] """ TEMPLATE_VERTEX = "%g,%g,%g"
false
Other
mrdoob
three.js
b340e4dfe3453571a613d0383fedd27ecafeb4d9.json
Fix build path to Shader files
src/renderers/shaders/ShaderChunk.js
@@ -6,7 +6,7 @@ * @author mikael emtinger / http://gomo.se/ */ - THREE.ShaderChunk = { +THREE.ShaderChunk = { // FOG
true
Other
mrdoob
three.js
b340e4dfe3453571a613d0383fedd27ecafeb4d9.json
Fix build path to Shader files
utils/build/includes/common.json
@@ -78,10 +78,10 @@ "src/scenes/Fog.js", "src/scenes/FogExp2.js", "src/renderers/CanvasRenderer.js", - "/src/renderers/shaders/ShaderChunk.js", - "/src/renderers/shaders/UniformsUtils.js", - "/src/renderers/shaders/UniformsLib.js", - "/src/renderers/shaders/ShaderLib.js", + "src/renderers/shaders/ShaderChunk.js", + "src/renderers/shaders/UniformsUtils.js", + "src/renderers/shaders/UniformsLib.js", + "src/renderers/shaders/ShaderLib.js", "src/renderers/WebGLRenderer.js", "src/renderers/WebGLRenderTarget.js", "src/renderers/WebGLRenderTargetCube.js",
true
Other
mrdoob
three.js
b340e4dfe3453571a613d0383fedd27ecafeb4d9.json
Fix build path to Shader files
utils/build/includes/webgl.json
@@ -69,10 +69,10 @@ "src/scenes/Scene.js", "src/scenes/Fog.js", "src/scenes/FogExp2.js", - "/src/renderers/shaders/ShaderChunk.js", - "/src/renderers/shaders/UniformsUtils.js", - "/src/renderers/shaders/UniformsLib.js", - "/src/renderers/shaders/ShaderLib.js", + "src/renderers/shaders/ShaderChunk.js", + "src/renderers/shaders/UniformsUtils.js", + "src/renderers/shaders/UniformsLib.js", + "src/renderers/shaders/ShaderLib.js", "src/renderers/WebGLRenderer.js", "src/renderers/WebGLRenderTarget.js", "src/renderers/WebGLRenderTargetCube.js",
true
Other
mrdoob
three.js
158676fe0911ff735c2f1289c9d631d802055a42.json
Remove duplicated code in ShaderLib
src/renderers/shaders/ShaderChunk.js
@@ -1773,67 +1773,4 @@ ].join("\n") -}; - -THREE.UniformsUtils = { - - merge: function ( uniforms ) { - - var u, p, tmp, merged = {}; - - for ( u = 0; u < uniforms.length; u ++ ) { - - tmp = this.clone( uniforms[ u ] ); - - for ( p in tmp ) { - - merged[ p ] = tmp[ p ]; - - } - - } - - return merged; - - }, - - clone: function ( uniforms_src ) { - - var u, p, parameter, parameter_src, uniforms_dst = {}; - - for ( u in uniforms_src ) { - - uniforms_dst[ u ] = {}; - - for ( p in uniforms_src[ u ] ) { - - parameter_src = uniforms_src[ u ][ p ]; - - if ( parameter_src instanceof THREE.Color || - parameter_src instanceof THREE.Vector2 || - parameter_src instanceof THREE.Vector3 || - parameter_src instanceof THREE.Vector4 || - parameter_src instanceof THREE.Matrix4 || - parameter_src instanceof THREE.Texture ) { - - uniforms_dst[ u ][ p ] = parameter_src.clone(); - - } else if ( parameter_src instanceof Array ) { - - uniforms_dst[ u ][ p ] = parameter_src.slice(); - - } else { - - uniforms_dst[ u ][ p ] = parameter_src; - - } - - } - - } - - return uniforms_dst; - - } - -}; +}; \ No newline at end of file
false
Other
mrdoob
three.js
b8c36253d3046463ac6c60914f930611575a36ea.json
add bower.json file
bower.json
@@ -1,6 +1,6 @@ { "name": "three.js", - "version": "0.6.4", + "version": "6.4.0", "homepage": "http://threejs.org/", "description": "JavaScript 3D library", "main": "build/three.js", @@ -15,6 +15,7 @@ "ignore": [ "**/.*", "*.md", + "bower.json", "docs", "editor", "examples",
false
Other
mrdoob
three.js
5a30276742f0dce71cf7e0b171a86a2ac3e742a3.json
add bower.json file
bower.json
@@ -0,0 +1,26 @@ +{ + "name": "three.js", + "version": "0.6.4", + "homepage": "http://threejs.org/", + "description": "JavaScript 3D library", + "main": "build/three.js", + "keywords": [ + "three", + "threejs", + "three.js", + "3D", + "webgl" + ], + "license": "MIT", + "ignore": [ + "**/.*", + "*.md", + "docs", + "editor", + "examples", + "src", + "test", + "utils", + "LICENSE" + ] +}
false
Other
mrdoob
three.js
dd1424b756a9d761dde870a986b03172bda6ab18.json
update octree and examples
examples/js/Octree.js
@@ -1,6 +1,6 @@ /*! * - * threeoctree.js (r56) / https://github.com/collinhover/threeoctree + * threeoctree.js (r59) / https://github.com/collinhover/threeoctree * (sparse) dynamic 3D spatial representation structure for fast searches. * * @author Collin Hover / http://collinhover.com/ @@ -26,6 +26,38 @@ function toArray ( target ) { return target ? ( isArray ( target ) !== true ? [ target ] : target ) : []; } + + function indexOfValue( array, value ) { + + for ( var i = 0, il = array.length; i < il; i++ ) { + + if ( array[ i ] === value ) { + + return i; + + } + + } + + return -1; + + } + + function indexOfPropertyWithValue( array, property, value ) { + + for ( var i = 0, il = array.length; i < il; i++ ) { + + if ( array[ i ][ property ] === value ) { + + return i; + + } + + } + + return -1; + + } /*=================================================== @@ -77,43 +109,79 @@ this.scene = parameters.scene; + if ( this.scene ) { + + this.visualGeometry = new THREE.CubeGeometry( 1, 1, 1 ); + this.visualMaterial = new THREE.MeshBasicMaterial( { color: 0xFF0066, wireframe: true, wireframeLinewidth: 1 } ); + + } + // properties this.objects = []; + this.objectsMap = {}; this.objectsData = []; + this.objectsDeferred = []; - this.depthMax = isNumber( parameters.depthMax ) ? parameters.depthMax : -1; + this.depthMax = isNumber( parameters.depthMax ) ? parameters.depthMax : Infinity; this.objectsThreshold = isNumber( parameters.objectsThreshold ) ? parameters.objectsThreshold : 8; this.overlapPct = isNumber( parameters.overlapPct ) ? parameters.overlapPct : 0.15; + this.undeferred = parameters.undeferred || false; this.root = parameters.root instanceof THREE.OctreeNode ? parameters.root : new THREE.OctreeNode( parameters ); }; THREE.Octree.prototype = { - setRoot: function ( root ) { + update: function () { - if ( root instanceof THREE.OctreeNode ) { + // add any deferred objects that were waiting for render cycle + + if ( this.objectsDeferred.length > 0 ) { - // store new root + for ( var i = 0, il = this.objectsDeferred.length; i < il; i++ ) { + + var deferred = this.objectsDeferred[ i ]; + + this.addDeferred( deferred.object, deferred.options ); + + } - this.root = root; + this.objectsDeferred.length = 0; - // update properties + } + + }, + + add: function ( object, options ) { + + // add immediately + + if ( this.undeferred ) { - this.root.updateProperties(); + this.updateObject( object ); + + this.addDeferred( object, options ); + + } else { + + // defer add until update called + + this.objectsDeferred.push( { object: object, options: options } ); } }, - add: function ( object, useFaces ) { + addDeferred: function ( object, options ) { var i, l, - index, geometry, faces, + useFaces, + vertices, + useVertices, objectData; // ensure object is not object data @@ -124,23 +192,42 @@ } - // if does not yet contain object + // check uuid to avoid duplicates - index = this.objects.indexOf( object ); + if ( !object.uuid ) { + + object.uuid = THREE.Math.generateUUID(); + + } - if ( index === -1 ) { + if ( !this.objectsMap[ object.uuid ] ) { // store this.objects.push( object ); + this.objectsMap[ object.uuid ] = object; - // ensure world matrices are updated - - this.updateObject( object ); + // check options - // if adding faces of object + if ( options ) { + + useFaces = options.useFaces; + useVertices = options.useVertices; + + } - if ( useFaces === true ) { + if ( useVertices === true ) { + + geometry = object.geometry; + vertices = geometry.vertices; + + for ( i = 0, l = vertices.length; i < l; i++ ) { + + this.addObjectData( object, vertices[ i ] ); + + } + + } else if ( useFaces === true ) { geometry = object.geometry; faces = geometry.faces; @@ -151,9 +238,7 @@ } - } - // else add object itself - else { + } else { this.addObjectData( object ); @@ -163,9 +248,9 @@ }, - addObjectData: function ( object, face ) { + addObjectData: function ( object, part ) { - var objectData = new THREE.OctreeObjectData( object, face ); + var objectData = new THREE.OctreeObjectData( object, part ); // add to tree objects data list @@ -192,36 +277,54 @@ } - // if contains object + // check uuid - index = this.objects.indexOf( object ); - - if ( index !== -1 ) { - - // remove from objects list + if ( this.objectsMap[ object.uuid ] ) { - this.objects.splice( index, 1 ); + this.objectsMap[ object.uuid ] = undefined; - // remove from nodes + // check and remove from objects, nodes, and data lists - objectsDataRemoved = this.root.removeObject( objectData ); + index = indexOfValue( this.objects, object ); - // remove from objects data list - - for ( i = 0, l = objectsDataRemoved.length; i < l; i++ ) { + if ( index !== -1 ) { + + this.objects.splice( index, 1 ); - objectData = objectsDataRemoved[ i ]; + // remove from nodes - index = this.objectsData.indexOf( objectData ); + objectsDataRemoved = this.root.removeObject( objectData ); - if ( index !== -1 ) { + // remove from objects data list + + for ( i = 0, l = objectsDataRemoved.length; i < l; i++ ) { + + objectData = objectsDataRemoved[ i ]; - this.objectsData.splice( index, 1 ); + index = indexOfValue( this.objectsData, objectData ); + + if ( index !== -1 ) { + + this.objectsData.splice( index, 1 ); + + } } } + } else if ( this.objectsDeferred.length > 0 ) { + + // check and remove from deferred + + index = indexOfPropertyWithValue( this.objectsDeferred, 'object', object ); + + if ( index !== -1 ) { + + this.objectsDeferred.splice( index, 1 ); + + } + } }, @@ -242,15 +345,15 @@ objectData = objectsData[ i ]; - this.add( objectData, objectData.usesFaces() ); + this.add( objectData, { useFaces: objectData.faces, useVertices: objectData.vertices } ); } } }, - update: function () { + rebuild: function () { var i, l, node, @@ -260,19 +363,8 @@ indexOctantLast, objectsUpdate = []; - // update all objects - - for ( i = 0, l = this.objects.length; i < l; i++ ) { - - object = this.objects[ i ]; - - // ensure world matrices are updated - - this.updateObject( object ); - - } - // check all object data for changes in position + // assumes all object matrices are up to date for ( i = 0, l = this.objectsData.length; i < l; i++ ) { @@ -326,6 +418,46 @@ }, + updateObject: function ( object ) { + + var i, l, + parentCascade = [ object ], + parent, + parentUpdate; + + // search all parents between object and root for world matrix update + + parent = object.parent; + + while( parent ) { + + parentCascade.push( parent ); + parent = parent.parent; + + } + + for ( i = 0, l = parentCascade.length; i < l; i++ ) { + + parent = parentCascade[ i ]; + + if ( parent.matrixWorldNeedsUpdate === true ) { + + parentUpdate = parent; + + } + + } + + // update world matrix starting at uppermost parent that needs update + + if ( typeof parentUpdate !== 'undefined' ) { + + parentUpdate.updateMatrixWorld(); + + } + + }, + search: function ( position, radius, organizeByObject, direction ) { var i, l, @@ -345,7 +477,7 @@ // ensure radius (i.e. distance of ray) is a number - if ( isNumber( radius ) !== true ) { + if ( !( radius > 0 ) ) { radius = Number.MAX_VALUE; @@ -384,40 +516,43 @@ objectData = objects[ i ]; object = objectData.object; - resultObjectIndex = resultsObjectsIndices.indexOf( object ); + resultObjectIndex = indexOfValue( resultsObjectsIndices, object ); // if needed, create new result data if ( resultObjectIndex === -1 ) { resultData = { object: object, - faces: [] + faces: [], + vertices: [] }; results.push( resultData ); resultsObjectsIndices.push( object ); - } - else { + } else { resultData = results[ resultObjectIndex ]; } - // if object data has face, add to list + // object data has faces or vertices, add to list - if ( typeof objectData.faces !== 'undefined' ) { + if ( objectData.faces ) { resultData.faces.push( objectData.faces ); + } else if ( objectData.vertices ) { + + resultData.vertices.push( objectData.vertices ); + } } - } - else { + } else { results = objects; @@ -427,41 +562,17 @@ }, - updateObject: function ( object ) { - - var i, l, - parentCascade = [ object ], - parent, - parentUpdate; - - // search all parents between object and root for world matrix update - - parent = object.parent; - - while( parent ) { - - parentCascade.push( parent ); - parent = parent.parent; - - } + setRoot: function ( root ) { - for ( i = 0, l = parentCascade.length; i < l; i++ ) { + if ( root instanceof THREE.OctreeNode ) { - parent = parentCascade[ i ]; + // store new root - if ( parent.matrixWorldNeedsUpdate === true ) { - - parentUpdate = parent; - - } + this.root = root; - } - - // update world matrix starting at uppermost parent that needs update - - if ( typeof parentUpdate !== 'undefined' ) { + // update properties - parentUpdate.updateMatrixWorld(); + this.root.updateProperties(); } @@ -499,16 +610,31 @@ =====================================================*/ - THREE.OctreeObjectData = function ( object, face ) { - - // utility - - this.utilVec31FaceBounds = new THREE.Vector3(); + THREE.OctreeObjectData = function ( object, part ) { // properties this.object = object; - this.faces = face; + + // handle part by type + + if ( part instanceof THREE.Face3 ) { + + this.faces = part; + this.face3 = true; + this.utilVec31FaceBounds = new THREE.Vector3(); + + } else if ( part instanceof THREE.Face4 ) { + + this.face4 = true; + this.faces = part; + this.utilVec31FaceBounds = new THREE.Vector3(); + + } else if ( part instanceof THREE.Vector3 ) { + + this.vertices = part; + + } this.radius = 0; this.position = new THREE.Vector3(); @@ -529,18 +655,39 @@ update: function () { - if ( this.usesFaces() ) { + if ( this.face3 ) { - this.radius = this.getFaceBoundingRadius( this.object, this.faces ); + this.radius = this.getFace3BoundingRadius( this.object, this.faces ); this.position.copy( this.faces.centroid ).applyMatrix4( this.object.matrixWorld ); + } else if ( this.face4 ) { + + this.radius = this.getFace4BoundingRadius( this.object, this.faces ); + this.position.copy( this.faces.centroid ).applyMatrix4( this.object.matrixWorld ); + + } else if ( this.vertices ) { + + this.radius = this.object.material.size || 1; + this.position.copy( this.vertices ).applyMatrix4( this.object.matrixWorld ); + } else { - var geometry = this.object.geometry; - - if ( geometry.boundingSphere === null ) geometry.computeBoundingSphere(); - - this.radius = geometry.boundingSphere.radius; + if ( this.object.geometry ) { + + if ( this.object.geometry.boundingSphere === null ) { + + this.object.geometry.computeBoundingSphere(); + + } + + this.radius = this.object.geometry.boundingSphere.radius; + + } else { + + this.radius = this.object.boundRadius; + + } + this.position.getPositionFromMatrix( this.object.matrixWorld ); } @@ -549,23 +696,35 @@ }, - getFaceBoundingRadius: function ( object, face ) { + getFace3BoundingRadius: function ( object, face ) { - var geometry = object instanceof THREE.Mesh ? object.geometry : object, + var geometry = object.geometry || object, vertices = geometry.vertices, centroid = face.centroid, - va = vertices[ face.a ], vb = vertices[ face.b ], vc = vertices[ face.c ], vd, - centroidToVert = this.utilVec31FaceBounds; - - centroid.addVectors( va, vb ).add( vc ).divideScalar( 3 ); + va = vertices[ face.a ], vb = vertices[ face.b ], vc = vertices[ face.c ], + centroidToVert = this.utilVec31FaceBounds, + radius; - return Math.max( centroidToVert.subVectors( centroid, va ).length(), centroidToVert.subVectors( centroid, vb ).length(), centroidToVert.subVectors( centroid, vc ).length() ); + centroid.addVectors( va, vb ).add( vc ).divideScalar( 3 ); + radius = Math.max( centroidToVert.subVectors( centroid, va ).length(), centroidToVert.subVectors( centroid, vb ).length(), centroidToVert.subVectors( centroid, vc ).length() ); + + return radius; }, - usesFaces: function () { + getFace4BoundingRadius: function ( object, face ) { - return this.faces instanceof THREE.Face3; + var geometry = object.geometry || object, + vertices = geometry.vertices, + centroid = face.centroid, + va = vertices[ face.a ], vb = vertices[ face.b ], vc = vertices[ face.c ], vd = vertices[ face.d ], + centroidToVert = this.utilVec31FaceBounds, + radius; + + centroid.addVectors( va, vb ).add( vc ).add( vd ).divideScalar( 4 ); + radius = Math.max( centroidToVert.subVectors( centroid, va ).length(), centroidToVert.subVectors( centroid, vb ).length(), centroidToVert.subVectors( centroid, vc ).length(), centroidToVert.subVectors( centroid, vd ).length() ); + + return radius; } @@ -595,8 +754,7 @@ this.tree = parameters.tree; - } - else if ( parameters.parent instanceof THREE.OctreeNode !== true ) { + } else if ( parameters.parent instanceof THREE.OctreeNode !== true ) { parameters.root = this; @@ -608,7 +766,7 @@ this.id = this.tree.nodeCount++; this.position = parameters.position instanceof THREE.Vector3 ? parameters.position : new THREE.Vector3(); - this.radius = isNumber( parameters.radius ) && parameters.radius > 0 ? parameters.radius : 1; + this.radius = parameters.radius > 0 ? parameters.radius : 1; this.indexOctant = parameters.indexOctant; this.depth = 0; @@ -632,7 +790,8 @@ if ( this.tree.scene ) { - this.visual = new THREE.Mesh( new THREE.CubeGeometry( this.radiusOverlap * 2, this.radiusOverlap * 2, this.radiusOverlap * 2 ), new THREE.MeshBasicMaterial( { color: 0xFF0000, wireframe: true, wireframeLinewidth: 1, opacity: 0.05, transparent: true } ) ); + this.visual = new THREE.Mesh( this.tree.visualGeometry, this.tree.visualMaterial ); + this.visual.scale.set( this.radiusOverlap * 2, this.radiusOverlap * 2, this.radiusOverlap * 2 ); this.visual.position.copy( this.position ); this.tree.scene.add( this.visual ); @@ -669,8 +828,7 @@ this.tree = this.parent.tree; this.depth = this.parent.depth + 1; - } - else { + } else { this.depth = 0; @@ -725,9 +883,9 @@ addNode: function ( node, indexOctant ) { - indexOctant = node.indexOctant = isNumber( indexOctant ) ? indexOctant : isNumber( node.indexOctant ) ? node.indexOctant : this.getOctantIndex( node ); + node.indexOctant = indexOctant; - if ( this.nodesIndices.indexOf( indexOctant ) === -1 ) { + if ( indexOfValue( this.nodesIndices, indexOctant ) === -1 ) { this.nodesIndices.push( indexOctant ); @@ -743,61 +901,22 @@ }, - removeNode: function ( identifier ) { + removeNode: function ( indexOctant ) { - var indexOctant = -1, - index, + var index, node; - - // if identifier is node - if ( identifier instanceof THREE.OctreeNode && this.nodesByIndex[ identifier.indexOctant ] === identifier ) { - - node = identifier; - indexOctant = node.indexOctant; - - } - // if identifier is number - else if ( isNumber( identifier ) ) { - - indexOctant = identifier; - - } - // else search all nodes for identifier (slow) - else { - - for ( index in this.nodesByIndex ) { - - node = this.nodesByIndex[ index ]; - - if ( node === identifier ) { - - indexOctant = index; - - break; - - } - - } - } + index = indexOfValue( this.nodesIndices, indexOctant ); - // if indexOctant found + this.nodesIndices.splice( index, 1 ); - if ( indexOctant !== -1 ) { - - index = this.nodesIndices.indexOf( indexOctant ); - - this.nodesIndices.splice( index, 1 ); - - node = node || this.nodesByIndex[ indexOctant ]; - - delete this.nodesByIndex[ indexOctant ]; + node = node || this.nodesByIndex[ indexOctant ]; + + delete this.nodesByIndex[ indexOctant ]; + + if ( node.parent === this ) { - if ( node.parent === this ) { - - node.setParent( undefined ); - - } + node.setParent( undefined ); } @@ -820,19 +939,17 @@ node.addObject( object ); - } - // if object lies outside bounds, add to parent node - else if ( indexOctant < -1 && this.parent instanceof THREE.OctreeNode ) { + } else if ( indexOctant < -1 && this.parent instanceof THREE.OctreeNode ) { + + // if object lies outside bounds, add to parent node this.parent.addObject( object ); - } - // else add to self - else { + } else { // add to this objects list - index = this.objects.indexOf( object ); + index = indexOfValue( this.objects, object ); if ( index === -1 ) { @@ -912,7 +1029,7 @@ // remove from this objects list - index = this.objects.indexOf( object ); + index = indexOfValue( this.objects, object ); if ( index !== -1 ) { @@ -925,9 +1042,9 @@ } - } - // search each object data for object and remove (slow) - else { + } else { + + // search each object data for object and remove (slow) for ( i = this.objects.length - 1; i >= 0; i-- ) { @@ -942,7 +1059,7 @@ objectRemoved = true; - if ( typeof objectData.faces === 'undefined' ) { + if ( !objectData.faces && !objectData.vertices ) { removeData.searchComplete = true; break; @@ -957,7 +1074,7 @@ // if object data removed and this is not on nodes removed from - if ( objectRemoved === true ) {//&& removeData.nodesRemovedFrom.indexOf( this ) === -1 ) { + if ( objectRemoved === true ) { removeData.nodesRemovedFrom.push( this ); @@ -1028,16 +1145,16 @@ objectsSplit.push( object ); objectsSplitOctants.push( indexOctant ); - } - // if lies outside radius - else if ( indexOctant < -1 ) { + } else if ( indexOctant < -1 ) { + + // lies outside radius objectsExpand.push( object ); objectsExpandOctants.push( indexOctant ); - } - // else if lies across bounds between octants - else { + } else { + + // lies across bounds between octants objectsRemaining.push( object ); @@ -1081,7 +1198,7 @@ // if not at max depth - if ( this.tree.depthMax < 0 || this.depth < this.tree.depthMax ) { + if ( this.depth < this.tree.depthMax ) { objects = objects || this.objects; @@ -1097,7 +1214,7 @@ // get object octant index - indexOctant = isNumber( octants[ i ] ) ? octants[ i ] : this.getOctantIndex( object ); + indexOctant = octants[ i ]; // if object contained by octant, branch this tree @@ -1107,9 +1224,7 @@ node.addObject( object ); - } - // else add to remaining - else { + } else { objectsRemaining.push( object ); @@ -1125,8 +1240,7 @@ } - } - else { + } else { objectsRemaining = this.objects; @@ -1151,9 +1265,7 @@ node = this.nodesByIndex[ indexOctant ]; - } - // create new - else { + } else { // properties @@ -1217,7 +1329,7 @@ // handle max depth down tree - if ( this.tree.depthMax < 0 || this.tree.root.getDepthEnd() < this.tree.depthMax ) { + if ( this.tree.root.getDepthEnd() < this.tree.depthMax ) { objects = objects || this.objects; octants = octants || []; @@ -1241,7 +1353,7 @@ // get object octant index - indexOctant = isNumber( octants[ i ] ) ? octants[ i ] : this.getOctantIndex( object ); + indexOctant = octants[ i ] ; // if object outside this, include in calculations @@ -1259,8 +1371,7 @@ iom[ this.tree.INDEX_OUTSIDE_POS_X ].count++; - } - else if ( flagsOutside & this.tree.FLAG_NEG_X ) { + } else if ( flagsOutside & this.tree.FLAG_NEG_X ) { iom[ this.tree.INDEX_OUTSIDE_NEG_X ].count++; @@ -1272,8 +1383,7 @@ iom[ this.tree.INDEX_OUTSIDE_POS_Y ].count++; - } - else if ( flagsOutside & this.tree.FLAG_NEG_Y ) { + } else if ( flagsOutside & this.tree.FLAG_NEG_Y ) { iom[ this.tree.INDEX_OUTSIDE_NEG_Y ].count++; @@ -1285,8 +1395,7 @@ iom[ this.tree.INDEX_OUTSIDE_POS_Z ].count++; - } - else if ( flagsOutside & this.tree.FLAG_NEG_Z ) { + } else if ( flagsOutside & this.tree.FLAG_NEG_Z ) { iom[ this.tree.INDEX_OUTSIDE_NEG_Z ].count++; @@ -1296,9 +1405,7 @@ objectsExpand.push( object ); - } - // else add to remaining - else { + } else { objectsRemaining.push( object ); @@ -1408,8 +1515,7 @@ } - } - else { + } else { objectsRemaining = objects; @@ -1597,7 +1703,6 @@ // handle type - // object data if ( objectData instanceof THREE.OctreeObjectData ) { radiusObj = objectData.radius; @@ -1608,9 +1713,7 @@ objectData.positionLast.copy( positionObj ); - } - // node - else if ( objectData instanceof THREE.OctreeNode ) { + } else if ( objectData instanceof THREE.OctreeNode ) { positionObj = objectData.position; @@ -1665,42 +1768,46 @@ // return octant index from delta xyz - // x right if ( deltaX - radiusObj > -overlap ) { + // x right + indexOctant = indexOctant | 1; - } - // x left - else if ( !( deltaX + radiusObj < overlap ) ) { + } else if ( !( deltaX + radiusObj < overlap ) ) { + + // x left objectData.indexOctant = this.tree.INDEX_INSIDE_CROSS; return objectData.indexOctant; } - // y right if ( deltaY - radiusObj > -overlap ) { + // y right + indexOctant = indexOctant | 2; - } - // y left - else if ( !( deltaY + radiusObj < overlap ) ) { + } else if ( !( deltaY + radiusObj < overlap ) ) { + + // y left objectData.indexOctant = this.tree.INDEX_INSIDE_CROSS; return objectData.indexOctant; } - // z right + if ( deltaZ - radiusObj > -overlap ) { + // z right + indexOctant = indexOctant | 4; - } - // z left - else if ( !( deltaZ + radiusObj < overlap ) ) { + } else if ( !( deltaZ + radiusObj < overlap ) ) { + + // z left objectData.indexOctant = this.tree.INDEX_INSIDE_CROSS; return objectData.indexOctant; @@ -1750,8 +1857,7 @@ intersects = this.intersectRay( position, direction, radius, directionPct ); - } - else { + } else { intersects = this.intersectSphere( position, radius ); @@ -1790,22 +1896,19 @@ if ( px < this.left ) { distance -= Math.pow( px - this.left, 2 ); - } - else if ( px > this.right ) { + } else if ( px > this.right ) { distance -= Math.pow( px - this.right, 2 ); } if ( py < this.bottom ) { distance -= Math.pow( py - this.bottom, 2 ); - } - else if ( py > this.top ) { + } else if ( py > this.top ) { distance -= Math.pow( py - this.top, 2 ); } if ( pz < this.back ) { distance -= Math.pow( pz - this.back, 2 ); - } - else if ( pz > this.front ) { + } else if ( pz > this.front ) { distance -= Math.pow( pz - this.front, 2 ); } @@ -1862,8 +1965,7 @@ } - } - else { + } else { depth = !depth || this.depth > depth ? this.depth : depth; @@ -2009,8 +2111,7 @@ } - } - else { + } else { intersects = this.intersectObject( object, recursive ); @@ -2035,4 +2136,4 @@ }; -}( THREE ) ); +}( THREE ) ); \ No newline at end of file
true
Other
mrdoob
three.js
dd1424b756a9d761dde870a986b03172bda6ab18.json
update octree and examples
examples/webgl_octree.html
@@ -6,7 +6,8 @@ <meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0"> <style> body { - background-color: #ffffff; + font-family: Monospace; + background-color: #f0f0f0; margin: 0px; overflow: hidden; } @@ -55,8 +56,20 @@ document.body.appendChild( renderer.domElement ); // create octree - + octree = new THREE.Octree( { + // when undeferred = true, objects are inserted immediately + // instead of being deferred until next octree.update() call + // this may decrease performance as it forces a matrix update + undeferred: false, + // set the max depth of tree + depthMax: Infinity, + // max number of objects before nodes split or merge + objectsThreshold: 8, + // percent between 0 and 1 that nodes will overlap each other + // helps insert objects that lie over more than one node + overlapPct: 0.15, + // pass the scene to visualize the octree scene: scene } ); @@ -67,6 +80,18 @@ new THREE.MeshBasicMaterial( { color: 0x00FF00, transparent: true, opacity: 0.4 } ) ); scene.add( searchMesh ); + + // info + + var info = document.createElement( 'div' ); + info.style.position = 'absolute'; + info.style.top = '0'; + info.style.width = '100%'; + info.style.textAlign = 'center'; + info.style.padding = '10px'; + info.style.background = '#FFFFFF'; + info.innerHTML = '<a href="http://threejs.org" target="_blank">three.js</a> webgl - octree (sparse & dynamic) - by <a href="http://github.com/collinhover/threeoctree" target="_blank">collinhover</a>'; + document.body.appendChild( info ); } @@ -86,6 +111,10 @@ // render results render(); + + // update octree to add deferred objects + + octree.update(); }
true
Other
mrdoob
three.js
dd1424b756a9d761dde870a986b03172bda6ab18.json
update octree and examples
examples/webgl_octree_raycasting.html
@@ -0,0 +1,395 @@ +<!DOCTYPE html> +<html> +<head> + <title>three.js webgl - octree raycasting</title> + <meta charset="utf-8"> + <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> + <meta name="description" content=""> + <meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0"> + <style> + body { + font-family: Monospace; + background-color: #f0f0f0; + margin: 0px; + overflow: hidden; + } + </style> + +</head> + +<body> + + <script type="text/javascript" src="../build/three.min.js"></script> + <script type="text/javascript" src="js/Octree.js"></script> + <script type="text/javascript" src="js/controls/TrackballControls.js"></script> + <script type="text/javascript" src="js/libs/stats.min.js"></script> + <script> + + var camera, scene, renderer; + + var controls, stats; + + var tracker; + + var octree; + + var objects = []; + var objectsSearch = []; + var totalFaces = 0; + + var simpleMeshCount = 2000; + var radius = 100; + var radiusMax = radius * 10; + var radiusMaxHalf = radiusMax * 0.5; + var radiusSearch = radius * 0.75; + + var baseColor = 0x333333; + var foundColor = 0x12C0E3; + var intersectColor = 0x00D66B; + + var clock = new THREE.Clock(); + var searchDelay = 1; + var searchInterval = 0; + var useOctree = true; + + var projector; + + var mouse = new THREE.Vector2(); + var intersected; + + init(); + animate(); + + function init() { + + // standard three scene, camera, renderer + + scene = new THREE.Scene(); + + camera = new THREE.PerspectiveCamera( 75, window.innerWidth / window.innerHeight, 1, radius * 100 ); + camera.position.z = radius * 10; + scene.add( camera ); + + renderer = new THREE.WebGLRenderer(); + renderer.setSize( window.innerWidth, window.innerHeight ); + + document.body.appendChild( renderer.domElement ); + + // create octree + + octree = new THREE.Octree( { + // uncomment below to see the octree (may kill the fps) + //scene: scene, + // when undeferred = true, objects are inserted immediately + // instead of being deferred until next octree.update() call + // this may decrease performance as it forces a matrix update + undeferred: false, + // set the max depth of tree + depthMax: Infinity, + // max number of objects before nodes split or merge + objectsThreshold: 8, + // percent between 0 and 1 that nodes will overlap each other + // helps insert objects that lie over more than one node + overlapPct: 0.15 + } ); + + // lights + + var ambient = new THREE.AmbientLight( 0x101010 ); + scene.add( ambient ); + + var directionalLight = new THREE.DirectionalLight( 0xffffff, 0.5 ); + directionalLight.position.set( 1, 1, 2 ).normalize(); + scene.add( directionalLight ); + + // create all objects + + var simpleGeometry = new THREE.CubeGeometry( 1, 1, 1 ); + + for ( var i = 0; i < simpleMeshCount - 1; i++ ) { + + totalFaces += simpleGeometry.faces.length; + + var simpleMaterial = new THREE.MeshBasicMaterial(); + simpleMaterial.color.setHex( baseColor ); + + modifyOctree( simpleGeometry, simpleMaterial, false, true, true, true ); + + } + + var loader = new THREE.JSONLoader(); + + loader.load( 'obj/lucy/Lucy100k_slim.js', function ( geometry ) { + + geometry.computeVertexNormals(); + totalFaces += geometry.faces.length; + + var material = new THREE.MeshPhongMaterial( { ambient: 0x030303, color: 0x030303, specular: 0x030303, shininess: 30 } ); + + modifyOctree( geometry, material, true ); + + } ); + + // projector for click intersection + + projector = new THREE.Projector(); + + // camera controls + + controls = new THREE.TrackballControls( camera ); + controls.rotateSpeed = 1.0; + controls.zoomSpeed = 1.2; + controls.panSpeed = 0.8; + controls.noZoom = false; + controls.noPan = false; + controls.staticMoving = true; + controls.dynamicDampingFactor = 0.3; + + // info + + var info = document.createElement( 'div' ); + info.style.position = 'absolute'; + info.style.top = '0'; + info.style.width = '100%'; + info.style.textAlign = 'center'; + info.style.padding = '10px'; + info.style.background = '#FFFFFF'; + info.innerHTML = '<a href="http://threejs.org" target="_blank">three.js</a> webgl - octree (raycasting performance) - by <a href="http://github.com/collinhover/threeoctree" target="_blank">collinhover</a><br><small style="opacity:0.5">Lucy model from <a href="http://graphics.stanford.edu/data/3Dscanrep/">Stanford 3d scanning repository</a>(decimated with <a href="http://meshlab.sourceforge.net/">Meshlab</a>)</small>'; + document.body.appendChild( info ); + + // stats + + stats = new Stats(); + stats.domElement.style.position = 'absolute'; + stats.domElement.style.top = '0'; + stats.domElement.style.left = '0'; + stats.domElement.style.zIndex = 100; + + document.body.appendChild( stats.domElement ); + + // bottom container + + var container = document.createElement( 'div' ); + container.style.position = 'absolute'; + container.style.bottom = '0'; + container.style.width = '100%'; + container.style.textAlign = 'center'; + document.body.appendChild( container ); + + // tracker + + tracker = document.createElement( 'div' ); + tracker.style.width = '100%'; + tracker.style.padding = '10px'; + tracker.style.background = '#FFFFFF'; + container.appendChild( tracker ); + + // octree use toggle + + var toggle = document.createElement( 'div' ); + toggle.style.position = 'absolute'; + toggle.style.bottom = '100%'; + toggle.style.width = '100%'; + toggle.style.padding = '10px'; + toggle.style.background = '#FFFFFF'; + container.appendChild( toggle ); + + var checkbox = document.createElement('input'); + checkbox.type = "checkbox"; + checkbox.name = "octreeToggle"; + checkbox.value = "value"; + checkbox.id = "octreeToggle"; + checkbox.checked = true; + + var label = document.createElement('label') + label.htmlFor = "octreeToggle"; + label.appendChild(document.createTextNode('Use Octree') ); + + toggle.appendChild(checkbox); + toggle.appendChild(label); + + // events + + checkbox.addEventListener( 'click', toggleOctree, false ); + renderer.domElement.addEventListener( 'mousemove', onDocumentMouseMove, false ); + + window.addEventListener( 'resize', onWindowResize, false ); + + } + + function toggleOctree () { + + useOctree = !useOctree; + + } + + function animate() { + + // note: three.js includes requestAnimationFrame shim + + requestAnimationFrame( animate ); + + render(); + + stats.update(); + + } + + function render() { + + controls.update(); + + renderer.render( scene, camera ); + + // update octree post render + // this ensures any objects being added + // have already had their matrices updated + + octree.update(); + + } + + function modifyOctree( geometry, material, useFaces, randomPosition, randomRotation, randomScale ) { + + var mesh; + + if ( geometry ) { + + // create new object + + mesh = new THREE.Mesh( geometry, material ); + + // give new object a random position, rotation, and scale + + if ( randomPosition ) { + + mesh.position.set( Math.random() * radiusMax - radiusMaxHalf, Math.random() * radiusMax - radiusMaxHalf, Math.random() * radiusMax - radiusMaxHalf ); + + } + + if ( randomRotation ) { + + mesh.rotation.set( Math.random() * 2 * Math.PI, Math.random() * 2 * Math.PI, Math.random() * 2 * Math.PI ); + + } + + if ( randomScale ) { + + mesh.scale.x = mesh.scale.y = mesh.scale.z = Math.random() * radius * 0.1 + radius * 0.05; + + } + + // add new object to octree and scene + // NOTE: octree object insertion is deferred until after the next render cycle + + octree.add( mesh, { useFaces: useFaces } ); + scene.add( mesh ); + + // store object + + objects.push( mesh ); + + /* + + // octree details to console + + console.log( ' ============================================================================================================'); + console.log( ' OCTREE: ', octree ); + console.log( ' ... depth ', octree.depth, ' vs depth end?', octree.depthEnd() ); + console.log( ' ... num nodes: ', octree.nodeCountEnd() ); + console.log( ' ... total objects: ', octree.objectCountEnd(), ' vs tree objects length: ', octree.objects.length ); + console.log( ' ============================================================================================================'); + console.log( ' '); + + // print full octree structure to console + + octree.toConsole(); + + */ + + } + + } + + function onWindowResize() { + + camera.aspect = window.innerWidth / window.innerHeight; + camera.updateProjectionMatrix(); + + renderer.setSize( window.innerWidth, window.innerHeight ); + + } + + function onDocumentMouseMove( event ) { + + event.preventDefault(); + + mouse.x = ( event.clientX / window.innerWidth ) * 2 - 1; + mouse.y = - ( event.clientY / window.innerHeight ) * 2 + 1; + + var vector = new THREE.Vector3( mouse.x, mouse.y, 0.5 ); + projector.unprojectVector( vector, camera ); + + var raycaster = new THREE.Raycaster( camera.position, vector.sub( camera.position ).normalize() ); + var octreeObjects; + var numObjects; + var numFaces = 0; + var intersections; + + if ( useOctree ) { + + octreeObjects = octree.search( raycaster.ray.origin, raycaster.ray.far, true, raycaster.ray.direction ); + + intersections = raycaster.intersectOctreeObjects( octreeObjects ); + + numObjects = octreeObjects.length; + + for ( var i = 0, il = numObjects; i < il; i++ ) { + + numFaces += octreeObjects[ i ].faces.length; + + } + + } + else { + + intersections = raycaster.intersectObjects( objects ); + numObjects = objects.length; + numFaces = totalFaces; + + } + + if ( intersections.length > 0 ) { + + if ( intersected != intersections[ 0 ].object ) { + + if ( intersected ) intersected.material.color.setHex( baseColor ); + + intersected = intersections[ 0 ].object; + intersected.material.color.setHex( intersectColor ); + + } + + document.body.style.cursor = 'pointer'; + + } + else if ( intersected ) { + + intersected.material.color.setHex( baseColor ); + intersected = null; + + document.body.style.cursor = 'auto'; + + } + + // update tracker + + tracker.innerHTML = ( useOctree ? 'Octree search' : 'Search without octree' ) + ' using infinite ray from camera found [ ' + numObjects + ' / ' + objects.length + ' ] objects, [ ' + numFaces + ' / ' + totalFaces + ' ] faces, and [ ' + intersections.length + ' ] intersections.'; + + } + + </script> + +</body> + +</html> \ No newline at end of file
true
Other
mrdoob
three.js
11304641b7aa8033c95e0e6de6ca346c40aecad3.json
Add inheritance information to AreaLight
docs/api/lights/AreaLight.html
@@ -7,6 +7,8 @@ <link type="text/css" rel="stylesheet" href="../../page.css" /> </head> <body> + [page:Object3D] &rarr; [page:Light] &rarr; + <h1>[name]</h1> <div class="desc">This illuminates the scene from a complete surface. This light only works in the [page:WebGLDeferredRenderer deferredrenderer]. </div>
false
Other
mrdoob
three.js
b4b7e8f98341517a1a7bd79b36410ccca83bfb43.json
Add normailizeNormals doc.
docs/api/core/BufferGeometry.html
@@ -110,9 +110,10 @@ <h3>.dispose()</h3> You need to call this when you want the bufferGeometry removed while the application is running. </div> - <h3>.normalizeNormals() [page:todo]</h3> + <h3>.normalizeNormals()</h3> <div> - todo + Every normal vector in a geometry will have a magnitude of 1. + This will correct lighting on the geometry surfaces. </div> <h2>Source</h2>
false
Other
mrdoob
three.js
75cf52cec9338bb73b7717ef24807dcbc3db4561.json
Add missing update calls.
examples/js/controls/OrbitControls.js
@@ -411,6 +411,7 @@ THREE.OrbitControls = function ( object, domElement ) { } + scope.update(); } function onKeyDown( event ) { @@ -500,6 +501,8 @@ THREE.OrbitControls = function ( object, domElement ) { var element = scope.domElement === document ? scope.domElement.body : scope.domElement; + var needUpdate = false; + switch ( event.touches.length ) { case 1: // one-fingered touch: rotate @@ -515,6 +518,8 @@ THREE.OrbitControls = function ( object, domElement ) { scope.rotateUp( 2 * Math.PI * rotateDelta.y / element.clientHeight * scope.rotateSpeed ); rotateStart.copy( rotateEnd ); + + needUpdate = true; break; case 2: // two-fingered touch: dolly @@ -539,6 +544,8 @@ THREE.OrbitControls = function ( object, domElement ) { } dollyStart.copy( dollyEnd ); + + needUpdate = true; break; case 3: // three-fingered touch: pan @@ -551,13 +558,21 @@ THREE.OrbitControls = function ( object, domElement ) { scope.pan( panDelta ); panStart.copy( panEnd ); + + needUpdate = true; break; default: state = STATE.NONE; } + if ( needUpdate ) { + + scope.update(); + + } + } function touchend( /* event */ ) {
false
Other
mrdoob
three.js
8b446fb57f9595393a97a08b4edcf82682a69a68.json
Remove remaining ray normalization in Raycaster.
src/core/Raycaster.js
@@ -1,20 +1,15 @@ /** * @author mrdoob / http://mrdoob.com/ * @author bhouston / http://exocortex.com/ + * @author stephomi / http://stephaneginier.com/ */ ( function ( THREE ) { THREE.Raycaster = function ( origin, direction, near, far ) { this.ray = new THREE.Ray( origin, direction ); - - // normalized ray.direction required for accurate distance calculations - if ( this.ray.direction.lengthSq() > 0 ) { - - this.ray.direction.normalize(); - - } + // direction is assumed to be normalized (for accurate distance calculations) this.near = near || 0; this.far = far || Infinity; @@ -172,8 +167,6 @@ intersects.push( { - // this works because the original ray was normalized, - // and the transformed localRay wasn't distance: distance, point: interPoint, face: null, @@ -288,7 +281,6 @@ inverseMatrix.getInverse( object.matrixWorld ); localRay.copy( raycaster.ray ).applyMatrix4( inverseMatrix ); - localRay.direction.normalize(); // for scale matrix var vertices = geometry.vertices; var nbVertices = vertices.length; @@ -347,13 +339,7 @@ THREE.Raycaster.prototype.set = function ( origin, direction ) { this.ray.set( origin, direction ); - - // normalized ray.direction required for accurate distance calculations - if ( this.ray.direction.length() > 0 ) { - - this.ray.direction.normalize(); - - } + // direction is assumed to be normalized (for accurate distance calculations) };
false
Other
mrdoob
three.js
e2e5cb13bd3bcda806966ba1c775428a2673a6b3.json
add new credits to Quaternion.js
src/math/Quaternion.js
@@ -2,6 +2,8 @@ * @author mikael emtinger / http://gomo.se/ * @author alteredq / http://alteredqualia.com/ * @author WestLangley / http://github.com/WestLangley + * @author bhouston / http://exocortex.com + * @author Hasan Kamal-Al-Deen / hasank1987@gmail.com */ THREE.Quaternion = function( x, y, z, w ) {
false
Other
mrdoob
three.js
5573a620601ba36c06f4d8c3e53eea9525358571.json
make benchmarks not just an empty webspage.
test/benchmark/benchmarking_float32array_accesspatterns.html
@@ -5,6 +5,11 @@ <title>ThreeJS Benchmark Tests - Using Files in /src</title> </head> <body> + + During this Benchmarking test the browser will be unresponsive.<br/><br/> + + Benchmark output is written to the JavaScript console. To access the JavaScript console presss Ctrl-Shift-J. + <script src="benchmark-1.0.0.js"></script> <!-- add ThreeJS sources to test below -->
false
Other
mrdoob
three.js
a81dfc9c99a54cbbb0cdb8bbfbfac2f28725879b.json
add the function setMaterialIndex to GeometryUtils
src/extras/GeometryUtils.js
@@ -1031,7 +1031,21 @@ THREE.GeometryUtils = { geometry.faces = faces; geometry.faceVertexUvs = faceVertexUvs; - } + }, + + setMaterialIndex: function ( geometry, index, startFace, endFace ){ + + var faces = geometry.faces; + var start = startFace || 0; + var end = endFace || faces.length - 1; + + for ( var i = start; i <= end; i ++ ) { + + faces[i].materialIndex = index; + + } + + } };
false
Other
mrdoob
three.js
a2365394f6940677b9d7ed9355ad4502fff2431f.json
add return for Color.set documentation
docs/api/math/Color.html
@@ -185,7 +185,7 @@ <h3>.clone() [page:Color]</h3> Clones this color. </div> - <h3>.set([page:todo value]) [page:todo]</h3> + <h3>.set([page:todo value]) [page:this]</h3> <div> value -- either an instance of Color, a hexadecimal value, or a css style string </div>
false
Other
mrdoob
three.js
99e16b15667fb8127a31e61ceeb3c366a83e6d08.json
Add the first version of the animation sidebar
editor/index.html
@@ -122,6 +122,7 @@ <script src="js/Sidebar.Scene.js"></script> <script src="js/Sidebar.Object3D.js"></script> <script src="js/Sidebar.Geometry.js"></script> + <script src="js/Sidebar.Animation.js"></script> <script src="js/Sidebar.Geometry.PlaneGeometry.js"></script> <script src="js/Sidebar.Geometry.CubeGeometry.js"></script> <script src="js/Sidebar.Geometry.CylinderGeometry.js"></script> @@ -146,6 +147,7 @@ cloneSelectedObject: new SIGNALS.Signal(), removeSelectedObject: new SIGNALS.Signal(), + playAnimations: new SIGNALS.Signal(), // notifications
true
Other
mrdoob
three.js
99e16b15667fb8127a31e61ceeb3c366a83e6d08.json
Add the first version of the animation sidebar
editor/js/Sidebar.Animation.js
@@ -0,0 +1,67 @@ +Sidebar.Animation = function ( signals ) { + + var options = {}; + var possibleAnimations = {}; + + var container = new UI.Panel(); + container.setPadding( '10px' ); + container.setBorderTop( '1px solid #ccc' ); + + container.add( new UI.Text( 'Animation' ).setColor( '#666' ) ); + container.add( new UI.Break(), new UI.Break() ); + + var AnimationsRow = new UI.Panel(); + var Animations = new UI.Select().setOptions( options ).setWidth( '130px' ).setColor( '#444' ).setFontSize( '12px' ); + AnimationsRow.add( new UI.Text( 'animations' ).setWidth( '90px' ).setColor( '#666' ) ); + AnimationsRow.add( Animations ); + container.add( AnimationsRow ); + container.add( new UI.Break() ); + + var PlayRow = new UI.Panel(); + var playButton = new UI.Button().setLabel("Play").onClick(play); + PlayRow.add( playButton ); + container.add( PlayRow ); + container.add( new UI.Break() ); + + function play(){ + + var value = Animations.getValue(); + if (possibleAnimations[value]){ + var anims = possibleAnimations[value] + for ( var i = 0;i < anims.length;i++){ + anims[i].play(); + } + signals.playAnimations.dispatch( anims ); + }; + } + + + signals.objectAdded.add( function ( object ) { + + console.log(object) + if (object instanceof THREE.Mesh){ + if (object.geometry && object.geometry.animation){ + var name = object.geometry.animation.name; + options[name] = name + Animations.setOptions(options); + + THREE.AnimationHandler.add(object.geometry.animation); + var animation = new THREE.Animation(object, + name, + THREE.AnimationHandler.CATMULLROM) + + if (possibleAnimations[name]){ + possibleAnimations[name].push(animation); + } else { + possibleAnimations[name] = [animation]; + } + + } + } + + } ); + + + return container; + +}
true
Other
mrdoob
three.js
99e16b15667fb8127a31e61ceeb3c366a83e6d08.json
Add the first version of the animation sidebar
editor/js/Sidebar.js
@@ -9,6 +9,7 @@ var Sidebar = function ( signals ) { container.add( new Sidebar.Object3D( signals ) ); container.add( new Sidebar.Geometry( signals ) ); container.add( new Sidebar.Material( signals ) ); + container.add( new Sidebar.Animation( signals ) ); return container;
true
Other
mrdoob
three.js
99e16b15667fb8127a31e61ceeb3c366a83e6d08.json
Add the first version of the animation sidebar
editor/js/Viewport.js
@@ -491,6 +491,23 @@ var Viewport = function ( signals ) { } ); + signals.playAnimations.add( function (animations) { + + function animate() { + requestAnimationFrame( animate ); + + for (var i = 0; i < animations.length ; i++ ){ + animations[i].update(0.016); + } + + + render(); + } + + animate(); + + } ); + // var renderer;
true
Other
mrdoob
three.js
ca8ba14a539566447be73a3f98a1b04c7b58a0c8.json
Implement Scene.clone #3032 The object returnen by the scene's clone method is now a fully valid scene and can be used in rendering.
build/three.js
@@ -14506,6 +14506,25 @@ THREE.Scene.prototype.__removeObject = function ( object ) { }; +THREE.Scene.prototype.clone = function (object) { + if ( object === undefined ) object = new THREE.Scene(); + + THREE.Object3D.prototype.clone.call(this, object); + + if(this.fog !== null) { + object.fog = this.fog.clone(); + } + + if(this.overrideMaterial !== null) { + object.overrideMaterial = this.overrideMaterial.clone(); + } + + object.autoUpdate = this.autoUpdate; + object.matrixAutoUpdate = this.matrixAutoUpdate; + + return object; +}; + /** * @author mrdoob / http://mrdoob.com/ * @author alteredq / http://alteredqualia.com/
true
Other
mrdoob
three.js
ca8ba14a539566447be73a3f98a1b04c7b58a0c8.json
Implement Scene.clone #3032 The object returnen by the scene's clone method is now a fully valid scene and can be used in rendering.
build/three.min.js
@@ -25,7 +25,7 @@ h-f*g*e,this.w=c*d*e+f*g*h):"ZXY"===b?(this.x=f*d*e-c*g*h,this.y=c*g*e+f*d*h,thi return this},setFromRotationMatrix:function(a){var b=a.elements,c=b[0],a=b[4],d=b[8],e=b[1],f=b[5],g=b[9],h=b[2],i=b[6],b=b[10],j=c+f+b;0<j?(c=0.5/Math.sqrt(j+1),this.w=0.25/c,this.x=(i-g)*c,this.y=(d-h)*c,this.z=(e-a)*c):c>f&&c>b?(c=2*Math.sqrt(1+c-f-b),this.w=(i-g)/c,this.x=0.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=0.25*c,this.z=(g+i)/c):(c=2*Math.sqrt(1+b-c-f),this.w=(e-a)/c,this.x=(d+h)/c,this.y=(g+i)/c,this.z=0.25*c);return this},inverse:function(){this.conjugate().normalize(); return this},conjugate:function(){this.x*=-1;this.y*=-1;this.z*=-1;return this},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);return this},multiply:function(a,b){return void 0!==b?(console.warn("DEPRECATED: Quaternion's .multiply() now only accepts one argument. Use .multiplyQuaternions( a, b ) instead."), this.multiplyQuaternions(a,b)):this.multiplyQuaternions(this,a)},multiplyQuaternions:function(a,b){var c=a.x,d=a.y,e=a.z,f=a.w,g=b.x,h=b.y,i=b.z,j=b.w;this.x=c*j+f*g+d*i-e*h;this.y=d*j+f*h+e*g-c*i;this.z=e*j+f*i+c*h-d*g;this.w=f*j-c*g-d*h-e*i;return this},multiplyVector3:function(a){console.warn("DEPRECATED: Quaternion's .multiplyVector3() has been removed. Use is now vector.applyQuaternion( quaternion ) instead.");return a.applyQuaternion(this)},slerp:function(a,b){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.acos(g),i=Math.sqrt(1-g*g);if(0.001>Math.abs(i))return this.w=0.5*(f+this.w),this.x=0.5*(c+this.x),this.y=0.5*(d+this.y),this.z=0.5*(e+this.z),this;g=Math.sin((1-b)*h)/i;h=Math.sin(b*h)/i;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;return this},equals:function(a){return a.x===this.x&&a.y=== +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.acos(g),i=Math.sqrt(1-g*g);if(0.0010>Math.abs(i))return this.w=0.5*(f+this.w),this.x=0.5*(c+this.x),this.y=0.5*(d+this.y),this.z=0.5*(e+this.z),this;g=Math.sin((1-b)*h)/i;h=Math.sin(b*h)/i;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;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){this.x=a[0];this.y=a[1];this.z=a[2];this.w=a[3];return this},toArray:function(){return[this.x,this.y,this.z,this.w]},clone:function(){return new THREE.Quaternion(this.x,this.y,this.z,this.w)}};THREE.Quaternion.slerp=function(a,b,c,d){return c.copy(a).slerp(b,d)};THREE.Vector2=function(a,b){this.x=a||0;this.y=b||0}; THREE.Vector2.prototype={constructor:THREE.Vector2,set:function(a,b){this.x=a;this.y=b;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);}},copy:function(a){this.x=a.x;this.y=a.y;return this},add:function(a, b){if(void 0!==b)return console.warn("DEPRECATED: Vector2's .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},addVectors:function(a,b){this.x=a.x+b.x;this.y=a.y+b.y;return this},addScalar:function(a){this.x+=a;this.y+=a;return this},sub:function(a,b){if(void 0!==b)return console.warn("DEPRECATED: Vector2's .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(a,b);this.x-=a.x;this.y-= @@ -54,8 +54,8 @@ case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw Err 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},sub:function(a,b){if(void 0!==b)return console.warn("DEPRECATED: Vector4's .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},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){this.x*=a;this.y*=a;this.z*=a;this.w*=a;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){0!==a?(this.x/=a,this.y/=a,this.z/=a,this.w/=a):(this.z=this.y=this.x=0,this.w=1);return this},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,e=a[0];d=a[4];var f=a[8],g=a[1],h=a[5],i=a[9];c=a[2];b=a[6];var j=a[10];if(0.01>Math.abs(d-g)&&0.01>Math.abs(f-c)&&0.01>Math.abs(i-b)){if(0.1>Math.abs(d+g)&&0.1>Math.abs(f+c)&&0.1>Math.abs(i+b)&&0.1>Math.abs(e+h+j-3))return this.set(1,0,0,0),this;a=Math.PI;e=(e+1)/2;h=(h+1)/2;j=(j+1)/2;d=(d+g)/4;f=(f+c)/4;i=(i+b)/4;e>h&&e>j?0.01>e?(b=0,d=c=0.707106781):(b=Math.sqrt(e),c=d/b,d=f/b):h>j?0.01>h?(b=0.707106781, -c=0,d=0.707106781):(c=Math.sqrt(h),b=d/c,d=i/c):0.01>j?(c=b=0.707106781,d=0):(d=Math.sqrt(j),b=f/d,c=i/d);this.set(b,c,d,a);return this}a=Math.sqrt((b-i)*(b-i)+(f-c)*(f-c)+(g-d)*(g-d));0.001>Math.abs(a)&&(a=1);this.x=(b-i)/a;this.y=(f-c)/a;this.z=(g-d)/a;this.w=Math.acos((e+h+j-1)/2);return this},min:function(a){this.x>a.x&&(this.x=a.x);this.y>a.y&&(this.y=a.y);this.z>a.z&&(this.z=a.z);this.w>a.w&&(this.w=a.w);return this},max:function(a){this.x<a.x&&(this.x=a.x);this.y<a.y&&(this.y=a.y);this.z<a.z&& -(this.z=a.z);this.w<a.w&&(this.w=a.w);return this},clamp:function(a,b){this.x<a.x?this.x=a.x:this.x>b.x&&(this.x=b.x);this.y<a.y?this.y=a.y:this.y>b.y&&(this.y=b.y);this.z<a.z?this.z=a.z:this.z>b.z&&(this.z=b.z);this.w<a.w?this.w=a.w:this.w>b.w&&(this.w=b.w);return this},negate:function(){return this.multiplyScalar(-1)},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* +c=0,d=0.707106781):(c=Math.sqrt(h),b=d/c,d=i/c):0.01>j?(c=b=0.707106781,d=0):(d=Math.sqrt(j),b=f/d,c=i/d);this.set(b,c,d,a);return this}a=Math.sqrt((b-i)*(b-i)+(f-c)*(f-c)+(g-d)*(g-d));0.0010>Math.abs(a)&&(a=1);this.x=(b-i)/a;this.y=(f-c)/a;this.z=(g-d)/a;this.w=Math.acos((e+h+j-1)/2);return this},min:function(a){this.x>a.x&&(this.x=a.x);this.y>a.y&&(this.y=a.y);this.z>a.z&&(this.z=a.z);this.w>a.w&&(this.w=a.w);return this},max:function(a){this.x<a.x&&(this.x=a.x);this.y<a.y&&(this.y=a.y);this.z< +a.z&&(this.z=a.z);this.w<a.w&&(this.w=a.w);return this},clamp:function(a,b){this.x<a.x?this.x=a.x:this.x>b.x&&(this.x=b.x);this.y<a.y?this.y=a.y:this.y>b.y&&(this.y=b.y);this.z<a.z?this.z=a.z:this.z>b.z&&(this.z=b.z);this.w<a.w?this.w=a.w:this.w>b.w&&(this.w=b.w);return this},negate:function(){return this.multiplyScalar(-1)},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){var b=this.length();0!==b&&a!==b&&this.multiplyScalar(a/b);return this},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},equals:function(a){return a.x===this.x&&a.y===this.y&&a.z===this.z&& a.w===this.w},fromArray:function(a){this.x=a[0];this.y=a[1];this.z=a[2];this.w=a[3];return this},toArray:function(){return[this.x,this.y,this.z,this.w]},clone:function(){return new THREE.Vector4(this.x,this.y,this.z,this.w)}};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},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(0.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, @@ -126,7 +126,7 @@ THREE.Triangle.prototype={constructor:THREE.Triangle,set:function(a,b,c){this.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)},equals:function(a){return a.a.equals(this.a)&&a.b.equals(this.b)&&a.c.equals(this.c)}, clone:function(){return(new THREE.Triangle).copy(this)}};THREE.Vertex=function(a){console.warn("THREE.Vertex has been DEPRECATED. Use THREE.Vector3 instead.");return a};THREE.UV=function(a,b){console.warn("THREE.UV has been DEPRECATED. Use THREE.Vector2 instead.");return new THREE.Vector2(a,b)};THREE.Clock=function(a){this.autoStart=void 0!==a?a:!0;this.elapsedTime=this.oldTime=this.startTime=0;this.running=!1}; THREE.Clock.prototype={constructor:THREE.Clock,start:function(){this.oldTime=this.startTime=void 0!==self.performance&&void 0!==self.performance.now?self.performance.now():Date.now();this.running=!0},stop:function(){this.getElapsedTime();this.running=!1},getElapsedTime:function(){this.getDelta();return this.elapsedTime},getDelta:function(){var a=0;this.autoStart&&!this.running&&this.start();if(this.running){var b=void 0!==self.performance&&void 0!==self.performance.now?self.performance.now():Date.now(), -a=0.001*(b-this.oldTime);this.oldTime=b;this.elapsedTime+=a}return a}};THREE.EventDispatcher=function(){}; +a=0.0010*(b-this.oldTime);this.oldTime=b;this.elapsedTime+=a}return a}};THREE.EventDispatcher=function(){}; THREE.EventDispatcher.prototype={constructor:THREE.EventDispatcher,addEventListener:function(a,b){void 0===this._listeners&&(this._listeners={});var c=this._listeners;void 0===c[a]&&(c[a]=[]);-1===c[a].indexOf(b)&&c[a].push(b)},hasEventListener:function(a,b){if(void 0===this._listeners)return!1;var c=this._listeners;return void 0!==c[a]&&-1!==c[a].indexOf(b)?!0:!1},removeEventListener:function(a,b){if(void 0!==this._listeners){var c=this._listeners,d=c[a].indexOf(b);-1!==d&&c[a].splice(d,1)}},dispatchEvent:function(a){if(void 0!== this._listeners){var b=this._listeners[a.type];if(void 0!==b){a.target=this;for(var c=0,d=b.length;c<d;c++)b[c].call(this,a)}}}};(function(a){a.Raycaster=function(b,c,d,e){this.ray=new a.Ray(b,c);0<this.ray.direction.lengthSq()&&this.ray.direction.normalize();this.near=d||0;this.far=e||Infinity};var b=new a.Sphere,c=new a.Ray,d=new a.Plane,e=new a.Vector3,f=new a.Vector3,g=new a.Matrix4,h=function(a,b){return a.distance-b.distance},i=function(h,j,m){if(h instanceof a.Particle){f.getPositionFromMatrix(h.matrixWorld);var q=j.ray.distanceToPoint(f);if(q>h.scale.x)return m;m.push({distance:q,point:h.position,face:null,object:h})}else if(h instanceof a.LOD)f.getPositionFromMatrix(h.matrixWorld),q=j.ray.origin.distanceTo(f),i(h.getObjectForDistance(q),j,m);else if(h instanceof a.Mesh){f.getPositionFromMatrix(h.matrixWorld);b.set(f,h.geometry.boundingSphere.radius*h.matrixWorld.getMaxScaleOnAxis());if(!1===j.ray.isIntersectionSphere(b))return m;var q=h.geometry,t=q.vertices;if(q instanceof a.BufferGeometry){var n=h.material;if(void 0===n||!q.dynamic)return m;var r=h.material instanceof a.MeshFaceMaterial,s=!0===r?h.material.materials:null,v=h.material.side, @@ -290,7 +290,8 @@ THREE.MorphAnimMesh.prototype.clone=function(a){void 0===a&&(a=new THREE.MorphAn THREE.LOD.prototype.update=function(){var a=new THREE.Vector3,b=new THREE.Vector3;return function(c){if(1<this.objects.length){a.getPositionFromMatrix(c.matrixWorld);b.getPositionFromMatrix(this.matrixWorld);c=a.distanceTo(b);this.objects[0].object.visible=!0;for(var d=1,e=this.objects.length;d<e;d++)if(c>=this.objects[d].distance)this.objects[d-1].object.visible=!1,this.objects[d].object.visible=!0;else break;for(;d<e;d++)this.objects[d].object.visible=!1}}}();THREE.LOD.prototype.clone=function(){};THREE.Sprite=function(a){THREE.Object3D.call(this);this.material=void 0!==a?a:new THREE.SpriteMaterial;this.rotation3d=this.rotation;this.rotation=0};THREE.Sprite.prototype=Object.create(THREE.Object3D.prototype);THREE.Sprite.prototype.updateMatrix=function(){this.rotation3d.set(0,0,this.rotation);this.quaternion.setFromEuler(this.rotation3d,this.eulerOrder);this.matrix.makeFromPositionQuaternionScale(this.position,this.quaternion,this.scale);this.matrixWorldNeedsUpdate=!0}; THREE.Sprite.prototype.clone=function(a){void 0===a&&(a=new THREE.Sprite(this.material));THREE.Object3D.prototype.clone.call(this,a);return a};THREE.Scene=function(){THREE.Object3D.call(this);this.overrideMaterial=this.fog=null;this.autoUpdate=!0;this.matrixAutoUpdate=!1;this.__objects=[];this.__lights=[];this.__objectsAdded=[];this.__objectsRemoved=[]};THREE.Scene.prototype=Object.create(THREE.Object3D.prototype); THREE.Scene.prototype.__addObject=function(a){if(a instanceof THREE.Light)-1===this.__lights.indexOf(a)&&this.__lights.push(a),a.target&&void 0===a.target.parent&&this.add(a.target);else if(!(a instanceof THREE.Camera||a instanceof THREE.Bone)&&-1===this.__objects.indexOf(a)){this.__objects.push(a);this.__objectsAdded.push(a);var b=this.__objectsRemoved.indexOf(a);-1!==b&&this.__objectsRemoved.splice(b,1)}for(b=0;b<a.children.length;b++)this.__addObject(a.children[b])}; -THREE.Scene.prototype.__removeObject=function(a){if(a instanceof THREE.Light){var b=this.__lights.indexOf(a);-1!==b&&this.__lights.splice(b,1)}else a instanceof THREE.Camera||(b=this.__objects.indexOf(a),-1!==b&&(this.__objects.splice(b,1),this.__objectsRemoved.push(a),b=this.__objectsAdded.indexOf(a),-1!==b&&this.__objectsAdded.splice(b,1)));for(b=0;b<a.children.length;b++)this.__removeObject(a.children[b])};THREE.Fog=function(a,b,c){this.name="";this.color=new THREE.Color(a);this.near=void 0!==b?b:1;this.far=void 0!==c?c:1E3};THREE.Fog.prototype.clone=function(){return new THREE.Fog(this.color.getHex(),this.near,this.far)};THREE.FogExp2=function(a,b){this.name="";this.color=new THREE.Color(a);this.density=void 0!==b?b:2.5E-4};THREE.FogExp2.prototype.clone=function(){return new THREE.FogExp2(this.color.getHex(),this.density)};THREE.CanvasRenderer=function(a){function b(a,b,c){for(var d=0,e=I.length;d<e;d++){var f=I[d];Xb.copy(f.color);if(f instanceof THREE.DirectionalLight){var g=Xa.getPositionFromMatrix(f.matrixWorld).normalize(),h=b.dot(g);0>=h||(h*=f.intensity,c.add(Xb.multiplyScalar(h)))}else f instanceof THREE.PointLight&&(g=Xa.getPositionFromMatrix(f.matrixWorld),h=b.dot(Xa.subVectors(g,a).normalize()),0>=h||(h*=0==f.distance?1:1-Math.min(a.distanceTo(g)/f.distance,1),0!=h&&(h*=f.intensity,c.add(Xb.multiplyScalar(h)))))}} +THREE.Scene.prototype.__removeObject=function(a){if(a instanceof THREE.Light){var b=this.__lights.indexOf(a);-1!==b&&this.__lights.splice(b,1)}else a instanceof THREE.Camera||(b=this.__objects.indexOf(a),-1!==b&&(this.__objects.splice(b,1),this.__objectsRemoved.push(a),b=this.__objectsAdded.indexOf(a),-1!==b&&this.__objectsAdded.splice(b,1)));for(b=0;b<a.children.length;b++)this.__removeObject(a.children[b])}; +THREE.Scene.prototype.clone=function(a){void 0===a&&(a=new THREE.Scene);THREE.Object3D.prototype.clone.call(this,a);null!==this.fog&&(a.fog=this.fog.clone());null!==this.overrideMaterial&&(a.overrideMaterial=this.overrideMaterial.clone());a.autoUpdate=this.autoUpdate;a.matrixAutoUpdate=this.matrixAutoUpdate;return a};THREE.Fog=function(a,b,c){this.name="";this.color=new THREE.Color(a);this.near=void 0!==b?b:1;this.far=void 0!==c?c:1E3};THREE.Fog.prototype.clone=function(){return new THREE.Fog(this.color.getHex(),this.near,this.far)};THREE.FogExp2=function(a,b){this.name="";this.color=new THREE.Color(a);this.density=void 0!==b?b:2.5E-4};THREE.FogExp2.prototype.clone=function(){return new THREE.FogExp2(this.color.getHex(),this.density)};THREE.CanvasRenderer=function(a){function b(a,b,c){for(var d=0,e=I.length;d<e;d++){var f=I[d];Xb.copy(f.color);if(f instanceof THREE.DirectionalLight){var g=Xa.getPositionFromMatrix(f.matrixWorld).normalize(),h=b.dot(g);0>=h||(h*=f.intensity,c.add(Xb.multiplyScalar(h)))}else f instanceof THREE.PointLight&&(g=Xa.getPositionFromMatrix(f.matrixWorld),h=b.dot(Xa.subVectors(g,a).normalize()),0>=h||(h*=0==f.distance?1:1-Math.min(a.distanceTo(g)/f.distance,1),0!=h&&(h*=f.intensity,c.add(Xb.multiplyScalar(h)))))}} function c(a,c,e,l,q,r,U,n){G.info.render.vertices+=3;G.info.render.faces++;p(n.opacity);m(n.blending);ya=a.positionScreen.x;Ha=a.positionScreen.y;fa=c.positionScreen.x;da=c.positionScreen.y;T=e.positionScreen.x;aa=e.positionScreen.y;d(ya,Ha,fa,da,T,aa);(n instanceof THREE.MeshLambertMaterial||n instanceof THREE.MeshPhongMaterial)&&null===n.map?(Qa.copy(n.color),Ya.copy(n.emissive),n.vertexColors===THREE.FaceColors&&Qa.multiply(U.color),!1===n.wireframe&&n.shading==THREE.SmoothShading&&3==U.vertexNormalsLength? (ra.copy(ib),ka.copy(ib),ua.copy(ib),b(U.v1.positionWorld,U.vertexNormalsModel[0],ra),b(U.v2.positionWorld,U.vertexNormalsModel[1],ka),b(U.v3.positionWorld,U.vertexNormalsModel[2],ua),ra.multiply(Qa).add(Ya),ka.multiply(Qa).add(Ya),ua.multiply(Qa).add(Ya),Ra.addColors(ka,ua).multiplyScalar(0.5),lb=j(ra,ka,ua,Ra),i(ya,Ha,fa,da,T,aa,0,0,1,0,0,1,lb)):(ha.copy(ib),b(U.centroidModel,U.normalModel,ha),ha.multiply(Qa).add(Ya),!0===n.wireframe?f(ha,n.wireframeLinewidth,n.wireframeLinecap,n.wireframeLinejoin): g(ha))):n instanceof THREE.MeshBasicMaterial||n instanceof THREE.MeshLambertMaterial||n instanceof THREE.MeshPhongMaterial?null!==n.map?n.map.mapping instanceof THREE.UVMapping&&(Ga=U.uvs[0],h(ya,Ha,fa,da,T,aa,Ga[l].x,Ga[l].y,Ga[q].x,Ga[q].y,Ga[r].x,Ga[r].y,n.map)):null!==n.envMap?n.envMap.mapping instanceof THREE.SphericalReflectionMapping&&(Xa.copy(U.vertexNormalsModelView[l]),Ca=0.5*Xa.x+0.5,yb=0.5*Xa.y+0.5,Xa.copy(U.vertexNormalsModelView[q]),Ib=0.5*Xa.x+0.5,k=0.5*Xa.y+0.5,Xa.copy(U.vertexNormalsModelView[r]), @@ -596,7 +597,7 @@ j;)g=h,h=this.getNextKeyWith(c,p,h.index+1)}else{this.stop();return}else{do g=h, this.target.set(d[0],d[1],d[2]),this.target.sub(c),this.target.y=0,this.target.normalize(),d=Math.atan2(this.target.x,this.target.z),a.rotation.set(0,d,0))}else"rot"===c?THREE.Quaternion.slerp(e,f,a.quaternion,d):"scl"===c&&(c=a.scale,c.x=e[0]+(f[0]-e[0])*d,c.y=e[1]+(f[1]-e[1])*d,c.z=e[2]+(f[2]-e[2])*d)}}}}; THREE.Animation.prototype.interpolateCatmullRom=function(a,b){var c=[],d=[],e,f,g,h,i,j;e=(a.length-1)*b;f=Math.floor(e);e-=f;c[0]=0===f?f:f-1;c[1]=f;c[2]=f>a.length-2?f:f+1;c[3]=f>a.length-3?f:f+2;f=a[c[0]];h=a[c[1]];i=a[c[2]];j=a[c[3]];c=e*e;g=e*c;d[0]=this.interpolate(f[0],h[0],i[0],j[0],e,c,g);d[1]=this.interpolate(f[1],h[1],i[1],j[1],e,c,g);d[2]=this.interpolate(f[2],h[2],i[2],j[2],e,c,g);return d}; THREE.Animation.prototype.interpolate=function(a,b,c,d,e,f,g){a=0.5*(c-a);d=0.5*(d-b);return(2*(b-c)+a+d)*g+(-3*(b-c)-2*a-d)*f+a*e+b};THREE.Animation.prototype.getNextKeyWith=function(a,b,c){for(var d=this.data.hierarchy[b].keys,c=this.interpolationType===THREE.AnimationHandler.CATMULLROM||this.interpolationType===THREE.AnimationHandler.CATMULLROM_FORWARD?c<d.length-1?c:d.length-1:c%d.length;c<d.length;c++)if(void 0!==d[c][a])return d[c];return this.data.hierarchy[b].keys[0]}; -THREE.Animation.prototype.getPrevKeyWith=function(a,b,c){for(var d=this.data.hierarchy[b].keys,c=this.interpolationType===THREE.AnimationHandler.CATMULLROM||this.interpolationType===THREE.AnimationHandler.CATMULLROM_FORWARD?0<c?c:0:0<=c?c:c+d.length;0<=c;c--)if(void 0!==d[c][a])return d[c];return this.data.hierarchy[b].keys[d.length-1]};THREE.KeyFrameAnimation=function(a,b,c){this.root=a;this.data=THREE.AnimationHandler.get(b);this.hierarchy=THREE.AnimationHandler.parse(a);this.currentTime=0;this.timeScale=0.001;this.isPlaying=!1;this.loop=this.isPaused=!0;this.JITCompile=void 0!==c?c:!0;a=0;for(b=this.hierarchy.length;a<b;a++){var c=this.data.hierarchy[a].sids,d=this.hierarchy[a];if(this.data.hierarchy[a].keys.length&&c){for(var e=0;e<c.length;e++){var f=c[e],g=this.getNextKeyWith(f,a,0);g&&g.apply(f)}d.matrixAutoUpdate=!1;this.data.hierarchy[a].node.updateMatrix(); +THREE.Animation.prototype.getPrevKeyWith=function(a,b,c){for(var d=this.data.hierarchy[b].keys,c=this.interpolationType===THREE.AnimationHandler.CATMULLROM||this.interpolationType===THREE.AnimationHandler.CATMULLROM_FORWARD?0<c?c:0:0<=c?c:c+d.length;0<=c;c--)if(void 0!==d[c][a])return d[c];return this.data.hierarchy[b].keys[d.length-1]};THREE.KeyFrameAnimation=function(a,b,c){this.root=a;this.data=THREE.AnimationHandler.get(b);this.hierarchy=THREE.AnimationHandler.parse(a);this.currentTime=0;this.timeScale=0.0010;this.isPlaying=!1;this.loop=this.isPaused=!0;this.JITCompile=void 0!==c?c:!0;a=0;for(b=this.hierarchy.length;a<b;a++){var c=this.data.hierarchy[a].sids,d=this.hierarchy[a];if(this.data.hierarchy[a].keys.length&&c){for(var e=0;e<c.length;e++){var f=c[e],g=this.getNextKeyWith(f,a,0);g&&g.apply(f)}d.matrixAutoUpdate=!1;this.data.hierarchy[a].node.updateMatrix(); d.matrixWorldNeedsUpdate=!0}}}; THREE.KeyFrameAnimation.prototype.play=function(a,b){if(!this.isPlaying){this.isPlaying=!0;this.loop=void 0!==a?a:!0;this.currentTime=void 0!==b?b:0;this.startTimeMs=b;this.startTime=1E7;this.endTime=-this.startTime;var c,d=this.hierarchy.length,e,f;for(c=0;c<d;c++)e=this.hierarchy[c],f=this.data.hierarchy[c],e.useQuaternion=!0,void 0===f.animationCache&&(f.animationCache={},f.animationCache.prevKey=null,f.animationCache.nextKey=null,f.animationCache.originalMatrix=e instanceof THREE.Bone?e.skinMatrix: e.matrix),e=this.data.hierarchy[c].keys,e.length&&(f.animationCache.prevKey=e[0],f.animationCache.nextKey=e[1],this.startTime=Math.min(e[0].time,this.startTime),this.endTime=Math.max(e[e.length-1].time,this.endTime));this.update(0)}this.isPaused=!1;THREE.AnimationHandler.addToUpdate(this)};THREE.KeyFrameAnimation.prototype.pause=function(){this.isPaused?THREE.AnimationHandler.addToUpdate(this):THREE.AnimationHandler.removeFromUpdate(this);this.isPaused=!this.isPaused}; @@ -689,8 +690,8 @@ b.texParameteri(b.TEXTURE_2D,b.TEXTURE_MAG_FILTER,b.NEAREST);b.texParameteri(b.T b.getUniformLocation(p,"opacity");q.color=b.getUniformLocation(p,"color");q.scale=b.getUniformLocation(p,"scale");q.rotation=b.getUniformLocation(p,"rotation");q.screenPosition=b.getUniformLocation(p,"screenPosition")};this.render=function(a,d,e,f){var a=a.__webglFlares,v=a.length;if(v){var z=new THREE.Vector3,G=f/e,C=0.5*e,H=0.5*f,I=16/f,F=new THREE.Vector2(I*G,I),A=new THREE.Vector3(1,1,0),K=new THREE.Vector2(1,1),B=q,I=m;b.useProgram(p);b.enableVertexAttribArray(m.vertex);b.enableVertexAttribArray(m.uv); b.uniform1i(B.occlusionMap,0);b.uniform1i(B.map,1);b.bindBuffer(b.ARRAY_BUFFER,g);b.vertexAttribPointer(I.vertex,2,b.FLOAT,!1,16,0);b.vertexAttribPointer(I.uv,2,b.FLOAT,!1,16,8);b.bindBuffer(b.ELEMENT_ARRAY_BUFFER,h);b.disable(b.CULL_FACE);b.depthMask(!1);var J,N,y,M,w;for(J=0;J<v;J++)if(I=16/f,F.set(I*G,I),M=a[J],z.set(M.matrixWorld.elements[12],M.matrixWorld.elements[13],M.matrixWorld.elements[14]),z.applyMatrix4(d.matrixWorldInverse),z.applyProjection(d.projectionMatrix),A.copy(z),K.x=A.x*C+C, K.y=A.y*H+H,l||0<K.x&&K.x<e&&0<K.y&&K.y<f){b.activeTexture(b.TEXTURE1);b.bindTexture(b.TEXTURE_2D,i);b.copyTexImage2D(b.TEXTURE_2D,0,b.RGB,K.x-8,K.y-8,16,16,0);b.uniform1i(B.renderType,0);b.uniform2f(B.scale,F.x,F.y);b.uniform3f(B.screenPosition,A.x,A.y,A.z);b.disable(b.BLEND);b.enable(b.DEPTH_TEST);b.drawElements(b.TRIANGLES,6,b.UNSIGNED_SHORT,0);b.activeTexture(b.TEXTURE0);b.bindTexture(b.TEXTURE_2D,j);b.copyTexImage2D(b.TEXTURE_2D,0,b.RGBA,K.x-8,K.y-8,16,16,0);b.uniform1i(B.renderType,1);b.disable(b.DEPTH_TEST); -b.activeTexture(b.TEXTURE1);b.bindTexture(b.TEXTURE_2D,i);b.drawElements(b.TRIANGLES,6,b.UNSIGNED_SHORT,0);M.positionScreen.copy(A);M.customUpdateCallback?M.customUpdateCallback(M):M.updateLensFlares();b.uniform1i(B.renderType,2);b.enable(b.BLEND);N=0;for(y=M.lensFlares.length;N<y;N++)w=M.lensFlares[N],0.001<w.opacity&&0.001<w.scale&&(A.x=w.x,A.y=w.y,A.z=w.z,I=w.size*w.scale/f,F.x=I*G,F.y=I,b.uniform3f(B.screenPosition,A.x,A.y,A.z),b.uniform2f(B.scale,F.x,F.y),b.uniform1f(B.rotation,w.rotation),b.uniform1f(B.opacity, -w.opacity),b.uniform3f(B.color,w.color.r,w.color.g,w.color.b),c.setBlending(w.blending,w.blendEquation,w.blendSrc,w.blendDst),c.setTexture(w.texture,1),b.drawElements(b.TRIANGLES,6,b.UNSIGNED_SHORT,0))}b.enable(b.CULL_FACE);b.enable(b.DEPTH_TEST);b.depthMask(!0)}}};THREE.ShadowMapPlugin=function(){var a,b,c,d,e,f,g=new THREE.Frustum,h=new THREE.Matrix4,i=new THREE.Vector3,j=new THREE.Vector3,l=new THREE.Vector3;this.init=function(g){a=g.context;b=g;var g=THREE.ShaderLib.depthRGBA,h=THREE.UniformsUtils.clone(g.uniforms);c=new THREE.ShaderMaterial({fragmentShader:g.fragmentShader,vertexShader:g.vertexShader,uniforms:h});d=new THREE.ShaderMaterial({fragmentShader:g.fragmentShader,vertexShader:g.vertexShader,uniforms:h,morphTargets:!0});e=new THREE.ShaderMaterial({fragmentShader:g.fragmentShader, +b.activeTexture(b.TEXTURE1);b.bindTexture(b.TEXTURE_2D,i);b.drawElements(b.TRIANGLES,6,b.UNSIGNED_SHORT,0);M.positionScreen.copy(A);M.customUpdateCallback?M.customUpdateCallback(M):M.updateLensFlares();b.uniform1i(B.renderType,2);b.enable(b.BLEND);N=0;for(y=M.lensFlares.length;N<y;N++)w=M.lensFlares[N],0.0010<w.opacity&&0.0010<w.scale&&(A.x=w.x,A.y=w.y,A.z=w.z,I=w.size*w.scale/f,F.x=I*G,F.y=I,b.uniform3f(B.screenPosition,A.x,A.y,A.z),b.uniform2f(B.scale,F.x,F.y),b.uniform1f(B.rotation,w.rotation), +b.uniform1f(B.opacity,w.opacity),b.uniform3f(B.color,w.color.r,w.color.g,w.color.b),c.setBlending(w.blending,w.blendEquation,w.blendSrc,w.blendDst),c.setTexture(w.texture,1),b.drawElements(b.TRIANGLES,6,b.UNSIGNED_SHORT,0))}b.enable(b.CULL_FACE);b.enable(b.DEPTH_TEST);b.depthMask(!0)}}};THREE.ShadowMapPlugin=function(){var a,b,c,d,e,f,g=new THREE.Frustum,h=new THREE.Matrix4,i=new THREE.Vector3,j=new THREE.Vector3,l=new THREE.Vector3;this.init=function(g){a=g.context;b=g;var g=THREE.ShaderLib.depthRGBA,h=THREE.UniformsUtils.clone(g.uniforms);c=new THREE.ShaderMaterial({fragmentShader:g.fragmentShader,vertexShader:g.vertexShader,uniforms:h});d=new THREE.ShaderMaterial({fragmentShader:g.fragmentShader,vertexShader:g.vertexShader,uniforms:h,morphTargets:!0});e=new THREE.ShaderMaterial({fragmentShader:g.fragmentShader, vertexShader:g.vertexShader,uniforms:h,skinning:!0});f=new THREE.ShaderMaterial({fragmentShader:g.fragmentShader,vertexShader:g.vertexShader,uniforms:h,morphTargets:!0,skinning:!0});c._shadowPass=!0;d._shadowPass=!0;e._shadowPass=!0;f._shadowPass=!0};this.render=function(a,c){b.shadowMapEnabled&&b.shadowMapAutoUpdate&&this.update(a,c)};this.update=function(p,m){var q,t,n,r,s,v,z,G,C,H=[];r=0;a.clearColor(1,1,1,1);a.disable(a.BLEND);a.enable(a.CULL_FACE);a.frontFace(a.CCW);b.shadowMapCullFace===THREE.CullFaceFront? a.cullFace(a.FRONT):a.cullFace(a.BACK);b.setDepthTest(!0);q=0;for(t=p.__lights.length;q<t;q++)if(n=p.__lights[q],n.castShadow)if(n instanceof THREE.DirectionalLight&&n.shadowCascade)for(s=0;s<n.shadowCascadeCount;s++){var I;if(n.shadowCascadeArray[s])I=n.shadowCascadeArray[s];else{C=n;z=s;I=new THREE.DirectionalLight;I.isVirtual=!0;I.onlyShadow=!0;I.castShadow=!0;I.shadowCameraNear=C.shadowCameraNear;I.shadowCameraFar=C.shadowCameraFar;I.shadowCameraLeft=C.shadowCameraLeft;I.shadowCameraRight=C.shadowCameraRight; I.shadowCameraBottom=C.shadowCameraBottom;I.shadowCameraTop=C.shadowCameraTop;I.shadowCameraVisible=C.shadowCameraVisible;I.shadowDarkness=C.shadowDarkness;I.shadowBias=C.shadowCascadeBias[z];I.shadowMapWidth=C.shadowCascadeWidth[z];I.shadowMapHeight=C.shadowCascadeHeight[z];I.pointsWorld=[];I.pointsFrustum=[];G=I.pointsWorld;v=I.pointsFrustum;for(var F=0;8>F;F++)G[F]=new THREE.Vector3,v[F]=new THREE.Vector3;G=C.shadowCascadeNearZ[z];C=C.shadowCascadeFarZ[z];v[0].set(-1,-1,G);v[1].set(1,-1,G);v[2].set(-1,
true
Other
mrdoob
three.js
ca8ba14a539566447be73a3f98a1b04c7b58a0c8.json
Implement Scene.clone #3032 The object returnen by the scene's clone method is now a fully valid scene and can be used in rendering.
src/scenes/Scene.js
@@ -109,3 +109,22 @@ THREE.Scene.prototype.__removeObject = function ( object ) { } }; + +THREE.Scene.prototype.clone = function (object) { + if ( object === undefined ) object = new THREE.Scene(); + + THREE.Object3D.prototype.clone.call(this, object); + + if(this.fog !== null) { + object.fog = this.fog.clone(); + } + + if(this.overrideMaterial !== null) { + object.overrideMaterial = this.overrideMaterial.clone(); + } + + object.autoUpdate = this.autoUpdate; + object.matrixAutoUpdate = this.matrixAutoUpdate; + + return object; +};
true
Other
mrdoob
three.js
557471058a6223dfde1d079d13115c881f49d9e9.json
Get the OES_texture_float_linear extension. There's a bug in most WebGL implementations that the OES_texture_float extension is not supposed to allow the various LINEAR filtering modes. To filter a floating point texture with linear filtering requires enabling OES_texture_float_linear. This CL does that. The code has not been updated to actually check the extension exists and doing or disallowing the appropriate features. Enabling it will mean on desktop things just work as they did before. On mobile/tablets it's far more likley OES_texture_float_linear does not exist
src/renderers/WebGLRenderer.js
@@ -191,6 +191,7 @@ THREE.WebGLRenderer = function ( parameters ) { var _gl; var _glExtensionTextureFloat; + var _glExtensionTextureFloatLinear; var _glExtensionStandardDerivatives; var _glExtensionTextureFilterAnisotropic; var _glExtensionCompressedTextureS3TC; @@ -7277,6 +7278,7 @@ THREE.WebGLRenderer = function ( parameters ) { } _glExtensionTextureFloat = _gl.getExtension( 'OES_texture_float' ); + _glExtensionTextureFloatLinear = _gl.getExtension( 'OES_texture_float_linear' ); _glExtensionStandardDerivatives = _gl.getExtension( 'OES_standard_derivatives' ); _glExtensionTextureFilterAnisotropic = _gl.getExtension( 'EXT_texture_filter_anisotropic' ) ||
false
Other
mrdoob
three.js
edd768501c8547e323a3b4351287b0a2bf0e244e.json
add vertexcolors to canvasrenderer This also has an example
examples/canvas_lines_colors.html
@@ -0,0 +1,261 @@ +<!DOCTYPE html> +<html lang="en"> + <head> + <title>three.js webgl - lines - cubes - colors</title> + <meta charset="utf-8"> + <meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0"> + <style> + body { + background-color: #000000; + margin: 0px; + overflow: hidden; + } + + a { + color:#0078ff; + } + + #info { + position: absolute; + top: 10px; width: 100%; + color: #ffffff; + padding: 5px; + font-family: Monospace; + font-size: 13px; + text-align: center; + z-index:100; + } + + a { + color: orange; + text-decoration: none; + } + + a:hover { + color: #0080ff; + } + + </style> + </head> + <body> + + <div id="info"> + <a href="http://threejs.org" target="_blank">three.js</a> - color lines WebGL demo + [<a href="http://en.wikipedia.org/wiki/Hilbert_curve">Hilbert curve</a> thanks to <a href="http://www.openprocessing.org/visuals/?visualID=15599">Thomas Diewald</a>] + </div> + + <script src="../build/three.min.js"></script> + + <script src="js/Detector.js"></script> + <script src="js/libs/stats.min.js"></script> + + <script> + + if ( ! Detector.webgl ) Detector.addGetWebGLMessage(); + + + var mouseX = 0, mouseY = 0, + + windowHalfX = window.innerWidth / 2, + windowHalfY = window.innerHeight / 2, + + camera, scene, renderer, material; + + init(); + animate(); + + function init() { + + var i, container; + + container = document.createElement( 'div' ); + document.body.appendChild( container ); + + camera = new THREE.PerspectiveCamera( 33, window.innerWidth / window.innerHeight, 1, 10000 ); + camera.position.z = 700; + + scene = new THREE.Scene(); + + renderer = new THREE.CanvasRenderer( { clearColor: 0x000000, clearAlpha: 1, antialias: false } ); + renderer.setSize( window.innerWidth, window.innerHeight ); + + container.appendChild( renderer.domElement ); + + var geometry3 = new THREE.Geometry(), + points = hilbert3D( new THREE.Vector3( 0,0,0 ), 200.0, 2, 0, 1, 2, 3, 4, 5, 6, 7 ), + colors3 = []; + + for ( i = 0; i < points.length; i ++ ) { + + geometry3.vertices.push( points[ i ] ); + + colors3[ i ] = new THREE.Color( 0xffffff ); + colors3[ i ].setHSL( i / points.length, 1.0, 0.5 ); + + } + + geometry3.colors = colors3; + + // lines + + material = new THREE.LineBasicMaterial( { color: 0xffffff, opacity: 1, linewidth: 3, vertexColors: THREE.VertexColors } ); + + var line, p, scale = 0.3, d = 225; + + line = new THREE.Line(geometry3, material ); + line.scale.x = line.scale.y = line.scale.z = scale*1.5; + line.position.x = 0; + line.position.y = 0; + line.position.z = 0; + scene.add( line ); + + var axis = new THREE.AxisHelper(100); + axis.position.x = -d; + scene.add(axis) + + + // + + stats = new Stats(); + stats.domElement.style.position = 'absolute'; + stats.domElement.style.top = '0px'; + //container.appendChild( stats.domElement ); + + // + + document.addEventListener( 'mousemove', onDocumentMouseMove, false ); + document.addEventListener( 'touchstart', onDocumentTouchStart, false ); + document.addEventListener( 'touchmove', onDocumentTouchMove, false ); + + // + + window.addEventListener( 'resize', onWindowResize, false ); + + } + + function onWindowResize() { + + windowHalfX = window.innerWidth / 2; + windowHalfY = window.innerHeight / 2; + + camera.aspect = window.innerWidth / window.innerHeight; + camera.updateProjectionMatrix(); + + renderer.setSize( window.innerWidth, window.innerHeight ); + + effectFXAA.uniforms[ 'resolution' ].value.set( 1 / window.innerWidth, 1 / window.innerHeight ); + + composer.reset(); + + } + + // port of Processing Java code by Thomas Diewald + // http://www.openprocessing.org/visuals/?visualID=15599 + + function hilbert3D( center, side, iterations, v0, v1, v2, v3, v4, v5, v6, v7 ) { + + var half = side / 2, + + vec_s = [ + + new THREE.Vector3( center.x - half, center.y + half, center.z - half ), + new THREE.Vector3( center.x - half, center.y + half, center.z + half ), + new THREE.Vector3( center.x - half, center.y - half, center.z + half ), + new THREE.Vector3( center.x - half, center.y - half, center.z - half ), + new THREE.Vector3( center.x + half, center.y - half, center.z - half ), + new THREE.Vector3( center.x + half, center.y - half, center.z + half ), + new THREE.Vector3( center.x + half, center.y + half, center.z + half ), + new THREE.Vector3( center.x + half, center.y + half, center.z - half ) + + ], + + vec = [ vec_s[ v0 ], vec_s[ v1 ], vec_s[ v2 ], vec_s[ v3 ], vec_s[ v4 ], vec_s[ v5 ], vec_s[ v6 ], vec_s[ v7 ] ]; + + if( --iterations >= 0 ) { + + var tmp = []; + + Array.prototype.push.apply( tmp, hilbert3D ( vec[ 0 ], half, iterations, v0, v3, v4, v7, v6, v5, v2, v1 ) ); + Array.prototype.push.apply( tmp, hilbert3D ( vec[ 1 ], half, iterations, v0, v7, v6, v1, v2, v5, v4, v3 ) ); + Array.prototype.push.apply( tmp, hilbert3D ( vec[ 2 ], half, iterations, v0, v7, v6, v1, v2, v5, v4, v3 ) ); + Array.prototype.push.apply( tmp, hilbert3D ( vec[ 3 ], half, iterations, v2, v3, v0, v1, v6, v7, v4, v5 ) ); + Array.prototype.push.apply( tmp, hilbert3D ( vec[ 4 ], half, iterations, v2, v3, v0, v1, v6, v7, v4, v5 ) ); + Array.prototype.push.apply( tmp, hilbert3D ( vec[ 5 ], half, iterations, v4, v3, v2, v5, v6, v1, v0, v7 ) ); + Array.prototype.push.apply( tmp, hilbert3D ( vec[ 6 ], half, iterations, v4, v3, v2, v5, v6, v1, v0, v7 ) ); + Array.prototype.push.apply( tmp, hilbert3D ( vec[ 7 ], half, iterations, v6, v5, v2, v1, v0, v3, v4, v7 ) ); + + return tmp; + + } + + return vec; + } + + // + + function onDocumentMouseMove( event ) { + + mouseX = event.clientX - windowHalfX; + mouseY = event.clientY - windowHalfY; + + } + + function onDocumentTouchStart( event ) { + + if ( event.touches.length > 1 ) { + + event.preventDefault(); + + mouseX = event.touches[ 0 ].pageX - windowHalfX; + mouseY = event.touches[ 0 ].pageY - windowHalfY; + + } + + } + + function onDocumentTouchMove( event ) { + + if ( event.touches.length == 1 ) { + + event.preventDefault(); + + mouseX = event.touches[ 0 ].pageX - windowHalfX; + mouseY = event.touches[ 0 ].pageY - windowHalfY; + } + + } + + // + + function animate() { + + requestAnimationFrame( animate ); + render(); + + stats.update(); + + } + + function render() { + + camera.position.x += ( mouseX - camera.position.x ) * .05; + camera.position.y += ( - mouseY + 200 - camera.position.y ) * .05; + + camera.lookAt( scene.position ); + + var time = Date.now() * 0.0005; + + for ( var i = 0; i < scene.children.length; i ++ ) { + + var object = scene.children[ i ]; + if ( object instanceof THREE.Line ) object.rotation.y = time * ( i % 2 ? 1 : -1 ); + + } + + renderer.render(scene, camera ); + + } + + </script> + </body> +</html>
true
Other
mrdoob
three.js
edd768501c8547e323a3b4351287b0a2bf0e244e.json
add vertexcolors to canvasrenderer This also has an example
src/core/Projector.js
@@ -428,7 +428,13 @@ THREE.Projector = function () { _line.z = Math.max( _clippedVertex1PositionScreen.z, _clippedVertex2PositionScreen.z ); _line.material = object.material; - + + if (object.material.vertexColors === THREE.VertexColors){ + + _line.vertexColors[0].set(object.geometry.colors[v]); + _line.vertexColors[1].set(object.geometry.colors[v-1]); + + } _renderData.elements.push( _line ); }
true
Other
mrdoob
three.js
edd768501c8547e323a3b4351287b0a2bf0e244e.json
add vertexcolors to canvasrenderer This also has an example
src/renderers/CanvasRenderer.js
@@ -429,7 +429,7 @@ THREE.CanvasRenderer = function ( parameters ) { _pointLights.add( lightColor ); - } + }setStrokeStyle } @@ -602,14 +602,40 @@ THREE.CanvasRenderer = function ( parameters ) { _context.lineTo( v2.positionScreen.x, v2.positionScreen.y ); if ( material instanceof THREE.LineBasicMaterial ) { - - setLineWidth( material.linewidth ); - setLineCap( material.linecap ); - setLineJoin( material.linejoin ); - setStrokeStyle( material.color.getStyle() ); - - _context.stroke(); - _elemBox.expandByScalar( material.linewidth * 2 ); + + setLineWidth( material.linewidth ); + setLineCap( material.linecap ); + setLineJoin( material.linejoin ); + + if (material.vertexColors !== THREE.VertexColors){ + + setStrokeStyle( material.color.getStyle() ); + + + } else { + + var colorStyle1 = element.vertexColors[0].getStyle(); + var colorStyle2 = element.vertexColors[1].getStyle(); + + if (colorStyle1 === colorStyle2){ + + setStrokeStyle( colorStyle1 ); + + }else { + + var grad= _context.createLinearGradient(v1.positionScreen.x, + v1.positionScreen.y, + v2.positionScreen.x, + v2.positionScreen.y); + grad.addColorStop(0, colorStyle1); + grad.addColorStop(1, colorStyle2); + setStrokeStyle(grad); + + } + + } + _context.stroke(); + _elemBox.expandByScalar( material.linewidth * 2 ); } else if ( material instanceof THREE.LineDashedMaterial ) {
true
Other
mrdoob
three.js
edd768501c8547e323a3b4351287b0a2bf0e244e.json
add vertexcolors to canvasrenderer This also has an example
src/renderers/renderables/RenderableLine.js
@@ -9,6 +9,8 @@ THREE.RenderableLine = function () { this.v1 = new THREE.RenderableVertex(); this.v2 = new THREE.RenderableVertex(); + + this.vertexColors = [ new THREE.Color(), new THREE.Color()]; this.material = null; };
true
Other
mrdoob
three.js
4453bf03df58e32da37c810e56deefeafa6b30ff.json
prepare documentation for programmatic additions
docs/api/cameras/Camera.html
@@ -1,13 +1,13 @@ <!DOCTYPE html> <html lang="en"> <head> - <meta charset="utf-8"> + <meta charset="utf-8" /> <script src="../../list.js"></script> <script src="../../page.js"></script> <link type="text/css" rel="stylesheet" href="../../page.css" /> </head> <body> - [page:Object3D] &rarr; + [page:Object3D] <!-- &rarr -->; <h1>[name]</h1>
true
Other
mrdoob
three.js
4453bf03df58e32da37c810e56deefeafa6b30ff.json
prepare documentation for programmatic additions
docs/api/cameras/OrthographicCamera.html
@@ -1,13 +1,13 @@ <!DOCTYPE html> <html lang="en"> <head> - <meta charset="utf-8"> + <meta charset="utf-8" /> <script src="../../list.js"></script> <script src="../../page.js"></script> <link type="text/css" rel="stylesheet" href="../../page.css" /> </head> <body> - [page:Object3D] &rarr; [page:Camera] &rarr; + [page:Object3D] <!-- &rarr -->; [page:Camera] <!-- &rarr -->; <h1>[name]</h1>
true
Other
mrdoob
three.js
4453bf03df58e32da37c810e56deefeafa6b30ff.json
prepare documentation for programmatic additions
docs/api/cameras/PerspectiveCamera.html
@@ -1,13 +1,13 @@ <!DOCTYPE html> <html lang="en"> <head> - <meta charset="utf-8"> + <meta charset="utf-8" /> <script src="../../list.js"></script> <script src="../../page.js"></script> <link type="text/css" rel="stylesheet" href="../../page.css" /> </head> <body> - [page:Object3D] &rarr; [page:Camera] &rarr; + [page:Object3D] <!-- &rarr -->; [page:Camera] <!-- &rarr -->; <h1>[name]</h1>
true
Other
mrdoob
three.js
4453bf03df58e32da37c810e56deefeafa6b30ff.json
prepare documentation for programmatic additions
docs/api/core/BufferGeometry.html
@@ -1,7 +1,7 @@ <!DOCTYPE html> <html lang="en"> <head> - <meta charset="utf-8"> + <meta charset="utf-8" /> <script src="../../list.js"></script> <script src="../../page.js"></script> <link type="text/css" rel="stylesheet" href="../../page.css" /> @@ -31,7 +31,7 @@ <h3>.[page:Integer id]</h3> Unique number of this buffergeometry instance </div> - <h3>.[page:Hashmap Attributes]</h3> + <h3>.[page:Hashmap attributes]</h3> <div> This hashmap has as id the name of the attribute to be set and as value the buffer to set it to. </div>
true
Other
mrdoob
three.js
4453bf03df58e32da37c810e56deefeafa6b30ff.json
prepare documentation for programmatic additions
docs/api/core/Clock.html
@@ -1,7 +1,7 @@ <!DOCTYPE html> <html lang="en"> <head> - <meta charset="utf-8"> + <meta charset="utf-8" /> <script src="../../list.js"></script> <script src="../../page.js"></script> <link type="text/css" rel="stylesheet" href="../../page.css" />
true
Other
mrdoob
three.js
4453bf03df58e32da37c810e56deefeafa6b30ff.json
prepare documentation for programmatic additions
docs/api/core/EventDispatcher.html
@@ -1,7 +1,7 @@ <!DOCTYPE html> <html lang="en"> <head> - <meta charset="utf-8"> + <meta charset="utf-8" /> <script src="../../list.js"></script> <script src="../../page.js"></script> <link type="text/css" rel="stylesheet" href="../../page.css" /> @@ -18,6 +18,9 @@ <h3>[name]()</h3> <div> Creates EventDispatcher object. </div> + + + <h2>Properties</h2> <h2>Methods</h2>
true
Other
mrdoob
three.js
4453bf03df58e32da37c810e56deefeafa6b30ff.json
prepare documentation for programmatic additions
docs/api/core/Face3.html
@@ -1,7 +1,7 @@ <!DOCTYPE html> <html lang="en"> <head> - <meta charset="utf-8"> + <meta charset="utf-8" /> <script src="../../list.js"></script> <script src="../../page.js"></script> <link type="text/css" rel="stylesheet" href="../../page.css" /> @@ -70,9 +70,9 @@ <h3>.[page:Array vertexColors]</h3> Array of 3 vertex colors. </div> - <h3>.[page:Array vertexTangets]</h3> + <h3>.[page:Array vertexTangents]</h3> <div> - Array of 3 vertex tangets. + Array of 3 vertex tangents. </div>
true
Other
mrdoob
three.js
4453bf03df58e32da37c810e56deefeafa6b30ff.json
prepare documentation for programmatic additions
docs/api/core/Face4.html
@@ -1,7 +1,7 @@ <!DOCTYPE html> <html lang="en"> <head> - <meta charset="utf-8"> + <meta charset="utf-8" /> <script src="../../list.js"></script> <script src="../../page.js"></script> <link type="text/css" rel="stylesheet" href="../../page.css" /> @@ -76,7 +76,7 @@ <h3>.[page:Array vertexColors]</h3> Array of 4 vertex colors. </div> - <h3>.[page:Array vertexTangets]</h3> + <h3>.[page:Array vertexTangents]</h3> <div> Array of 4 vertex tangets. </div>
true
Other
mrdoob
three.js
4453bf03df58e32da37c810e56deefeafa6b30ff.json
prepare documentation for programmatic additions
docs/api/core/Geometry.html
@@ -1,7 +1,7 @@ <!DOCTYPE html> <html lang="en"> <head> - <meta charset="utf-8"> + <meta charset="utf-8" /> <script src="../../list.js"></script> <script src="../../page.js"></script> <link type="text/css" rel="stylesheet" href="../../page.css" /> @@ -142,42 +142,42 @@ <h3>.[page:Boolean dynamic]</h3> Defaults to true. </div> - <h3>.verticesNeedUpdate</h3> + <h3>.[page:Boolean verticesNeedUpdate]</h3> <div> Set to *true* if the vertices array has been updated. </div> - <h3>.elementsNeedUpdate</h3> + <h3>.[page:Boolean elementsNeedUpdate]</h3> <div> Set to *true* if the faces array has been updated. </div> - <h3>.uvsNeedUpdate</h3> + <h3>.[page:Boolean uvsNeedUpdate]</h3> <div> Set to *true* if the uvs array has been updated. </div> - <h3>.normalsNeedUpdate</h3> + <h3>.[page:Boolean normalsNeedUpdate]</h3> <div> Set to *true* if the normals array has been updated. </div> - <h3>.tangentsNeedUpdate</h3> + <h3>.[page:Boolean tangentsNeedUpdate]</h3> <div> Set to *true* if the tangents in the faces has been updated. </div> - <h3>.colorsNeedUpdate</h3> + <h3>.[page:Boolean colorsNeedUpdate]</h3> <div> Set to *true* if the colors array has been updated. </div> - <h3>.lineDistancesNeedUpdate</h3> + <h3>.[page:Boolean lineDistancesNeedUpdate]</h3> <div> Set to *true* if the linedistances array has been updated. </div> - <h3>.buffersNeedUpdate</h3> + <h3>.[page:Boolean buffersNeedUpdate]</h3> <div> Set to *true* if an array has changed in length. </div>
true
Other
mrdoob
three.js
4453bf03df58e32da37c810e56deefeafa6b30ff.json
prepare documentation for programmatic additions
docs/api/core/Object3D.html
@@ -1,7 +1,7 @@ <!DOCTYPE html> <html lang="en"> <head> - <meta charset="utf-8"> + <meta charset="utf-8" /> <script src="../../list.js"></script> <script src="../../page.js"></script> <link type="text/css" rel="stylesheet" href="../../page.css" />
true
Other
mrdoob
three.js
4453bf03df58e32da37c810e56deefeafa6b30ff.json
prepare documentation for programmatic additions
docs/api/core/Projector.html
@@ -1,7 +1,7 @@ <!DOCTYPE html> <html lang="en"> <head> - <meta charset="utf-8"> + <meta charset="utf-8" /> <script src="../../list.js"></script> <script src="../../page.js"></script> <link type="text/css" rel="stylesheet" href="../../page.css" /> @@ -15,7 +15,8 @@ <h1>[name]</h1> <h2>Constructor</h2> <h3>[name]()</h3> - + + <h2>Properties</h2> <h2>Methods</h2>
true
Other
mrdoob
three.js
4453bf03df58e32da37c810e56deefeafa6b30ff.json
prepare documentation for programmatic additions
docs/api/core/Raycaster.html
@@ -1,7 +1,7 @@ <!DOCTYPE html> <html lang="en"> <head> - <meta charset="utf-8"> + <meta charset="utf-8" /> <script src="../../list.js"></script> <script src="../../page.js"></script> <link type="text/css" rel="stylesheet" href="../../page.css" />
true
Other
mrdoob
three.js
4453bf03df58e32da37c810e56deefeafa6b30ff.json
prepare documentation for programmatic additions
docs/api/extras/FontUtils.html
@@ -1,7 +1,7 @@ <!DOCTYPE html> <html lang="en"> <head> - <meta charset="utf-8"> + <meta charset="utf-8" /> <script src="../../list.js"></script> <script src="../../page.js"></script> <link type="text/css" rel="stylesheet" href="../../page.css" />
true
Other
mrdoob
three.js
4453bf03df58e32da37c810e56deefeafa6b30ff.json
prepare documentation for programmatic additions
docs/api/extras/GeometryUtils.html
@@ -1,7 +1,7 @@ <!DOCTYPE html> <html lang="en"> <head> - <meta charset="utf-8"> + <meta charset="utf-8" /> <script src="../../list.js"></script> <script src="../../page.js"></script> <link type="text/css" rel="stylesheet" href="../../page.css" /> @@ -65,12 +65,6 @@ <h3> .randomPointsInGeometry( [page:geometry Geometry] , [page:Integer Points]) </div> - <h3> .binarySearchIndices( [page:Integer Value] )</h3> - <div> - Value β€” Value to search in indices <br /> - - returns [page:Int Position] - </div> <h3> .triangleArea ( [page:Vector VectorA] , [page:Vector VectorB] , [page:Vector VectorC]) </h3>
true
Other
mrdoob
three.js
4453bf03df58e32da37c810e56deefeafa6b30ff.json
prepare documentation for programmatic additions
docs/api/extras/ImageUtils.html
@@ -1,7 +1,7 @@ <!DOCTYPE html> <html lang="en"> <head> - <meta charset="utf-8"> + <meta charset="utf-8" /> <script src="../../list.js"></script> <script src="../../page.js"></script> <link type="text/css" rel="stylesheet" href="../../page.css" />
true
Other
mrdoob
three.js
4453bf03df58e32da37c810e56deefeafa6b30ff.json
prepare documentation for programmatic additions
docs/api/extras/SceneUtils.html
@@ -1,7 +1,7 @@ <!DOCTYPE html> <html lang="en"> <head> - <meta charset="utf-8"> + <meta charset="utf-8" /> <script src="../../list.js"></script> <script src="../../page.js"></script> <link type="text/css" rel="stylesheet" href="../../page.css" />
true
Other
mrdoob
three.js
4453bf03df58e32da37c810e56deefeafa6b30ff.json
prepare documentation for programmatic additions
docs/api/extras/animation/Animation.html
@@ -1,7 +1,7 @@ <!DOCTYPE html> <html lang="en"> <head> - <meta charset="utf-8"> + <meta charset="utf-8" /> <script src="../../../list.js"></script> <script src="../../../page.js"></script> <link type="text/css" rel="stylesheet" href="../../../page.css" />
true
Other
mrdoob
three.js
4453bf03df58e32da37c810e56deefeafa6b30ff.json
prepare documentation for programmatic additions
docs/api/extras/animation/AnimationHandler.html
@@ -1,7 +1,7 @@ <!DOCTYPE html> <html lang="en"> <head> - <meta charset="utf-8"> + <meta charset="utf-8" /> <script src="../../../list.js"></script> <script src="../../../page.js"></script> <link type="text/css" rel="stylesheet" href="../../../page.css" />
true
Other
mrdoob
three.js
4453bf03df58e32da37c810e56deefeafa6b30ff.json
prepare documentation for programmatic additions
docs/api/extras/animation/AnimationMorphTarget.html
@@ -1,7 +1,7 @@ <!DOCTYPE html> <html lang="en"> <head> - <meta charset="utf-8"> + <meta charset="utf-8" /> <script src="../../../list.js"></script> <script src="../../../page.js"></script> <link type="text/css" rel="stylesheet" href="../../../page.css" />
true
Other
mrdoob
three.js
4453bf03df58e32da37c810e56deefeafa6b30ff.json
prepare documentation for programmatic additions
docs/api/extras/animation/KeyFrameAnimation.html
@@ -1,7 +1,7 @@ <!DOCTYPE html> <html lang="en"> <head> - <meta charset="utf-8"> + <meta charset="utf-8" /> <script src="../../../list.js"></script> <script src="../../../page.js"></script> <link type="text/css" rel="stylesheet" href="../../../page.css" />
true
Other
mrdoob
three.js
4453bf03df58e32da37c810e56deefeafa6b30ff.json
prepare documentation for programmatic additions
docs/api/extras/cameras/CombinedCamera.html
@@ -1,7 +1,7 @@ <!DOCTYPE html> <html lang="en"> <head> - <meta charset="utf-8"> + <meta charset="utf-8" /> <script src="../../../list.js"></script> <script src="../../../page.js"></script> <link type="text/css" rel="stylesheet" href="../../../page.css" />
true
Other
mrdoob
three.js
4453bf03df58e32da37c810e56deefeafa6b30ff.json
prepare documentation for programmatic additions
docs/api/extras/cameras/CubeCamera.html
@@ -1,7 +1,7 @@ <!DOCTYPE html> <html lang="en"> <head> - <meta charset="utf-8"> + <meta charset="utf-8" /> <script src="../../../list.js"></script> <script src="../../../page.js"></script> <link type="text/css" rel="stylesheet" href="../../../page.css" />
true
Other
mrdoob
three.js
4453bf03df58e32da37c810e56deefeafa6b30ff.json
prepare documentation for programmatic additions
docs/api/extras/core/Curve.html
@@ -1,7 +1,7 @@ <!DOCTYPE html> <html lang="en"> <head> - <meta charset="utf-8"> + <meta charset="utf-8" /> <script src="../../../list.js"></script> <script src="../../../page.js"></script> <link type="text/css" rel="stylesheet" href="../../../page.css" />
true
Other
mrdoob
three.js
4453bf03df58e32da37c810e56deefeafa6b30ff.json
prepare documentation for programmatic additions
docs/api/extras/core/CurvePath.html
@@ -1,7 +1,7 @@ <!DOCTYPE html> <html lang="en"> <head> - <meta charset="utf-8"> + <meta charset="utf-8" /> <script src="../../../list.js"></script> <script src="../../../page.js"></script> <link type="text/css" rel="stylesheet" href="../../../page.css" /> @@ -18,57 +18,11 @@ <h3>[name]()</h3> <h2>Properties</h2> - <h3>.curves</h3> - - <h3>.bends</h3> - - <h3>.autoClose</h3> + <h2>Methods</h2> - <h3>.add ( curve )</h3> - <div>todo</div> - - <h3>.checkConnection ()</h3> - <div>todo</div> - - <h3>.closePath ()</h3> - <div>todo</div> - - <h3>.getPoint ( t )</h3> - <div>todo</div> - - <h3>.getLength ()</h3> - <div>todo</div> - - <h3>.getCurveLengths ()</h3> - <div>todo</div> - - <h3>.getBoundingBox ()</h3> - <div>todo</div> - - <h3>.createPointsGeometry ( divisions )</h3> - <div>todo</div> - - <h3>.createSpacedPointsGeometry ( divisions )</h3> - <div>todo</div> - - <h3>.createGeometry ( points )</h3> - <div>todo</div> - - <h3>.addWrapPath ( bendpath )</h3> - <div>todo</div> - - <h3>.getTransformedPoints ( segments, bends )</h3> - <div>todo</div> - - <h3>.getTransformedSpacedPoints ( segments, bends )</h3> - <div>todo</div> - - <h3>.getWrapPoints ( oldPts, path )</h3> - <div>todo</div> - <h2>Source</h2> [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
true
Other
mrdoob
three.js
4453bf03df58e32da37c810e56deefeafa6b30ff.json
prepare documentation for programmatic additions
docs/api/extras/core/Gyroscope.html
@@ -1,7 +1,7 @@ <!DOCTYPE html> <html lang="en"> <head> - <meta charset="utf-8"> + <meta charset="utf-8" /> <script src="../../../list.js"></script> <script src="../../../page.js"></script> <link type="text/css" rel="stylesheet" href="../../../page.css" />
true
Other
mrdoob
three.js
4453bf03df58e32da37c810e56deefeafa6b30ff.json
prepare documentation for programmatic additions
docs/api/extras/core/Path.html
@@ -1,7 +1,7 @@ <!DOCTYPE html> <html lang="en"> <head> - <meta charset="utf-8"> + <meta charset="utf-8" /> <script src="../../../list.js"></script> <script src="../../../page.js"></script> <link type="text/css" rel="stylesheet" href="../../../page.css" /> @@ -19,13 +19,6 @@ <h3>[name]()</h3> <h2>Properties</h2> - <h3>.curves</h3> - - <h3>.bends</h3> - - <h3>.autoClose</h3> - - <h3>.actions</h3> <h2>Methods</h2> @@ -59,12 +52,6 @@ <h3>.ellipse ( aX, aY, xRadius, yRadius, aStartAngle, aEndAngle, aClockwise ) </ <h3>.absellipse ( aX, aY, xRadius, yRadius, aStartAngle, aEndAngle, aClockwise ) </h3> <div>todo</div> - <h3>.getSpacedPoints ( divisions, closedPath ) </h3> - <div>todo</div> - - <h3>.getPoints ( divisions, closedPath ) </h3> - <div>todo</div> - <h3>.toShapes () </h3> <div>todo</div>
true
Other
mrdoob
three.js
4453bf03df58e32da37c810e56deefeafa6b30ff.json
prepare documentation for programmatic additions
docs/api/extras/core/Shape.html
@@ -1,7 +1,7 @@ <!DOCTYPE html> <html lang="en"> <head> - <meta charset="utf-8"> + <meta charset="utf-8" /> <script src="../../../list.js"></script> <script src="../../../page.js"></script> <link type="text/css" rel="stylesheet" href="../../../page.css" /> @@ -19,41 +19,9 @@ <h3>[name]()</h3> <h2>Properties</h2> - <h3>.curves</h3> - - <h3>.bends</h3> - - <h3>.autoClose</h3> - - <h3>.actions</h3> - - <h3>.holes</h3> - - <h2>Methods</h2> - <h3>.extrude ( options )</h3> - <div>todo</div> - - <h3>.makeGeometry ( options )</h3> - <div>todo</div> - - <h3>.getPointsHoles ( divisions )</h3> - <div>todo</div> - - <h3>.getSpacedPointsHoles ( divisions )</h3> - <div>todo</div> - - <h3>.extractAllPoints ( divisions )</h3> - <div>todo</div> - - <h3>.extractPoints ( divisions )</h3> - <div>todo</div> - - <h3>.extractAllSpacedPoints ( divisions )</h3> - <div>todo</div> - <h2>Source</h2>
true
Other
mrdoob
three.js
4453bf03df58e32da37c810e56deefeafa6b30ff.json
prepare documentation for programmatic additions
docs/api/extras/geometries/CircleGeometry.html
@@ -1,7 +1,7 @@ <!DOCTYPE html> <html lang="en"> <head> - <meta charset="utf-8"> + <meta charset="utf-8" /> <script src="../../../list.js"></script> <script src="../../../page.js"></script> <link type="text/css" rel="stylesheet" href="../../../page.css" /> @@ -24,6 +24,10 @@ <h3>[name]([page:Float radius], [page:Integer segments], [page:Float thetaStart] thetaStart β€” Start angle for first segment, default = 0 (three o'clock position).<br /> thetaLength β€” Circumference of the circle, default = 2*Pi (360Β°). </div> + + <h2>Properties</h2> + + <h2>Methods</h2> <h2>Source</h2>
true
Other
mrdoob
three.js
4453bf03df58e32da37c810e56deefeafa6b30ff.json
prepare documentation for programmatic additions
docs/api/extras/geometries/ConvexGeometry.html
@@ -1,7 +1,7 @@ <!DOCTYPE html> <html lang="en"> <head> - <meta charset="utf-8"> + <meta charset="utf-8" /> <script src="../../../list.js"></script> <script src="../../../page.js"></script> <link type="text/css" rel="stylesheet" href="../../../page.css" />
true
Other
mrdoob
three.js
4453bf03df58e32da37c810e56deefeafa6b30ff.json
prepare documentation for programmatic additions
docs/api/extras/geometries/CubeGeometry.html
@@ -1,15 +1,15 @@ <!DOCTYPE html> <html lang="en"> <head> - <meta charset="utf-8"> + <meta charset="utf-8" /> <script src="../../../list.js"></script> <script src="../../../page.js"></script> <link type="text/css" rel="stylesheet" href="../../../page.css" /> </head> <body> <h1>CubeGeometry</h1> - <div class="desc">CubeGeometry is the quadrilateral primitive geometry class. It is typically used for creating a cube or irregular quadrilateral of the dimensions provided within the (optional) 'width', 'height', & 'depth' constructor arguments.</div> + <div class="desc">CubeGeometry is the quadrilateral primitive geometry class. It is typically used for creating a cube or irregular quadrilateral of the dimensions provided within the (optional) 'width', 'height', and 'depth' constructor arguments.</div> <h2>Constructor</h2> @@ -24,6 +24,10 @@ <h3>[name]([page:Float width], [page:Float height], [page:Float depth], [page:In depthSegments β€” Number of segmented faces along the depth of the sides. </div> + <h2>Properties</h2> + + <h2>Methods</h2> + <h2>Source</h2> [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
true
Other
mrdoob
three.js
4453bf03df58e32da37c810e56deefeafa6b30ff.json
prepare documentation for programmatic additions
docs/api/extras/geometries/CylinderGeometry.html
@@ -1,7 +1,7 @@ <!DOCTYPE html> <html lang="en"> <head> - <meta charset="utf-8"> + <meta charset="utf-8" /> <script src="../../../list.js"></script> <script src="../../../page.js"></script> <link type="text/css" rel="stylesheet" href="../../../page.css" /> @@ -32,9 +32,6 @@ <h3>.[page:Vector3 todo]</h3> <h2>Methods</h2> - <h3>.computeCentroids();</h3> - <h3>.computeFaceNormals();</h3> - <h2>Source</h2>
true
Other
mrdoob
three.js
4453bf03df58e32da37c810e56deefeafa6b30ff.json
prepare documentation for programmatic additions
docs/api/extras/geometries/ExtrudeGeometry.html
@@ -1,7 +1,7 @@ <!DOCTYPE html> <html lang="en"> <head> - <meta charset="utf-8"> + <meta charset="utf-8" /> <script src="../../../list.js"></script> <script src="../../../page.js"></script> <link type="text/css" rel="stylesheet" href="../../../page.css" /> @@ -19,18 +19,22 @@ <h3>[name]( shapes, options )</h3> <h2>Properties</h2> + + <h2>Methods</h2> + <h3>.addShapeList ( shapes, options )</h3> + <div> + shapes β€” todo <br /> + options β€” todo + </div> <div>todo</div> <h3>.addShape ( shape, options )</h3> - <div>todo</div> - - <h2>Methods</h2> - - <h3>.todo( [page:Vector3 todo] )</h3> <div> - todo β€” todo<br /> + shape β€” todo <br /> + options β€” todo </div> + <div>todo</div> <h2>Source</h2>
true
Other
mrdoob
three.js
4453bf03df58e32da37c810e56deefeafa6b30ff.json
prepare documentation for programmatic additions
docs/api/extras/geometries/IcosahedronGeometry.html
@@ -1,7 +1,7 @@ <!DOCTYPE html> <html lang="en"> <head> - <meta charset="utf-8"> + <meta charset="utf-8" /> <script src="../../../list.js"></script> <script src="../../../page.js"></script> <link type="text/css" rel="stylesheet" href="../../../page.css" />
true
Other
mrdoob
three.js
4453bf03df58e32da37c810e56deefeafa6b30ff.json
prepare documentation for programmatic additions
docs/api/extras/geometries/LatheGeometry.html
@@ -1,7 +1,7 @@ <!DOCTYPE html> <html lang="en"> <head> - <meta charset="utf-8"> + <meta charset="utf-8" /> <script src="../../../list.js"></script> <script src="../../../page.js"></script> <link type="text/css" rel="stylesheet" href="../../../page.css" />
true
Other
mrdoob
three.js
4453bf03df58e32da37c810e56deefeafa6b30ff.json
prepare documentation for programmatic additions
docs/api/extras/geometries/OctahedronGeometry.html
@@ -1,7 +1,7 @@ <!DOCTYPE html> <html lang="en"> <head> - <meta charset="utf-8"> + <meta charset="utf-8" /> <script src="../../../list.js"></script> <script src="../../../page.js"></script> <link type="text/css" rel="stylesheet" href="../../../page.css" />
true
Other
mrdoob
three.js
4453bf03df58e32da37c810e56deefeafa6b30ff.json
prepare documentation for programmatic additions
docs/api/extras/geometries/ParametricGeometry.html
@@ -1,7 +1,7 @@ <!DOCTYPE html> <html lang="en"> <head> - <meta charset="utf-8"> + <meta charset="utf-8" /> <script src="../../../list.js"></script> <script src="../../../page.js"></script> <link type="text/css" rel="stylesheet" href="../../../page.css" />
true