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 | bc4fd08b2128b0f1cfe4d6d0282faa902d4398ce.json | Shortcut descriptions (#9062)
* adds shortcut key to buttons and menu
* revert bad formatting
* reverts UI.Button changes and inlines the button shortcut key in the description text
* removes unintentional whitespaces | editor/js/Menubar.Edit.js | @@ -104,7 +104,7 @@ Menubar.Edit = function ( editor ) {
var option = new UI.Row();
option.setClass( 'option' );
- option.setTextContent( 'Delete' );
+ option.setTextContent( 'Delete (Del)' );
option.onClick( function () {
var object = editor.selected; | true |
Other | mrdoob | three.js | bc4fd08b2128b0f1cfe4d6d0282faa902d4398ce.json | Shortcut descriptions (#9062)
* adds shortcut key to buttons and menu
* revert bad formatting
* reverts UI.Button changes and inlines the button shortcut key in the description text
* removes unintentional whitespaces | editor/js/Toolbar.js | @@ -14,21 +14,21 @@ var Toolbar = function ( editor ) {
// translate / rotate / scale
- var translate = new UI.Button( 'translate' ).onClick( function () {
+ var translate = new UI.Button( 'translate ( e )' ).onClick( function () {
signals.transformModeChanged.dispatch( 'translate' );
} );
buttons.add(... | true |
Other | mrdoob | three.js | bc4fd08b2128b0f1cfe4d6d0282faa902d4398ce.json | Shortcut descriptions (#9062)
* adds shortcut key to buttons and menu
* revert bad formatting
* reverts UI.Button changes and inlines the button shortcut key in the description text
* removes unintentional whitespaces | editor/js/libs/ui.js | @@ -1045,8 +1045,6 @@ UI.Button = function ( value ) {
UI.Element.call( this );
- var scope = this;
-
var dom = document.createElement( 'button' );
dom.className = 'Button';
| true |
Other | mrdoob | three.js | d2933332783b3b0d113f048dfb8dd7cc5999320b.json | Fix Skeleton.pose() bug (#8976)
* Fix Skeleton.pose() bug
* Clean up THREE.Skeleton | src/objects/Skeleton.js | @@ -123,7 +123,7 @@ Object.assign( THREE.Skeleton.prototype, {
if ( bone ) {
- if ( bone.parent ) {
+ if ( bone.parent instanceof THREE.Bone ) {
bone.matrix.getInverse( bone.parent.matrixWorld );
bone.matrix.multiply( bone.matrixWorld ); | false |
Other | mrdoob | three.js | 3d01a17385df25ee4d92b0501f0b80b3744f22a0.json | Update CinematicCamera.js (#8873)
remove console message | examples/js/cameras/CinematicCamera.js | @@ -135,7 +135,7 @@ THREE.CinematicCamera.prototype.initPostProcessing = function () {
this.postprocessing.bokeh_uniforms[ "focalDepth" ].value = 0.1;
- console.log( this.postprocessing.bokeh_uniforms[ "focalDepth" ].value );
+ //console.log( this.postprocessing.bokeh_uniforms[ "focalDepth" ].value );
thi... | false |
Other | mrdoob | three.js | 5797cf55a68703bb0272d82d205c3a26f90aae42.json | remove warnings. (#8877)
# Conflicts:
# src/renderers/shaders/ShaderChunk/cube_uv_reflection_fragment.glsl | src/renderers/shaders/ShaderChunk/cube_uv_reflection_fragment.glsl | @@ -1,6 +1,6 @@
#ifdef ENVMAP_TYPE_CUBE_UV
-const float cubeUV_textureSize = 1024.0;
+#define cubeUV_textureSize (1024.0)
int getFaceFromDirection(vec3 direction) {
vec3 absDirection = abs(direction);
@@ -19,8 +19,8 @@ int getFaceFromDirection(vec3 direction) {
}
return face;
}
-float cubeUV_maxLods1 = log... | false |
Other | mrdoob | three.js | f39fee8eaf049994c7df25173425d83a108b40fe.json | fix legacy redirect (#8879) | examples/js/controls/OrbitControls.js | @@ -1003,14 +1003,14 @@ Object.defineProperties( THREE.OrbitControls.prototype, {
get: function () {
console.warn( 'THREE.OrbitControls: .staticMoving has been deprecated. Use .enableDamping instead.' );
- return ! this.constraint.enableDamping;
+ return ! this.enableDamping;
},
set: function ( v... | false |
Other | mrdoob | three.js | 8fe367d9221852c63cd9058453684c4b8e58b8b6.json | Fix GridHelper API change (#8812) | examples/misc_sound.html | @@ -156,9 +156,7 @@
// ground
- var helper = new THREE.GridHelper( 500, 10 );
- helper.color1.setHex( 0x444444 );
- helper.color2.setHex( 0x444444 );
+ var helper = new THREE.GridHelper( 500, 10, 0x444444, 0x444444 );
helper.position.y = 0.1;
scene.add( helper );
| false |
Other | mrdoob | three.js | 5a7a681011bfcbb76a3e9264f923e4b59718db38.json | Change .drawcalls to .groups | src/extras/geometries/WireframeGeometry.js | @@ -77,10 +77,10 @@ THREE.WireframeGeometry = function ( geometry ) {
var indices = geometry.index.array;
var vertices = geometry.attributes.position;
- var drawcalls = geometry.drawcalls;
+ var groups = geometry.groups;
var numEdges = 0;
- if ( drawcalls.length === 0 ) {
+ if ( groups.length ==... | false |
Other | mrdoob | three.js | e1a2ad2e5ed2f78beb86f0ea95d44cea7089527d.json | Use updated OBJ Loader in OBJ_MTL example
This requires loading the MTL first with an instance of `MTLLoader`, and passing the resulting `materialCreator` to an instance of `OBJLoader` | examples/webgl_loader_obj_mtl.html | @@ -34,7 +34,7 @@
<script src="js/loaders/DDSLoader.js"></script>
<script src="js/loaders/MTLLoader.js"></script>
- <script src="js/loaders/OBJMTLLoader.js"></script>
+ <script src="js/loaders/OBJLoader.js"></script>
<script src="js/Detector.js"></script>
<script src="js/libs/stats.min.js"></script>
@... | false |
Other | mrdoob | three.js | ef1073ecb632f3e06c9312201c055e2fe0a0bd50.json | add comments on indirect diffuse cubemap. | src/renderers/shaders/ShaderChunk/lights_pars.glsl | @@ -126,12 +126,16 @@ uniform vec3 ambientLightColor;
vec3 queryVec = flipNormal * vec3( flipEnvMap * worldNormal.x, worldNormal.yz );
+ // TODO: replace with properly filtered cubemaps and access the irradiance LOD level, be it the last LOD level
+ // of a specular cubemap, or just the default level of a s... | false |
Other | mrdoob | three.js | 0dd332ed4bfe289361a37db7177aa7a1d24567ee.json | Add ETC1 compressed texture support. | examples/js/loaders/DDSLoader.js | @@ -102,6 +102,7 @@ THREE.DDSLoader.parse = function ( buffer, loadMipmaps ) {
var FOURCC_DXT1 = fourCCToInt32( "DXT1" );
var FOURCC_DXT3 = fourCCToInt32( "DXT3" );
var FOURCC_DXT5 = fourCCToInt32( "DXT5" );
+ var FOURCC_ETC1 = fourCCToInt32( "ETC1" );
var headerLengthInt = 31; // The header length in 32 bit ... | true |
Other | mrdoob | three.js | 0dd332ed4bfe289361a37db7177aa7a1d24567ee.json | Add ETC1 compressed texture support. | src/Three.js | @@ -352,6 +352,10 @@ THREE.RGB_PVRTC_2BPPV1_Format = 2101;
THREE.RGBA_PVRTC_4BPPV1_Format = 2102;
THREE.RGBA_PVRTC_2BPPV1_Format = 2103;
+// ETC compressed texture formats
+
+THREE.RGB_ETC1_Format = 2151;
+
// Loop styles for AnimationAction
THREE.LoopOnce = 2200; | true |
Other | mrdoob | three.js | 0dd332ed4bfe289361a37db7177aa7a1d24567ee.json | Add ETC1 compressed texture support. | src/renderers/WebGLRenderer.js | @@ -3624,6 +3624,14 @@ THREE.WebGLRenderer = function ( parameters ) {
}
+ extension = extensions.get( 'WEBGL_compressed_texture_etc1' );
+
+ if ( extension !== null ) {
+
+ if ( p === THREE.RGB_ETC1_Format ) return extension.COMPRESSED_RGB_ETC1_WEBGL;
+
+ }
+
extension = extensions.get( 'EXT_blend_minma... | true |
Other | mrdoob | three.js | 0dd332ed4bfe289361a37db7177aa7a1d24567ee.json | Add ETC1 compressed texture support. | src/renderers/webgl/WebGLExtensions.js | @@ -30,6 +30,10 @@ THREE.WebGLExtensions = function ( gl ) {
extension = gl.getExtension( 'WEBGL_compressed_texture_pvrtc' ) || gl.getExtension( 'WEBKIT_WEBGL_compressed_texture_pvrtc' );
break;
+ case 'WEBGL_compressed_texture_etc1':
+ extension = gl.getExtension( 'WEBGL_compressed_texture_etc1' );
+ ... | true |
Other | mrdoob | three.js | 0dd332ed4bfe289361a37db7177aa7a1d24567ee.json | Add ETC1 compressed texture support. | src/renderers/webgl/WebGLState.js | @@ -167,7 +167,8 @@ THREE.WebGLState = function ( gl, extensions, paramThreeToGL ) {
compressedTextureFormats = [];
if ( extensions.get( 'WEBGL_compressed_texture_pvrtc' ) ||
- extensions.get( 'WEBGL_compressed_texture_s3tc' ) ) {
+ extensions.get( 'WEBGL_compressed_texture_s3tc' ) ||
+ e... | true |
Other | mrdoob | three.js | cd80a94cdb501660c6ff96da41d2b30e54db027b.json | fix use with operator and share to optimize | examples/js/nodes/accessors/ScreenUVNode.js | @@ -4,7 +4,7 @@
THREE.ScreenUVNode = function( resolution ) {
- THREE.TempNode.call( this, 'v2', { shared: false } );
+ THREE.TempNode.call( this, 'v2' );
this.resolution = resolution;
@@ -20,7 +20,7 @@ THREE.ScreenUVNode.prototype.generate = function( builder, output ) {
if ( builder.isShader( 'fragment... | false |
Other | mrdoob | three.js | 2f61147d63ac92d4dd43b87fc2ad44252e1d044d.json | fix float input, auto joint or split node | examples/js/nodes/utils/SwitchNode.js | @@ -4,7 +4,7 @@
THREE.SwitchNode = function( node, components ) {
- THREE.GLNode.call( this, 'fv1' );
+ THREE.GLNode.call( this );
this.node = node;
this.components = components || 'x';
@@ -42,24 +42,28 @@ THREE.SwitchNode.prototype.generate = function( builder, output ) {
if ( outputLength > inputLength... | false |
Other | mrdoob | three.js | 46dfb3990aa247d9406704d13f2d6734d7d31a72.json | add sqrt and fix getType | examples/js/nodes/math/Math1Node.js | @@ -18,7 +18,8 @@ THREE.Math1Node.EXP = 'exp';
THREE.Math1Node.EXP2 = 'exp2';
THREE.Math1Node.LOG = 'log';
THREE.Math1Node.LOG2 = 'log2';
-THREE.Math1Node.INVERSE_SQRT = 'inversesqrt';
+THREE.Math1Node.SQRT = 'sqrt';
+THREE.Math1Node.INV_SQRT = 'inversesqrt';
THREE.Math1Node.FLOOR = 'floor';
THREE.Math1Node.CEIL =... | false |
Other | mrdoob | three.js | 3d0dc519c6a888fe521907cf54c84e4cd821ba29.json | StereoEffect set eye separation (#9432) | examples/js/effects/StereoEffect.js | @@ -16,6 +16,12 @@ THREE.StereoEffect = function ( renderer ) {
};
+ this.setEyeSep = function ( eyeSep ) {
+
+ _stereo.eyeSep = eyeSep;
+
+ };
+
this.render = function ( scene, camera ) {
scene.updateMatrixWorld(); | true |
Other | mrdoob | three.js | 3d0dc519c6a888fe521907cf54c84e4cd821ba29.json | StereoEffect set eye separation (#9432) | src/cameras/StereoCamera.js | @@ -12,6 +12,8 @@ function StereoCamera() {
this.aspect = 1;
+ this.eyeSep = 0.064;
+
this.cameraL = new PerspectiveCamera();
this.cameraL.layers.enable( 1 );
this.cameraL.matrixAutoUpdate = false;
@@ -49,7 +51,7 @@ Object.assign( StereoCamera.prototype, {
// http://paulbourke.net/stereographics/stereo... | true |
Other | mrdoob | three.js | 2ee2d33965d9f6cef67b05177f6b66677b6d7e6e.json | Clarify the explanation (#9422)
First usage of `updateStyle` with now indication of what or where it came from. | docs/manual/introduction/Creating-a-scene.html | @@ -61,7 +61,7 @@ <h2>Creating the scene</h2>
<div>In addition to creating the renderer instance, we also need to set the size at which we want it to render our app. It's a good idea to use the width and height of the area we want to fill with our app - in this case, the width and height of the browser window. For... | false |
Other | mrdoob | three.js | bf50f022aa2d209070e1d50801c8534c9553b3da.json | Update ExtrudeGeometry.js (#9409)
Changed the bevel so that it is elliptical instead of sinusoidal. Formatted both areas the same with the linear option in the comments. | src/extras/geometries/ExtrudeGeometry.js | @@ -361,10 +361,10 @@ ExtrudeGeometry.prototype.addShape = function ( shape, options ) {
//for ( b = bevelSegments; b > 0; b -- ) {
t = b / bevelSegments;
- z = bevelThickness * ( 1 - t );
+ z = bevelThickness * Math.cos ( t * Math.PI / 2 ); // curved
+ //z = bevelThickness * ( 1 - t ); //linear
- //z = b... | false |
Other | mrdoob | three.js | 5ddf8219864e2f014ecdda19203847d5497f5f81.json | Add Raycaster returned UV property to docs (#9329) | docs/api/core/Raycaster.html | @@ -59,7 +59,8 @@ <h2>Example</h2>
[example:webgl_interactive_raycasting_points Raycasting to Points],
[example:webgl_geometry_terrain_raycast Terrain raycasting],
[example:webgl_octree_raycasting Raycasting using an octree],
- [example:webgl_interactive_voxelpainter Raycasting to paint voxels]</div>
+ ... | false |
Other | mrdoob | three.js | 4d8a7d7c62c1f99154556f8c2e5d0aa1fc2dae46.json | Build three.js too when running build_debug.sh | utils/build/build_debug.sh | @@ -1,4 +1,5 @@
#!/bin/sh
cd "$(dirname "$0")"
+python build.py --include common --include extras --output ../../build/three.js
python build.py --include common --include extras --output ../../build/three.min.js | false |
Other | mrdoob | three.js | bb5600fd89325e7f953996bf0fd6b45e3655e6a8.json | add unbiased mode to the MSAA render pass. (#8930)
* add unbiased mode to the MSAA render pass.
* clearer code.
* better comment.
* cleanup code. fix bug of using "camera", instead of "this.camera"
* fix more places were "camera" is used instad of "this.camera" -- it worked because example declared "camer... | examples/files.js | @@ -189,6 +189,7 @@ var files = {
"webgl_postprocessing_godrays",
"webgl_postprocessing_masking",
"webgl_postprocessing_msaa",
+ "webgl_postprocessing_msaa_unbiased",
"webgl_postprocessing_nodes",
"webgl_postprocessing_procedural",
"webgl_postprocessing_smaa", | true |
Other | mrdoob | three.js | bb5600fd89325e7f953996bf0fd6b45e3655e6a8.json | add unbiased mode to the MSAA render pass. (#8930)
* add unbiased mode to the MSAA render pass.
* clearer code.
* better comment.
* cleanup code. fix bug of using "camera", instead of "this.camera"
* fix more places were "camera" is used instad of "this.camera" -- it worked because example declared "camer... | examples/js/postprocessing/ManualMSAARenderPass.js | @@ -18,6 +18,7 @@ THREE.ManualMSAARenderPass = function ( scene, camera ) {
this.camera = camera;
this.sampleLevel = 4; // specified as n, where the number of samples is 2^n, so sampleLevel = 4, is 2^4 samples, 16.
+ this.unbiased = true;
if ( THREE.CopyShader === undefined ) console.error( "THREE.ManualMSAAR... | true |
Other | mrdoob | three.js | bb5600fd89325e7f953996bf0fd6b45e3655e6a8.json | add unbiased mode to the MSAA render pass. (#8930)
* add unbiased mode to the MSAA render pass.
* clearer code.
* better comment.
* cleanup code. fix bug of using "camera", instead of "this.camera"
* fix more places were "camera" is used instad of "this.camera" -- it worked because example declared "camer... | examples/js/postprocessing/TAARenderPass.js | @@ -45,8 +45,6 @@ Object.assign( THREE.TAARenderPass.prototype, {
var jitterOffsets = THREE.TAARenderPass.JitterVectors[ 5 ];
- var camera = ( this.camera || this.scene.camera );
-
if ( ! this.sampleRenderTarget ) {
this.sampleRenderTarget = new THREE.WebGLRenderTarget( readBuffer.width, readBuffer.hei... | true |
Other | mrdoob | three.js | bb5600fd89325e7f953996bf0fd6b45e3655e6a8.json | add unbiased mode to the MSAA render pass. (#8930)
* add unbiased mode to the MSAA render pass.
* clearer code.
* better comment.
* cleanup code. fix bug of using "camera", instead of "this.camera"
* fix more places were "camera" is used instad of "this.camera" -- it worked because example declared "camer... | examples/webgl_postprocessing_msaa.html | @@ -53,7 +53,9 @@
var camera, scene, renderer, composer, copyPass, msaaRenderPass;
var gui, stats, texture;
- var param = { MSAASampleLevel: 2 };
+ var param = {
+ sampleLevel: 2
+ };
init();
animate();
@@ -66,19 +68,13 @@
gui = new dat.GUI();
- var example = gui.add( param, 'MS... | true |
Other | mrdoob | three.js | bb5600fd89325e7f953996bf0fd6b45e3655e6a8.json | add unbiased mode to the MSAA render pass. (#8930)
* add unbiased mode to the MSAA render pass.
* clearer code.
* better comment.
* cleanup code. fix bug of using "camera", instead of "this.camera"
* fix more places were "camera" is used instad of "this.camera" -- it worked because example declared "camer... | examples/webgl_postprocessing_msaa_unbiased.html | @@ -0,0 +1,211 @@
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <title>three.js webgl - postprocessing manual msaa</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 {
+ margin: 0px;
+ background-col... | true |
Other | mrdoob | three.js | bb5600fd89325e7f953996bf0fd6b45e3655e6a8.json | add unbiased mode to the MSAA render pass. (#8930)
* add unbiased mode to the MSAA render pass.
* clearer code.
* better comment.
* cleanup code. fix bug of using "camera", instead of "this.camera"
* fix more places were "camera" is used instad of "this.camera" -- it worked because example declared "camer... | examples/webgl_postprocessing_taa.html | @@ -144,6 +144,7 @@
composer = new THREE.EffectComposer( renderer );
taaRenderPass = new THREE.TAARenderPass( scene, camera );
+ taaRenderPass.unbiased = false;
composer.addPass( taaRenderPass );
renderPass = new THREE.RenderPass( scene, camera ); | true |
Other | mrdoob | three.js | bb5600fd89325e7f953996bf0fd6b45e3655e6a8.json | add unbiased mode to the MSAA render pass. (#8930)
* add unbiased mode to the MSAA render pass.
* clearer code.
* better comment.
* cleanup code. fix bug of using "camera", instead of "this.camera"
* fix more places were "camera" is used instad of "this.camera" -- it worked because example declared "camer... | src/cameras/PerspectiveCamera.js | @@ -155,6 +155,13 @@ THREE.PerspectiveCamera.prototype = Object.assign( Object.create( THREE.Camera.p
},
+ clearViewOffset: function() {
+
+ this.view = null;
+ this.updateProjectionMatrix();
+
+ },
+
updateProjectionMatrix: function () {
var near = this.near, | true |
Other | mrdoob | three.js | 318c4ccfe77a2ac6541145f7491a95d5f37105ae.json | Fix tga parsing bug of horizontal origin. | examples/js/loaders/TGALoader.js | @@ -390,36 +390,36 @@ THREE.TGALoader.prototype._parser = function ( buffer ) {
x_start = 0;
x_step = 1;
x_end = width;
- y_start = 0;
- y_step = 1;
- y_end = height;
+ y_start = height - 1;
+ y_step = -1;
+ y_end = -1;
break;
case TGA_ORIGIN_BL:
x_start = 0;
x_step... | false |
Other | mrdoob | three.js | 9f6ff08c78daf2bda2f66f7ed856b6906d11b307.json | use vector operations and pre-optimize | src/renderers/shaders/ShaderChunk/cube_uv_reflection_fragment.glsl | @@ -94,18 +94,9 @@ vec2 getCubeUV(vec3 direction, float roughnessLevel, float mipLevel) {
}
r = normalize(r);
float texelOffset = 0.5 * cubeUV_rcpTextureSize;
- float s1 = (r.y/abs(r.x) + 1.0)*0.5;
- float s2 = (r.z/abs(r.x) + 1.0)*0.5;
- vec2 uv = offset + vec2(s1, s2) * scale;
- float min_x... | false |
Other | mrdoob | three.js | 2ba3e37476013604b660b5da0f7af05aead04f76.json | Add getShaderPrecisionFormat polyfill | src/renderers/WebGLRenderer.js | @@ -221,6 +221,20 @@ THREE.WebGLRenderer = function ( parameters ) {
}
+ if ( _gl.getShaderPrecisionFormat === undefined ) {
+
+ _gl.getShaderPrecisionFormat = function () {
+
+ return {
+ 'rangeMin': 1,
+ 'rangeMax': 1,
+ 'precision': 1
+ };
+
+ }
+
+ }
+
var capabilities = new THREE.WebGLCapabi... | false |
Other | mrdoob | three.js | 08055e6a1ac5889a8b639463840ffbaa9bbdfc43.json | add light.power to docs. | docs/api/lights/PointLight.html | @@ -59,6 +59,13 @@ <h3>[property:Float intensity]</h3>
Default - *1.0*.
</div>
+ <h3>[property:Float power]</h3>
+ <div>
+ Light's power.<br />
+ In "physical lights" mode, the luminous power of the light measured in lumens.<br/>
+ Default - *4PI*.
+ </div>
+
<h3>[property:Float distance]... | true |
Other | mrdoob | three.js | 08055e6a1ac5889a8b639463840ffbaa9bbdfc43.json | add light.power to docs. | docs/api/lights/SpotLight.html | @@ -81,6 +81,13 @@ <h3>[property:Float intensity]</h3>
Default — *1.0*.
</div>
+ <h3>[property:Float power]</h3>
+ <div>
+ Light's power.<br />
+ In "physical lights" mode, the luminous power of the light measured in lumens.<br/>
+ Default - *4PI*.
+ </div>
+
<h3>[property:Float distance]... | true |
Other | mrdoob | three.js | 5d86e3a81722c64305301f34b90513a1712e5a6f.json | add ref for lumens. | examples/webgl_lights_physical.html | @@ -54,10 +54,13 @@
bulbLight, bulbMat,
object, loader, stats;
+ // ref for lumens: http://www.power-sure.com/lumens.htm
var lightTypes = {
- "60W Bulb (450 cd)": 450,
- "40W Bulb (300 cd)": 300,
- "20W Bulb (150 cd)": 120
+ "100W Bulb (1700 lumen)": 1700,
+ "60W Bulb (800 lumen)": 800,
+... | false |
Other | mrdoob | three.js | 450ab30cb89448cbe48b9094fc3e900023966a70.json | fix compatibility issues between PRs. | examples/webgl_tonemapping.html | @@ -39,7 +39,7 @@
<script src="../examples/js/libs/dat.gui.min.js"></script>
<script src="../src/loaders/BinaryTextureLoader.js"></script>
<script src="../examples/js/loaders/RGBELoader.js"></script>
- <script src="../examples/js/loaders/HDRCubeMapLoader.js"></script>
+ <script src="../examples/js/loaders/HD... | false |
Other | mrdoob | three.js | a30f4d290caf065429cce468463bdba39af0b2d2.json | Fix broken external link | examples/obj/male02/readme.txt | @@ -1,3 +1,3 @@
Model by Reallusion iClone from Google 3d Warehouse:
-http://sketchup.google.com/3dwarehouse/details?mid=f526cc4abf7cb68d76cab47c765b7255
\ No newline at end of file
+https://3dwarehouse.sketchup.com/user.html?id=0122725873552223594220183 | false |
Other | mrdoob | three.js | 5e44a0e7dbcdebe4b7ef65ad8684d9d1bb8ae463.json | add variable decls
yup | examples/js/modifiers/SubdivisionModifier.js | @@ -325,7 +325,7 @@ THREE.SubdivisionModifier.prototype.modify = function ( geometry ) {
newVertices = newSourceVertices.concat( newEdgeVertices );
var sl = newSourceVertices.length, edge1, edge2, edge3;
newFaces = [];
-
+ var uv, x0, x1, x2;
var x3 = new THREE.Vector2(0, 0);
var x4 ... | false |
Other | mrdoob | three.js | 8ab4529129cfb80afdc35f18db505fc404ecca87.json | Avoid multiple textureLoaders in for-loops | examples/js/MD2Character.js | @@ -223,13 +223,13 @@ THREE.MD2Character = function () {
function loadTextures( baseUrl, textureUrls ) {
- var mapping = THREE.UVMapping;
+ var textureLoader = new THREE.TextureLoader();
var textures = [];
for ( var i = 0; i < textureUrls.length; i ++ ) {
- textures[ i ] = new THREE.Texture... | true |
Other | mrdoob | three.js | 8ab4529129cfb80afdc35f18db505fc404ecca87.json | Avoid multiple textureLoaders in for-loops | examples/js/MD2CharacterComplex.js | @@ -506,13 +506,13 @@ THREE.MD2CharacterComplex = function () {
function loadTextures( baseUrl, textureUrls ) {
- var mapping = THREE.UVMapping;
+ var textureLoader = new THREE.TextureLoader();
var textures = [];
for ( var i = 0; i < textureUrls.length; i ++ ) {
-
- textures[ i ] = new THR... | true |
Other | mrdoob | three.js | 8ab4529129cfb80afdc35f18db505fc404ecca87.json | Avoid multiple textureLoaders in for-loops | examples/js/UCSCharacter.js | @@ -91,13 +91,13 @@ THREE.UCSCharacter = function() {
function loadTextures( baseUrl, textureUrls ) {
- var mapping = THREE.UVMapping;
+ var textureLoader = new THREE.TextureLoader();
var textures = [];
for ( var i = 0; i < textureUrls.length; i ++ ) {
- textures[ i ] = new THREE.TextureLoader().loa... | true |
Other | mrdoob | three.js | c49ac0847bb1ade3b0efd931c6f97aca064ab889.json | fix statistics calculation for instanced geometry | src/renderers/webgl/WebGLBufferRenderer.js | @@ -37,11 +37,23 @@ THREE.WebGLBufferRenderer = function ( _gl, extensions, _infoRender ) {
if ( position instanceof THREE.InterleavedBufferAttribute ) {
- extension.drawArraysInstancedANGLE( mode, 0, position.data.count, geometry.maxInstancedCount );
+ var count = position.data.count;
+
+ extension.drawAr... | true |
Other | mrdoob | three.js | c49ac0847bb1ade3b0efd931c6f97aca064ab889.json | fix statistics calculation for instanced geometry | src/renderers/webgl/WebGLIndexedBufferRenderer.js | @@ -53,6 +53,9 @@ THREE.WebGLIndexedBufferRenderer = function ( _gl, extensions, _infoRender ) {
extension.drawElementsInstancedANGLE( mode, count, type, start * size, geometry.maxInstancedCount );
+ _infoRender.calls ++;
+ _infoRender.vertices += count * geometry.maxInstancedCount;
+ if ( mode === _gl.TRIANG... | true |
Other | mrdoob | three.js | 1e99bc45784a60784b396f0e86681505594d18f1.json | fix VRControls onError | examples/js/controls/VRControls.js | @@ -21,7 +21,11 @@ THREE.VRControls = function ( object, onError ) {
}
- if ( onError ) onError( 'HMD not available' );
+ if ( vrInputs.length === 0 ) {
+
+ if ( onError ) onError( 'PositionSensorVRDevice not available' );
+
+ }
}
| false |
Other | mrdoob | three.js | 21d8d2781d1451f40b7ee91e6539c3b7a3ee6e5c.json | remove GeometryUtils documenation | docs/api/extras/GeometryUtils.html | @@ -1,60 +0,0 @@
-<!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>
- <h1>[name]</h1>
-
- <div class="desc">Contains han... | true |
Other | mrdoob | three.js | 21d8d2781d1451f40b7ee91e6539c3b7a3ee6e5c.json | remove GeometryUtils documenation | docs/list.js | @@ -161,7 +161,6 @@ var list = {
],
"Extras": [
- [ "GeometryUtils", "api/extras/GeometryUtils" ],
[ "SceneUtils", "api/extras/SceneUtils" ]
],
| true |
Other | mrdoob | three.js | 2abf3765ec6e92d8e1540994b31b36a4704ebc72.json | revert empty texture (#8578) | src/renderers/webgl/WebGLState.js | @@ -60,11 +60,6 @@ THREE.WebGLState = function ( gl, extensions, paramThreeToGL ) {
var currentScissor = new THREE.Vector4();
var currentViewport = new THREE.Vector4();
- var emptyTexture = gl.createTexture();
- gl.bindTexture( gl.TEXTURE_2D, emptyTexture );
- gl.texParameteri( gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTE... | false |
Other | mrdoob | three.js | 3cfd6e80f0d52e85367353bc72b8e5b682de9937.json | add method docs
intersectsBox method not documented. | docs/api/math/Frustum.html | @@ -81,6 +81,14 @@ <h3>[method:Boolean containsPoint]([page:Vector3 point])</h3>
Checks to see if the frustum contains the point.
</div>
+ <h3>[method:Boolean intersectsBox]([page:Box3 box])</h3>
+ <div>
+ box -- [page:Box3]
+ </div>
+ <div>
+ Check to see if the box intersects with the frustum.
+ </div>... | false |
Other | mrdoob | three.js | 3db3411c9d86e0b54cc40c41079c693b4553e17f.json | fix capitalization of "UVGenerator"
The docs list it as "uvGenerator" instead of "UVGenerator", took me a while to spot why it wasn't working... | docs/api/extras/geometries/ExtrudeGeometry.html | @@ -1,99 +1,99 @@
-<!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 | 6dd16bf1c5d030e00ea7036b6b8ef4aeca5366b4.json | add reflectivity example. | examples/files.js | @@ -129,6 +129,7 @@ var files = {
"webgl_materials_nodes",
"webgl_materials_normalmap",
"webgl_materials_parallaxmap",
+ "webgl_materials_reflectivity",
"webgl_materials_shaders_fresnel",
"webgl_materials_skin",
"webgl_materials_standard", | true |
Other | mrdoob | three.js | 6dd16bf1c5d030e00ea7036b6b8ef4aeca5366b4.json | add reflectivity example. | examples/models/obj/emerald.obj | @@ -0,0 +1,312 @@
+# Blender v2.74 (sub 0) OBJ File: ''
+# www.blender.org
+mtllib diamond-for-threejs.mtl
+o emerald_obj_1
+v -3.292856 5.746839 5.366825
+v -4.692856 5.043496 4.000000
+v -4.692857 -5.043496 4.000000
+v -3.292857 -5.746839 5.366825
+v -4.692856 5.043496 -4.000000
+v -3.292856 5.746839 -5.366825
+v -3.... | true |
Other | mrdoob | three.js | 6dd16bf1c5d030e00ea7036b6b8ef4aeca5366b4.json | add reflectivity example. | examples/webgl_materials_reflectivity.html | @@ -0,0 +1,291 @@
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <title>threejs webgl - materials - hdr environment mapping</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-f... | true |
Other | mrdoob | three.js | c290352133019105f3be6232db0ecf1f16f591de.json | simplify light factories. | src/renderers/shaders/ShaderChunk/lights.glsl | @@ -10,11 +10,14 @@ uniform vec3 ambientLightColor;
uniform DirectionalLight directionalLights[ MAX_DIR_LIGHTS ];
- void getDirectionalDirectLight( const in DirectionalLight directionalLight, const in GeometricContext geometry, out IncidentLight directLight ) {
+ IncidentLight getDirectionalDirectLight( const in... | true |
Other | mrdoob | three.js | c290352133019105f3be6232db0ecf1f16f591de.json | simplify light factories. | src/renderers/shaders/ShaderChunk/lights_lambert_vertex.glsl | @@ -10,9 +10,7 @@ ReflectedLight backReflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ) );
for ( int i = 0; i < MAX_POINT_LIGHTS; i ++ ) {
- IncidentLight directLight;
-
- getPointDirectLight( pointLights[ i ], geometry, directLight );
+ IncidentLight directLight = getPointDirectLight( pointLights[ i ],... | true |
Other | mrdoob | three.js | c290352133019105f3be6232db0ecf1f16f591de.json | simplify light factories. | src/renderers/shaders/ShaderChunk/lights_phong_fragment.glsl | @@ -25,9 +25,7 @@ ReflectedLight indirectReflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 )
for ( int i = 0; i < MAX_POINT_LIGHTS; i ++ ) {
- IncidentLight directLight;
-
- getPointDirectLight( pointLights[ i ], geometry, directLight );
+ IncidentLight directLight = getPointDirectLight( pointLights[ i ]... | true |
Other | mrdoob | three.js | 0287cab597c854f48b859cbf7eeb5f8b995d6314.json | remove unused code from broken ShaderSkin.js | examples/js/ShaderSkin.js | @@ -455,12 +455,11 @@ THREE.ShaderSkin = {
"#if MAX_POINT_LIGHTS > 0",
"for ( int i = 0; i < MAX_POINT_LIGHTS; i ++ ) {",
-
+
"vec3 pointVector = normalize( pointLights[ i ].direction );",
+ "float attenuation = calcLightAttenuation( length( lVector ), pointLights[ i ].distance, pointLigh... | false |
Other | mrdoob | three.js | c21a28c4b1155b9d95fe91ea9dc6669ec30aa075.json | put isIntersectionSphere inside a closure | src/math/Box3.js | @@ -247,15 +247,23 @@ THREE.Box3.prototype = {
},
- isIntersectionSphere: function ( sphere ) {
+ isIntersectionSphere: function () {
- // Find the point on the AABB closest to the sphere center.
- var closestPoint = this.clampPoint( sphere.center );
+ var closestPoint;
- // If that point is inside the s... | false |
Other | mrdoob | three.js | d31d47352a0febb4540a26e916c26324a0189382.json | remove colorAmbient from Blender exporter | utils/exporters/blender/addons/io_three/constants.py | @@ -272,7 +272,6 @@
TIME = 'time'
KEYS = 'keys'
-AMBIENT = 'ambient'
COLOR = 'color'
EMISSIVE = 'emissive'
SPECULAR = 'specular'
@@ -352,7 +351,6 @@
SHADING = 'shading'
COLOR_DIFFUSE = 'colorDiffuse'
-COLOR_AMBIENT = 'colorAmbient'
COLOR_EMISSIVE = 'colorEmissive'
COLOR_SPECULAR = 'colorSpecular'
DBG_NAME... | true |
Other | mrdoob | three.js | d31d47352a0febb4540a26e916c26324a0189382.json | remove colorAmbient from Blender exporter | utils/exporters/blender/addons/io_three/exporter/api/material.py | @@ -30,22 +30,6 @@ def inner(name, *args, **kwargs):
return inner
-@_material
-def ambient_color(material):
- """
-
- :param material:
- :return: rgb value
- :rtype: tuple
-
- """
- logger.debug("material.ambient_color(%s)", material)
- diffuse = diffuse_color(material)
- return (materi... | true |
Other | mrdoob | three.js | d31d47352a0febb4540a26e916c26324a0189382.json | remove colorAmbient from Blender exporter | utils/exporters/blender/addons/io_three/exporter/api/mesh.py | @@ -527,7 +527,6 @@ def materials(mesh, options):
logger.info("Compiling attributes for %s", mat.name)
attributes = {
- constants.COLOR_AMBIENT: material.ambient_color(mat),
constants.COLOR_EMISSIVE: material.emissive_color(mat),
constants.SHADING: material.shadi... | true |
Other | mrdoob | three.js | d31d47352a0febb4540a26e916c26324a0189382.json | remove colorAmbient from Blender exporter | utils/exporters/blender/addons/io_three/exporter/material.py | @@ -32,9 +32,6 @@ def _common_attributes(self):
self[constants.COLOR] = utilities.rgb2int(diffuse)
if self[constants.TYPE] != constants.THREE_BASIC:
- ambient = api.material.ambient_color(self.node)
- self[constants.AMBIENT] = utilities.rgb2int(ambient)
-
emissive ... | true |
Other | mrdoob | three.js | da582107010e26768fec37ff0347431963546b59.json | Add earcut library to examples | examples/js/libs/earcut.js | @@ -0,0 +1,674 @@
+/**
+ *
+ * Earcut https://github.com/mapbox/earcut
+ *
+ * Copyright (c) 2015, Mapbox
+ *
+ * Permission to use, copy, modify, and/or distribute this software for any purpose
+ * with or without fee is hereby granted, provided that the above copyright notice
+ * and this permission notice appear in ... | false |
Other | mrdoob | three.js | fc1a3b24cb5c96ef4847b84aa2fe441bd2c28769.json | update support properties
transparency => opacity
remove colorAmbient, https://github.com/mrdoob/three.js/pull/7374 | utils/exporters/maya/plug-ins/threeJsFileTranslator.py | @@ -233,11 +233,10 @@ def _exportMaterial(self, mat):
"DbgName": mat.name(),
"blending": "NormalBlending",
"colorDiffuse": map(lambda i: i * mat.getDiffuseCoeff(), mat.getColor().rgb),
- "colorAmbient": mat.getAmbientColor().rgb,
"depthTest": True,
... | false |
Other | mrdoob | three.js | 91370c6e097227812732fc9809e272046123333b.json | Ignore empty entries in MTL files | examples/js/loaders/MTLLoader.js | @@ -311,6 +311,10 @@ THREE.MTLLoader.MaterialCreator.prototype = {
var value = mat[ prop ];
+ if ( value === '' ) {
+ continue;
+ }
+
switch ( prop.toLowerCase() ) {
// Ns is material specular exponent | false |
Other | mrdoob | three.js | 3b10641e4c87531725a28e0edb5173a472577839.json | add addExtension method | examples/js/loaders/3MFLoader.js | @@ -1,16 +1,7 @@
-THREE.ThreeMFLoader = function ( manager, extensions ) {
+THREE.ThreeMFLoader = function ( manager ) {
- if ( manager instanceof Array ) {
-
- this.manager = THREE.DefaultLoadingManager;
- this.availableExtensions = manager;
-
- } else {
-
- this.manager = ( manager !== undefined ) ? manager : TH... | false |
Other | mrdoob | three.js | 991b8fa7c3a1303df69fa8c447e4d021f06751a8.json | return this on copy | src/lights/LightShadow.js | @@ -29,6 +29,8 @@ THREE.LightShadow.prototype = {
this.mapSize.copy( source.mapSize );
+ return this;
+
},
clone: function () { | false |
Other | mrdoob | three.js | 635b3e274d097244ae2c0e9e021e2e07f851bcde.json | Fix bower.json ignores | bower.json | @@ -14,13 +14,13 @@
"ignore": [
"**/.*",
"*.md",
- "docs",
- "editor",
- "examples/*",
- "!examples/js",
- "src",
- "test",
- "utils",
- "LICENSE"
+ "/docs",
+ "/editor",
+ "/examples/*",
+ "!/examples/js",
+ "/src",
+ "/test",
+ "/utils",
+ "/LICENSE"
]
} | false |
Other | mrdoob | three.js | 447d4fcce879e0570721ed5e7aa784b65b4f3625.json | convert whitespaces into tab | examples/webgl_loader_fbx.html | @@ -31,9 +31,9 @@
<script src="../build/three.min.js"></script>
- <script src="js/controls/OrbitControls.js"></script>
+ <script src="js/controls/OrbitControls.js"></script>
- <script src="js/loaders/FBXLoader.js"></script>
+ <script src="js/loaders/FBXLoader.js"></script>
<script src="js/... | false |
Other | mrdoob | three.js | 720bb21c91b3b964d1bd58a23a6cf3bc6aead903.json | fix abc to abs | examples/js/nodes/math/Math1Node.js | @@ -30,7 +30,7 @@ THREE.Math1Node.TAN = 'tan';
THREE.Math1Node.ASIN = 'asin';
THREE.Math1Node.ACOS = 'acos';
THREE.Math1Node.ARCTAN = 'atan';
-THREE.Math1Node.ABS = 'abc';
+THREE.Math1Node.ABS = 'abs';
THREE.Math1Node.SIGN = 'sign';
THREE.Math1Node.LENGTH = 'length';
THREE.Math1Node.NEGATE = 'negate'; | false |
Other | mrdoob | three.js | 0c52b0c1887b21b2ad8af5f0bb6bda99bc455d90.json | fix mod function | examples/js/nodes/math/Math2Node.js | @@ -79,7 +79,7 @@ THREE.Math2Node.prototype.generate = function( builder, output ) {
case THREE.Math2Node.MIN:
case THREE.Math2Node.MAX:
- case THREE.Math2Node.MODULO:
+ case THREE.Math2Node.MOD:
a = this.a.build( builder, type );
b = this.b.build( builder, bl == 1 ? 'fv1' : type );
break; | false |
Other | mrdoob | three.js | 0e1a70097f027a536c0d51a4c1cb808093459e8a.json | Give unified name to VMD Animation | examples/js/loaders/MMDLoader.js | @@ -221,13 +221,13 @@ THREE.MMDLoader.prototype.mergeVmds = function ( vmds ) {
};
-THREE.MMDLoader.prototype.pourVmdIntoModel = function ( mesh, vmd ) {
+THREE.MMDLoader.prototype.pourVmdIntoModel = function ( mesh, vmd, name ) {
- this.createAnimation( mesh, vmd );
+ this.createAnimation( mesh, vmd, name );
... | false |
Other | mrdoob | three.js | 0fe5f5e49aa85056d89ead51e299a269fe3a4f06.json | fix alert name | examples/js/nodes/utils/NormalMapNode.js | @@ -34,7 +34,7 @@ THREE.NormalMapNode.prototype.generate = function( builder, output ) {
}
else {
- console.warn( "THREE.NormalMap is not compatible with " + builder.shader + " shader." );
+ console.warn( "THREE.NormalMapNode is not compatible with " + builder.shader + " shader." );
return builder.format( ... | false |
Other | mrdoob | three.js | 43b81cc674c342a6da127675d6516c98c012eab6.json | Clarify .clone() action | docs/api/core/Geometry.html | @@ -278,6 +278,8 @@ <h3>[method:Geometry clone]()</h3>
<div>
Creates a new clone of the Geometry.
</div>
+
+ <div>This method copies only vertices, faces and uvs. It does not copy any other properties of the geometry.</div>
<h3>[method:null dispose]()</h3>
<div> | false |
Other | mrdoob | three.js | 80bfa452412ab24774c9268fb3f71fa9408586cc.json | Mover Vector3 legacy code. | src/Three.Legacy.js | @@ -26,6 +26,41 @@ Object.defineProperties( THREE.Box3.prototype, {
}
} );
+//
+
+Object.defineProperties( THREE.Vector3.prototype, {
+ setEulerFromRotationMatrix: {
+ value: function () {
+ console.error( 'THREE.Vector3: .setEulerFromRotationMatrix() has been removed. Use Euler.setFromRotationMatrix() instead.... | true |
Other | mrdoob | three.js | 80bfa452412ab24774c9268fb3f71fa9408586cc.json | Mover Vector3 legacy code. | src/math/Vector3.js | @@ -679,42 +679,6 @@ THREE.Vector3.prototype = {
},
- setEulerFromRotationMatrix: function ( m, order ) {
-
- console.error( 'THREE.Vector3: .setEulerFromRotationMatrix() has been removed. Use Euler.setFromRotationMatrix() instead.' );
-
- },
-
- setEulerFromQuaternion: function ( q, order ) {
-
- console.error... | true |
Other | mrdoob | three.js | 2321132bf8fccb1b93e7df1053352191810b31db.json | build three.js with CinematicCamera | build/three.js | @@ -17126,7 +17126,7 @@ THREE.PerspectiveCamera.prototype.toJSON = function ( meta ) {
* @author mrdoob / http://mrdoob.com/
* @author greggman / http://games.greggman.com/
* @author zz85 / http://www.lab4games.net/zz85/blog
- * @author kaypikun
+ * @author kaypiKun
*/
//Inheriting PerspectiveCamera | true |
Other | mrdoob | three.js | 2321132bf8fccb1b93e7df1053352191810b31db.json | build three.js with CinematicCamera | src/cameras/CinematicCamera.js | @@ -2,7 +2,7 @@
* @author mrdoob / http://mrdoob.com/
* @author greggman / http://games.greggman.com/
* @author zz85 / http://www.lab4games.net/zz85/blog
- * @author kaypikun
+ * @author kaypiKun
*/
//Inheriting PerspectiveCamera | true |
Other | mrdoob | three.js | f757eaf28fd8cf6726d1a92d694645c131cd0d36.json | Shader Clean Up | src/renderers/shaders/ShaderChunk/common.glsl | @@ -31,16 +31,16 @@ struct GeometricContext {
};
-vec3 transformDirection( in vec3 normal, in mat4 matrix ) {
+vec3 transformDirection( in vec3 dir, in mat4 matrix ) {
- return normalize( ( matrix * vec4( normal, 0.0 ) ).xyz );
+ return normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );
}
// http://en.wikiboo... | true |
Other | mrdoob | three.js | f757eaf28fd8cf6726d1a92d694645c131cd0d36.json | Shader Clean Up | src/renderers/shaders/ShaderChunk/lights_phong_pars_fragment.glsl | @@ -14,13 +14,15 @@ varying vec3 vViewPosition;
struct BlinnPhongMaterial {
+
vec3 diffuseColor;
vec3 specularColor;
float specularShininess;
float specularStrength;
+
};
-void BlinnPhongMaterial_RE_DirectLight( const in IncidentLight directLight, const in GeometricContext geometry, const in BlinnPhongM... | true |
Other | mrdoob | three.js | f757eaf28fd8cf6726d1a92d694645c131cd0d36.json | Shader Clean Up | src/renderers/shaders/ShaderChunk/lights_phong_pars_vertex.glsl | @@ -3,9 +3,3 @@
varying vec3 vWorldPosition;
#endif
-
-#if NUM_POINT_LIGHTS > 0
-
- uniform vec3 pointLightPosition[ NUM_POINT_LIGHTS ];
-
-#endif | true |
Other | mrdoob | three.js | f757eaf28fd8cf6726d1a92d694645c131cd0d36.json | Shader Clean Up | src/renderers/shaders/ShaderChunk/lights_standard_fragment.glsl | @@ -1,4 +1,4 @@
-PhysicalMaterial material;
+StandardMaterial material;
material.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor );
-material.specularRoughness = clamp( roughnessFactor, 0.04, 1.0 ); // disney's remapping of [ 0, 1 ] roughness to [ 0.04, 1 ]
+material.specularRoughness = clamp( roughnessFacto... | true |
Other | mrdoob | three.js | f757eaf28fd8cf6726d1a92d694645c131cd0d36.json | Shader Clean Up | src/renderers/shaders/ShaderChunk/lights_standard_pars_fragment.glsl | @@ -1,36 +1,37 @@
-struct PhysicalMaterial {
+struct StandardMaterial {
+
vec3 diffuseColor;
float specularRoughness;
vec3 specularColor;
- float clearCoatWeight;
- float clearCoatRoughness;
+
};
-void PhysicalMaterial_RE_DirectLight( const in IncidentLight directLight, const in GeometricContext geometry, cons... | true |
Other | mrdoob | three.js | f757eaf28fd8cf6726d1a92d694645c131cd0d36.json | Shader Clean Up | src/renderers/shaders/ShaderChunk/lights_template.glsl | @@ -3,8 +3,8 @@
// for specific lighting scenarios.
//
// Instructions for use:
-// - Ensure that both Material_RE_DirectLight, Material_RE_IndirectDiffuseLight and Material_RE_IndirectSpecularLight are defined
-// - If you have defined a Material_RE_IndirectSpecularLight, you need to also provide a Material_Lig... | true |
Other | mrdoob | three.js | f757eaf28fd8cf6726d1a92d694645c131cd0d36.json | Shader Clean Up | src/renderers/shaders/ShaderLib.js | @@ -452,7 +452,6 @@ THREE.ShaderLib = {
THREE.ShaderChunk[ "uv2_pars_vertex" ],
THREE.ShaderChunk[ "displacementmap_pars_vertex" ],
THREE.ShaderChunk[ "envmap_pars_vertex" ],
- THREE.ShaderChunk[ "lights_phong_pars_vertex" ], // use phong chunk for now
THREE.ShaderChunk[ "color_pars_vertex" ],
THR... | true |
Other | mrdoob | three.js | ec6b4b4dd53615f66e1c50d4ebd44e6e2d35144f.json | remove lodash dependency | package.json | @@ -31,7 +31,6 @@
"devDependencies": {
"argparse": "^1.0.3",
"jscs": "^1.13.1",
- "lodash": "^3.10.0",
"uglify-js": "^2.6.0"
}
} | true |
Other | mrdoob | three.js | ec6b4b4dd53615f66e1c50d4ebd44e6e2d35144f.json | remove lodash dependency | test/unit/unittests_three.html | @@ -7,7 +7,6 @@
</head>
<body>
<div id="qunit"></div>
- <script src="../../node_modules/lodash/index.js"></script>
<script src="qunit-1.18.0.js"></script>
<script src="qunit-utils.js"></script>
<script src="SmartComparer.js"></script> | true |
Other | mrdoob | three.js | 244b9529cb2a037f831f32ac0c0496916b2192ad.json | add test to html file | test/unit/unittests_three.html | @@ -28,6 +28,7 @@
<script src="core/InterleavedBuffer.js"></script>
<script src="core/InterleavedBufferAttribute.js"></script>
+ <script src="core/Raycaster.js"></script>
<script src="core/Face3.js"></script>
<script src="core/Geometry.js"></script>
<script src="core/BufferAttribute.js"></script> | false |
Other | mrdoob | three.js | 7961f3a999a330276ff55e4183765cd31c07f345.json | add unit tests for raycaster | test/unit/core/Raycaster.js | @@ -0,0 +1,105 @@
+/**
+ * @author simonThiele / https://github.com/simonThiele
+ */
+
+module( "Raycaster" );
+
+test( "intersectObjects", function() {
+ var raycaster = getRaycaster();
+ var objectsToCheck = getObjectsToCheck();
+
+ ok ( raycaster.intersectObjects(objectsToCheck).length === 1,
+ "no recursive search... | false |
Other | mrdoob | three.js | 1ac1fa92d6c3f8db60b98eb5ceee7adc7d3af359.json | add test to html file | test/unit/unittests_three.html | @@ -28,6 +28,7 @@
<script src="core/InterleavedBuffer.js"></script>
<script src="core/InterleavedBufferAttribute.js"></script>
+ <script src="core/Face3.js"></script>
<script src="core/Geometry.js"></script>
<script src="core/BufferAttribute.js"></script>
<script src="core/BufferGeometry.js"></script> | false |
Other | mrdoob | three.js | 0e886bf700f880b25f956eda49150fb8c384e5aa.json | add unit test for face3 | test/unit/core/Face3.js | @@ -0,0 +1,58 @@
+/**
+ * @author simonThiele / https://github.com/simonThiele
+ */
+
+module( "Face3" );
+
+test( "copy", function() {
+ var instance = new THREE.Face3(0, 1, 2, new THREE.Vector3(0, 1, 0), new THREE.Color(0.25, 0.5, 0.75), 2);
+ var copiedInstance = instance.copy(instance);
+
+ checkCopy(copiedInstance... | false |
Other | mrdoob | three.js | 97374fdcbbd34e07cfb949ee8108ae03cc17fc68.json | add spacings to InterleavedBuffer | test/unit/core/InterleavedBuffer.js | @@ -4,10 +4,10 @@
module( "InterleavedBuffer" );
-function checkInstanceAgainstCopy(instance, copiedInstance) {
+function checkInstanceAgainstCopy( instance, copiedInstance ) {
ok( copiedInstance instanceof THREE.InterleavedBuffer, "the clone has the correct type" );
- for (var i = 0; i < instance.array.length... | false |
Other | mrdoob | three.js | 41789c1aef9c89a01af1a74b41346de103b03a93.json | add spacings to InstancedBufferGeometry | test/unit/core/InstancedBufferGeometry.js | @@ -7,8 +7,10 @@ module( "InstancedBufferGeometry" );
function createClonableMock() {
return {
callCount: 0,
+
clone: function() {
this.callCount++;
+
return this;
}
}
@@ -23,13 +25,13 @@ test( "copy", function() {
var instance = new THREE.InstancedBufferGeometry();
- instance.addGroup(0, 10... | false |
Other | mrdoob | three.js | 2ac769af22f3f0c74b212a67ec977c2b20c46cc0.json | add spacings to InstancedBufferAttribute | test/unit/core/InstancedBufferAttribute.js | @@ -14,9 +14,9 @@ test( "can be created", function() {
});
test( "copy", function() {
- var array = new Float32Array([1, 2, 3, 7, 8, 9]);
- var instance = new THREE.InstancedBufferAttribute(array, 2, 123);
- var copiedInstance = instance.copy(instance);
+ var array = new Float32Array( [1, 2, 3, 7, 8, 9] );
+ var in... | false |
Other | mrdoob | three.js | 7db944e26fcff4c522fd3170d0320ec5e43e6a14.json | add tests to html | test/unit/unittests_three.html | @@ -28,6 +28,7 @@
<script src="core/InterleavedBuffer.js"></script>
<script src="core/InterleavedBufferAttribute.js"></script>
+ <script src="core/Geometry.js"></script>
<script src="core/BufferAttribute.js"></script>
<script src="core/BufferGeometry.js"></script>
<script src="core/Clock.js"></script> | false |
Other | mrdoob | three.js | 5bf7d23f30e21caf0da337e3e84edd71c868e6ba.json | add first bunch of unit tests for geometry | test/unit/core/Geometry.js | @@ -0,0 +1,107 @@
+/**
+ * @author simonThiele / https://github.com/simonThiele
+ */
+
+module( "Geometry" );
+
+test( "rotateX", function() {
+ var geometry = getGeometry();
+
+ var matrix = new THREE.Matrix4();
+ matrix.makeRotationX( Math.PI / 2 ); // 90 degree
+
+ geometry.applyMatrix( matrix );
+
+ var v0 = geomet... | false |
Other | mrdoob | three.js | 8d5fca0a266b8440062de3823a9624dacc7d9a25.json | Add Support for Reflectivity in Maya Exporter
https://github.com/mrdoob/three.js/issues/7634
https://github.com/mrdoob/three.js/issues/7632 | utils/exporters/maya/plug-ins/threeJsFileTranslator.py | @@ -241,6 +241,7 @@ def _exportMaterial(self, mat):
"vertexColors": False
}
if isinstance(mat, nodetypes.Phong):
+ result["reflectivity"] = mat.getReflectivity()
result["colorSpecular"] = mat.getSpecularColor().rgb
result["specularCoef"] = mat.getCosPo... | false |
Other | mrdoob | three.js | 04658393de0f78dc8d537c9409c0bb78c9a060ec.json | Add Support for Reflectivity in Loader.js
https://github.com/mrdoob/three.js/issues/7632
https://github.com/mrdoob/three.js/issues/7634 | src/loaders/Loader.js | @@ -240,6 +240,9 @@ THREE.Loader.prototype = {
if ( value === true ) json.vertexColors = THREE.VertexColors;
if ( value === 'face' ) json.vertexColors = THREE.FaceColors;
break;
+ case 'reflectivity':
+ json.reflectivity = value;
+ break;
defau... | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.