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
96eb4cef277e2a15c2e7c359f2be5a5fb3c01455.json
Remove third parameter from resize listener
examples/webgl_shading_physical.html
@@ -264,7 +264,7 @@ // EVENTS - window.addEventListener( 'resize', onWindowResize, false ); + window.addEventListener( 'resize', onWindowResize ); // GUI
true
Other
mrdoob
three.js
96eb4cef277e2a15c2e7c359f2be5a5fb3c01455.json
Remove third parameter from resize listener
examples/webgl_shadowmap.html
@@ -122,7 +122,7 @@ // - window.addEventListener( 'resize', onWindowResize, false ); + window.addEventListener( 'resize', onWindowResize ); window.addEventListener( 'keydown', onKeyDown, false ); }
true
Other
mrdoob
three.js
96eb4cef277e2a15c2e7c359f2be5a5fb3c01455.json
Remove third parameter from resize listener
examples/webgl_shadowmap_pcss.html
@@ -256,7 +256,7 @@ // - window.addEventListener( 'resize', onWindowResize, false ); + window.addEventListener( 'resize', onWindowResize ); }
true
Other
mrdoob
three.js
96eb4cef277e2a15c2e7c359f2be5a5fb3c01455.json
Remove third parameter from resize listener
examples/webgl_shadowmap_performance.html
@@ -116,7 +116,7 @@ // - window.addEventListener( 'resize', onWindowResize, false ); + window.addEventListener( 'resize', onWindowResize ); }
true
Other
mrdoob
three.js
96eb4cef277e2a15c2e7c359f2be5a5fb3c01455.json
Remove third parameter from resize listener
examples/webgl_shadowmap_pointlight.html
@@ -119,7 +119,7 @@ // - window.addEventListener( 'resize', onWindowResize, false ); + window.addEventListener( 'resize', onWindowResize ); }
true
Other
mrdoob
three.js
96eb4cef277e2a15c2e7c359f2be5a5fb3c01455.json
Remove third parameter from resize listener
examples/webgl_shadowmap_viewer.html
@@ -36,7 +36,7 @@ initMisc(); document.body.appendChild( renderer.domElement ); - window.addEventListener( 'resize', onWindowResize, false ); + window.addEventListener( 'resize', onWindowResize ); }
true
Other
mrdoob
three.js
96eb4cef277e2a15c2e7c359f2be5a5fb3c01455.json
Remove third parameter from resize listener
examples/webgl_shadowmap_vsm.html
@@ -53,7 +53,7 @@ } ); document.body.appendChild( renderer.domElement ); - window.addEventListener( 'resize', onWindowResize, false ); + window.addEventListener( 'resize', onWindowResize ); }
true
Other
mrdoob
three.js
96eb4cef277e2a15c2e7c359f2be5a5fb3c01455.json
Remove third parameter from resize listener
examples/webgl_shadowmesh.html
@@ -61,7 +61,7 @@ renderer.setPixelRatio( window.devicePixelRatio ); renderer.setSize( SCREEN_WIDTH, SCREEN_HEIGHT ); document.getElementById( "container" ).appendChild( renderer.domElement ); - window.addEventListener( 'resize', onWindowResize, false ); + window.addEventListener( 'resize', onWindo...
true
Other
mrdoob
three.js
96eb4cef277e2a15c2e7c359f2be5a5fb3c01455.json
Remove third parameter from resize listener
examples/webgl_simple_gi.html
@@ -191,7 +191,7 @@ controls.minDistance = 1; controls.maxDistance = 10; - window.addEventListener( 'resize', onWindowResize, false ); + window.addEventListener( 'resize', onWindowResize ); }
true
Other
mrdoob
three.js
96eb4cef277e2a15c2e7c359f2be5a5fb3c01455.json
Remove third parameter from resize listener
examples/webgl_sprites.html
@@ -104,7 +104,7 @@ // - window.addEventListener( 'resize', onWindowResize, false ); + window.addEventListener( 'resize', onWindowResize ); }
true
Other
mrdoob
three.js
96eb4cef277e2a15c2e7c359f2be5a5fb3c01455.json
Remove third parameter from resize listener
examples/webgl_sprites_nodes.html
@@ -181,7 +181,7 @@ // Events // - window.addEventListener( 'resize', onWindowResize, false ); + window.addEventListener( 'resize', onWindowResize ); onWindowResize(); animate();
true
Other
mrdoob
three.js
96eb4cef277e2a15c2e7c359f2be5a5fb3c01455.json
Remove third parameter from resize listener
examples/webgl_tonemapping.html
@@ -123,7 +123,7 @@ render(); - window.addEventListener( 'resize', onWindowResize, false ); + window.addEventListener( 'resize', onWindowResize ); gui = new GUI();
true
Other
mrdoob
three.js
96eb4cef277e2a15c2e7c359f2be5a5fb3c01455.json
Remove third parameter from resize listener
examples/webgl_trails.html
@@ -66,7 +66,7 @@ // - window.addEventListener( 'resize', onWindowResize, false ); + window.addEventListener( 'resize', onWindowResize ); }
true
Other
mrdoob
three.js
96eb4cef277e2a15c2e7c359f2be5a5fb3c01455.json
Remove third parameter from resize listener
examples/webgl_video_kinect.html
@@ -165,7 +165,7 @@ // - window.addEventListener( 'resize', onWindowResize, false ); + window.addEventListener( 'resize', onWindowResize ); }
true
Other
mrdoob
three.js
c214c8a5ba8a638a72494e81758a858d25059942.json
Use euclideanModulo in MathUtils.pingPong
src/math/MathUtils.js
@@ -66,7 +66,7 @@ const MathUtils = { pingPong: function ( x, length = 1 ) { - return length - Math.abs( x % ( length * 2 ) - length ); + return length - Math.abs( MathUtils.euclideanModulo( x, length * 2 ) - length ); },
true
Other
mrdoob
three.js
c214c8a5ba8a638a72494e81758a858d25059942.json
Use euclideanModulo in MathUtils.pingPong
test/unit/src/math/MathUtils.tests.js
@@ -157,7 +157,7 @@ export default QUnit.module( 'Maths', () => { assert.strictEqual( MathUtils.pingPong( 2.5 ), 0.5, "Value at 2.5 is 0.5" ); assert.strictEqual( MathUtils.pingPong( 2.5, 2 ), 1.5, "Value at 2.5 with length of 2 is 1.5" ); - assert.strictEqual( MathUtils.pingPong( - 2 ), 0, "Value at -2 is ...
true
Other
mrdoob
three.js
e0cf3e37510a80d7de9d2515627ee05202c3ce77.json
Remove geometry check
examples/js/utils/BufferGeometryUtils.js
@@ -628,12 +628,7 @@ THREE.BufferGeometryUtils = { */ computeMorphedAttributes: function ( object ) { - if ( ! object.geometry ) { - - console.error( 'Please provide an object with a geometry' ); - return null; - - } else if ( ! object.geometry.isBufferGeometry ) { + if ( ! object.geometry.isBufferGeometr...
true
Other
mrdoob
three.js
e0cf3e37510a80d7de9d2515627ee05202c3ce77.json
Remove geometry check
examples/jsm/utils/BufferGeometryUtils.js
@@ -640,12 +640,7 @@ var BufferGeometryUtils = { */ computeMorphedAttributes: function ( object ) { - if ( ! object.geometry ) { - - console.warn( 'Please provide an object with a geometry' ); - return null; - - } else if ( ! object.geometry.isBufferGeometry ) { + if ( ! object.geometry.isBufferGeometry )...
true
Other
mrdoob
three.js
c793e60c34983e07c9e198ba4def19fec5d955d9.json
Remove modularize script (#21587)
.github/CONTRIBUTING.md
@@ -5,15 +5,15 @@ It is assumed that you know a little about node.js and git. If not, [here's some * Install [Node.js](https://nodejs.org/) * Install [Git](https://git-scm.com/) -* [Fork](https://help.github.com/en/github/getting-started-with-github/fork-a-repo) three.js +* [Fork](https://help.github.com/en/github...
true
Other
mrdoob
three.js
c793e60c34983e07c9e198ba4def19fec5d955d9.json
Remove modularize script (#21587)
utils/modularize.js
@@ -1,335 +0,0 @@ -var fs = require( 'fs' ); -var os = require( 'os' ), EOL = os.EOL; -THREE = require( '../build/three.js' ); - -var srcFolder = __dirname + '/../examples/js/'; -var dstFolder = __dirname + '/../examples/jsm/'; - -var files = [ - { path: 'animation/AnimationClipCreator.js', dependencies: [], ignoreList...
true
Other
mrdoob
three.js
dfc5efcc5bb6522e42324c098acc8e8c21c9fdcd.json
Normalize CSM imports (#21566)
examples/jsm/csm/CSM.js
@@ -7,8 +7,8 @@ import { Matrix4, Box3 } from '../../../build/three.module.js'; -import Frustum from './Frustum.js'; -import Shader from './Shader.js'; +import { Frustum } from './Frustum.js'; +import { CSMShader } from './CSMShader.js'; const _cameraToLightMatrix = new Matrix4(); const _lightSpaceFrustum = ne...
true
Other
mrdoob
three.js
dfc5efcc5bb6522e42324c098acc8e8c21c9fdcd.json
Normalize CSM imports (#21566)
examples/jsm/csm/CSMShader.js
@@ -1,6 +1,6 @@ import { ShaderChunk } from '../../../build/three.module.js'; -export default { +const CSMShader = { lights_fragment_begin: /* glsl */` GeometricContext geometry; @@ -231,3 +231,5 @@ uniform float shadowFar; #endif ` + ShaderChunk.lights_pars_begin }; + +export { CSMShader };
true
Other
mrdoob
three.js
dfc5efcc5bb6522e42324c098acc8e8c21c9fdcd.json
Normalize CSM imports (#21566)
examples/jsm/csm/Frustum.js
@@ -2,7 +2,7 @@ import { Vector3, Matrix4 } from '../../../build/three.module.js'; const inverseProjectionMatrix = new Matrix4(); -export default class Frustum { +class Frustum { constructor( data ) { @@ -148,3 +148,5 @@ export default class Frustum { } } + +export { Frustum };
true
Other
mrdoob
three.js
0af5454b19a3cf15fe126e9e767b961de3046713.json
prevent unwanted references (#18564)
src/core/EventDispatcher.js
@@ -77,6 +77,8 @@ Object.assign( EventDispatcher.prototype, { } + event.target = null; + } }
false
Other
mrdoob
three.js
232e4e8fcac86aed1bc14424a2f0515207696213.json
fix typo in the doc: Matrix4#makeShear (#22059)
docs/api/en/math/Matrix4.html
@@ -319,12 +319,12 @@ <h3>[method:this makeScale]( [param:Float x], [param:Float y], [param:Float z] ) <h3>[method:this makeShear]( [param:Float xy], [param:Float xz], [param:Float yx], [param:Float yz], [param:Float zx], [param:Float zy] )</h3> <p> - [page:Float x] - the amount to shear X by Y.<br /> - [pa...
false
Other
mrdoob
three.js
6fb297a402a3bf60d11287a37164a42954debd6f.json
fix renderBufferDirect parameter in doc (#22049)
docs/api/en/renderers/WebGLRenderer.html
@@ -409,7 +409,7 @@ <h3>[method:null render]( [param:Object3D scene], [param:Camera camera] )</h3> [page:WebGLRenderer.autoClearDepth autoClearDepth] properties to false. To forcibly clear one ore more buffers call [page:WebGLRenderer.clear .clear]. </p> - <h3>[method:null renderBufferDirect]( [param:Camera c...
true
Other
mrdoob
three.js
6fb297a402a3bf60d11287a37164a42954debd6f.json
fix renderBufferDirect parameter in doc (#22049)
docs/api/zh/renderers/WebGLRenderer.html
@@ -363,7 +363,7 @@ <h3>[method:null render]( [param:Object3D scene], [param:Camera camera] )</h3> 即便forceClear设为true, 也可以通过将[page:WebGLRenderer.autoClearColor autoClearColor]、[page:WebGLRenderer.autoClearStencil autoClearStencil]或[page:WebGLRenderer.autoClearDepth autoClearDepth]属性的值设为false来阻止对应缓存被清除。 </p> - ...
true
Other
mrdoob
three.js
0aa0fa7dea0d600500eab5b43df30dba0321227c.json
Add license comment to fflate.
examples/js/libs/fflate.min.js
@@ -1 +1,7 @@ +/*! +fflate - fast JavaScript compression/decompression +<https://101arrowz.github.io/fflate> +Licensed under MIT. https://github.com/101arrowz/fflate/blob/master/LICENSE +Subset included: synchronous unzip, gunzip, and unzlib +*/ !function(f){typeof exports=="object"&&typeof module!="undefined"?module....
true
Other
mrdoob
three.js
0aa0fa7dea0d600500eab5b43df30dba0321227c.json
Add license comment to fflate.
examples/jsm/libs/fflate.module.min.js
@@ -1 +1,7 @@ +/*! +fflate - fast JavaScript compression/decompression +<https://101arrowz.github.io/fflate> +Licensed under MIT. https://github.com/101arrowz/fflate/blob/master/LICENSE +Subset included: synchronous unzip, gunzip, and unzlib +*/ "use strict";var r=Uint8Array,n=Uint16Array,e=Uint32Array,t=new r([0,0,0,...
true
Other
mrdoob
three.js
19dbe70f46da8bd9831da4de429b6768ac0fb92a.json
Fix objectPath formatting Fixed objectPath formatting to support Windows PC file paths separated by "\".
utils/packLDrawModel.js
@@ -172,7 +172,7 @@ function parseObject( fileName, isRoot ) { } - var objectPath = path.join( prefix, fileName ); + var objectPath = path.join( prefix, fileName ).trim().replace( /\\/g, '/' ); if ( ! objectContent ) {
false
Other
mrdoob
three.js
3bc9e619f7822cf5bbd95ed8495c2063f6e26b6f.json
Remove converter scripts.
utils/converters/README.md
@@ -1,18 +0,0 @@ -Utilities for converting model files to the Three.js JSON format. -It's necessary to install the [esm](https://www.npmjs.com/package/esm) npm package before you can use the converters. - -## obj2three.js - -Usage: - -``` -node -r esm obj2three.js model.obj -``` - -## fbx2three.js - -Usage: - -``` -nod...
true
Other
mrdoob
three.js
3bc9e619f7822cf5bbd95ed8495c2063f6e26b6f.json
Remove converter scripts.
utils/converters/fbx2three.js
@@ -1,81 +0,0 @@ -import fs from 'fs'; -import path from 'path'; - -import { FBXLoader } from '../../examples/jsm/loaders/FBXLoader.js'; -import { ImageLoader, ImageUtils, LoaderUtils } from '../../build/three.module.js'; - -if ( process.argv.length <= 2 ) { - - console.log( `Usage: ${path.basename( __filename )} model...
true
Other
mrdoob
three.js
3bc9e619f7822cf5bbd95ed8495c2063f6e26b6f.json
Remove converter scripts.
utils/converters/obj2three.js
@@ -1,29 +0,0 @@ -import fs from 'fs'; -import path from 'path'; - -import { OBJLoader } from '../../examples/jsm/loaders/OBJLoader.js'; - -if ( process.argv.length <= 2 ) { - - console.log( "Usage: " + path.basename( __filename ) + " model.obj" ); - process.exit( - 1 ); - -} - -// - -const PRECISION = 6; - -function p...
true
Other
mrdoob
three.js
528193fdac968ed7d872a5e5c6f63012b8a89ac9.json
Remove extension from node exports
package.json
@@ -10,8 +10,8 @@ "import": "./build/three.module.js", "require": "./build/three.cjs" }, - "./examples/jsm/*": "./examples/jsm/*.js", - "./src/*": "./src/*.js" + "./examples/jsm/*": "./examples/jsm/*", + "./src/*": "./src/*" }, "repository": { "type": "git",
false
Other
mrdoob
three.js
98f64b0030da65117057190fb871c6be9baab811.json
Convert vertex colors to Linear from sRGB (#23340)
examples/jsm/loaders/OBJLoader.js
@@ -11,7 +11,8 @@ import { MeshPhongMaterial, Points, PointsMaterial, - Vector3 + Vector3, + Color } from 'three'; // o object_name | g group_name @@ -30,6 +31,8 @@ const _vC = new Vector3(); const _ab = new Vector3(); const _cb = new Vector3(); +const _color = new Color(); + function ParserState() { ...
false
Other
mrdoob
three.js
484f9e24f25cceaf68fd8684e021f3e57579ab19.json
Update LICENSE (#23131)
LICENSE
@@ -1,6 +1,6 @@ The MIT License -Copyright © 2010-2021 three.js authors +Copyright © 2010-2022 three.js authors Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal
false
Other
mrdoob
three.js
a221c4a17770c4b79ba9b4055acb3e0ba4fd4f55.json
Add isObject3D unittest (#23121)
test/unit/src/core/Object3D.tests.js
@@ -122,9 +122,13 @@ export default QUnit.module( 'Core', () => { } ); // PUBLIC STUFF - QUnit.todo( 'isObject3D', ( assert ) => { + QUnit.test( 'isObject3D', ( assert ) => { - assert.ok( false, 'everything\'s gonna be alright' ); + const object = new Object3D(); + assert.ok( object.isObject3D, 'Objec...
false
Other
mrdoob
three.js
0b035d06ad39b342d2169548115089de13d4d7d0.json
Add a placeholder to the examples (#23045) * Add a placeholder to the examples * add placeholder to coverage * cleanup placeholder * make it contained in index.html * remove favicons
examples/index.html
@@ -114,6 +114,13 @@ <h1><a href="https://threejs.org">three.js</a></h1> } + if ( viewer.src === '' ) { + + viewer.srcdoc = document.getElementById( 'PlaceholderHTML' ).innerHTML; + viewer.style.display = 'unset'; + + } + filterInput.value = extractQuery(); if ( filterInput.value !== '' ) ...
false
Other
mrdoob
three.js
ab69febff58bc0c42920eeb0ffa514de759c531d.json
add getTypedArray unittest (#23051)
test/unit/src/utils.tests.js
@@ -1,6 +1,6 @@ /* global QUnit */ -import { arrayMin, arrayMax } from '../../../src/utils'; +import { arrayMin, arrayMax, getTypedArray } from '../../../src/utils'; QUnit.module( 'utils', () => { @@ -29,4 +29,18 @@ QUnit.module( 'utils', () => { } ); + QUnit.test( 'getTypedArray', ( assert ) => { + + as...
false
Other
mrdoob
three.js
9dee529ef9256719725787bdd15c31d1ed768164.json
Fix a typo related to the STEP MathNode (#23042)
examples/jsm/renderers/nodes/math/MathNode.js
@@ -187,7 +187,7 @@ class MathNode extends TempNode { } else if ( method === MathNode.STEP ) { params.push( - b.build( builder, builder.getTypeLength( a.getNodeType( builder ) ) === 1 ? 'float' : inputType ), + a.build( builder, builder.getTypeLength( a.getNodeType( builder ) ) === 1 ? 'float' : inpu...
false
Other
mrdoob
three.js
2e17ddbacb5b4e994f59b418b1b82f1b1b15943c.json
Improve webgl_loader_svg.html (#23040)
examples/webgl_loader_svg.html
@@ -22,17 +22,13 @@ <script type="module"> import * as THREE from '../build/three.module.js'; - - import Stats from './jsm/libs/stats.module.js'; - import { GUI } from './jsm/libs/lil-gui.module.min.js'; import { OrbitControls } from './jsm/controls/OrbitControls.js'; import { SVGLoader } from '....
false
Other
mrdoob
three.js
48a642ec2174a3d17a5302d53e88eb29983ef6f7.json
change default value of fog property
docs/api/en/materials/SpriteMaterial.html
@@ -67,7 +67,7 @@ <h3>[property:Color color]</h3> <p>[page:Color] of the material, by default set to white (0xffffff). The [page:.map] is mutiplied by the color.</p> <h3>[property:boolean fog]</h3> - <p>Whether or not this material affected by the scene's fog. Default is false</p> + <p>Whether or not this mat...
false
Other
mrdoob
three.js
5c81a64e0c48e40120dfcfa60ee3e51ea5da6bbc.json
Move extension name to EXTENSIONS dictionary
examples/js/loaders/GLTFLoader.js
@@ -333,6 +333,7 @@ THREE.GLTFLoader = ( function () { KHR_MATERIALS_CLEARCOAT: 'KHR_materials_clearcoat', KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS: 'KHR_materials_pbrSpecularGlossiness', KHR_MATERIALS_UNLIT: 'KHR_materials_unlit', + KHR_TEXTURE_BASISU: 'KHR_texture_basisu', KHR_TEXTURE_TRANSFORM: 'KHR_textur...
true
Other
mrdoob
three.js
5c81a64e0c48e40120dfcfa60ee3e51ea5da6bbc.json
Move extension name to EXTENSIONS dictionary
examples/jsm/loaders/GLTFLoader.js
@@ -398,6 +398,7 @@ var GLTFLoader = ( function () { KHR_MATERIALS_CLEARCOAT: 'KHR_materials_clearcoat', KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS: 'KHR_materials_pbrSpecularGlossiness', KHR_MATERIALS_UNLIT: 'KHR_materials_unlit', + KHR_TEXTURE_BASISU: 'KHR_texture_basisu', KHR_TEXTURE_TRANSFORM: 'KHR_texture_...
true
Other
mrdoob
three.js
80a9ebe566736fcb34b0c732ea4ea620c182b414.json
Set sRGB encoding. Also some clean up.
examples/webgl_materials_cubemap_dynamic.html
@@ -28,7 +28,7 @@ textureLoader.load( 'textures/2294472375_24a3b8ef46_o.jpg', function ( texture ) { - texture.mapping = THREE.UVMapping; + texture.encoding = THREE.sRGBEncoding; init( texture ); animate(); @@ -40,37 +40,45 @@ renderer = new THREE.WebGLRenderer( { antialias: true } ); ...
false
Other
mrdoob
three.js
a56e9baae23cb2e2abbae73606dda1694548f29f.json
Retain filter settings
src/renderers/WebGLCubeRenderTarget.js
@@ -37,6 +37,10 @@ WebGLCubeRenderTarget.prototype.fromEquirectangularTexture = function ( renderer this.texture.format = texture.format; this.texture.encoding = texture.encoding; + this.texture.generateMipmaps = texture.generateMipmaps; + this.texture.minFilter = texture.minFilter; + this.texture.magFilter = tex...
false
Other
mrdoob
three.js
cfd945d1f8b8e88f32e9a6c02656d7a5c9d90d91.json
Set flipY to false
examples/webgl_buffergeometry_instancing_interleaved.html
@@ -109,6 +109,7 @@ var material = new THREE.MeshBasicMaterial(); material.map = new THREE.TextureLoader().load( 'textures/crate.gif' ); + material.map.flipY = false; // per instance data
false
Other
mrdoob
three.js
bb913300c78cd0b5b33c9323f1b89c4dff22456f.json
Fix loading files without BasisU extensions
examples/jsm/loaders/GLTFLoader.js
@@ -637,7 +637,7 @@ var GLTFLoader = ( function () { if ( ! textureDef.extensions || ! textureDef.extensions[ this.name ] ) { - return Promise.resolve(); + return null; } @@ -2078,7 +2078,6 @@ var GLTFLoader = ( function () { var parser = this; var json = this.json; var options = this.options...
false
Other
mrdoob
three.js
e76ae5cf4cb31b428f178ed8f0d775cb16874354.json
Update chinese docs with corresponding text.
docs/api/zh/extras/core/CurvePath.html
@@ -50,7 +50,7 @@ <h3>[method:null closePath]()</h3> <p>添加一条[page:LineCurve lineCurve]用于闭合路径。</p> <h3>[method:Array getCurveLengths]()</h3> - <p>将[page:.curves]数组中曲线的长度相加。</p> + <p>Get list of cumulative curve lengths of the curves in the [page:.curves] array.</p> <h3>[method:Vector getPoint]( [param:Flo...
false
Other
mrdoob
three.js
71c8b3f6cbf8da5d1939608314002b70a3d4a2d7.json
Map more surfaces as horizontal-like (#21875)
src/geometries/ExtrudeGeometry.js
@@ -731,7 +731,7 @@ const WorldUVGenerator = { const d_y = vertices[ indexD * 3 + 1 ]; const d_z = vertices[ indexD * 3 + 2 ]; - if ( Math.abs( a_y - b_y ) < 0.01 ) { + if ( Math.abs( a_y - b_y ) < Math.abs( a_x - b_x ) ) { return [ new Vector2( a_x, 1 - a_z ),
false
Other
mrdoob
three.js
6ae46407ec2b17c63759acdb72d6d3b4a7924697.json
Update Spherical.html (#21873)
docs/api/zh/math/Spherical.html
@@ -19,10 +19,10 @@ <h3>[name]( [param:Float radius], [param:Float phi], [param:Float theta] )</h3> <p> [page:Float radius] - 半径值,或者说从该点到原点的 [link:https://en.wikipedia.org/wiki/Euclidean_distance Euclidean distance](欧几里得距离,即直线距离)。默认值为*1.0*。<br /> - [page:Float phi] - polar angle in radians from the y (up) axi...
false
Other
mrdoob
three.js
09a68603cda2e17bf1a60988fa124132ee5f86fa.json
Update GLTFExporter.js (#21858) * Update GLTFExporter.js * Update GLTFExporter.js
examples/js/exporters/GLTFExporter.js
@@ -1080,7 +1080,7 @@ if ( material.emissive ) { - // emissiveFactor + // note: `emissive` is not scaled by `material.emissiveIntensity` for now to accommodate glTF spec. see #21849. const emissive = material.emissive.toArray(); if ( ! equalArray( emissive, [ 0, 0, 0 ] ) ) {
true
Other
mrdoob
three.js
09a68603cda2e17bf1a60988fa124132ee5f86fa.json
Update GLTFExporter.js (#21858) * Update GLTFExporter.js * Update GLTFExporter.js
examples/jsm/exporters/GLTFExporter.js
@@ -1176,7 +1176,7 @@ class GLTFWriter { if ( material.emissive ) { - // emissiveFactor + // note: `emissive` is not scaled by `material.emissiveIntensity` for now to accommodate glTF spec. see #21849. const emissive = material.emissive.toArray(); if ( ! equalArray( emissive, [ 0, 0, 0 ] ) ) {
true
Other
mrdoob
three.js
39bff4a955304d23f6de79edabd712acbac9e6da.json
Respect morph targets in OutlinePass (#21836)
examples/js/postprocessing/OutlinePass.js
@@ -395,7 +395,7 @@ #include <project_vertex> vPosition = mvPosition; - vec4 worldPosition = modelMatrix * vec4( position, 1.0 ); + vec4 worldPosition = modelMatrix * vec4( transformed, 1.0 ); projTexCoord = textureMatrix * worldPosition; }`,
true
Other
mrdoob
three.js
39bff4a955304d23f6de79edabd712acbac9e6da.json
Respect morph targets in OutlinePass (#21836)
examples/jsm/postprocessing/OutlinePass.js
@@ -453,7 +453,7 @@ class OutlinePass extends Pass { #include <project_vertex> vPosition = mvPosition; - vec4 worldPosition = modelMatrix * vec4( position, 1.0 ); + vec4 worldPosition = modelMatrix * vec4( transformed, 1.0 ); projTexCoord = textureMatrix * worldPosition; }`,
true
Other
mrdoob
three.js
9e22a6a250fada8e4c6eae57355e76709f5ecbd7.json
Update Core.html (#24422)
docs/api/en/constants/Core.html
@@ -50,6 +50,14 @@ <h2>Mouse Buttons</h2> THREE.MOUSE.RIGHT </code> + <h2>Touch Actions</h2> + <code> +THREE.TOUCH.ROTATE +THREE.TOUCH.PAN +THREE.TOUCH.DOLLY_PAN +THREE.TOUCH.DOLLY_ROTATE + </code> + <h2>Source</h2> <p>
false
Other
mrdoob
three.js
920a716c719f79ec0705d777c7e174513dcbd4f6.json
Add @deprecated to RGBFormat (#24426) * Update constants.js * Update constants.js Co-authored-by: Michael Herzog <michael.herzog@human-interactive.org>
src/constants.js
@@ -85,7 +85,7 @@ export const UnsignedShort4444Type = 1017; export const UnsignedShort5551Type = 1018; export const UnsignedInt248Type = 1020; export const AlphaFormat = 1021; -export const RGBFormat = 1022; +export const RGBFormat = 1022; // @deprecated since r137 export const RGBAFormat = 1023; export const Lum...
false
Other
mrdoob
three.js
a907060783c020581eaeedd6cde05cbb6c0e0802.json
Update MaterialLoader.js (#24402) Adding the field glslVersion
src/loaders/MaterialLoader.js
@@ -225,6 +225,7 @@ class MaterialLoader extends Loader { if ( json.defines !== undefined ) material.defines = json.defines; if ( json.vertexShader !== undefined ) material.vertexShader = json.vertexShader; if ( json.fragmentShader !== undefined ) material.fragmentShader = json.fragmentShader; + if ( json.gls...
false
Other
mrdoob
three.js
03f35a96ae36507a2d234f6f0726dd64393ee49d.json
Remove workaround for Adreno (#24399)
examples/jsm/nodes/math/MathNode.js
@@ -1,6 +1,5 @@ import TempNode from '../core/TempNode.js'; import ExpressionNode from '../core/ExpressionNode.js'; -import JoinNode from '../utils/JoinNode.js'; import SplitNode from '../utils/SplitNode.js'; import OperatorNode from './OperatorNode.js'; @@ -131,17 +130,7 @@ class MathNode extends TempNode { ...
false
Other
mrdoob
three.js
d9a8da2290719e6224104ebd55ab71b38e578d74.json
Remove workaround for Adreno bug (#24390)
src/renderers/shaders/ShaderChunk/bumpmap_pars_fragment.glsl.js
@@ -24,11 +24,9 @@ export default /* glsl */` vec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy, float faceDirection ) { - // Workaround for Adreno 3XX dFd*( vec3 ) bug. See #9988 - - vec3 vSigmaX = vec3( dFdx( surf_pos.x ), dFdx( surf_pos.y ), dFdx( surf_pos.z ) ); - vec3 vSigmaY = vec3( dFdy( ...
true
Other
mrdoob
three.js
d9a8da2290719e6224104ebd55ab71b38e578d74.json
Remove workaround for Adreno bug (#24390)
src/renderers/shaders/ShaderChunk/normalmap_pars_fragment.glsl.js
@@ -19,10 +19,8 @@ export default /* glsl */` vec3 perturbNormal2Arb( vec3 eye_pos, vec3 surf_norm, vec3 mapN, float faceDirection ) { - // Workaround for Adreno 3XX dFd*( vec3 ) bug. See #9988 - - vec3 q0 = vec3( dFdx( eye_pos.x ), dFdx( eye_pos.y ), dFdx( eye_pos.z ) ); - vec3 q1 = vec3( dFdy( eye_pos.x ), d...
true
Other
mrdoob
three.js
96bc672f4b17482b3a8e20680aaf723def1933b1.json
Simplify implementation of PlaneHelper (#24378) * Simplify implementation of PlaneHelper * Remove unnecessary include file
src/helpers/PlaneHelper.js
@@ -4,15 +4,14 @@ import { LineBasicMaterial } from '../materials/LineBasicMaterial.js'; import { MeshBasicMaterial } from '../materials/MeshBasicMaterial.js'; import { Float32BufferAttribute } from '../core/BufferAttribute.js'; import { BufferGeometry } from '../core/BufferGeometry.js'; -import { FrontSide, BackSid...
false
Other
mrdoob
three.js
a7de96e860559468081f752bee37220a307f8f73.json
fix property (#23658)
examples/jsm/controls/TrackballControls.js
@@ -703,7 +703,7 @@ class TrackballControls extends EventDispatcher { case 2: _state = STATE.TOUCH_ZOOM_PAN; - _moveCurr.copy( getMouseOnCircle( event.pageX - _movePrev.pageX, event.pageY - _movePrev.pageY ) ); + _moveCurr.copy( getMouseOnCircle( event.pageX - _movePrev.x, event.pageY - _movePrev.y...
false
Other
mrdoob
three.js
ac69703e278a5c1326f62bf02f61db19f847c391.json
Add buffer() function (#23656)
examples/jsm/nodes/ShaderNode.js
@@ -5,6 +5,7 @@ import AttributeNode from './core/AttributeNode.js'; // input nodes import BoolNode from './inputs/BoolNode.js'; +import BufferNode from './inputs/BufferNode.js'; import ColorNode from './inputs/ColorNode.js'; import FloatNode from './inputs/FloatNode.js'; import IntNode from './inputs/IntNode.js...
false
Other
mrdoob
three.js
a65c32328f7ac4c602079ca51078e3e4fee3123e.json
Fix normalized morph color attribute (#23654)
src/renderers/webgl/WebGLMorphtargets.js
@@ -139,7 +139,7 @@ function WebGLMorphtargets( gl, capabilities, textures ) { morph.fromBufferAttribute( morphColor, j ); - if ( morphColor.normalized === true ) denormalize( morph, morphNormal ); + if ( morphColor.normalized === true ) denormalize( morph, morphColor ); buffer[ offset...
false
Other
mrdoob
three.js
8323901ec2af183d9361d7c50c5d45e731792798.json
Add BoolNode and UintNode (#23636)
examples/jsm/nodes/ShaderNode.js
@@ -4,9 +4,11 @@ import VarNode from './core/VarNode.js'; import AttributeNode from './core/AttributeNode.js'; // input nodes +import BoolNode from './inputs/BoolNode.js'; import ColorNode from './inputs/ColorNode.js'; import FloatNode from './inputs/FloatNode.js'; import IntNode from './inputs/IntNode.js'; +imp...
true
Other
mrdoob
three.js
8323901ec2af183d9361d7c50c5d45e731792798.json
Add BoolNode and UintNode (#23636)
examples/jsm/nodes/core/NodeBuilder.js
@@ -155,7 +155,10 @@ class NodeBuilder { // rename to generate getConst( type, value ) { - if ( type === 'float' ) return value + ( value % 1 ? '' : '.0' ); + if ( type === 'float' ) return toFloat( value ); + if ( type === 'int' ) return `${ Math.round( value ) }`; + if ( type === 'uint' ) return ( value >= ...
true
Other
mrdoob
three.js
8323901ec2af183d9361d7c50c5d45e731792798.json
Add BoolNode and UintNode (#23636)
examples/jsm/nodes/inputs/BoolNode.js
@@ -0,0 +1,33 @@ +import InputNode from '../core/InputNode.js'; + +class BoolNode extends InputNode { + + constructor( value = false ) { + + super( 'bool' ); + + this.value = value; + + } + + serialize( data ) { + + super.serialize( data ); + + data.value = this.value; + + } + + deserialize( data ) { + + super.ser...
true
Other
mrdoob
three.js
8323901ec2af183d9361d7c50c5d45e731792798.json
Add BoolNode and UintNode (#23636)
examples/jsm/nodes/inputs/UintNode.js
@@ -0,0 +1,33 @@ +import InputNode from '../core/InputNode.js'; + +class UintNode extends InputNode { + + constructor( value = 0 ) { + + super( 'uint' ); + + this.value = value; + + } + + serialize( data ) { + + super.serialize( data ); + + data.value = this.value; + + } + + deserialize( data ) { + + super.seriali...
true
Other
mrdoob
three.js
8323901ec2af183d9361d7c50c5d45e731792798.json
Add BoolNode and UintNode (#23636)
examples/jsm/renderers/webgpu/nodes/WebGPUNodeBuilder.js
@@ -31,6 +31,8 @@ import { getRoughness } from 'three-nodes/functions/PhysicalMaterialFunctions.js const wgslTypeLib = { float: 'f32', int: 'i32', + uint: 'u32', + bool: 'bool', vec2: 'vec2<f32>', vec3: 'vec3<f32>', vec4: 'vec4<f32>',
true
Other
mrdoob
three.js
6fb8b456657239afd9fabde4ff78dc5905f7e368.json
remove eslint errors in docs folder (#22941)
docs/index.html
@@ -404,7 +404,7 @@ <h1><a href="https://threejs.org">three.js</a></h1> if ( search ) { - let link = sectionLink.href.split( /[?#]/ )[ 0 ]; + const link = sectionLink.href.split( /[?#]/ )[ 0 ]; sectionLink.href = `${link}?q=${search}`; } else { @@ -458,7 +458,7 @@ <h1><a href="https://threejs.o...
true
Other
mrdoob
three.js
6fb8b456657239afd9fabde4ff78dc5905f7e368.json
remove eslint errors in docs folder (#22941)
docs/scenes/bones-browser.html
@@ -42,7 +42,7 @@ Vector3, Uint16BufferAttribute, WebGLRenderer - } from "../../build/three.module.js"; + } from '../../build/three.module.js'; import { GUI } from '../../examples/jsm/libs/lil-gui.module.min.js'; import { OrbitControls } from '../../examples/jsm/controls/OrbitControls.js'; ...
true
Other
mrdoob
three.js
b63ffffb6bb7f2fde9160d775b25d288926f7cf5.json
fix recent webxr changes (#22918)
src/renderers/webxr/WebXRManager.js
@@ -13,9 +13,10 @@ import { DepthStencilFormat, RGBAFormat, RGBFormat, + sRGBEncoding, UnsignedByteType, UnsignedShortType, - UnsignedInt248Type, + UnsignedInt248Type } from '../../constants.js'; class WebXRManager extends EventDispatcher { @@ -269,7 +270,7 @@ class WebXRManager extends EventDispatcher { ...
false
Other
mrdoob
three.js
c748762b7e2fd7fff6882e7c08402633edda8137.json
Introduce FramebufferTexture. (#22916)
examples/jsm/objects/Lensflare.js
@@ -2,14 +2,12 @@ import { AdditiveBlending, Box2, BufferGeometry, - ClampToEdgeWrapping, Color, - DataTexture, + FramebufferTexture, InterleavedBuffer, InterleavedBufferAttribute, Mesh, MeshBasicMaterial, - NearestFilter, RGBFormat, RawShaderMaterial, Vector2, @@ -34,17 +32,8 @@ class Lensflare e...
true
Other
mrdoob
three.js
c748762b7e2fd7fff6882e7c08402633edda8137.json
Introduce FramebufferTexture. (#22916)
examples/jsm/utils/RoughnessMipmapper.js
@@ -14,7 +14,8 @@ import { PlaneGeometry, RawShaderMaterial, Vector2, - WebGLRenderTarget + WebGLRenderTarget, + FramebufferTexture } from '../../../build/three.module.js'; const _mipmapMaterial = _getMipmapMaterial(); @@ -68,42 +69,27 @@ class RoughnessMipmapper { } - if ( width !== roughnessMap.imag...
true
Other
mrdoob
three.js
c748762b7e2fd7fff6882e7c08402633edda8137.json
Introduce FramebufferTexture. (#22916)
examples/webgl_framebuffer_texture.html
@@ -95,9 +95,7 @@ // - const data = new Uint8Array( textureSize * textureSize * 3 ); - - texture = new THREE.DataTexture( data, textureSize, textureSize, THREE.RGBFormat ); + texture = new THREE.FramebufferTexture( textureSize, textureSize, THREE.RGBFormat ); texture.minFilter = THREE.NearestFilt...
true
Other
mrdoob
three.js
c748762b7e2fd7fff6882e7c08402633edda8137.json
Introduce FramebufferTexture. (#22916)
src/Three.js
@@ -26,6 +26,7 @@ export { Line } from './objects/Line.js'; export { Points } from './objects/Points.js'; export { Group } from './objects/Group.js'; export { VideoTexture } from './textures/VideoTexture.js'; +export { FramebufferTexture } from './textures/FramebufferTexture.js'; export { DataTexture } from './text...
true
Other
mrdoob
three.js
c748762b7e2fd7fff6882e7c08402633edda8137.json
Introduce FramebufferTexture. (#22916)
src/renderers/WebGLRenderer.js
@@ -2038,6 +2038,13 @@ function WebGLRenderer( parameters = {} ) { this.copyFramebufferToTexture = function ( position, texture, level = 0 ) { + if ( texture.isFramebufferTexture !== true ) { + + console.error( 'THREE.WebGLRenderer: copyFramebufferToTexture() can only be used with FramebufferTexture.' ); + r...
true
Other
mrdoob
three.js
c748762b7e2fd7fff6882e7c08402633edda8137.json
Introduce FramebufferTexture. (#22916)
src/renderers/webgl/WebGLTextures.js
@@ -709,6 +709,10 @@ function WebGLTextures( _gl, extensions, state, properties, capabilities, utils, state.texImage3D( _gl.TEXTURE_3D, 0, glInternalFormat, image.width, image.height, image.depth, 0, glFormat, glType, image.data ); + } else if ( texture.isFramebufferTexture ) { + + // texture data extracted ...
true
Other
mrdoob
three.js
c748762b7e2fd7fff6882e7c08402633edda8137.json
Introduce FramebufferTexture. (#22916)
src/textures/FramebufferTexture.js
@@ -0,0 +1,25 @@ +import { Texture } from './Texture.js'; +import { NearestFilter } from '../constants.js'; + +class FramebufferTexture extends Texture { + + constructor( width, height, format ) { + + super( { width, height } ); + + this.format = format; + + this.magFilter = NearestFilter; + this.minFilter = Neares...
true
Other
mrdoob
three.js
92bb9158efc0d52fb95d12bf474dc857e8e3c639.json
Fix collada transparency handling. (#22907) According to the official collada specification, the opaque attribute for the transparent object is optional, and the default value is 'A_ONE'.
examples/jsm/loaders/ColladaLoader.js
@@ -1276,7 +1276,7 @@ class ColladaLoader extends Loader { break; case 'transparent': data[ child.nodeName ] = { - opaque: child.getAttribute( 'opaque' ), + opaque: child.hasAttribute( 'opaque' ) ? child.getAttribute( 'opaque' ) : 'A_ONE', data: parseEffectParameter( child ) ...
false
Other
mrdoob
three.js
8fc1cecff0e02308788215ce02fb4390794188b1.json
Fix a typo (#22905) Remove the dot from the final menu element. 🐬
manual/list.json
@@ -49,7 +49,7 @@ "Billboards and Facades": "en/billboards", "Freeing Resources": "en/cleanup", "Making Voxel Geometry (Minecraft)": "en/voxel-geometry", - "Start making a Game.": "en/game" + "Start making a Game": "en/game" }, "WebXR": { "VR - Basics": "en/webxr", @@ -110,7 +110,7 @@ "Bil...
false
Other
mrdoob
three.js
1d544d0fd254775c36e222e088833a3d4b3c2220.json
Remove LogLuv encoding from the shaders (#22876) * Remove logLuv encoding from the shaders * Update constants
docs/api/en/constants/Textures.html
@@ -561,7 +561,6 @@ <h2>Encoding</h2> THREE.sRGBEncoding THREE.GammaEncoding THREE.RGBEEncoding - THREE.LogLuvEncoding THREE.RGBM7Encoding THREE.RGBM16Encoding THREE.RGBDEncoding
true
Other
mrdoob
three.js
1d544d0fd254775c36e222e088833a3d4b3c2220.json
Remove LogLuv encoding from the shaders (#22876) * Remove logLuv encoding from the shaders * Update constants
examples/jsm/nodes/utils/ColorSpaceNode.js
@@ -197,7 +197,6 @@ ColorSpaceNode.Nodes = ( function () { }` ); - const LinearToRGBD = new FunctionNode( /* glsl */` vec3 LinearToRGBD( in vec4 value, in float maxRange ) { @@ -209,45 +208,6 @@ ColorSpaceNode.Nodes = ( function () { }` ); - // LogLuv reference: http://graphicrants.blogspot.ca/2009...
true
Other
mrdoob
three.js
1d544d0fd254775c36e222e088833a3d4b3c2220.json
Remove LogLuv encoding from the shaders (#22876) * Remove logLuv encoding from the shaders * Update constants
examples/jsm/renderers/nodes/display/ColorSpaceNode.js
@@ -3,7 +3,7 @@ import { ShaderNode } from '../ShaderNode.js'; import { LinearEncoding/*, sRGBEncoding, RGBEEncoding, RGBM7Encoding, RGBM16Encoding, - RGBDEncoding, GammaEncoding, LogLuvEncoding*/ } from 'three'; + RGBDEncoding, GammaEncoding*/ } from 'three'; export const LinearToLinear = new ShaderNode( ( inp...
true
Other
mrdoob
three.js
1d544d0fd254775c36e222e088833a3d4b3c2220.json
Remove LogLuv encoding from the shaders (#22876) * Remove logLuv encoding from the shaders * Update constants
src/constants.js
@@ -159,7 +159,6 @@ export const LinearEncoding = 3000; export const sRGBEncoding = 3001; export const GammaEncoding = 3007; export const RGBEEncoding = 3002; -export const LogLuvEncoding = 3003; export const RGBM7Encoding = 3004; export const RGBM16Encoding = 3005; export const RGBDEncoding = 3006;
true
Other
mrdoob
three.js
1d544d0fd254775c36e222e088833a3d4b3c2220.json
Remove LogLuv encoding from the shaders (#22876) * Remove logLuv encoding from the shaders * Update constants
src/renderers/shaders/ShaderChunk/encodings_pars_fragment.glsl.js
@@ -59,31 +59,4 @@ vec4 LinearToRGBD( in vec4 value, in float maxRange ) { D = clamp( floor( D ) / 255.0, 0.0, 1.0 ); return vec4( value.rgb * ( D * ( 255.0 / maxRange ) ), D ); } - -// LogLuv reference: http://graphicrants.blogspot.ca/2009/04/rgbm-color-encoding.html - -// M matrix, for encoding -const mat3 cLogL...
true
Other
mrdoob
three.js
1d544d0fd254775c36e222e088833a3d4b3c2220.json
Remove LogLuv encoding from the shaders (#22876) * Remove logLuv encoding from the shaders * Update constants
src/renderers/webgl/WebGLProgram.js
@@ -1,7 +1,7 @@ import { WebGLUniforms } from './WebGLUniforms.js'; import { WebGLShader } from './WebGLShader.js'; import { ShaderChunk } from '../shaders/ShaderChunk.js'; -import { RGBFormat, NoToneMapping, AddOperation, MixOperation, MultiplyOperation, CubeRefractionMapping, CubeUVRefractionMapping, CubeUVReflect...
true
Other
mrdoob
three.js
1d544d0fd254775c36e222e088833a3d4b3c2220.json
Remove LogLuv encoding from the shaders (#22876) * Remove logLuv encoding from the shaders * Update constants
test/unit/src/constants.tests.js
@@ -133,7 +133,6 @@ export default QUnit.module( 'Constants', () => { assert.equal( Constants.sRGBEncoding, 3001, 'sRGBEncoding is equal to 3001' ); assert.equal( Constants.GammaEncoding, 3007, 'GammaEncoding is equal to 3007' ); assert.equal( Constants.RGBEEncoding, 3002, 'RGBEEncoding is equal to 3002' ); - ...
true
Other
mrdoob
three.js
00434467a99a50ef9beeaa15ebb5c743bbb9e197.json
expose raycaster in drag control (#22851)
examples/js/controls/DragControls.js
@@ -65,6 +65,12 @@ } + function getRaycaster() { + + return _raycaster; + + } + function onPointerMove( event ) { if ( scope.enabled === false ) return;
true
Other
mrdoob
three.js
00434467a99a50ef9beeaa15ebb5c743bbb9e197.json
expose raycaster in drag control (#22851)
examples/jsm/controls/DragControls.js
@@ -64,6 +64,12 @@ class DragControls extends EventDispatcher { } + function getRaycaster() { + + return _raycaster; + + } + function onPointerMove( event ) { if ( scope.enabled === false ) return;
true
Other
mrdoob
three.js
9b86245eafd2c71ace83688ad0f20de1750f2968.json
Add WebGLShaderCache. (#23022)
src/renderers/WebGLRenderer.js
@@ -573,6 +573,7 @@ function WebGLRenderer( parameters = {} ) { cubeuvmaps.dispose(); objects.dispose(); bindingStates.dispose(); + programCache.dispose(); xr.dispose(); @@ -657,6 +658,12 @@ function WebGLRenderer( parameters = {} ) { } ); + if ( material.isShaderMaterial ) { + + programCa...
true
Other
mrdoob
three.js
9b86245eafd2c71ace83688ad0f20de1750f2968.json
Add WebGLShaderCache. (#23022)
src/renderers/webgl/WebGLPrograms.js
@@ -1,13 +1,14 @@ import { BackSide, DoubleSide, CubeUVRefractionMapping, CubeUVReflectionMapping, LinearEncoding, sRGBEncoding, ObjectSpaceNormalMap, TangentSpaceNormalMap, NoToneMapping, RGBAFormat, UnsignedByteType } from '../../constants.js'; import { Layers } from '../../core/Layers.js'; import { WebGLProgram }...
true
Other
mrdoob
three.js
9b86245eafd2c71ace83688ad0f20de1750f2968.json
Add WebGLShaderCache. (#23022)
src/renderers/webgl/WebGLShaderCache.js
@@ -0,0 +1,120 @@ +let _id = 0; + +class WebGLShaderCache { + + constructor() { + + this.shaderCache = new Map(); + this.materialCache = new Map(); + + } + + update( material ) { + + const vertexShader = material.vertexShader; + const fragmentShader = material.fragmentShader; + + const vertexShaderStage = this._ge...
true
Other
mrdoob
three.js
9b86245eafd2c71ace83688ad0f20de1750f2968.json
Add WebGLShaderCache. (#23022)
src/utils.js
@@ -54,40 +54,4 @@ function createElementNS( name ) { } -/** - * cyrb53 hash for string from: https://stackoverflow.com/a/52171480 - * - * Public Domain, @bryc - https://stackoverflow.com/users/815680/bryc - * - * It is roughly similar to the well-known MurmurHash/xxHash algorithms. It uses a combination - *...
true
Other
mrdoob
three.js
d80a715d0114903be289cd22312c2bcc287e5202.json
Fix RoughnessMipmapper (#22985) * use proper filtering * Fixed RoughnessMipmapper * Update RoughnessMipmapper.js * Update WebGLTextures.js * Update WebGLTextures.js * Update WebGLTextures.js Co-authored-by: Michael Herzog <michael.herzog@human-interactive.org>
examples/jsm/utils/RoughnessMipmapper.js
@@ -119,9 +119,11 @@ class RoughnessMipmapper { _renderer.copyFramebufferToTexture( position, material.roughnessMap, mip ); + _mipmapMaterial.uniforms.roughnessMap.value = material.roughnessMap; + } - if ( roughnessMap !== material.roughnessMap ) roughnessMap.dispose(); + roughnessMap.dispose(); _...
true
Other
mrdoob
three.js
d80a715d0114903be289cd22312c2bcc287e5202.json
Fix RoughnessMipmapper (#22985) * use proper filtering * Fixed RoughnessMipmapper * Update RoughnessMipmapper.js * Update WebGLTextures.js * Update WebGLTextures.js * Update WebGLTextures.js Co-authored-by: Michael Herzog <michael.herzog@human-interactive.org>
src/renderers/WebGLRenderer.js
@@ -2049,21 +2049,9 @@ function WebGLRenderer( parameters = {} ) { const width = Math.floor( texture.image.width * levelScale ); const height = Math.floor( texture.image.height * levelScale ); - let glFormat = utils.convert( texture.format ); - - if ( capabilities.isWebGL2 ) { - - // Workaround for https://...
true
Other
mrdoob
three.js
d80a715d0114903be289cd22312c2bcc287e5202.json
Fix RoughnessMipmapper (#22985) * use proper filtering * Fixed RoughnessMipmapper * Update RoughnessMipmapper.js * Update WebGLTextures.js * Update WebGLTextures.js * Update WebGLTextures.js Co-authored-by: Michael Herzog <michael.herzog@human-interactive.org>
src/renderers/webgl/WebGLTextures.js
@@ -181,9 +181,7 @@ function WebGLTextures( _gl, extensions, state, properties, capabilities, utils, function getMipLevels( texture, image, supportsMips ) { - if ( textureNeedsGenerateMipmaps( texture, supportsMips ) === true ) { - - // generated mipmaps via gl.generateMipmap() + if ( textureNeedsGenerateMipm...
true
Other
mrdoob
three.js
cef1c28b9f57b28791ac74766ee47dc0ac468290.json
add dispose() for SelectionHelper (#22977) Co-authored-by: pank <pank07@vanke.com>
examples/jsm/interactive/SelectionHelper.js
@@ -18,29 +18,45 @@ class SelectionHelper { this.isDown = false; - this.renderer.domElement.addEventListener( 'pointerdown', function ( event ) { + this.pointerdownEvent = function ( event ) { this.isDown = true; this.onSelectStart( event ); - }.bind( this ) ); + }.bind( this ); - this.rendere...
false
Other
mrdoob
three.js
c495c47aec3772484a0b0c6acc8499a62157568f.json
fix matrix.lookAt parameter document (#22969) Co-authored-by: webglzhang <49345883@qq.com>
docs/api/en/math/Matrix4.html
@@ -202,9 +202,9 @@ <h3>[method:Float getMaxScaleOnAxis]()</h3> <h3>[method:this identity]()</h3> <p>Resets this matrix to the [link:https://en.wikipedia.org/wiki/Identity_matrix identity matrix].</p> - <h3>[method:this lookAt]( [param:Vector3 eye], [param:Vector3 center], [param:Vector3 up], )</h3> + <h3>[me...
true