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
ddff0f642acbf650b53d1ddffe544900569ab983.json
Add comments to FF RGB format fix
examples/js/SimulationRenderer.js
@@ -226,7 +226,7 @@ function SimulationRenderer( WIDTH, renderer ) { } - var texture = new THREE.DataTexture( a, WIDTH, WIDTH, THREE.RGBAFormat, THREE.FloatType ); + var texture = new THREE.DataTexture( a, WIDTH, WIDTH, THREE.RGBAFormat, THREE.FloatType ); // was RGB format. changed to RGBA format. see discuss...
true
Other
mrdoob
three.js
ddff0f642acbf650b53d1ddffe544900569ab983.json
Add comments to FF RGB format fix
examples/js/postprocessing/AdaptiveToneMappingPass.js
@@ -186,7 +186,8 @@ THREE.AdaptiveToneMappingPass.prototype = { this.previousLuminanceRT.dispose(); } - var pars = { minFilter: THREE.LinearFilter, magFilter: THREE.LinearFilter, format: THREE.RGBAFormat }; + + var pars = { minFilter: THREE.LinearFilter, magFilter: THREE.LinearFilter, format: THREE.RGBAForma...
true
Other
mrdoob
three.js
f1bb83627ee8303e8e7495d3ac60cb4bde58b88a.json
Remove example variations_standard2 because now its basically the same as the other without metalness.
examples/webgl_materials_variations_standard2.html
@@ -1,242 +0,0 @@ -<!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; - fon...
false
Other
mrdoob
three.js
4895e177aa5cdb2f41eb5d63a30be609fa60ffe5.json
remove reflectivity from example 'reflectivity' is not a property of mesh standard material
examples/webgl_materials_variations_standard2.html
@@ -105,14 +105,12 @@ for( var beta = 0; beta <= 1.0; beta += stepSize ) { - var reflectivity = beta; - for( var gamma = 0; gamma <= 1.0; gamma += stepSize ) { // basic monochromatic energy preservation var diffuseColor = new THREE.Color( gamma, 0, 0 ).multiplyScalar( 1 - 0.08 );...
false
Other
mrdoob
three.js
807a8ec729c715f6e4008c48c0cd49b0d4e66dbd.json
add error checking to include parser.
src/renderers/webgl/WebGLProgram.js
@@ -197,7 +197,9 @@ THREE.WebGLProgram = ( function () { var pattern = /#include[ \t]+<([\w\d.]+)>/g; function replace( match, include ) { - return parseIncludes( THREE.ShaderChunk[ include ] ); + var replace = THREE.ShaderChunk[ include ]; + if( ! replace ) throw new Error( "can not resolve #include <"+i...
false
Other
mrdoob
three.js
8350e0e49b512b1e437a3b8877aad044fee311f9.json
use glsl files for material vert/frag sahders.
src/renderers/shaders/ShaderLib.js
@@ -19,100 +19,8 @@ THREE.ShaderLib = { ] ), - vertexShader: [ - - '#include <common>', - '#include <uv_pars_vertex>', - '#include <uv2_pars_vertex>', - '#include <envmap_pars_vertex>', - '#include <color_pars_vertex>', - '#include <morphtarget_pars_vertex>', - '#include <skinning_pars_vertex>', -...
true
Other
mrdoob
three.js
8350e0e49b512b1e437a3b8877aad044fee311f9.json
use glsl files for material vert/frag sahders.
src/renderers/shaders/ShaderLib/cube_frag.glsl
@@ -0,0 +1,15 @@ +uniform samplerCube tCube; +uniform float tFlip; + +varying vec3 vWorldPosition; + +#include <common> +#include <logdepthbuf_pars_fragment> + +void main() { + + gl_FragColor = textureCube( tCube, vec3( tFlip * vWorldPosition.x, vWorldPosition.yz ) ); + + #include <logdepthbuf_fragment> + +}
true
Other
mrdoob
three.js
8350e0e49b512b1e437a3b8877aad044fee311f9.json
use glsl files for material vert/frag sahders.
src/renderers/shaders/ShaderLib/cube_vert.glsl
@@ -0,0 +1,14 @@ +varying vec3 vWorldPosition; + +#include <common> +#include <logdepthbuf_pars_vertex> + +void main() { + + vWorldPosition = transformDirection( position, modelMatrix ); + + gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 ); + + #include <logdepthbuf_vertex> + +}
true
Other
mrdoob
three.js
8350e0e49b512b1e437a3b8877aad044fee311f9.json
use glsl files for material vert/frag sahders.
src/renderers/shaders/ShaderLib/depthRGBA_frag.glsl
@@ -0,0 +1,33 @@ +#include <common> +#include <logdepthbuf_pars_fragment> + +vec4 pack_depth( const in float depth ) { + + const vec4 bit_shift = vec4( 256.0 * 256.0 * 256.0, 256.0 * 256.0, 256.0, 1.0 ); + const vec4 bit_mask = vec4( 0.0, 1.0 / 256.0, 1.0 / 256.0, 1.0 / 256.0 ); + vec4 res = mod( depth * bit_shift *...
true
Other
mrdoob
three.js
8350e0e49b512b1e437a3b8877aad044fee311f9.json
use glsl files for material vert/frag sahders.
src/renderers/shaders/ShaderLib/depthRGBA_vert.glsl
@@ -0,0 +1,16 @@ +#include <common> +#include <morphtarget_pars_vertex> +#include <skinning_pars_vertex> +#include <logdepthbuf_pars_vertex> + +void main() { + + #include <skinbase_vertex> + + #include <begin_vertex> + #include <morphtarget_vertex> + #include <skinning_vertex> + #include <project_vertex> + #inclu...
true
Other
mrdoob
three.js
8350e0e49b512b1e437a3b8877aad044fee311f9.json
use glsl files for material vert/frag sahders.
src/renderers/shaders/ShaderLib/depth_frag.glsl
@@ -0,0 +1,25 @@ +uniform float mNear; +uniform float mFar; +uniform float opacity; + +#include <common> +#include <logdepthbuf_pars_fragment> + +void main() { + + #include <logdepthbuf_fragment> + + #ifdef USE_LOGDEPTHBUF_EXT + + float depth = gl_FragDepthEXT / gl_FragCoord.w; + + #else + + float depth = gl_F...
true
Other
mrdoob
three.js
8350e0e49b512b1e437a3b8877aad044fee311f9.json
use glsl files for material vert/frag sahders.
src/renderers/shaders/ShaderLib/depth_vert.glsl
@@ -0,0 +1,12 @@ +#include <common> +#include <morphtarget_pars_vertex> +#include <logdepthbuf_pars_vertex> + +void main() { + + #include <begin_vertex> + #include <morphtarget_vertex> + #include <project_vertex> + #include <logdepthbuf_vertex> + +}
true
Other
mrdoob
three.js
8350e0e49b512b1e437a3b8877aad044fee311f9.json
use glsl files for material vert/frag sahders.
src/renderers/shaders/ShaderLib/distanceRGBA_frag.glsl
@@ -0,0 +1,26 @@ +uniform vec3 lightPos; +varying vec4 vWorldPosition; + +#include <common> + +vec4 pack1K ( float depth ) { + + depth /= 1000.0; + const vec4 bitSh = vec4( 256.0 * 256.0 * 256.0, 256.0 * 256.0, 256.0, 1.0 ); + const vec4 bitMsk = vec4( 0.0, 1.0 / 256.0, 1.0 / 256.0, 1.0 / 256.0 ); + vec4 res = mod(...
true
Other
mrdoob
three.js
8350e0e49b512b1e437a3b8877aad044fee311f9.json
use glsl files for material vert/frag sahders.
src/renderers/shaders/ShaderLib/distanceRGBA_vert.glsl
@@ -0,0 +1,18 @@ +varying vec4 vWorldPosition; + +#include <common> +#include <morphtarget_pars_vertex> +#include <skinning_pars_vertex> + +void main() { + + #include <skinbase_vertex> + #include <begin_vertex> + #include <morphtarget_vertex> + #include <skinning_vertex> + #include <project_vertex> + #include <wo...
true
Other
mrdoob
three.js
8350e0e49b512b1e437a3b8877aad044fee311f9.json
use glsl files for material vert/frag sahders.
src/renderers/shaders/ShaderLib/equirect_frag.glsl
@@ -0,0 +1,20 @@ +uniform sampler2D tEquirect; +uniform float tFlip; + +varying vec3 vWorldPosition; + +#include <common> +#include <logdepthbuf_pars_fragment> + +void main() { + + // gl_FragColor = textureCube( tCube, vec3( tFlip * vWorldPosition.x, vWorldPosition.yz ) ); + vec3 direction = normalize( vWorldPositio...
true
Other
mrdoob
three.js
8350e0e49b512b1e437a3b8877aad044fee311f9.json
use glsl files for material vert/frag sahders.
src/renderers/shaders/ShaderLib/equirect_vert.glsl
@@ -0,0 +1,14 @@ +varying vec3 vWorldPosition; + +#include <common> +#include <logdepthbuf_pars_vertex> + +void main() { + + vWorldPosition = transformDirection( position, modelMatrix ); + + gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 ); + + #include <logdepthbuf_vertex> + +}
true
Other
mrdoob
three.js
8350e0e49b512b1e437a3b8877aad044fee311f9.json
use glsl files for material vert/frag sahders.
src/renderers/shaders/ShaderLib/linedashed_frag.glsl
@@ -0,0 +1,34 @@ +uniform vec3 diffuse; +uniform float opacity; + +uniform float dashSize; +uniform float totalSize; + +varying float vLineDistance; + +#include <common> +#include <color_pars_fragment> +#include <fog_pars_fragment> +#include <logdepthbuf_pars_fragment> + +void main() { + + if ( mod( vLineDistance, tot...
true
Other
mrdoob
three.js
8350e0e49b512b1e437a3b8877aad044fee311f9.json
use glsl files for material vert/frag sahders.
src/renderers/shaders/ShaderLib/linedashed_vert.glsl
@@ -0,0 +1,21 @@ +uniform float scale; +attribute float lineDistance; + +varying float vLineDistance; + +#include <common> +#include <color_pars_vertex> +#include <logdepthbuf_pars_vertex> + +void main() { + + #include <color_vertex> + + vLineDistance = scale * lineDistance; + + vec4 mvPosition = modelViewMatrix * v...
true
Other
mrdoob
three.js
8350e0e49b512b1e437a3b8877aad044fee311f9.json
use glsl files for material vert/frag sahders.
src/renderers/shaders/ShaderLib/meshbasic_frag.glsl
@@ -0,0 +1,49 @@ +uniform vec3 diffuse; +uniform float opacity; + +#ifndef FLAT_SHADED + + varying vec3 vNormal; + +#endif + +#include <common> +#include <color_pars_fragment> +#include <uv_pars_fragment> +#include <uv2_pars_fragment> +#include <map_pars_fragment> +#include <alphamap_pars_fragment> +#include <aomap_pa...
true
Other
mrdoob
three.js
8350e0e49b512b1e437a3b8877aad044fee311f9.json
use glsl files for material vert/frag sahders.
src/renderers/shaders/ShaderLib/meshbasic_vert.glsl
@@ -0,0 +1,35 @@ +#include <common> +#include <uv_pars_vertex> +#include <uv2_pars_vertex> +#include <envmap_pars_vertex> +#include <color_pars_vertex> +#include <morphtarget_pars_vertex> +#include <skinning_pars_vertex> +#include <logdepthbuf_pars_vertex> + +void main() { + + #include <uv_vertex> + #include <uv2_ver...
true
Other
mrdoob
three.js
8350e0e49b512b1e437a3b8877aad044fee311f9.json
use glsl files for material vert/frag sahders.
src/renderers/shaders/ShaderLib/meshlambert_frag.glsl
@@ -0,0 +1,78 @@ +uniform vec3 diffuse; +uniform vec3 emissive; +uniform float opacity; + +varying vec3 vLightFront; + +#ifdef DOUBLE_SIDED + + varying vec3 vLightBack; + +#endif + +#include <common> +#include <color_pars_fragment> +#include <uv_pars_fragment> +#include <uv2_pars_fragment> +#include <map_pars_fragment...
true
Other
mrdoob
three.js
8350e0e49b512b1e437a3b8877aad044fee311f9.json
use glsl files for material vert/frag sahders.
src/renderers/shaders/ShaderLib/meshlambert_vert.glsl
@@ -0,0 +1,46 @@ +#define LAMBERT + +varying vec3 vLightFront; + +#ifdef DOUBLE_SIDED + + varying vec3 vLightBack; + +#endif + +#include <common> +#include <uv_pars_vertex> +#include <uv2_pars_vertex> +#include <envmap_pars_vertex> +#include <bsdfs> +#include <lights_pars> +#include <color_pars_vertex> +#include <morp...
true
Other
mrdoob
three.js
8350e0e49b512b1e437a3b8877aad044fee311f9.json
use glsl files for material vert/frag sahders.
src/renderers/shaders/ShaderLib/meshphong_frag.glsl
@@ -0,0 +1,61 @@ +#define PHONG + +uniform vec3 diffuse; +uniform vec3 emissive; +uniform vec3 specular; +uniform float shininess; +uniform float opacity; + +#include <common> +#include <color_pars_fragment> +#include <uv_pars_fragment> +#include <uv2_pars_fragment> +#include <map_pars_fragment> +#include <alphamap_par...
true
Other
mrdoob
three.js
8350e0e49b512b1e437a3b8877aad044fee311f9.json
use glsl files for material vert/frag sahders.
src/renderers/shaders/ShaderLib/meshphong_vert.glsl
@@ -0,0 +1,55 @@ +#define PHONG + +varying vec3 vViewPosition; + +#ifndef FLAT_SHADED + + varying vec3 vNormal; + +#endif + +#include <common> +#include <uv_pars_vertex> +#include <uv2_pars_vertex> +#include <displacementmap_pars_vertex> +#include <envmap_pars_vertex> +#include <lights_phong_pars_vertex> +#include <co...
true
Other
mrdoob
three.js
8350e0e49b512b1e437a3b8877aad044fee311f9.json
use glsl files for material vert/frag sahders.
src/renderers/shaders/ShaderLib/normal_frag.glsl
@@ -0,0 +1,13 @@ +uniform float opacity; +varying vec3 vNormal; + +#include <common> +#include <logdepthbuf_pars_fragment> + +void main() { + + gl_FragColor = vec4( 0.5 * normalize( vNormal ) + 0.5, opacity ); + + #include <logdepthbuf_fragment> + +}
true
Other
mrdoob
three.js
8350e0e49b512b1e437a3b8877aad044fee311f9.json
use glsl files for material vert/frag sahders.
src/renderers/shaders/ShaderLib/normal_vert.glsl
@@ -0,0 +1,16 @@ +varying vec3 vNormal; + +#include <common> +#include <morphtarget_pars_vertex> +#include <logdepthbuf_pars_vertex> + +void main() { + + vNormal = normalize( normalMatrix * normal ); + + #include <begin_vertex> + #include <morphtarget_vertex> + #include <project_vertex> + #include <logdepthbuf_ver...
true
Other
mrdoob
three.js
8350e0e49b512b1e437a3b8877aad044fee311f9.json
use glsl files for material vert/frag sahders.
src/renderers/shaders/ShaderLib/points_frag.glsl
@@ -0,0 +1,27 @@ +uniform vec3 diffuse; +uniform float opacity; + +#include <common> +#include <color_pars_fragment> +#include <map_particle_pars_fragment> +#include <fog_pars_fragment> +#include <shadowmap_pars_fragment> +#include <logdepthbuf_pars_fragment> + +void main() { + + vec3 outgoingLight = vec3( 0.0 ); + v...
true
Other
mrdoob
three.js
8350e0e49b512b1e437a3b8877aad044fee311f9.json
use glsl files for material vert/frag sahders.
src/renderers/shaders/ShaderLib/points_vert.glsl
@@ -0,0 +1,25 @@ +uniform float size; +uniform float scale; + +#include <common> +#include <color_pars_vertex> +#include <shadowmap_pars_vertex> +#include <logdepthbuf_pars_vertex> + +void main() { + + #include <color_vertex> + #include <begin_vertex> + #include <project_vertex> + + #ifdef USE_SIZEATTENUATION + ...
true
Other
mrdoob
three.js
8350e0e49b512b1e437a3b8877aad044fee311f9.json
use glsl files for material vert/frag sahders.
src/renderers/webgl/WebGLProgram.js
@@ -194,11 +194,10 @@ THREE.WebGLProgram = ( function () { function parseIncludes( string ) { - var pattern = /#include +<([\w\d.]+)>/g; + var pattern = /#include[ \t]+<([\w\d.]+)>/g; function replace( match, include ) { - - return THREE.ShaderChunk[ include ]; + return parseIncludes( THREE.ShaderChunk...
true
Other
mrdoob
three.js
8350e0e49b512b1e437a3b8877aad044fee311f9.json
use glsl files for material vert/frag sahders.
utils/build/includes/common.json
@@ -193,8 +193,30 @@ "src/renderers/shaders/ShaderChunk/worldpos_vertex.glsl", "src/renderers/shaders/UniformsUtils.js", "src/renderers/shaders/UniformsLib.js", - "src/renderers/shaders/ShaderLib/meshstandard_vert.glsl", + "src/renderers/shaders/ShaderLib/cube_frag.glsl", + "src/renderers/shaders/ShaderLib/cube_v...
true
Other
mrdoob
three.js
7fb2830beb15f6d52b81f37a512f7b4276b5f2f4.json
remove envMap encoding macro.
src/renderers/shaders/ShaderChunk/envmap_pars_fragment.glsl
@@ -11,12 +11,6 @@ #endif uniform float flipEnvMap; - vec4 envMapTexelToLinear( vec4 value ) { - #define MACRO_DECODE ENVMAP_ENCODING - #include <encoding_template> - #undef MACRO_DECODE - } - #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( STANDARD ) uniform floa...
false
Other
mrdoob
three.js
fbf78109160127c66a124e829b59ca702f73fecf.json
fix skin+morph and timeScale (#9156)
examples/js/loaders/sea3d/SEA3DLoader.js
@@ -569,7 +569,7 @@ THREE.SEA3D.Animator.prototype.getTimeScale = function() { THREE.SEA3D.Animator.prototype.updateTimeScale = function() { - this.currentAnimationAction.setEffectiveTimeScale( this.timeScale * ( this.currentAnimation ? this.currentAnimation.timeScale : 1 ) ); + this.mixer.timeScale = this.timeSca...
false
Other
mrdoob
three.js
e62a212bcd32fa063bd6a03746ba9a3b7213a9a7.json
Fix Sky Shader on Android/S6 (#8382) (#8614) * Fix Sky Shader on Android/S6 (#8382) `exp(n)` does not return the correct value, so I replaced it with `pow(e, n)`. * Editor: Include VRControls/VREffect when needed. * Editor: Workaround for Storage not being ready in time. * Editor: Fixed edit button. * A...
examples/js/SkyShader.js
@@ -126,7 +126,10 @@ THREE.ShaderLib[ 'sky' ] = { "float sunIntensity(float zenithAngleCos)", "{", - "return EE * max(0.0, 1.0 - exp(-((cutoffAngle - acos(zenithAngleCos))/steepness)));", + // This function originally used `exp(n)`, but it returns an incorrect value + // on Samsung S6 phones. So it has been...
false
Other
mrdoob
three.js
a889569d4fce1ce6a49d7b1f40502168f6f9139a.json
support texture coordinates in ply parser (#9121)
examples/js/loaders/PLYLoader.js
@@ -346,20 +346,41 @@ THREE.PLYLoader.prototype = { } else if ( elementName === "face" ) { var vertex_indices = element.vertex_indices; + var texcoord = element.texcoord; if ( vertex_indices.length === 3 ) { geometry.faces.push( new THREE.Face3( vertex_indices[ 0 ], vertex_indices[ 1...
false
Other
mrdoob
three.js
5059d33b6fd73d6af9840aec93b4bdf0104d9db9.json
add stencil properties to material
src/loaders/Loader.js
@@ -229,6 +229,8 @@ THREE.Loader.prototype = { break; case 'depthTest': case 'depthWrite': + case 'stencilTest': + case 'stencilWrite': case 'colorWrite': case 'opacity': case 'reflectivity':
true
Other
mrdoob
three.js
5059d33b6fd73d6af9840aec93b4bdf0104d9db9.json
add stencil properties to material
src/loaders/MaterialLoader.js
@@ -70,6 +70,8 @@ THREE.MaterialLoader.prototype = { if ( json.alphaTest !== undefined ) material.alphaTest = json.alphaTest; if ( json.depthTest !== undefined ) material.depthTest = json.depthTest; if ( json.depthWrite !== undefined ) material.depthWrite = json.depthWrite; + if ( json.stencilTest !== undefin...
true
Other
mrdoob
three.js
5059d33b6fd73d6af9840aec93b4bdf0104d9db9.json
add stencil properties to material
src/materials/Material.js
@@ -30,6 +30,9 @@ THREE.Material = function () { this.depthTest = true; this.depthWrite = true; + this.stencilTest = false; + this.stencilWrite = false; + this.colorWrite = true; this.precision = null; // override the renderer's default precision for this material @@ -257,6 +260,9 @@ THREE.Material.prototyp...
true
Other
mrdoob
three.js
5059d33b6fd73d6af9840aec93b4bdf0104d9db9.json
add stencil properties to material
src/renderers/WebGLRenderer.js
@@ -1191,10 +1191,12 @@ THREE.WebGLRenderer = function ( parameters ) { } - // Ensure depth buffer writing is enabled so it can be cleared on next render + // Ensure buffer writing is enabled so they can be cleared on next render state.setDepthTest( true ); state.setDepthWrite( true ); + state.setSten...
true
Other
mrdoob
three.js
5059d33b6fd73d6af9840aec93b4bdf0104d9db9.json
add stencil properties to material
src/renderers/webgl/WebGLState.js
@@ -627,6 +627,7 @@ THREE.WebGLState = function ( gl, extensions, paramThreeToGL ) { currentBlending = null; currentDepthWrite = null; + currentStencilWrite = null; currentColorWrite = null; currentFlipSided = null;
true
Other
mrdoob
three.js
40a7b6fbe489bd131b3955779afb5500f0aae01f.json
add colorWrite support to loaders
src/loaders/Loader.js
@@ -229,6 +229,7 @@ THREE.Loader.prototype = { break; case 'depthTest': case 'depthWrite': + case 'colorWrite': case 'opacity': case 'reflectivity': case 'transparent':
true
Other
mrdoob
three.js
40a7b6fbe489bd131b3955779afb5500f0aae01f.json
add colorWrite support to loaders
src/loaders/MaterialLoader.js
@@ -70,6 +70,7 @@ THREE.MaterialLoader.prototype = { if ( json.alphaTest !== undefined ) material.alphaTest = json.alphaTest; if ( json.depthTest !== undefined ) material.depthTest = json.depthTest; if ( json.depthWrite !== undefined ) material.depthWrite = json.depthWrite; + if ( json.colorWrite !== undefine...
true
Other
mrdoob
three.js
4847d475f77e3435e9ca95c1ce2a122d6d6c5355.json
add colorWrite to material copy method
src/materials/Material.js
@@ -257,6 +257,8 @@ THREE.Material.prototype = { this.depthTest = source.depthTest; this.depthWrite = source.depthWrite; + this.colorWrite = source.colorWrite; + this.precision = source.precision; this.polygonOffset = source.polygonOffset;
false
Other
mrdoob
three.js
501f2da27291d3244e184bc837953c03e18bf111.json
Optimize Outline rendering of MMD (#9472) * Optimize Outline rendering of MMD * Use Layers instead of visible for MMDHelper.renderOutline() optimization
examples/js/loaders/MMDLoader.js
@@ -4034,6 +4034,12 @@ THREE.MMDHelper.prototype = { add: function ( mesh ) { + if ( ! ( mesh instanceof THREE.SkinnedMesh ) ) { + + throw new Error( 'THREE.MMDHelper.add() accepts only THREE.SkinnedMesh instance.' ); + + } + mesh.mixer = null; mesh.ikSolver = null; mesh.grantSolver = null; @@ -4378,...
false
Other
mrdoob
three.js
9889425cf33bf29796e9ffd1f80a1b8a7cc43304.json
Change Line for LineSegments in ObjLoader (#9533)
examples/js/loaders/OBJLoader.js
@@ -696,11 +696,11 @@ THREE.OBJLoader.prototype = { } var multiMaterial = new THREE.MultiMaterial( createdMaterials ); - mesh = ( ! isLine ? new THREE.Mesh( buffergeometry, multiMaterial ) : new THREE.Line( buffergeometry, multiMaterial ) ); + mesh = ( ! isLine ? new THREE.Mesh( buffergeometry, multiM...
false
Other
mrdoob
three.js
4f2f70ece3cbc2e4286a0cd57674513332a99137.json
reduce code bulk, still the darkening bug.
examples/js/postprocessing/MSAAPass.js
@@ -7,15 +7,6 @@ THREE.MSAAPass = function ( scene, camera, params, clearColor, clearAlpha ) { this.scene = scene; this.camera = camera; - // any set of samples in equal area weighting pattern is fine (3 or +4 samples would also work as well) - this.sampleOffsets = []; - this.sampleOffsets[0] = null; - this...
true
Other
mrdoob
three.js
4f2f70ece3cbc2e4286a0cd57674513332a99137.json
reduce code bulk, still the darkening bug.
examples/webgl_postprocessing_msaa.html
@@ -48,8 +48,6 @@ renderer.setSize( window.innerWidth, window.innerHeight ); document.body.appendChild( renderer.domElement ); - // - camera = new THREE.PerspectiveCamera( 70, window.innerWidth / window.innerHeight, 1, 1000 ); camera.position.z = 400; @@ -66,10 +64,9 @@ // postprocessing...
true
Other
mrdoob
three.js
1b5eeee7ec2b3ada3783ef3977cb8a5a50638809.json
add links to helpful websites.
src/renderers/shaders/ShaderChunk/encodings.glsl
@@ -1,3 +1,5 @@ +// For a discussion of what this is, please read this: http://lousodrome.net/blog/light/2013/05/26/gamma-correct-and-hdr-rendering-in-a-32-bits-buffer/ + // These encodings should have the same integer values as THREE.Linear, THREE.sRGB, etc... #define ENCODING_Linear 3000 #define ENCODING_sRGB 30...
false
Other
mrdoob
three.js
86c290a276d22f6dc4ec03b0e5a8c13e2e36ae74.json
fix resize window
examples/webgl_postprocessing.html
@@ -97,6 +97,7 @@ camera.updateProjectionMatrix(); renderer.setSize( window.innerWidth, window.innerHeight ); + composer.setSize( window.innerWidth, window.innerHeight ); }
true
Other
mrdoob
three.js
86c290a276d22f6dc4ec03b0e5a8c13e2e36ae74.json
fix resize window
examples/webgl_postprocessing_glitch.html
@@ -120,6 +120,7 @@ camera.updateProjectionMatrix(); renderer.setSize( window.innerWidth, window.innerHeight ); + composer.setSize( window.innerWidth, window.innerHeight ); }
true
Other
mrdoob
three.js
cb908242866321e223ccd473d38657382a8e2909.json
add implicit declaration
examples/js/postprocessing/ShaderPass.js
@@ -2,20 +2,31 @@ * @author alteredq / http://alteredqualia.com/ */ -THREE.ShaderPass = function ( shader, textureID ) { +THREE.ShaderPass = function( shader, textureID ) { this.textureID = ( textureID !== undefined ) ? textureID : "tDiffuse"; - this.uniforms = THREE.UniformsUtils.clone( shader.uniforms ); ...
false
Other
mrdoob
three.js
42a9faa1242f5440c71c34570e6437c8c6d92028.json
add time scale
examples/js/materials/nodes/utils/TimeNode.js
@@ -7,6 +7,7 @@ THREE.TimeNode = function( value ) { THREE.FloatNode.call( this, value ); this.requestUpdate = true; + this.scale = 1; }; @@ -15,6 +16,6 @@ THREE.TimeNode.prototype.constructor = THREE.TimeNode; THREE.TimeNode.prototype.updateAnimation = function( delta ) { - this.number += delta; + this...
false
Other
mrdoob
three.js
02ee56a8174ff65b777209cf3135123b05646441.json
fix caustic projection
examples/webgl_materials_nodes.html
@@ -1025,10 +1025,9 @@ var worldPos = new THREE.PositionNode( THREE.PositionNode.WORLD ); var worldPosTop = new THREE.SwitchNode( worldPos, 'xz' ); - var pos = new THREE.PositionNode( THREE.PositionNode.WORLD ); - var posNorm = new THREE.Math1Node( pos, THREE.Math1Node.NORMALIZE ); + var world...
false
Other
mrdoob
three.js
7b8aad6fded9cbb716b7225b024e26ab612f0251.json
allow redefine nodes dynamically
examples/js/materials/nodes/ConstNode.js
@@ -4,12 +4,28 @@ THREE.ConstNode = function( name, useDefine ) { - name = name || THREE.ConstNode.PI; + THREE.TempNode.call( this ); - var rDeclaration = /^([a-z_0-9]+)\s([a-z_0-9]+)\s?\=(.*?)\;/i; - var type = 'fv1'; + this.parse( name || THREE.ConstNode.PI, useDefine ); + +}; + +THREE.ConstNode.prototype = Ob...
true
Other
mrdoob
three.js
7b8aad6fded9cbb716b7225b024e26ab612f0251.json
allow redefine nodes dynamically
examples/js/materials/nodes/accessors/CameraNode.js
@@ -6,9 +6,34 @@ THREE.CameraNode = function( scope, camera ) { THREE.TempNode.call( this, 'v3' ); - this.scope = scope || THREE.CameraNode.POSITION; + this.setScope( scope || THREE.CameraNode.POSITION ); this.camera = camera; + this.requestUpdate = this.camera !== undefined; + +}; + +THREE.CameraNode.prototy...
true
Other
mrdoob
three.js
a1f61d30070ea13ff7b4446765ad0f46b2069b9a.json
add comment for texture transparency detection
examples/js/loaders/MMDLoader.js
@@ -2200,6 +2200,7 @@ THREE.MMDLoader.prototype.createMesh = function ( model, texturePath, onProgress if ( m.map !== null ) { + // Check if this part of the texture image the material uses requires transparency function checkTextureTransparency ( m ) { m.map.readyCallbacks.push( function ( t ) ...
false
Other
mrdoob
three.js
bbb6c648ee73c8d36f00d2838f82b5041f49ca4c.json
remove unused shareDepthFrom
docs/api/renderers/WebGLRenderTarget.html
@@ -88,11 +88,6 @@ <h3>[property:boolean generateMipmaps]</h3> Whether to generate mipmaps (if possible) for a texture. True by default. </div> - <h3>[property:WebGLRenderTarget shareDepthFrom]</h3> - <div> - Shares the depth from another WebGLRenderTarget. Default is null. - </div> - <h2>Methods</h2...
true
Other
mrdoob
three.js
bbb6c648ee73c8d36f00d2838f82b5041f49ca4c.json
remove unused shareDepthFrom
editor/js/libs/tern-threejs/threejs.js
@@ -5292,10 +5292,6 @@ "!type": "boolean", "!doc": "Whether to generate mipmaps (if possible) for a texture. True by default." }, - "shareDepthFrom": { - "!type": "+THREE.WebGLRenderTarget", - "!doc": "Shares the depth from another WebGLRenderTarget. Default is nu...
true
Other
mrdoob
three.js
bbb6c648ee73c8d36f00d2838f82b5041f49ca4c.json
remove unused shareDepthFrom
src/renderers/WebGLRenderTarget.js
@@ -70,8 +70,6 @@ THREE.WebGLRenderTarget.prototype = { this.depthBuffer = source.depthBuffer; this.stencilBuffer = source.stencilBuffer; - this.shareDepthFrom = source.shareDepthFrom; - return this; },
true
Other
mrdoob
three.js
48566c27fe5365ced395499412f24a0e6ad8d110.json
add PMREM to materials_standard.
examples/webgl_materials_standard.html
@@ -51,6 +51,12 @@ <script src="js/controls/TrackballControls.js"></script> <script src="js/loaders/OBJLoader.js"></script> + <script src="js/loaders/RGBELoader.js"></script> + <script src="js/loaders/HDRCubeTextureLoader.js"></script> + <script src="js/Half.js"></script> + <script src="js/Encodings.js"></s...
false
Other
mrdoob
three.js
6af12202b1c42ed71ba5071db64d8fdcfa40e207.json
add max(... EPSILON) to new G_GGX_SmithCorrelated
src/renderers/shaders/ShaderChunk/bsdfs.glsl
@@ -75,7 +75,7 @@ float G_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const i float gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) ); float gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) ); - return 0.5 / ( gv + gl ); + return 0.5 / max( gv + gl, EPSILON ); }
false
Other
mrdoob
three.js
2c1a73cee6883b8a99033a84ce6cb36dde630a6a.json
add comment based on WestLangley's suggestion.
src/renderers/shaders/ShaderChunk/bsdfs.glsl
@@ -71,6 +71,7 @@ float G_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const i float a2 = pow2( alpha ); + // dotNL and dotNV are explicitly swapped. This is not a mistake. float gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) ); float gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotN...
false
Other
mrdoob
three.js
de61a95cefa648f74bdc807b593149d4cb9bdde4.json
Reset texture state
src/renderers/webgl/WebGLState.js
@@ -668,6 +668,9 @@ THREE.WebGLState = function ( gl, extensions, paramThreeToGL ) { compressedTextureFormats = null; + currentTextureSlot = undefined; + currentBoundTextures = {}; + currentBlending = null; currentColorWrite = null;
false
Other
mrdoob
three.js
b2e731425307118723462af04c3c09a5657f77ba.json
fix sRGB encoding, missing constant.
src/renderers/shaders/ShaderChunk/encodings_pars_fragment.glsl
@@ -15,7 +15,7 @@ vec4 sRGBToLinear( in vec4 value ) { return vec4( mix( pow( value.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), value.rgb * 0.0773993808, vec3( lessThanEqual( value.rgb, vec3( 0.04045 ) ) ) ), value.w ); } vec4 LinearTosRGB( in vec4 value ) { - return vec4( mix( pow( value.rgb, vec3(...
false
Other
mrdoob
three.js
dfd876dff214710fedd3ccc4147cf56cd13c9f32.json
finer grain timing.
examples/canvas_ascii_effect.html
@@ -116,8 +116,9 @@ requestAnimationFrame( animate ); + stats.begin(); render(); - stats.update(); + stats.end(); }
true
Other
mrdoob
three.js
dfd876dff214710fedd3ccc4147cf56cd13c9f32.json
finer grain timing.
examples/canvas_camera_orthographic.html
@@ -145,8 +145,9 @@ requestAnimationFrame( animate ); + stats.begin(); render(); - stats.update(); + stats.end(); }
true
Other
mrdoob
three.js
dfd876dff214710fedd3ccc4147cf56cd13c9f32.json
finer grain timing.
examples/canvas_camera_orthographic2.html
@@ -208,8 +208,9 @@ requestAnimationFrame( animate ); + stats.begin(); render(); - stats.update(); + stats.end(); }
true
Other
mrdoob
three.js
dfd876dff214710fedd3ccc4147cf56cd13c9f32.json
finer grain timing.
examples/canvas_geometry_birds.html
@@ -420,8 +420,9 @@ requestAnimationFrame( animate ); + stats.begin(); render(); - stats.update(); + stats.end(); }
true
Other
mrdoob
three.js
dfd876dff214710fedd3ccc4147cf56cd13c9f32.json
finer grain timing.
examples/canvas_geometry_cube.html
@@ -193,8 +193,9 @@ requestAnimationFrame( animate ); + stats.begin(); render(); - stats.update(); + stats.end(); }
true
Other
mrdoob
three.js
dfd876dff214710fedd3ccc4147cf56cd13c9f32.json
finer grain timing.
examples/webgl_animation_skinning_blending.html
@@ -235,6 +235,8 @@ requestAnimationFrame( animate, renderer.domElement ); + stats.begin(); + // step forward in time based on whether we're stepping and scale var scale = gui.getTimeScale(); @@ -248,7 +250,7 @@ gui.update( blendMesh.mixer.time ); renderer.render( scene, camera ); - ...
true
Other
mrdoob
three.js
dfd876dff214710fedd3ccc4147cf56cd13c9f32.json
finer grain timing.
examples/webgl_animation_skinning_morph.html
@@ -635,8 +635,9 @@ requestAnimationFrame( animate ); + stats.begin(); render(); - stats.update(); + stats.end(); if ( showMemInfo ) {
true
Other
mrdoob
three.js
dfd876dff214710fedd3ccc4147cf56cd13c9f32.json
finer grain timing.
examples/webgl_materials_displacementmap.html
@@ -284,9 +284,9 @@ controls.update(); + stats.begin(); render(); - - stats.update(); + stats.end(); }
true
Other
mrdoob
three.js
dfd876dff214710fedd3ccc4147cf56cd13c9f32.json
finer grain timing.
examples/webgl_materials_envmaps_hdr.html
@@ -257,8 +257,9 @@ requestAnimationFrame( animate ); + stats.begin(); render(); - stats.update(); + stats.end(); }
true
Other
mrdoob
three.js
dfd876dff214710fedd3ccc4147cf56cd13c9f32.json
finer grain timing.
examples/webgl_materials_texture_manualmipmap.html
@@ -240,8 +240,9 @@ requestAnimationFrame( animate ); + stats.begin(); render(); - stats.update(); + stats.end(); }
true
Other
mrdoob
three.js
dfd876dff214710fedd3ccc4147cf56cd13c9f32.json
finer grain timing.
examples/webgl_materials_transparency.html
@@ -214,8 +214,9 @@ requestAnimationFrame( animate ); + stats.begin(); render(); - stats.update(); + stats.end(); }
true
Other
mrdoob
three.js
dfd876dff214710fedd3ccc4147cf56cd13c9f32.json
finer grain timing.
examples/webgl_materials_variations_phong.html
@@ -215,8 +215,9 @@ requestAnimationFrame( animate ); + stats.begin(); render(); - stats.update(); + stats.end(); }
true
Other
mrdoob
three.js
dfd876dff214710fedd3ccc4147cf56cd13c9f32.json
finer grain timing.
examples/webgl_postprocessing_advanced.html
@@ -359,8 +359,9 @@ requestAnimationFrame( animate ); + stats.begin(); render(); - stats.update(); + stats.end(); }
true
Other
mrdoob
three.js
dfd876dff214710fedd3ccc4147cf56cd13c9f32.json
finer grain timing.
examples/webgl_postprocessing_dof.html
@@ -278,8 +278,9 @@ requestAnimationFrame( animate, renderer.domElement ); + stats.begin(); render(); - stats.update(); + stats.end(); }
true
Other
mrdoob
three.js
dfd876dff214710fedd3ccc4147cf56cd13c9f32.json
finer grain timing.
examples/webgl_postprocessing_godrays.html
@@ -255,8 +255,9 @@ requestAnimationFrame( animate, renderer.domElement ); + stats.begin(); render(); - stats.update(); + stats.end(); }
true
Other
mrdoob
three.js
dfd876dff214710fedd3ccc4147cf56cd13c9f32.json
finer grain timing.
examples/webgl_postprocessing_msaa.html
@@ -164,6 +164,8 @@ requestAnimationFrame( animate ); + stats.begin(); + for ( var i = 0; i < scene.children.length; i ++ ) { var child = scene.children[ i ]; @@ -174,8 +176,7 @@ } composer.render(); - - stats.update(); + stats.end(); }
true
Other
mrdoob
three.js
dfd876dff214710fedd3ccc4147cf56cd13c9f32.json
finer grain timing.
examples/webgl_postprocessing_smaa.html
@@ -108,6 +108,8 @@ requestAnimationFrame( animate ); + stats.begin(); + for ( var i = 0; i < scene.children.length; i ++ ) { var child = scene.children[ i ]; @@ -119,7 +121,7 @@ composer.render(); - stats.update(); + stats.end(); }
true
Other
mrdoob
three.js
dfd876dff214710fedd3ccc4147cf56cd13c9f32.json
finer grain timing.
examples/webgl_postprocessing_ssao.html
@@ -191,8 +191,9 @@ function animate() { requestAnimationFrame( animate ); + stats.begin(); render(); - stats.update(); + stats.end(); } function render() {
true
Other
mrdoob
three.js
dfd876dff214710fedd3ccc4147cf56cd13c9f32.json
finer grain timing.
examples/webgl_shading_physical.html
@@ -429,8 +429,9 @@ requestAnimationFrame( animate ); + stats.begin(); render(); - stats.update(); + stats.end(); }
true
Other
mrdoob
three.js
dfd876dff214710fedd3ccc4147cf56cd13c9f32.json
finer grain timing.
examples/webgl_shadowmap_performance.html
@@ -369,8 +369,9 @@ requestAnimationFrame( animate ); + stats.begin(); render(); - stats.update(); + stats.end(); }
true
Other
mrdoob
three.js
dfd876dff214710fedd3ccc4147cf56cd13c9f32.json
finer grain timing.
examples/webgl_tonemapping.html
@@ -252,8 +252,9 @@ requestAnimationFrame( animate ); + stats.begin(); render(); - stats.update(); + stats.end(); }
true
Other
mrdoob
three.js
f053a9268ce175aeccdbb67d9fe0dbc4a864597a.json
add comments to PMREM generator and packer.
examples/js/pmrem/PMREMCubeUVPacker.js
@@ -1,6 +1,16 @@ /** * @author Prashant Sharma / spidersharma03 * @author Ben Houston / bhouston, https://clara.io + * + * This class takes the cube lods(corresponding to different roughness values), and creates a single cubeUV + * Texture. The format for a given roughness set of faces is simply:: + * +X+Y+Z + * -...
true
Other
mrdoob
three.js
f053a9268ce175aeccdbb67d9fe0dbc4a864597a.json
add comments to PMREM generator and packer.
examples/js/pmrem/PMREMGenerator.js
@@ -1,6 +1,14 @@ /** * @author Prashant Sharma / spidersharma03 * @author Ben Houston / bhouston, https://clara.io + * + * To avoid cube map seams, I create an extra pixel around each face. This way when the cube map is + * sampled by an application later(with a little care by sampling the centre of the texel), th...
true
Other
mrdoob
three.js
8d5203fd2f43235c23e0d059b802e207cce69fa8.json
prevent NaN values in .normalizeNormals
src/core/BufferGeometry.js
@@ -818,9 +818,13 @@ THREE.BufferGeometry.prototype = { n = 1.0 / Math.sqrt( x * x + y * y + z * z ); - normals[ i ] *= n; - normals[ i + 1 ] *= n; - normals[ i + 2 ] *= n; + if( isFinite( n ) ) { + + normals[ i ] *= n; + normals[ i + 1 ] *= n; + normals[ i + 2 ] *= n; + + } }
false
Other
mrdoob
three.js
b1c0f302710766d0ac7610891c6809e80cddbc24.json
adopt setFromMatrixColumn in orbit controls.
examples/js/controls/OrbitControls.js
@@ -295,11 +295,7 @@ THREE.OrbitControls = function ( object, domElement ) { return function panLeft( distance, objectMatrix ) { - var te = objectMatrix.elements; - - // get X column of objectMatrix - v.set( te[ 0 ], te[ 1 ], te[ 2 ] ); - + v.setFromMatrixColumn( 0, objectMatrix ); // get X column of obj...
false
Other
mrdoob
three.js
89b3d0babe1ce013d2cec1b12f2f6e2ec890e96d.json
Normalize all line endings in an OBJ file (#9633) `String.prototype.replace` only targets and replaces the first occurrence of a string. By using a regex with the global flag, all instances of a pattern are replaced.
examples/js/loaders/OBJLoader.js
@@ -412,7 +412,7 @@ THREE.OBJLoader.prototype = { if ( text.indexOf( '\r\n' ) !== - 1 ) { // This is faster than String.split with regex that splits on both - text = text.replace( '\r\n', '\n' ); + text = text.replace( /\r\n/g, '\n' ); }
false
Other
mrdoob
three.js
10adc957a6c52fa6e49495d31f7fcddf0f25e9b9.json
Add rollup-watch to dev dependencies (#9404) * Add rollup-watch to dev dependencies * Remove chokidar-cli from devDependencies - fixes #9598
package.json
@@ -21,7 +21,7 @@ }, "scripts": { "build": "rollup -c", - "build-uglify": "rollup -c && uglifyjs build/three.js -cm --preamble \"\/\/ threejs.org\/license\" > build/three.min.js", + "build-uglify": "rollup -c && uglifyjs build/three.js -cm --preamble \"// threejs.org/license\" > build/three.min.js", ...
false
Other
mrdoob
three.js
e82196998409070d137fb978a5670661e53ac21b.json
Update Mesh.html (#9601) morphTargetForcedOrder has removed in r80 version
docs/api/objects/Mesh.html
@@ -80,7 +80,6 @@ <h3>[method:Integer getMorphTargetIndexByName]( [page:String name] )</h3> <h3>[method:null updateMorphTargets]()</h3> <div> Updates the morphtargets to have no influence on the object. Resets the - [page:Mesh.morphTargetForcedOrder morphTargetForcedOrder], [page:Mesh.morphTargetInfluences...
false
Other
mrdoob
three.js
7714fe8f6dec8fd3ecfa0266c2c4a8ef0e9f61c7.json
Avoid implicit keyframe trimming. (#9595)
src/animation/AnimationClip.js
@@ -28,9 +28,6 @@ function AnimationClip( name, duration, tracks ) { } - // maybe only do these on demand, as doing them here could potentially slow down loading - // but leaving these here during development as this ensures a lot of testing of these functions - this.trim(); this.optimize(); }
false
Other
mrdoob
three.js
aaaa526bc49351794e20da2940f48825d2f0c053.json
add standard define (#9596)
examples/js/nodes/materials/StandardNode.js
@@ -20,6 +20,7 @@ THREE.StandardNode.prototype.build = function( builder ) { var material = builder.material; var code; + material.define( 'STANDARD' ); material.define( 'PHYSICAL' ); material.define( 'ALPHATEST', '0.0' );
false
Other
mrdoob
three.js
61bbbfa3d1165b17a40167f57c0ea9c9e4b36a70.json
Avoid accidental removal of last keyframe. (#9592) Fixes #9056.
src/animation/KeyframeTrackPrototype.js
@@ -269,9 +269,12 @@ KeyframeTrackPrototype = { values = this.values, stride = this.getValueSize(), - writeIndex = 1; + smoothInterpolation = this.getInterpolation() === InterpolateSmooth, - for( var i = 1, n = times.length - 1; i <= n; ++ i ) { + writeIndex = 1, + lastIndex = times.length - 1; + +...
false
Other
mrdoob
three.js
7e668e1cb853a528c2bb2559fba18d06c996de37.json
Add files via upload (#9588)
editor/js/Menubar.View.js
@@ -29,7 +29,7 @@ Menubar.View = function ( editor ) { } else { - alert( 'WebVR nor available' ); + alert( 'WebVR not available' ); }
false
Other
mrdoob
three.js
272607c803e635558fc02e42ca298473a415540f.json
Update dat.gui (#9639) dat.gui had an issue where if you call .listen() on dropdown controls they don't work in Chrome on OSX You can see an example here http://threejs.org/examples/webgl_postprocessing_ssao.html On Chrome OSX try to change the renderMode There are 2 fixes. One is to remove the call to `lis...
examples/js/libs/dat.gui.min.js
@@ -10,85 +10,5 @@ * * http://www.apache.org/licenses/LICENSE-2.0 */ -var dat=dat||{};dat.gui=dat.gui||{};dat.utils=dat.utils||{};dat.controllers=dat.controllers||{};dat.dom=dat.dom||{};dat.color=dat.color||{};dat.utils.css=function(){return{load:function(e,a){var a=a||document,c=a.createElement("link");c.type="t...
false
Other
mrdoob
three.js
448423a55b60603db63acee0701062a81958d60e.json
view source support (#9225) Revive "view-source" support and add a catch and try statement if "view-source" is not available. Note: the relative path on view-source is not working, it has to be a full url for it to work...
examples/index.html
@@ -284,9 +284,14 @@ <h1><a href="http://threejs.org">three.js</a> / examples</h1> button.id = 'button'; button.textContent = 'View source'; button.addEventListener( 'click', function ( event ) { - - window.open( 'https://github.com/mrdoob/three.js/blob/master/examples/' + selected + '.html' ); - + try{ + ...
false
Other
mrdoob
three.js
7f0e131d963298b1bd60a7d49fd9287e5e7e7139.json
Improve example (#9223)
examples/webgl_geometry_convex.html
@@ -11,11 +11,25 @@ margin: 0px; overflow: hidden; } + #info { + position: absolute; + color: #fff; + top: 0px; + width: 100%; + padding: 5px; + text-align:center; + } + a { + color: #fff; + } </style> </head> <body> + <div id="info"><a href="http://threejs.org" targ...
false
Other
mrdoob
three.js
a350f91896fad35ec3d1491773a3c0adb4b47734.json
Use flat vertex normals (#9221)
examples/js/geometries/ConvexGeometry.js
@@ -194,7 +194,18 @@ THREE.ConvexGeometry = function( vertices ) { } this.computeFaceNormals(); - this.computeVertexNormals(); + + // Compute flat vertex normals + for ( var i = 0; i < this.faces.length; i ++ ) { + + var face = this.faces[ i ]; + var normal = face.normal; + + face.vertexNormals[ 0 ] = normal.c...
false
Other
mrdoob
three.js
777f18eb6897657daabdd680c2967720b99bc0f4.json
Update Vector3.html like a grammer natzi (#9183) GitHub makes everything so easy these days!
docs/api/math/Vector3.html
@@ -146,7 +146,7 @@ <h3>[method:Float lengthManhattan]() [page:Vector3 this]</h3> <h3>[method:Vector3 normalize]() [page:Vector3 this]</h3> <div> - Normalizes this vector. Transforms this Vector into a Unit vector by dividing the vector by it's length. + Normalizes this vector. Transforms this Vector into a U...
false