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
8d0d3cfc4fad36071d624f5cabb2424f3c02a8c7.json
Ignore case on name match
src/extras/objects/MorphBlendMesh.js
@@ -62,7 +62,7 @@ THREE.MorphBlendMesh.prototype.createAnimation = function ( name, start, end, fp THREE.MorphBlendMesh.prototype.autoCreateAnimations = function ( fps ) { - var pattern = /([a-z]+)_?(\d+)/; + var pattern = /([a-z]+)_?(\d+)/i; var firstAnimation, frameRanges = {};
false
Other
mrdoob
three.js
d443359764e0f5b4596756426613c1730f8e3c2c.json
remove unused code.
src/renderers/shaders/ShaderChunk/light_pars.glsl
@@ -1,111 +0,0 @@ - -#if MAX_DIR_LIGHTS > 0 - - //uniform vec3 directionalLightColor[ MAX_DIR_LIGHTS ]; - //uniform vec3 directionalLightDirection[ MAX_DIR_LIGHTS ]; - - struct DirectionalLight { - vec3 color; - vec3 direction; - }; - - uniform DirectionalLight directionalLights[ MAX_DIR_LIGHTS ]; - - void getDirLi...
false
Other
mrdoob
three.js
223c383b1456bc49c1f422d397a5288d099c35cc.json
reduce the need for temporaries, cleanup code.
src/renderers/WebGLRenderer.js
@@ -2470,12 +2470,11 @@ THREE.WebGLRenderer = function ( parameters ) { continue; } - _direction.setFromMatrixPosition( light.matrixWorld ); + lightUniforms.direction.setFromMatrixPosition( light.matrixWorld ); _vector3.setFromMatrixPosition( light.target.matrixWorld ); - _direction.sub( _vec...
true
Other
mrdoob
three.js
223c383b1456bc49c1f422d397a5288d099c35cc.json
reduce the need for temporaries, cleanup code.
src/renderers/shaders/ShaderChunk/lights_phong_pars_fragment.glsl
@@ -17,12 +17,9 @@ varying vec3 vViewPosition; #if MAX_DIR_LIGHTS > 0 - //uniform vec3 directionalLightColor[ MAX_DIR_LIGHTS ]; - //uniform vec3 directionalLightDirection[ MAX_DIR_LIGHTS ]; - struct DirectionalLight { - vec3 color; vec3 direction; + vec3 color; }; uniform DirectionalLight singleTes...
true
Other
mrdoob
three.js
74d3aa3f12120c906d190e621cb1260e88932757.json
parse arrays of struct uniforms, code cleanup.
src/renderers/shaders/ShaderChunk/light_pars.glsl
@@ -26,13 +26,13 @@ //uniform vec3 hemisphereLightGroundColor[ MAX_HEMI_LIGHTS ]; //uniform vec3 hemisphereLightDirection[ MAX_HEMI_LIGHTS ]; - struct HemisphericLight { + struct HemisphereLight { vec3 skyColor; vec3 groundColor; vec3 direction; }; - uniform HemisphericLight hemisphericLights[ MAX...
true
Other
mrdoob
three.js
74d3aa3f12120c906d190e621cb1260e88932757.json
parse arrays of struct uniforms, code cleanup.
src/renderers/shaders/ShaderChunk/lights_lambert_pars_vertex.glsl
@@ -1 +1,113 @@ uniform vec3 ambientLightColor; + + +#if MAX_DIR_LIGHTS > 0 + + //uniform vec3 directionalLightColor[ MAX_DIR_LIGHTS ]; + //uniform vec3 directionalLightDirection[ MAX_DIR_LIGHTS ]; + + struct DirectionalLight { + vec3 color; + vec3 direction; + }; + + uniform DirectionalLight directionalLights[ MA...
true
Other
mrdoob
three.js
74d3aa3f12120c906d190e621cb1260e88932757.json
parse arrays of struct uniforms, code cleanup.
src/renderers/shaders/ShaderChunk/lights_phong_fragment.glsl
@@ -2,7 +2,7 @@ vec3 viewDir = normalize( vViewPosition ); vec3 totalReflectedLight = vec3( 0.0 ); -var diffuse = diffuseColor.rgb; +vec3 diffuse = diffuseColor.rgb; #ifdef METAL @@ -15,7 +15,7 @@ var diffuse = diffuseColor.rgb; for ( int i = 0; i < MAX_POINT_LIGHTS; i ++ ) { vec3 lightDir, lightIntens...
true
Other
mrdoob
three.js
74d3aa3f12120c906d190e621cb1260e88932757.json
parse arrays of struct uniforms, code cleanup.
src/renderers/shaders/ShaderChunk/lights_phong_pars_fragment.glsl
@@ -13,3 +13,115 @@ varying vec3 vViewPosition; varying vec3 vNormal; #endif + + +#if MAX_DIR_LIGHTS > 0 + + //uniform vec3 directionalLightColor[ MAX_DIR_LIGHTS ]; + //uniform vec3 directionalLightDirection[ MAX_DIR_LIGHTS ]; + + struct DirectionalLight { + vec3 color; + vec3 direction; + }; + + uniform Direc...
true
Other
mrdoob
three.js
74d3aa3f12120c906d190e621cb1260e88932757.json
parse arrays of struct uniforms, code cleanup.
src/renderers/shaders/ShaderLib.js
@@ -143,6 +143,7 @@ THREE.ShaderLib = { THREE.ShaderChunk[ "uv2_pars_vertex" ], THREE.ShaderChunk[ "envmap_pars_vertex" ], THREE.ShaderChunk[ "lights_lambert_pars_vertex" ], + THREE.ShaderChunk[ "lights_pars" ], THREE.ShaderChunk[ "color_pars_vertex" ], THREE.ShaderChunk[ "morphtarget_pars_vertex"...
true
Other
mrdoob
three.js
74d3aa3f12120c906d190e621cb1260e88932757.json
parse arrays of struct uniforms, code cleanup.
src/renderers/webgl/WebGLProgram.js
@@ -25,26 +25,53 @@ THREE.WebGLProgram = ( function () { var uniforms = {}; var n = gl.getProgramParameter( program, gl.ACTIVE_UNIFORMS ); + + var arrayStructRe = /^([\w\d_]+)\[(\d+)\]\.([\w\d_]+)$/; + var arrayRe = /^([\w\d_]+)\[0\]$/; for ( var i = 0; i < n; i ++ ) { var info = gl.getActiveUni...
true
Other
mrdoob
three.js
eb3dfab0bb313ca2059b33b6e57c0eeae02a7bc2.json
Fix null pointer err for some collada models For some collada models, the parent of bone might be null instead of -1.
src/objects/SkinnedMesh.js
@@ -43,7 +43,7 @@ THREE.SkinnedMesh = function ( geometry, material, useVertexTexture ) { gbone = this.geometry.bones[ b ]; - if ( gbone.parent !== - 1 ) { + if ( gbone.parent !== - 1 && gbone.parent !== null) { bones[ gbone.parent ].add( bones[ b ] );
false
Other
mrdoob
three.js
6d64a0616e2223061010ef7c771b7d6843e3e35c.json
Remove Line Breaks at function calls
src/objects/Mesh.js
@@ -211,8 +211,7 @@ THREE.Mesh.prototype.raycast = ( function () { b = indices[ i + 1 ]; c = indices[ i + 2 ]; - intersection = checkBufferGeometryIntersection( this, raycaster, ray, - positions, uvs, a, b, c ); + intersection = checkBufferGeometryIntersection( this, raycaster,...
false
Other
mrdoob
three.js
6dffe4a2bf5213b4eb29d50b92f59f6d7656c3d5.json
Fix intersection uv for non-indexed BufferGeometry
src/objects/Mesh.js
@@ -218,22 +218,22 @@ THREE.Mesh.prototype.raycast = ( function () { if ( distance < raycaster.near || distance > raycaster.far ) continue; + a = i / 3; + b = a + 1; + c = a + 2; + var uv; if ( attributes.uv !== undefined ) { var uvs = attributes.uv.array; - uvA.fromArr...
false
Other
mrdoob
three.js
1fa269150d403793d4fb236b8681c2018fc5c472.json
add indirect diffuse lighting.
src/renderers/shaders/ShaderChunk/lights_pars.glsl
@@ -107,6 +107,46 @@ uniform vec3 ambientLightColor; #if defined( USE_ENVMAP ) && defined( PHYSICAL ) + + vec3 getDiffuseLightProbeIndirectLightColor( /*const in SpecularLightProbe specularLightProbe,*/ const in GeometricContext geometry, const in int maxMIPLevel ) { + + #ifdef DOUBLE_SIDED + + float flipNorma...
true
Other
mrdoob
three.js
1fa269150d403793d4fb236b8681c2018fc5c472.json
add indirect diffuse lighting.
src/renderers/shaders/ShaderChunk/lights_template.glsl
@@ -71,6 +71,13 @@ GeometricContext geometry = GeometricContext( -vViewPosition, normalize( normal } +#endif + +#if defined( USE_ENVMAP ) && defined( PHYSICAL ) + + // TODO, replace 8 with the real maxMIPLevel + indirectDiffuseColor += getDiffuseLightProbeIndirectLightColor( /*lightProbe,*/ geometry, 8 ); + #...
true
Other
mrdoob
three.js
348c706a4679e52eaf1a0646e18636abfa9509e6.json
Keep TrackballControls from consuming all events.
examples/js/controls/TrackballControls.js
@@ -356,8 +356,6 @@ THREE.TrackballControls = function ( object, domElement ) { if ( _this.enabled === false ) return; - window.removeEventListener( 'keydown', keydown ); - _prevState = _state; if ( _state !== STATE.NONE ) { @@ -386,17 +384,12 @@ THREE.TrackballControls = function ( object, domElement )...
false
Other
mrdoob
three.js
6e3c2e88ebe0ed51f9800dfdae9d60fddd29452a.json
remove diffuse light probe for now.
src/renderers/shaders/ShaderChunk/lights_pars.glsl
@@ -107,44 +107,6 @@ uniform vec3 ambientLightColor; #if defined( USE_ENVMAP ) && defined( PHYSICAL ) - - vec3 getDiffuseLightProbeIndirectLightColor( /*const in SpecularLightProbe specularLightProbe,*/ const in GeometricContext geometry, const in float maxLodLevel ) { - - #ifdef DOUBLE_SIDED - - float flipNor...
false
Other
mrdoob
three.js
9a32595d57f7dfb9292db4d2bff7a63bdab40995.json
add more "const" and "in" qualifiers to functions.
src/renderers/shaders/ShaderChunk/bsdfs.glsl
@@ -1,4 +1,4 @@ -float calcLightAttenuation( float lightDistance, float cutoffDistance, float decayExponent ) { +float calcLightAttenuation( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) { if ( decayExponent > 0.0 ) { @@ -36,7 +36,7 @@ vec3 F_Schlick( const in vec3 sp...
false
Other
mrdoob
three.js
67d35df4f026e78723951d0842514eaedf02f73e.json
fix Sea3DLoader for new simplified lighting model.
examples/js/loaders/sea3d/SEA3DLoader.js
@@ -84,14 +84,15 @@ THREE.SEA3D.ShaderLib.replaceCode = function( src, target, replace ) { THREE.SEA3D.ShaderLib.fragStdMtl = THREE.SEA3D.ShaderLib.replaceCode( THREE.ShaderLib.phong.fragmentShader, [ // Target - 'outgoingLight += diffuseColor.rgb * ( totalDiffuseLight + totalAmbientLight ) * specular + totalSpecu...
false
Other
mrdoob
three.js
b64a4386b4388a0913c139473b047ff59c915329.json
remove struct initializers in vertex lambert.
src/renderers/shaders/ShaderChunk/lights_lambert_vertex.glsl
@@ -1,7 +1,14 @@ vec3 diffuse = vec3( 1.0 ); -GeometricContext geometry = GeometricContext( mvPosition.xyz, normalize( transformedNormal ), normalize( -mvPosition.xyz ) ); -GeometricContext backGeometry = GeometricContext( geometry.position, -geometry.normal, geometry.viewDir ); +GeometricContext geometry; +geometry...
false
Other
mrdoob
three.js
206a7d0d4b012be1d79fbccfa38c332279a343c3.json
parse materialIndex when adding groups
src/loaders/BufferGeometryLoader.js
@@ -64,7 +64,7 @@ THREE.BufferGeometryLoader.prototype = { var group = groups[ i ]; - geometry.addGroup( group.start, group.count ); + geometry.addGroup( group.start, group.count, group.materialIndex ); }
false
Other
mrdoob
three.js
02888c4051d3f2b42c3e3e8334f406064777bf3d.json
Add support for BufferGeometry
examples/js/exporters/OBJExporter.js
@@ -23,7 +23,9 @@ THREE.OBJExporter.prototype = { var nbNormals = 0; var geometry = mesh.geometry; - + if ( geometry instanceof THREE.BufferGeometry ) { + geometry = new THREE.Geometry().fromBufferGeometry(geometry); + } if ( geometry instanceof THREE.Geometry ) { output += 'o ' + mesh.name ...
false
Other
mrdoob
three.js
ee11d86d08c2de3278f7b0c9538635c6f9a0a28a.json
Fix constant used in fresnel approximation
src/renderers/shaders/ShaderChunk/bsdfs.glsl
@@ -24,7 +24,7 @@ vec3 F_Schlick( const in vec3 specularColor, const in float dotLH ) { //;float fresnel = pow( 1.0 - dotLH, 5.0 ); // Optimized variant (presented by Epic at SIGGRAPH '13) - float fresnel = exp2( ( -5.55437 * dotLH - 6.98316 ) * dotLH ); + float fresnel = exp2( ( -5.55473 * dotLH - 6.98316 ) * do...
false
Other
mrdoob
three.js
f0823390a8e7e0da84735b1b83c94ad54f4c0e6f.json
Clarify area definition for setViewport/setScissor
docs/api/renderers/WebGLRenderer.html
@@ -178,6 +178,8 @@ <h3>[method:null setViewport]( [page:Integer x], [page:Integer y], [page:Integer <h3>[method:null setScissor]( [page:Integer x], [page:Integer y], [page:Integer width], [page:Integer height] )</h3> <div>Sets the scissor area from (x, y) to (x + width, y + height).</div> + + <div>NOTE: The...
false
Other
mrdoob
three.js
6b958991dc755f3feef4fa304e8aab0d8a3d4e5f.json
Remove unused variable
examples/webgl_multiple_elements.html
@@ -87,7 +87,7 @@ var canvas; - var scenes = [], camera, renderer, emptyScene; + var scenes = [], camera, renderer; init(); animate(); @@ -109,8 +109,6 @@ var template = document.getElementById("template").text; var content = document.getElementById("content"); - var emptyScene = ne...
false
Other
mrdoob
three.js
ee1e677ba3bf150ff5f241579dfc77f71c5d6f0d.json
remove unused code.
utils/exporters/blender/addons/io_three/exporter/geometry.py
@@ -565,7 +565,6 @@ def _parse_geometry(self): mt = api.mesh.blend_shapes(self.node, self.options) or [] self[constants.MORPH_TARGETS] = mt if len(mt) > 0 and self._scene: # there's blend shapes, let check for animation - #self[constants.CLIPS] = api.mesh.animated_...
false
Other
mrdoob
three.js
d848e13d346c5087d09b579066e241268d0ca6d0.json
add decayExponent support to lights.
utils/exporters/blender/addons/io_three/constants.py
@@ -113,6 +113,7 @@ WARNING = 'warning' INFO = 'info' DEBUG = 'debug' +DISABLED = 'disabled' NONE = 'None' MSGPACK = 'msgpack' @@ -338,6 +339,7 @@ DISTANCE = 'distance' ASPECT = 'aspect' ANGLE = 'angle' +DECAY = 'decayExponent' FOV = 'fov' ASPECT = 'aspect'
true
Other
mrdoob
three.js
d848e13d346c5087d09b579066e241268d0ca6d0.json
add decayExponent support to lights.
utils/exporters/blender/addons/io_three/exporter/api/light.py
@@ -75,3 +75,23 @@ def intensity(lamp): """ logger.debug("light.intensity(%s)", lamp) return round(lamp.energy, 2) + +# mapping enum values to decay exponent +__FALLOFF_TO_EXP = { + 'CONSTANT': 0, + 'INVERSE_LINEAR': 1, + 'INVERSE_SQUARE': 2, + 'CUSTOM_CURVE': 0, + 'LINEAR_QUADRATIC_WEIGHT...
true
Other
mrdoob
three.js
d848e13d346c5087d09b579066e241268d0ca6d0.json
add decayExponent support to lights.
utils/exporters/blender/addons/io_three/exporter/object.py
@@ -51,8 +51,12 @@ def _init_light(self): # self[constants.DISTANCE] = api.light.distance(self.data) self[constants.DISTANCE] = 0; - if self[constants.TYPE] == constants.SPOT_LIGHT: + lightType = self[constants.TYPE] + if lightType == constants.SPOT_LIGHT: self[c...
true
Other
mrdoob
three.js
412044d236d99b97ba23f83cc541fad31bd7e706.json
fix bad names in animation tracks on geometries.
utils/exporters/blender/addons/io_three/exporter/api/mesh.py
@@ -465,6 +465,11 @@ def animated_blend_shapes(mesh, name, options): :param options: """ + + # let filter the name to only keep the node's name + # the two cases are '%sGeometry' and '%sGeometry.%d', and we want %s + name = re.search("^(.*)Geometry(\..*)?$", name).group(1) + logger.debug("mesh...
false
Other
mrdoob
three.js
2d3f69905f8f426fdc43c1c082cac6b56bd54713.json
fix double application of ambient light.
src/renderers/shaders/ShaderLib.js
@@ -230,13 +230,13 @@ THREE.ShaderLib = { " #ifdef DOUBLE_SIDED", " if ( gl_FrontFacing )", - " outgoingLight += diffuseColor.rgb * ( vLightFront * shadowMask + totalAmbientLight ) + emissive;", + " outgoingLight += diffuseColor.rgb * ( vLightFront * shadowMask ) + emissive;", " else", - " o...
false
Other
mrdoob
three.js
73cb6b483afb981d5408d389e7bd7f66c9cef0b5.json
add variations with cubeMap on phong.
examples/webgl_materials_phong_variations.html
@@ -81,8 +81,7 @@ var reflectionCube = THREE.ImageUtils.loadTextureCube( urls ); reflectionCube.format = THREE.RGBFormat; - reflectionCube = null; - + var cubeWidth = 400; var numberOfSphersPerSide = 5; var sphereRadius = ( cubeWidth / numberOfSphersPerSide ) * 0.8 * 0.5; @@ -91,20 +90,3...
false
Other
mrdoob
three.js
61aa1f739fad60b41d91c87f535b951988b46ef6.json
add lambert variations.
examples/webgl_materials_lambert_variations.html
@@ -0,0 +1,248 @@ +<!DOCTYPE html> +<html lang="en"> + <head> + <title>three.js webgl - materials</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 { + color: #fff; + font-family:Monospace; + f...
false
Other
mrdoob
three.js
ca484bfd8ac073250548995ecd12722e983ec6cd.json
add basic variations.
examples/webgl_materials_basic_variations.html
@@ -0,0 +1,247 @@ +<!DOCTYPE html> +<html lang="en"> + <head> + <title>three.js webgl - materials</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 { + color: #fff; + font-family:Monospace; + f...
false
Other
mrdoob
three.js
89b3dac2dce16c25076e1cc23a0107d7eb56ca13.json
remove energy conserving mode.
editor/js/Sidebar.Material.js
@@ -163,16 +163,6 @@ Sidebar.Material = function ( editor ) { container.add( materialVertexColorsRow ); - // energy conserving - - var materialEnergyConservingRow = new UI.Panel(); - var materialEnergyConserving = new UI.Checkbox( false ).onChange( update ); - - materialEnergyConservingRow.add( new UI.Text( 'Ener...
true
Other
mrdoob
three.js
89b3dac2dce16c25076e1cc23a0107d7eb56ca13.json
remove energy conserving mode.
src/materials/MeshPhongMaterial.js
@@ -11,8 +11,6 @@ * * map: new THREE.Texture( <Image> ), * - * energyConverving: false - * * lightMap: new THREE.Texture( <Image> ), * lightMapIntensity: <float> * @@ -73,8 +71,6 @@ THREE.MeshPhongMaterial = function ( parameters ) { this.map = null; - this.energyConserving = false; - this.light...
true
Other
mrdoob
three.js
89b3dac2dce16c25076e1cc23a0107d7eb56ca13.json
remove energy conserving mode.
src/renderers/shaders/ShaderChunk/bsdfs.glsl
@@ -1,6 +1,3 @@ -//#define ENERGY_PRESERVING_MONOCHROME - - float calcLightAttenuation( float lightDistance, float cutoffDistance, float decayExponent ) { if ( decayExponent > 0.0 ) {
true
Other
mrdoob
three.js
89b3dac2dce16c25076e1cc23a0107d7eb56ca13.json
remove energy conserving mode.
src/renderers/shaders/ShaderChunk/lights_phong_fragment.glsl
@@ -7,14 +7,4 @@ material.diffuseColor = diffuseColor.rgb; material.diffuseColor = vec3( 0.0 ); -#endif - -#if defined( ENERGY_PRESERVING_RGB ) - - material.diffuseColor *= whiteCompliment( specular ); - -#elif defined( ENERGY_PRESERVING_MONOCHROME ) - - material.diffuseColor *= whiteCompliment( luminance( specul...
true
Other
mrdoob
three.js
89b3dac2dce16c25076e1cc23a0107d7eb56ca13.json
remove energy conserving mode.
src/renderers/shaders/ShaderChunk/lights_physical_fragment.glsl
@@ -2,13 +2,3 @@ PhysicalMaterial material; material.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor ); material.specularRoughness = roughnessFactor * 0.5 + 0.5; // disney's remapping of [ 0, 1 ] roughness to [ 0.5, 1 ] material.specularColor = mix( vec3( 0.04 ) * reflectivity, diffuseColor.rgb, metalnessF...
true
Other
mrdoob
three.js
89b3dac2dce16c25076e1cc23a0107d7eb56ca13.json
remove energy conserving mode.
src/renderers/webgl/WebGLProgram.js
@@ -252,10 +252,6 @@ THREE.WebGLProgram = ( function () { parameters.alphaMap ? '#define USE_ALPHAMAP' : '', parameters.vertexColors ? '#define USE_COLOR' : '', - parameters.energyConserving ? '#define ENERGY_PRESERVING_MONOCHROME' : '', - - - parameters.flatShading ? '#define FLAT_SHADED' : '', ...
true
Other
mrdoob
three.js
89b3dac2dce16c25076e1cc23a0107d7eb56ca13.json
remove energy conserving mode.
src/renderers/webgl/WebGLPrograms.js
@@ -160,8 +160,6 @@ THREE.WebGLPrograms = function ( renderer, capabilities ) { specularMap: !! material.specularMap, alphaMap: !! material.alphaMap, - energyConserving: !! material.energyConserving, - combine: material.combine, vertexColors: material.vertexColors,
true
Other
mrdoob
three.js
8610ef32210a5426aedd4ecd29c3ba4c0f2ff3c0.json
remove unneeded function.
src/renderers/shaders/ShaderChunk/common.glsl
@@ -21,13 +21,6 @@ struct ReflectedLight { vec3 diffuse; }; -void accumulateReflectedLight( inout ReflectedLight accumulator, const in ReflectedLight item ) { - - accumulator.diffuse += item.diffuse; - accumulator.specular += item.specular; - -} - struct GeometricContext { vec3 position; vec3 normal;
false
Other
mrdoob
three.js
d8552f349f65d79e2fcfe644ffb54328010ee949.json
introduce IncidentLight struct
src/renderers/shaders/ShaderChunk/common.glsl
@@ -82,9 +82,15 @@ vec3 linearToOutput( in vec3 a ) { } -vec3 BRDF_Lambert( const in vec3 lightColor, const in vec3 lightDir, const in vec3 normal, const in vec3 diffuseColor ) { +struct IncidentLight { + vec3 color; + vec3 direction; +}; - return lightColor * diffuseColor * ( saturate( dot( normal, lightDir )...
true
Other
mrdoob
three.js
d8552f349f65d79e2fcfe644ffb54328010ee949.json
introduce IncidentLight struct
src/renderers/shaders/ShaderChunk/lights_lambert_vertex.glsl
@@ -13,14 +13,14 @@ vec3 diffuse = vec3( 1.0 ); for ( int i = 0; i < MAX_POINT_LIGHTS; i ++ ) { - vec3 lightColor, lightDir; - getPointLightDirect( pointLights[i], mvPosition.xyz, lightColor, lightDir ); + IncidentLight incidentLight; + getPointLightDirect( pointLights[ i ], mvPosition.xyz, incidentLight ); ...
true
Other
mrdoob
three.js
d8552f349f65d79e2fcfe644ffb54328010ee949.json
introduce IncidentLight struct
src/renderers/shaders/ShaderChunk/lights_phong_fragment.glsl
@@ -17,14 +17,14 @@ vec3 diffuse = diffuseColor.rgb; for ( int i = 0; i < MAX_POINT_LIGHTS; i ++ ) { - vec3 lightColor, lightDir; - getPointLightDirect( pointLights[i], -vViewPosition, lightColor, lightDir ); + IncidentLight incidentLight; + getPointLightDirect( pointLights[ i ], -vViewPosition, incidentLight...
true
Other
mrdoob
three.js
89af64638fff208c8947f37deb2181c7d77b4933.json
adjust formatting of clampLength
src/math/Vector2.js
@@ -292,17 +292,17 @@ THREE.Vector2.prototype = { clampLength: function ( min, max ) { - var oldLength = this.length(); + var oldLength = this.length(); - var newLength = ( oldLength < min ) ? min : ( ( oldLength > max ) ? max : oldLength ); + var newLength = ( oldLength < min ) ? min : ( ( oldLength > ma...
true
Other
mrdoob
three.js
89af64638fff208c8947f37deb2181c7d77b4933.json
adjust formatting of clampLength
src/math/Vector3.js
@@ -522,17 +522,17 @@ THREE.Vector3.prototype = { clampLength: function ( min, max ) { - var oldLength = this.length(); + var oldLength = this.length(); - var newLength = ( oldLength < min ) ? min : ( ( oldLength > max ) ? max : oldLength ); + var newLength = ( oldLength < min ) ? min : ( ( oldLength > ma...
true
Other
mrdoob
three.js
525b9c672db3f051b6b47033a1c5e436efe1b4f2.json
remove closure of clampLength
src/math/Vector2.js
@@ -290,15 +290,11 @@ THREE.Vector2.prototype = { }(), - clampLength: function () { + clampLength: function ( min, max ) { - var oldLength, newLength; + var oldLength = this.length(); - return function clampLength( min, max ) { - - oldLength = this.length(); - - newLength = ( oldLength < min ) ? min :...
true
Other
mrdoob
three.js
525b9c672db3f051b6b47033a1c5e436efe1b4f2.json
remove closure of clampLength
src/math/Vector3.js
@@ -520,15 +520,11 @@ THREE.Vector3.prototype = { }(), - clampLength: function () { + clampLength: function ( min, max ) { - var oldLength, newLength; + var oldLength = this.length(); - return function clampLength( min, max ) { - - oldLength = this.length(); - - newLength = ( oldLength < min ) ? min :...
true
Other
mrdoob
three.js
2125b9b995d7bbfad829c204a293930db2a9c96a.json
Move `vertices` outside of the faces loop
examples/js/exporters/OBJExporter.js
@@ -114,13 +114,13 @@ THREE.OBJExporter.prototype = { } } - + // faces + var indices = []; for ( var i = 0, j = 1, l = faces.length; i < l; i ++, j += 3 ) { var face = faces[ i ]; - var indices = []; for ( var m = 0; m < 3; m ++ ) {
false
Other
mrdoob
three.js
349d5056fc008ba5938169c542757a919a3fb5db.json
Pass world units to OrthographicCamera constructor
examples/webgl_camera.html
@@ -48,12 +48,14 @@ var SCREEN_WIDTH = window.innerWidth; var SCREEN_HEIGHT = window.innerHeight; + var aspect = SCREEN_WIDTH / SCREEN_HEIGHT; var container, stats; var camera, scene, renderer, mesh; var cameraRig, activeCamera, activeHelper; var cameraPerspective, cameraOrtho; var cam...
false
Other
mrdoob
three.js
9197b1b929847cb9e8148612693220603a9f8832.json
remove console in matrix4
test/unit/math/Matrix4.js
@@ -167,7 +167,7 @@ test( "getInverse", function() { b.getInverse( a, false ); ok( matrixEquals4( b, new THREE.Matrix4() ), "Passed!" ); - try { + try { b.getInverse( c, true ); ok( false, "Passed!" ); // should never get here. } @@ -225,8 +225,7 @@ test( "makeBasis/extractBasis", function() { b.extra...
false
Other
mrdoob
three.js
72f72f4dc9c693305e29d5692dfe9ffeed6b5495.json
remove console in quaternion
test/unit/math/Quaternion.js
@@ -334,9 +334,6 @@ function slerpTestSkeleton( doSlerp, maxError ) { result = doSlerp( [ 0, D, 0, D ], [ 0, -D, 0, D ], 0.5 ); ok( result.equals( 0, 0, 0, 1 ), "W-Unit from diagonals" ); ok( isNormal( result ), "Approximately normal (W-Unit)" ); - - console.log( "maxNormError", maxNormError ); - }
false
Other
mrdoob
three.js
24f427a54b5dd312978c1e75cdd4262e076159c4.json
remove console in euler
test/unit/math/Euler.js
@@ -7,7 +7,7 @@ module( "Euler" ); var eulerZero = new THREE.Euler( 0, 0, 0, "XYZ" ); var eulerAxyz = new THREE.Euler( 1, 0, 0, "XYZ" ); var eulerAzyx = new THREE.Euler( 0, 1, 0, "ZYX" ); - + var matrixEquals4 = function( a, b, tolerance ) { tolerance = tolerance || 0.0001; if( a.elements.length != b.elements....
false
Other
mrdoob
three.js
d6fbddeed3b9265283bbcd51aedfe140bbc1b5c5.json
remove unused test
test/unit/core/BufferGeometry.js
@@ -184,8 +184,6 @@ test( "computeBoundingBox", function() { ok( bb.min.x === bb.max.x && bb.min.y === bb.max.y && bb.min.z === bb.max.z, "since there is only one vertex, max and min are equal" ); ok( bb.min.x === -1 && bb.min.y === -1 && bb.min.z === -1, "since there is only one vertex, min and max are this vert...
false
Other
mrdoob
three.js
a71785d0d3db2b2d86cb0f6a68a4d7a832382c2c.json
use BufferAttribute as mock to supress warnings
test/unit/core/InstancedBufferGeometry.js
@@ -20,16 +20,16 @@ test( "copy", function() { var instanceMock1 = {}; var instanceMock2 = {}; var indexMock = createClonableMock(); - var attributeMock1 = {}; - var attributeMock2 = {}; + var defaultAttribute1 = new THREE.BufferAttribute([1]); + var defaultAttribute2 = new THREE.BufferAttribute([2]); var ins...
false
Other
mrdoob
three.js
7360ed9c5ec5cb45fd13701587ef87e92512c333.json
Simplify faces creation with for loop
examples/js/exporters/OBJExporter.js
@@ -15,6 +15,8 @@ THREE.OBJExporter.prototype = { var indexVertex = 0; var indexVertexUvs = 0; var indexNormals = 0; + + var faceVertexKeys = ["a", "b", "c"]; var parseMesh = function ( mesh ) { @@ -112,18 +114,19 @@ THREE.OBJExporter.prototype = { } } - + // faces - - + ...
false
Other
mrdoob
three.js
0bfe511c9102c2cb8e6c2b334e210e017a2c8489.json
use texture loader to load textures in test
test/unit/extras/ImageUtils.test.js
@@ -17,33 +17,36 @@ QUnit.test( "test load handler", function( assert ) { var done = assert.async(); - THREE.ImageUtils.loadTexture( good_url, undefined, function ( tex ) { + new THREE.TextureLoader().load(good_url, function ( tex ) { assert.success( "load handler should be called" ); assert.ok( tex, "te...
false
Other
mrdoob
three.js
6d5d6f8b74a23f3deffb25b0d014b495d6b36b13.json
use addgroup for adding draw calls in test
test/unit/geometry/EdgesGeometry.js
@@ -171,8 +171,7 @@ function addDrawCalls ( geometry ) { var start = i * 3; var count = 3; - geometry.addDrawCall ( start, count, offset ); - + geometry.addGroup( start, count ); } return geometry;
false
Other
mrdoob
three.js
0d760a26b368f0fc4e81834975862e4c66cf26cf.json
use setIndex for index attributes in test
test/unit/geometry/EdgesGeometry.js
@@ -152,7 +152,7 @@ function createIndexedBufferGeometry ( vertList, idxList ) { vertices = vertices.subarray( 0, 3 * numVerts ); - geom.addAttribute( 'index', new THREE.BufferAttribute( indices, 1 ) ); + geom.setIndex( new THREE.BufferAttribute( indices, 1 ) ); geom.addAttribute( 'position', new THREE.BufferAt...
false
Other
mrdoob
three.js
eb1314e77ec307c56d834e323bb26e8157de73bf.json
Add camera controller to each element
examples/webgl_multiple_elements.html
@@ -74,6 +74,7 @@ </div> <script src="../build/three.min.js"></script> + <script src="../examples/js/controls/OrbitControls.js"></script> <script src="js/Detector.js"></script> @@ -87,7 +88,7 @@ var canvas; - var scenes = [], camera, renderer; + var scenes = [], renderer; init(); a...
false
Other
mrdoob
three.js
b89da830de87fabcecde1842f0d82e36b8a413c7.json
fix light json check
test/unit/qunit-utils.js
@@ -207,9 +207,11 @@ function checkLightClone( light ) { function checkLightJsonWriting( light, json ) { QUnit.assert.equal( json.metadata.version, "4.4", "check metadata version" ); - QUnit.assert.equalKey( light, json, 'type' ); - QUnit.assert.equalKey( light, json, 'uuid' ); - QUnit.assert.equal( json.id, undef...
false
Other
mrdoob
three.js
f058021ec1272d2376677debeb11d711e01e6f61.json
Add test for CatmullRomCurve3
test/unit/extras/curves/CatmullRomCurve3.js
@@ -0,0 +1,97 @@ +/** + * @author zz85 / http://joshuakoo.com + */ + +module( "CatmullRomCurve3" ); + +var positions = [ + new THREE.Vector3( -60, -100, 60 ), + new THREE.Vector3( -60, 20, 60 ), + new THREE.Vector3( -60, 120, 60 ), + new THREE.Vector3( 60, 20, -60 ), + new THREE.Vector3( 60, -100, -60 ) +]; +...
true
Other
mrdoob
three.js
f058021ec1272d2376677debeb11d711e01e6f61.json
Add test for CatmullRomCurve3
test/unit/extras/curves/ClosedSplineCurve3.js
@@ -13,8 +13,6 @@ function vectorsAreEqual( check, that ) { for ( var i = 0; i < check.length; i ++ ) { var a = check[ i ], b = that[ i ]; - console.log( a.distanceToSquared( b ) ) - if ( a.distanceToSquared( b ) > threshold ) { return 'Vector differs at index ' + i + @@ -53,6 +51,7 @@ test( "basic che...
true
Other
mrdoob
three.js
f058021ec1272d2376677debeb11d711e01e6f61.json
Add test for CatmullRomCurve3
test/unit/unittests_sources.html
@@ -36,6 +36,7 @@ <script src="../../src/extras/core/Curve.js"></script> <script src="../../src/extras/CurveUtils.js"></script> <script src="../../src/extras/curves/ClosedSplineCurve3.js"></script> + <script src="../../src/extras/curves/CatmullRomCurve3.js"></script> <!-- add class-based unit tests below...
true
Other
mrdoob
three.js
c6c305a39de6cebb5c0d5a5ca3a5481603556247.json
Add attributeDivisors to state
src/renderers/webgl/WebGLState.js
@@ -8,6 +8,7 @@ THREE.WebGLState = function ( gl, extensions, paramThreeToGL ) { var newAttributes = new Uint8Array( 16 ); var enabledAttributes = new Uint8Array( 16 ); + var attributeDivisors = new Uint8Array( 16 ); var capabilities = {};
false
Other
mrdoob
three.js
761f98dd5b79868d75468a7388a0cd83c74c4d09.json
add tests for camera
test/unit/cameras/Camera.js
@@ -5,8 +5,18 @@ module( "Camera" ); test( "lookAt", function() { - var obj = new THREE.Camera(); - obj.lookAt(new THREE.Vector3(0, 1, -1)); + var cam = new THREE.Camera(); + cam.lookAt(new THREE.Vector3(0, 1, -1)); - ok( obj.rotation.x * (180 / Math.PI) === 45 , "x is equal" ); + ok( cam.rotation.x * (180 / Math...
false
Other
mrdoob
three.js
71daf959eaf3c85dbb9c2323b0c07fe8bca49a7c.json
Improve HemisphereLight illumination model
src/renderers/shaders/ShaderChunk/hemilight_fragment.glsl
@@ -0,0 +1,18 @@ +#if MAX_HEMI_LIGHTS > 0 + + for( int i = 0; i < MAX_HEMI_LIGHTS; i ++ ) { + + vec3 lightDir = hemisphereLightDirection[ i ]; + + float dotProduct = dot( normal, lightDir ); + + float hemiDiffuseWeight = 0.5 * dotProduct + 0.5; + + vec3 lightColor = mix( hemisphereLightGroundColor[ i ], hemisphereL...
true
Other
mrdoob
three.js
71daf959eaf3c85dbb9c2323b0c07fe8bca49a7c.json
Improve HemisphereLight illumination model
src/renderers/shaders/ShaderChunk/lights_phong_fragment.glsl
@@ -1,31 +1,3 @@ -#ifndef FLAT_SHADED - - vec3 normal = normalize( vNormal ); - - #ifdef DOUBLE_SIDED - - normal = normal * ( -1.0 + 2.0 * float( gl_FrontFacing ) ); - - #endif - -#else - - vec3 fdx = dFdx( vViewPosition ); - vec3 fdy = dFdy( vViewPosition ); - vec3 normal = normalize( cross( fdx, fdy ) ); - -#endif -...
true
Other
mrdoob
three.js
71daf959eaf3c85dbb9c2323b0c07fe8bca49a7c.json
Improve HemisphereLight illumination model
src/renderers/shaders/ShaderChunk/normal_phong_fragment.glsl
@@ -0,0 +1,28 @@ +#ifndef FLAT_SHADED + + vec3 normal = normalize( vNormal ); + + #ifdef DOUBLE_SIDED + + normal = normal * ( -1.0 + 2.0 * float( gl_FrontFacing ) ); + + #endif + +#else + + vec3 fdx = dFdx( vViewPosition ); + vec3 fdy = dFdy( vViewPosition ); + vec3 normal = normalize( cross( fdx, fdy ) ); + +#endif +...
true
Other
mrdoob
three.js
71daf959eaf3c85dbb9c2323b0c07fe8bca49a7c.json
Improve HemisphereLight illumination model
src/renderers/shaders/ShaderLib.js
@@ -366,7 +366,9 @@ THREE.ShaderLib = { THREE.ShaderChunk[ "alphamap_fragment" ], THREE.ShaderChunk[ "alphatest_fragment" ], THREE.ShaderChunk[ "specularmap_fragment" ], + THREE.ShaderChunk[ "normal_phong_fragment" ], THREE.ShaderChunk[ "lightmap_fragment" ], + THREE.ShaderChunk[ "hemilight_fr...
true
Other
mrdoob
three.js
71daf959eaf3c85dbb9c2323b0c07fe8bca49a7c.json
Improve HemisphereLight illumination model
utils/build/includes/common.json
@@ -114,6 +114,7 @@ "src/renderers/shaders/ShaderChunk/envmap_vertex.glsl", "src/renderers/shaders/ShaderChunk/fog_fragment.glsl", "src/renderers/shaders/ShaderChunk/fog_pars_fragment.glsl", + "src/renderers/shaders/ShaderChunk/hemilight_fragment.glsl", "src/renderers/shaders/ShaderChunk/lightmap_fragment.glsl"...
true
Other
mrdoob
three.js
ef42280373467e7e0b5f600b84d73ac881a915d0.json
simplify AnimationMixer to prevent bugs.
src/animation/AnimationMixer.js
@@ -13,8 +13,7 @@ THREE.AnimationMixer = function( root ) { this.time = 0; this.timeScale = 1.0; this.actions = []; - this.propertyBindings = []; - this.propertyBindingNamesToIndex = {}; + this.propertyBindingMap = {}; }; @@ -38,20 +37,15 @@ THREE.AnimationMixer.prototype = { var track = tracks[ i ]; ...
false
Other
mrdoob
three.js
63414e3323ee994ca410bf629d5303f3dd3d2846.json
remove debug comment.
examples/js/BlendCharacter.js
@@ -22,9 +22,7 @@ THREE.BlendCharacter = function () { scope.mixer = new THREE.AnimationMixer( scope ); - // Create the animations - console.log( geometry ); - + // Create the animations for ( var i = 0; i < geometry.clips.length; ++ i ) { var animName = geometry.clips[ i ].name;
false
Other
mrdoob
three.js
94478be299e4f98e923bae54ed0233c3463b79e7.json
simplify Action propertyBinding caches.
src/animation/AnimationAction.js
@@ -21,7 +21,7 @@ THREE.AnimationAction = function ( clip, startTime, timeScale, weight, loop ) { this.actionTime = - this.startTime; this.clipTime = 0; - this.propertyBindingIndices = []; + this.propertyBindings = []; }; /*
true
Other
mrdoob
three.js
94478be299e4f98e923bae54ed0233c3463b79e7.json
simplify Action propertyBinding caches.
src/animation/AnimationMixer.js
@@ -52,14 +52,15 @@ THREE.AnimationMixer.prototype = { else { propertyBinding = this.propertyBindings[ j ]; } + + // push in the same order as the tracks. + action.propertyBindings.push( propertyBinding ); // track usages of shared property bindings, because if we leave too many around, the mi...
true
Other
mrdoob
three.js
281f51051c30a1d9ceb6cc120a9bf0e695d1a724.json
avoid clones while interpolating values.
src/animation/AnimationUtils.js
@@ -19,6 +19,19 @@ }, + clone: function( exemplarValue ) { + + var typeName = typeof exemplarValue; + if( typeName === "object" ) { + if( exemplarValue.clone ) { + return exemplarValue.clone(); + } + console.error( "can not figure out how to copy exemplarValue", exemplarValue ); + } + + return exem...
true
Other
mrdoob
three.js
281f51051c30a1d9ceb6cc120a9bf0e695d1a724.json
avoid clones while interpolating values.
src/animation/KeyframeTrack.js
@@ -11,7 +11,11 @@ THREE.KeyframeTrack = function ( name, keys ) { this.name = name; - this.keys = keys || []; // time in seconds, value as value + this.keys = keys; // time in seconds, value as value + + // local cache of value type to avoid allocations during runtime. + this.result = THREE.AnimationUtils.clone( ...
true
Other
mrdoob
three.js
281f51051c30a1d9ceb6cc120a9bf0e695d1a724.json
avoid clones while interpolating values.
src/animation/PropertyBinding.js
@@ -46,15 +46,19 @@ THREE.PropertyBinding.prototype = { if( this.cumulativeWeight === 0 ) { - this.cumulativeValue = value; + if( this.cumulativeValue === null ) { + this.cumulativeValue = THREE.AnimationUtils.clone( value ); + } this.cumulativeWeight = weight; - + //console.log( this ); + ...
true
Other
mrdoob
three.js
0dac7b9c20a73a2cd82495de5ff041de637ec2dd.json
fix copy material
src/materials/MeshPhongMaterial.js
@@ -112,59 +112,64 @@ THREE.MeshPhongMaterial = function ( parameters ) { THREE.MeshPhongMaterial.prototype = Object.create( THREE.Material.prototype ); THREE.MeshPhongMaterial.prototype.constructor = THREE.MeshPhongMaterial; -THREE.MeshPhongMaterial.prototype.clone = function () { +THREE.MeshPhongMaterial.prototyp...
false
Other
mrdoob
three.js
2d0a1ee70acc22222bfaf08c7a502249b6ed9859.json
correct key value for num-
examples/misc_controls_transform.html
@@ -98,7 +98,7 @@ control.setSize( control.size + 0.1 ); break; case 189: - case 10: // -,_,num- + case 109: // -,_,num- control.setSize( Math.max(control.size - 0.1, 0.1 ) ); break; }
false
Other
mrdoob
three.js
1e219a674a7e9a8e001e5b643b1848a8b130b098.json
add support for binding to materials.
src/animation/PropertyBinding.js
@@ -15,6 +15,7 @@ THREE.PropertyBinding = function ( rootNode, trackName ) { this.directoryName = parseResults.directoryName || null; this.nodeName = parseResults.nodeName; + this.material = parseResults.material; this.propertyName = parseResults.propertyName || null; this.propertyArrayIndex = parseResults.pr...
false
Other
mrdoob
three.js
633e071ae1d83db3c6ab390a7dad564990505b66.json
add new animation classes to common includes.
utils/build/includes/common.json
@@ -34,6 +34,12 @@ "src/core/DirectGeometry.js", "src/core/BufferGeometry.js", "src/core/InstancedBufferGeometry.js", + "src/animation/AnimationAction.js", + "src/animation/AnimationClip.js", + "src/animation/AnimationMixer.js", + "src/animation/AnimationUtils.js", + "src/animation/KeyframeTrack.js", + "src/anima...
false
Other
mrdoob
three.js
87b5f7e9bdc2de3b9e41e9f117d04f079bb73b7e.json
remove three-math from npm build, never used.
utils/npm/build.js
@@ -106,5 +106,4 @@ buildAll.stderr.on('data', function (data) { buildAll.on( 'exit', function ( exitCode ) { console.log( "exitCode: " + exitCode ); buildModule( "three" ); - buildModule( "three-math" ); });
false
Other
mrdoob
three.js
d0148758941fe5b20368ef22c53c197d7959cd9a.json
Set better defaults for DataTexture
examples/js/Ocean.js
@@ -248,8 +248,6 @@ THREE.Ocean.prototype.generateSeedPhaseTexture = function() { } this.pingPhaseTexture = new THREE.DataTexture( phaseArray, this.resolution, this.resolution, THREE.RGBAFormat ); - this.pingPhaseTexture.minFilter = THREE.NearestFilter; - this.pingPhaseTexture.magFilter = THREE.NearestFilter; t...
true
Other
mrdoob
three.js
d0148758941fe5b20368ef22c53c197d7959cd9a.json
Set better defaults for DataTexture
examples/js/SimulationRenderer.js
@@ -206,7 +206,6 @@ function SimulationRenderer( WIDTH, renderer ) { texture.minFilter = THREE.NearestFilter; texture.magFilter = THREE.NearestFilter; texture.needsUpdate = true; - texture.flipY = false; return texture; @@ -232,7 +231,6 @@ function SimulationRenderer( WIDTH, renderer ) { texture.min...
true
Other
mrdoob
three.js
d0148758941fe5b20368ef22c53c197d7959cd9a.json
Set better defaults for DataTexture
examples/js/postprocessing/GlitchPass.js
@@ -113,7 +113,6 @@ THREE.GlitchPass.prototype = { texture.minFilter = THREE.NearestFilter; texture.magFilter = THREE.NearestFilter; texture.needsUpdate = true; - texture.flipY = false; return texture; }
true
Other
mrdoob
three.js
d0148758941fe5b20368ef22c53c197d7959cd9a.json
Set better defaults for DataTexture
src/objects/Skeleton.js
@@ -38,10 +38,6 @@ THREE.Skeleton = function ( bones, boneInverses, useVertexTexture ) { this.boneMatrices = new Float32Array( this.boneTextureWidth * this.boneTextureHeight * 4 ); // 4 floats per RGBA pixel this.boneTexture = new THREE.DataTexture( this.boneMatrices, this.boneTextureWidth, this.boneTextureHeig...
true
Other
mrdoob
three.js
d0148758941fe5b20368ef22c53c197d7959cd9a.json
Set better defaults for DataTexture
src/textures/DataTexture.js
@@ -3,10 +3,25 @@ */ THREE.DataTexture = function ( data, width, height, format, type, mapping, wrapS, wrapT, magFilter, minFilter, anisotropy ) { + + if ( magFilter === undefined ) { + + magFilter = THREE.NearestFilter; + + } + + if ( minFilter === undefined ) { + + minFilter = THREE.NearestFilter; + ...
true
Other
mrdoob
three.js
1cefeae8a1939f71f24c80e6e3017a9f1eda1a27.json
fix potential null reference.
src/loaders/ObjectLoader.js
@@ -627,7 +627,7 @@ THREE.ObjectLoader.prototype = { } - if( data.animations ) { + if( data.animations && data.animations.tracks ) { var dataTracks = data.animations.tracks;
false
Other
mrdoob
three.js
dfde145893cc33b7b8a987de95b6250614a5f3e6.json
Add ellipse rotation angle to THREE.Path docs.
docs/api/extras/core/Path.html
@@ -1,123 +1,125 @@ -<!DOCTYPE html> -<html lang="en"> - <head> +<!DOCTYPE html> +<html lang="en"> + <head> <meta charset="utf-8" /> - <base href="../../../" /> - <script src="list.js"></script> - <script src="page.js"></script> - <link type="text/css" rel="stylesheet" href="page.css" /> - </head> - <body> -...
false
Other
mrdoob
three.js
c2b42fd10002738f49004d40e017e57636d4c3a2.json
Add ellipse rotation (optional) to THREE.Path. Adds an optional rotation parameter to THREE.Path.ellipse and THREE.Path.absellipse.
src/extras/core/Path.js
@@ -153,24 +153,24 @@ THREE.Path.prototype.arc = function ( aX, aY, aRadius, }; THREE.Path.prototype.ellipse = function ( aX, aY, xRadius, yRadius, - aStartAngle, aEndAngle, aClockwise ) { + aStartAngle, aEndAngle, aClockwise, aRotation ) { var lastargs = this.actions[ this.actions.length -...
false
Other
mrdoob
three.js
e16a8b4a6b4e8595e00bbf2681f18f1d0d0d5d43.json
Add rotation angle to THREE.EllipseCurve docs.
docs/api/extras/curves/EllipseCurve.html
@@ -1,70 +1,73 @@ -<!DOCTYPE html> -<html lang="en"> - <head> +<!DOCTYPE html> +<html lang="en"> + <head> <meta charset="utf-8" /> - <base href="../../../" /> - <script src="list.js"></script> - <script src="page.js"></script> - <link type="text/css" rel="stylesheet" href="page.css" /> - </head> - <body> - ...
false
Other
mrdoob
three.js
26e3f30e387fa5f8d512e45e7865cb82561637f2.json
Add rotation (optional) to THREE.EllipseCurve.
src/extras/curves/EllipseCurve.js
@@ -2,7 +2,7 @@ * Ellipse curve **************************************************************/ -THREE.EllipseCurve = function ( aX, aY, xRadius, yRadius, aStartAngle, aEndAngle, aClockwise ) { +THREE.EllipseCurve = function ( aX, aY, xRadius, yRadius, aStartAngle, aEndAngle, aClockwise, aRotation ) { this.aX...
false
Other
mrdoob
three.js
6e44ac297047fa01382f66eb0cfebc0e3e8bd1c6.json
Add dispose() to WebGLRenderer
src/renderers/WebGLRenderer.js
@@ -183,17 +183,7 @@ THREE.WebGLRenderer = function ( parameters ) { } - _canvas.addEventListener( 'webglcontextlost', function ( event ) { - - event.preventDefault(); - - resetGLState(); - setDefaultGLState(); - - objects.clear(); - properties.clear(); - - }, false ); + _canvas.addEventListener( 'w...
false
Other
mrdoob
three.js
e3604c6e538f138c05e2ca2051b44468ab10d58d.json
fix obvious bugs.
src/animation/AnimationMixer.js
@@ -13,8 +13,7 @@ THREE.AnimationMixer = function( root ) { this.time = 0; this.timeScale = 1.0; this.actions = []; - this.propertyBindings = {}; - this.propertyBindingsArray = []; + this.propertyBindings = []; }; @@ -33,15 +32,20 @@ THREE.AnimationMixer.prototype = { var track = tracks[ i ]; - var...
false
Other
mrdoob
three.js
8bfe403c00b09093bcf7082888696e371671a789.json
Add dispose method to all controls
examples/js/controls/DeviceOrientationControls.js
@@ -88,6 +88,12 @@ THREE.DeviceOrientationControls = function ( object ) { }; + this.dispose = function () { + + this.disconnect(); + + }; + this.connect(); };
true
Other
mrdoob
three.js
8bfe403c00b09093bcf7082888696e371671a789.json
Add dispose method to all controls
examples/js/controls/DragControls.js
@@ -96,6 +96,12 @@ THREE.DragControls = function( _camera, _objects, _domElement ) { }; + this.dispose = function() { + + me.deactivate(); + + }; + this.activate(); function onDocumentMouseMove( event ) {
true
Other
mrdoob
three.js
8bfe403c00b09093bcf7082888696e371671a789.json
Add dispose method to all controls
examples/js/controls/EditorControls.js
@@ -203,11 +203,30 @@ THREE.EditorControls = function ( object, domElement ) { } - domElement.addEventListener( 'contextmenu', function ( event ) { + function contextmenu( event ) { event.preventDefault(); - }, false ); + } + + this.dispose = function() { + + domElement.removeEventListener( 'contextmenu',...
true
Other
mrdoob
three.js
8bfe403c00b09093bcf7082888696e371671a789.json
Add dispose method to all controls
examples/js/controls/FirstPersonControls.js
@@ -253,19 +253,37 @@ THREE.FirstPersonControls = function ( object, domElement ) { }; - - this.domElement.addEventListener( 'contextmenu', function ( event ) { + function contextmenu( event ) { event.preventDefault(); - }, false ); + } + + this.dispose = function() { + + this.domElement.removeEventListen...
true