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 | ac325c657d352a294547d27d61244ff5db34df97.json | Add modulrized STLLoader. | examples/files.js | @@ -125,6 +125,7 @@ var files = {
"webgl_loader_sea3d_skinning",
"webgl_loader_sea3d_sound",
"webgl_loader_stl",
+ "webgl_loader_stl_module",
"webgl_loader_svg",
"webgl_loader_texture_dds",
"webgl_loader_texture_exr", | true |
Other | mrdoob | three.js | ac325c657d352a294547d27d61244ff5db34df97.json | Add modulrized STLLoader. | examples/jsm/loaders/STLLoader.js | @@ -0,0 +1,354 @@
+/**
+ * @author aleeper / http://adamleeper.com/
+ * @author mrdoob / http://mrdoob.com/
+ * @author gero3 / https://github.com/gero3
+ * @author Mugen87 / https://github.com/Mugen87
+ *
+ * Description: A THREE loader for STL ASCII files, as created by Solidworks and other CAD programs.
+ *
+ * Supp... | true |
Other | mrdoob | three.js | ac325c657d352a294547d27d61244ff5db34df97.json | Add modulrized STLLoader. | examples/webgl_loader_stl_module.html | @@ -0,0 +1,272 @@
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <title>three.js webgl - STL</title>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
+ <style>
+ body {
+ font-family: Monospace;
+ background-color: #000000;... | true |
Other | mrdoob | three.js | ac325c657d352a294547d27d61244ff5db34df97.json | Add modulrized STLLoader. | utils/modularize.js | @@ -23,6 +23,7 @@ var files = [
{ path: 'loaders/GLTFLoader.js', ignoreList: [ 'NoSide', 'Matrix2', 'DDSLoader' ] },
{ path: 'loaders/OBJLoader.js', ignoreList: [] },
{ path: 'loaders/MTLLoader.js', ignoreList: [] },
+ { path: 'loaders/STLLoader.js', ignoreList: [] },
{ path: 'pmrem/PMREMCubeUVPacker.js', ign... | true |
Other | mrdoob | three.js | 0693261e5cc45c98d7b2d57e4d884b29c3ec0725.json | fix lgtm error | examples/js/loaders/SVGLoader.js | @@ -56,37 +56,37 @@ THREE.SVGLoader.prototype = {
case 'path':
style = parseStyle( node, style );
- if ( node.hasAttribute( 'd' ) ) path = parsePathNode( node, style );
+ if ( node.hasAttribute( 'd' ) ) path = parsePathNode( node );
break;
case 'rect':
style = parseStyle( node, s... | false |
Other | mrdoob | three.js | 5cb6d53903436d5259568d5ddd5ac929c92f94a3.json | fix lgtm error | examples/js/loaders/AssimpLoader.js | @@ -834,20 +834,6 @@ THREE.AssimpLoader.prototype = {
}
- function aiColor4D() {
-
- this.r = 0;
- this.g = 0;
- this.b = 0;
- this.a = 0;
- this.toTHREE = function () {
-
- return new THREE.Color( this.r, this.g, this.b, this.a );
-
- };
-
- }
-
function aiColor3D() {
this.r = 0;
@@ -8... | true |
Other | mrdoob | three.js | 5cb6d53903436d5259568d5ddd5ac929c92f94a3.json | fix lgtm error | examples/jsm/loaders/AssimpLoader.js | @@ -856,20 +856,6 @@ AssimpLoader.prototype = {
}
- function aiColor4D() {
-
- this.r = 0;
- this.g = 0;
- this.b = 0;
- this.a = 0;
- this.toTHREE = function () {
-
- return new Color( this.r, this.g, this.b, this.a );
-
- };
-
- }
-
function aiColor3D() {
this.r = 0;
@@ -1558,17 +1544... | true |
Other | mrdoob | three.js | de46d2567ccec1678844252a89f7792bcec0a1ce.json | remove redundant param | src/renderers/webgl/WebGLProgram.js | @@ -613,8 +613,8 @@ function WebGLProgram( renderer, extensions, code, material, shader, parameters,
// console.log( '*VERTEX*', vertexGlsl );
// console.log( '*FRAGMENT*', fragmentGlsl );
- var glVertexShader = WebGLShader( gl, gl.VERTEX_SHADER, vertexGlsl, renderer.debug.checkShaderErrors );
- var glFragmentSha... | true |
Other | mrdoob | three.js | de46d2567ccec1678844252a89f7792bcec0a1ce.json | remove redundant param | src/renderers/webgl/WebGLShader.d.ts | @@ -1,3 +1,3 @@
export class WebGLShader {
- constructor(gl: any, type: string, string: string, debug: boolean);
+ constructor(gl: any, type: string, string: string);
} | true |
Other | mrdoob | three.js | 518d2463af8cd73a6c21137728493ff98124f857.json | Remove remaining IIFEs from core. | src/Three.Legacy.js | @@ -594,17 +594,10 @@ Object.assign( Matrix4.prototype, {
},
getPosition: function () {
- var v1;
+ console.warn( 'THREE.Matrix4: .getPosition() has been removed. Use Vector3.setFromMatrixPosition( matrix ) instead.' );
+ return new Vector3().setFromMatrixColumn( this, 3 );
- return function getPosition() {... | true |
Other | mrdoob | three.js | 518d2463af8cd73a6c21137728493ff98124f857.json | Remove remaining IIFEs from core. | src/animation/PropertyBinding.js | @@ -9,7 +9,10 @@
*/
// Characters [].:/ are reserved for track binding syntax.
-var RESERVED_CHARS_RE = '\\[\\]\\.:\\/';
+var _RESERVED_CHARS_RE = '\\[\\]\\.:\\/';
+
+var _reservedRe;
+var _trackRe, _supportedObjectNames;
function Composite( targetGroup, path, optionalParsedPath ) {
@@ -109,101 +112,101 @@ Ob... | true |
Other | mrdoob | three.js | 518d2463af8cd73a6c21137728493ff98124f857.json | Remove remaining IIFEs from core. | src/core/BufferGeometry.js | @@ -15,11 +15,14 @@ import { arrayMax } from '../utils.js';
* @author mrdoob / http://mrdoob.com/
*/
-var bufferGeometryId = 1; // BufferGeometry uses odd numbers as Id
+var _bufferGeometryId = 1; // BufferGeometry uses odd numbers as Id
+var _m1, _obj, _offset;
+var _box, _boxMorphTargets;
+var _vector;
funct... | true |
Other | mrdoob | three.js | 518d2463af8cd73a6c21137728493ff98124f857.json | Remove remaining IIFEs from core. | src/core/Geometry.js | @@ -19,11 +19,12 @@ import { _Math } from '../math/Math.js';
* @author bhouston / http://clara.io
*/
-var geometryId = 0; // Geometry uses even numbers as Id
+var _geometryId = 0; // Geometry uses even numbers as Id
+var _m1, _obj, _offset;
function Geometry() {
- Object.defineProperty( this, 'id', { value: ... | true |
Other | mrdoob | three.js | 518d2463af8cd73a6c21137728493ff98124f857.json | Remove remaining IIFEs from core. | src/core/Object3D.js | @@ -16,11 +16,14 @@ import { TrianglesDrawMode } from '../constants.js';
* @author elephantatwork / www.elephantatwork.ch
*/
-var object3DId = 0;
+var _object3DId = 0;
+var _m1, _q1, _v1;
+var _xAxis, _yAxis, _zAxis;
+var _target, _position, _scale, _quaternion;
function Object3D() {
- Object.defineProperty(... | true |
Other | mrdoob | three.js | 518d2463af8cd73a6c21137728493ff98124f857.json | Remove remaining IIFEs from core. | src/loaders/Loader.js | @@ -24,6 +24,8 @@ import { Color } from '../math/Color.js';
* @author alteredq / http://alteredqualia.com/
*/
+var _BlendingMode, _color, _textureLoader, _materialLoader;
+
function Loader() {}
Loader.Handlers = {
@@ -83,260 +85,260 @@ Object.assign( Loader.prototype, {
},
- createMaterial: ( function (... | true |
Other | mrdoob | three.js | 518d2463af8cd73a6c21137728493ff98124f857.json | Remove remaining IIFEs from core. | src/polyfills.js | @@ -55,44 +55,40 @@ if ( Object.assign === undefined ) {
// Missing in IE
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign
- ( function () {
+ Object.assign = function ( target ) {
- Object.assign = function ( target ) {
+ 'use strict';
- 'use strict';
+ i... | true |
Other | mrdoob | three.js | 6df176d3f014effff3436f514ab9f5a03e0e80b4.json | fix minor style issue | examples/js/objects/Sky.js | @@ -40,7 +40,7 @@ THREE.Sky.SkyShader = {
"mieCoefficient": { value: 0.005 },
"mieDirectionalG": { value: 0.8 },
"sunPosition": { value: new THREE.Vector3() },
- "up": { value: new THREE.Vector3(0, 1, 0) }
+ "up": { value: new THREE.Vector3( 0, 1, 0 ) }
},
vertexShader: [ | true |
Other | mrdoob | three.js | 6df176d3f014effff3436f514ab9f5a03e0e80b4.json | fix minor style issue | examples/jsm/objects/Sky.js | @@ -49,7 +49,7 @@ Sky.SkyShader = {
"mieCoefficient": { value: 0.005 },
"mieDirectionalG": { value: 0.8 },
"sunPosition": { value: new Vector3() },
- "up": { value: new Vector3(0, 1, 0) }
+ "up": { value: new Vector3( 0, 1, 0 ) }
},
vertexShader: [ | true |
Other | mrdoob | three.js | cbf555d24250ed7d319edd3ad71c3db06e40af84.json | add bias example and update prem texture | examples/webgl_materials_nodes.html | @@ -71,63 +71,56 @@
}
- var cubemap = function () {
+ var premTexture, pmremCube, pmremGenerator, pmremCubeUVPacker, premSize = 1024;
- var path = "textures/cube/Park2/";
- var format = '.jpg';
- var urls = [
- path + 'posx' + format, path + 'negx' + format,
- path + 'posy' + format, path... | false |
Other | mrdoob | three.js | 3ac3c1ee896d5cc511d3ffee4ba15883619b3e80.json | remove energyPreservation flags | examples/jsm/nodes/materials/nodes/StandardNode.js | @@ -34,8 +34,6 @@ StandardNode.prototype.build = function ( builder ) {
builder.define( this.clearCoat || this.clearCoatRoughness ? 'PHYSICAL' : 'STANDARD' );
- if ( this.energyPreservation ) builder.define( 'ENERGY_PRESERVATION' );
-
builder.requires.lights = true;
builder.extensions.shaderTextureLOD = tru... | false |
Other | mrdoob | three.js | 070101a9b3ae3b971316b4ae82fa3fa28452c9b8.json | remove non-ENERGY_PRESERVATION code | src/materials/MeshStandardMaterial.js | @@ -44,8 +44,6 @@ import { Color } from '../math/Color.js';
* envMap: new THREE.CubeTexture( [posx, negx, posy, negy, posz, negz] ),
* envMapIntensity: <float>
*
- * energyPreservation: <bool>,
- *
* refractionRatio: <float>,
*
* wireframe: <boolean>,
@@ -101,8 +99,6 @@ function MeshStandardMaterial( p... | true |
Other | mrdoob | three.js | 070101a9b3ae3b971316b4ae82fa3fa28452c9b8.json | remove non-ENERGY_PRESERVATION code | src/renderers/shaders/ShaderChunk/lights_physical_pars_fragment.glsl.js | @@ -96,13 +96,6 @@ void RE_Direct_Physical( const in IncidentLight directLight, const in GeometricC
void RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {
- // Defer to the IndirectSpecular function... | true |
Other | mrdoob | three.js | 070101a9b3ae3b971316b4ae82fa3fa28452c9b8.json | remove non-ENERGY_PRESERVATION code | src/renderers/webgl/WebGLProgram.js | @@ -522,8 +522,6 @@ function WebGLProgram( renderer, extensions, code, material, shader, parameters,
parameters.physicallyCorrectLights ? '#define PHYSICALLY_CORRECT_LIGHTS' : '',
- parameters.energyPreservation ? '#define ENERGY_PRESERVATION' : '',
-
parameters.logarithmicDepthBuffer ? '#define USE_LOGDE... | true |
Other | mrdoob | three.js | 070101a9b3ae3b971316b4ae82fa3fa28452c9b8.json | remove non-ENERGY_PRESERVATION code | src/renderers/webgl/WebGLPrograms.js | @@ -201,8 +201,6 @@ function WebGLPrograms( renderer, extensions, capabilities ) {
toneMapping: renderer.toneMapping,
physicallyCorrectLights: renderer.physicallyCorrectLights,
- energyPreservation: material.energyPreservation,
-
premultipliedAlpha: material.premultipliedAlpha,
alphaTest: material... | true |
Other | mrdoob | three.js | 7247f04180e7ee9e5f0193470e589904ab17b009.json | Remove dup paragraph in disposing objects doc
I deleted a duplicate paragraph from the "How to dispose of objects" page in the docs. | docs/manual/en/introduction/How-to-dispose-of-objects.html | @@ -92,11 +92,6 @@ <h3>Does *three.js* provide information about the amount of cached objects?</h3>
in your application, it's a good idea to debug this property in order to easily identify a memory leak.
</p>
- <p>
- Internal resources for a texture are only allocated if the image has fully loaded. If you dispo... | false |
Other | mrdoob | three.js | 5d073e1ef3a81b883f090adb09f103be79b79411.json | Remove triangulate function from typing
Function has already been removed from the codebase and is not part of the public API. | src/extras/ShapeUtils.d.ts | @@ -5,7 +5,6 @@ interface Vec2 {
export namespace ShapeUtils {
export function area( contour: Vec2[] ): number;
- export function triangulate( contour: Vec2[], indices: boolean ): number[];
export function triangulateShape( contour: Vec2[], holes: Vec2[] ): number[][];
export function isClockWise( pts: Vec2[] ... | false |
Other | mrdoob | three.js | ba248bcbf08c222413daf6341ecc7c9e1f8b3707.json | force context loss in renderer.dispose | src/renderers/WebGLRenderer.js | @@ -577,6 +577,8 @@ function WebGLRenderer( parameters ) {
animation.stop();
+ this.forceContextLoss();
+
};
// Events | false |
Other | mrdoob | three.js | 6f63ebba977a1851ff206d5603d074454342ad79.json | fix default side | examples/webgl_materials_nodes.html | @@ -725,9 +725,9 @@
}, false );
addGui( 'side', {
+ DoubleSided: THREE.DoubleSide,
FrontSided: THREE.FrontSide,
- BackSided: THREE.BackSide,
- DoubleSided: THREE.DoubleSide
+ BackSided: THREE.BackSide
}, function ( val ) {
defaultSide = Number( val ); | false |
Other | mrdoob | three.js | 6ee06c715587c498cac381727278adf4da34189c.json | Add default to textures | src/textures/DataTexture2DArray.js | @@ -9,7 +9,7 @@ function DataTexture2DArray( data, width, height, depth ) {
Texture.call( this, null );
- this.image = { data: data, width: width, height: height, depth: depth };
+ this.image = { data: data || null, width: width || 1, height: height || 1, depth: depth || 1 };
this.magFilter = NearestFilter;
... | true |
Other | mrdoob | three.js | 6ee06c715587c498cac381727278adf4da34189c.json | Add default to textures | src/textures/DataTexture3D.js | @@ -17,7 +17,7 @@ function DataTexture3D( data, width, height, depth ) {
Texture.call( this, null );
- this.image = { data: data, width: width, height: height, depth: depth };
+ this.image = { data: data || null, width: width || 1, height: height || 1, depth: depth || 1 };
this.magFilter = NearestFilter;
th... | true |
Other | mrdoob | three.js | 9d324c9601f2fddcb86d1f09262db9a0998338c3.json | add quaternion tests | test/unit/src/math/Quaternion.tests.js | @@ -224,27 +224,119 @@ export default QUnit.module( 'Maths', () => {
} );
- QUnit.todo( "x", ( assert ) => {
+ QUnit.test( "x", ( assert ) => {
+ var a = new Quaternion();
+ assert.ok(a.x === 0, "Passed!");
- assert.ok( false, "everything's gonna be alright" );
+ a = new Quaternion(1, 2, 3);
+ asse... | false |
Other | mrdoob | three.js | 416c109665f067237f6ce7dc1dfdbb0df088d104.json | remove unnessecary import | test/unit/src/math/Plane.tests.js | @@ -18,7 +18,6 @@ import {
zero3,
one3
} from './Constants.tests';
-import { Cache } from '../../../../build/three';
function comparePlane( a, b, threshold ) {
| false |
Other | mrdoob | three.js | 97951a622ae7931728775f6fc5f9c29c2bf5b89c.json | add Plane unittests | src/math/Plane.js | @@ -16,6 +16,8 @@ function Plane( normal, constant ) {
Object.assign( Plane.prototype, {
+ isPlane: true,
+
set: function ( normal, constant ) {
this.normal.copy( normal ); | true |
Other | mrdoob | three.js | 97951a622ae7931728775f6fc5f9c29c2bf5b89c.json | add Plane unittests | test/unit/src/math/Plane.tests.js | @@ -8,6 +8,7 @@ import { Plane } from '../../../../src/math/Plane';
import { Vector3 } from '../../../../src/math/Vector3';
import { Line3 } from '../../../../src/math/Line3';
import { Sphere } from '../../../../src/math/Sphere';
+import { Box3 } from '../../../../src/math/Box3';
import { Matrix4 } from '../../../.... | true |
Other | mrdoob | three.js | 66d03802f93a6fd98ee855b4b332cbde19b27080.json | remove the link | docs/api/en/extras/ShapeUtils.html | @@ -22,7 +22,7 @@ <h2>Methods</h2>
<h3>[method:Number area]( contour )</h3>
<p>
- contour -- 2D polygon. An array of THREE.Vector2(), according to the <a href="https://github.com/mrdoob/three.js/blob/master/src/extras/ShapeUtils.js#L18">definition</a> of the method.<br /><br />
+ contour -- 2D polygon. An arr... | false |
Other | mrdoob | three.js | d6907618cd3e4ca8963dfd526f445ddede17026a.json | Catch xr.supportsSession() rejection | examples/js/vr/WebVR.js | @@ -136,7 +136,7 @@ var WEBVR = {
stylizeElement( button );
- navigator.xr.supportsSession( 'immersive-vr' ).then( showEnterXR );
+ navigator.xr.supportsSession( 'immersive-vr' ).then( showEnterXR ).catch( showVRNotFound );
return button;
| false |
Other | mrdoob | three.js | 66c410a543e13581a56053e0a055be68f89ccf07.json | Explain the 2D contour
state the format of a contour as a arument | docs/api/en/extras/ShapeUtils.html | @@ -22,7 +22,7 @@ <h2>Methods</h2>
<h3>[method:Number area]( contour )</h3>
<p>
- contour -- 2D polygon.<br /><br />
+ contour -- 2D polygon. An array of THREE.Vector2(), according to the <a href="https://github.com/mrdoob/three.js/blob/master/src/extras/ShapeUtils.js#L18">definition</a> of the method.<br /><... | false |
Other | mrdoob | three.js | 9848016d19d1f255ff444bd94f5411e9bcba3603.json | Implement STEP directive | examples/js/loaders/LDrawLoader.js | @@ -684,6 +684,9 @@ THREE.LDrawLoader = ( function () {
triangles: null,
lineSegments: null,
conditionalSegments: null,
+
+ // If true, this object is the start of a construction step
+ startingConstructionStep: false
};
this.parseScopesStack.push( newParseScope );
@@ -1042,6 +1045,8 @@ T... | true |
Other | mrdoob | three.js | 9848016d19d1f255ff444bd94f5411e9bcba3603.json | Implement STEP directive | examples/jsm/loaders/LDrawLoader.js | @@ -702,6 +702,9 @@ var LDrawLoader = ( function () {
triangles: null,
lineSegments: null,
conditionalSegments: null,
+
+ // If true, this object is the start of a construction step
+ startingConstructionStep: false
};
this.parseScopesStack.push( newParseScope );
@@ -1060,6 +1063,8 @@ var... | true |
Other | mrdoob | three.js | 9848016d19d1f255ff444bd94f5411e9bcba3603.json | Implement STEP directive | examples/webgl_loader_ldraw.html | @@ -110,48 +110,11 @@
separateObjects: false,
displayLines: true,
conditionalLines: true,
- smoothNormals: true
+ smoothNormals: true,
+ constructionStep: 0,
+ noConstructionSteps: "No steps."
};
- gui = new GUI();
-
- gui.add( guiData, 'modelFileName', modelFileList ).nam... | true |
Other | mrdoob | three.js | f0151321810eac88a04ec2509dde6a3a72869350.json | add Matrix4 unittests | test/unit/src/math/Matrix4.tests.js | @@ -79,9 +79,13 @@ export default QUnit.module( 'Maths', () => {
} );
// PUBLIC STUFF
- QUnit.todo( "isMatrix4", ( assert ) => {
+ QUnit.test( "isMatrix4", ( assert ) => {
- assert.ok( false, "everything's gonna be alright" );
+ var a = new Matrix4();
+ assert.ok( a.isMatrix4 === true, "Passed!" );
+
... | false |
Other | mrdoob | three.js | be422c3767e4b777658d298025f07dd20c0d70f8.json | lint the code | test/unit/src/math/Math.tests.js | @@ -52,9 +52,9 @@ export default QUnit.module( 'Maths', () => {
QUnit.test( "lerp", ( assert ) => {
- assert.strictEqual(ThreeMath.lerp(1, 2, 0), 1, "Value equal to lower boundary");
- assert.strictEqual(ThreeMath.lerp(1, 2, 1), 2, "Value equal to upper boundary");
- assert.strictEqual(ThreeMath.lerp(1, 2,... | false |
Other | mrdoob | three.js | 2eb06eeaaaf68d62aa850f9fd995faf1eff263c5.json | add Matrix3 unit tests | test/unit/src/math/Matrix3.tests.js | @@ -77,9 +77,13 @@ export default QUnit.module( 'Maths', () => {
} );
// PUBLIC STUFF
- QUnit.todo( "isMatrix3", ( assert ) => {
+ QUnit.test( "isMatrix3", ( assert ) => {
- assert.ok( false, "everything's gonna be alright" );
+ var a = new Matrix3();
+ assert.ok( a.isMatrix3 === true, "Passed!" );
+
... | false |
Other | mrdoob | three.js | 5a026e572824f86e932e8a6af665d5c34fd0712d.json | Add math unittests | test/unit/src/math/Math.tests.js | @@ -49,9 +49,13 @@ export default QUnit.module( 'Maths', () => {
} );
- QUnit.todo( "lerp", ( assert ) => {
+ QUnit.test( "lerp", ( assert ) => {
+
+
+ assert.strictEqual(ThreeMath.lerp(1, 2, 0), 1, "Value equal to lower boundary");
+ assert.strictEqual(ThreeMath.lerp(1, 2, 1), 2, "Value equal to upper bou... | false |
Other | mrdoob | three.js | 654fb5ed564429027d960494d1b1045a2351b436.json | update sea3d examples to modules | examples/webgl_loader_sea3d.html | @@ -13,35 +13,34 @@
Geometry Compression with <a href="https://github.com/google/draco" target="_blank" rel="noopener">Google Draco</a> and content with LZMA using <a href="http://sunag.github.io/sea3d/IO/index.html" style="color:#FFFFFF" target="_blank">SEA3D I.O.</a> Tools<br>
</div>
- <script src="../build... | true |
Other | mrdoob | three.js | 654fb5ed564429027d960494d1b1045a2351b436.json | update sea3d examples to modules | examples/webgl_loader_sea3d_bvh.html | @@ -12,35 +12,42 @@
Runtime convertion of BVH Animation to SEA3D Skeleton Animation
</div>
- <script src="../build/three.js"></script>
-
- <script src="js/controls/OrbitControls.js"></script>
-
- <script src="js/postprocessing/EffectComposer.js"></script>
- <script src="js/postprocessing/RenderPass.js"></s... | true |
Other | mrdoob | three.js | 654fb5ed564429027d960494d1b1045a2351b436.json | update sea3d examples to modules | examples/webgl_loader_sea3d_bvh_retarget.html | @@ -12,35 +12,39 @@
Runtime retarget of BVH Animation to SEA3D Skeleton
</div>
- <script src="../build/three.js"></script>
+ <script type="module">
- <script src="js/controls/OrbitControls.js"></script>
+ import {
+ Vector3,
+ Color,
+ Clock,
+ Group,
+ Object3D,
+ AnimationMixer,
+ ... | true |
Other | mrdoob | three.js | 654fb5ed564429027d960494d1b1045a2351b436.json | update sea3d examples to modules | examples/webgl_loader_sea3d_hierarchy.html | @@ -9,38 +9,35 @@
<body>
<div id="info">
<a href="http://threejs.org" target="_blank" rel="noopener">three.js</a> - Exported by <a href="https://github.com/sunag/sea3d" target="_blank" rel="noopener">SEA3D Exporter</a> and edited by <a href="https://github.com/sunag/sea3d" target="_blank" rel="noopener">SEA3D ... | true |
Other | mrdoob | three.js | 654fb5ed564429027d960494d1b1045a2351b436.json | update sea3d examples to modules | examples/webgl_loader_sea3d_keyframe.html | @@ -12,32 +12,31 @@
<div id="description">Click to play</div>
</div>
- <script src="../build/three.js"></script>
+ <script type="module">
- <script src="js/controls/OrbitControls.js"></script>
+ import {
+ Vector3,
+ Color,
+ Clock,
+ PerspectiveCamera,
+ Scene,
+ WebGLRenderer
+ } f... | true |
Other | mrdoob | three.js | 654fb5ed564429027d960494d1b1045a2351b436.json | update sea3d examples to modules | examples/webgl_loader_sea3d_morph.html | @@ -12,32 +12,31 @@
<div id="description">Flag is Vertex Animation / Teapot is Morpher</div>
</div>
- <script src="../build/three.js"></script>
+ <script type="module">
- <script src="js/controls/OrbitControls.js"></script>
+ import {
+ Vector3,
+ Color,
+ Clock,
+ PerspectiveCamera,
+ Sc... | true |
Other | mrdoob | three.js | 654fb5ed564429027d960494d1b1045a2351b436.json | update sea3d examples to modules | examples/webgl_loader_sea3d_physics.html | @@ -13,37 +13,35 @@
<div id="description">Right click to clone</div>
</div>
- <script src="../build/three.js"></script>
-
- <script src="js/controls/OrbitControls.js"></script>
-
- <script src="js/postprocessing/EffectComposer.js"></script>
- <script src="js/postprocessing/RenderPass.js"></script>
- <scri... | true |
Other | mrdoob | three.js | 654fb5ed564429027d960494d1b1045a2351b436.json | update sea3d examples to modules | examples/webgl_loader_sea3d_skinning.html | @@ -14,32 +14,32 @@
<div id="playercount"></div>
</div>
- <script src="../build/three.js"></script>
+ <script type="module">
- <script src="js/controls/OrbitControls.js"></script>
+ import {
+ Vector3,
+ Color,
+ Clock,
+ Object3D,
+ PerspectiveCamera,
+ Scene,
+ WebGLRenderer
+ }... | true |
Other | mrdoob | three.js | 654fb5ed564429027d960494d1b1045a2351b436.json | update sea3d examples to modules | examples/webgl_loader_sea3d_sound.html | @@ -57,32 +57,35 @@
</div>
- <script src="../build/three.js"></script>
-
- <script src="js/controls/PointerLockControls.js"></script>
-
- <script src="js/postprocessing/EffectComposer.js"></script>
- <script src="js/postprocessing/RenderPass.js"></script>
- <script src="js/postprocessing/ShaderPass.js"></sc... | true |
Other | mrdoob | three.js | 68080d3af0bd208273ad8a6d3c75e0097e195c3c.json | fix LGTM Errors | examples/js/loaders/AWDLoader.js | @@ -49,6 +49,8 @@ THREE.AWDLoader = ( function () {
this.id = 0;
this.data = null;
+ this.namespace = 0;
+ this.flags = 0;
}
@@ -167,7 +169,7 @@ THREE.AWDLoader = ( function () {
parseNextBlock: function () {
var assetData,
- ns, type, len, block,
+ block,
blockId = this.readU32(),
... | false |
Other | mrdoob | three.js | dc87b9108857ea1a56319cca424bd1580628b6b3.json | Fix code style | src/core/InstancedBufferGeometry.js | @@ -35,14 +35,16 @@ InstancedBufferGeometry.prototype = Object.assign( Object.create( BufferGeometry
},
- toJSON: function(){
+ toJSON: function () {
+
var data = BufferGeometry.prototype.toJSON.call( this );
data.maxInstancedCount = this.maxInstancedCount;
data.isInstancedBufferGeometry = true;
... | false |
Other | mrdoob | three.js | ad45315adf6d6afd77c39ad55e68b05d706d0d82.json | Enable premultiplied alpha | examples/js/loaders/LDrawLoader.js | @@ -1268,6 +1268,7 @@ THREE.LDrawLoader = ( function () {
}
material.transparent = isTransparent;
+ material.premultipliedAlpha = true;
material.opacity = alpha;
material.userData.canHaveEnvMap = canHaveEnvMap; | false |
Other | mrdoob | three.js | 0c08f4f0018b9619e1b87dd44d4373007b67faa3.json | prevent unexpected vertex weighting | examples/js/loaders/LDrawLoader.js | @@ -66,6 +66,13 @@ THREE.LDrawLoader = ( function () {
}
+ // NOTE: Some of the normals wind up being skewed in an unexpected way because
+ // quads provide more "influence" to some vertex normals than a triangle due to
+ // the fact that a quad is made up of two triangles and all triangles are weighted
+ //... | false |
Other | mrdoob | three.js | 2131b112e74e04c764b5a6960b4a5760b4fb49bc.json | Add first pass at shader | examples/js/loaders/LDrawLoader.js | @@ -7,6 +7,83 @@
THREE.LDrawLoader = ( function () {
+ var optionalLineVertShader = /* glsl */`
+ attribute vec3 optionalControl0;
+ attribute vec3 optionalControl1;
+ attribute vec3 point0;
+ attribute vec3 point1;
+
+ varying vec4 controlOut0;
+ varying vec4 controlOut1;
+ varying vec4 pointOut0;
+ varying vec4 ... | false |
Other | mrdoob | three.js | 5bfe1047ff1d3e06d98bc86e6fee5942e7ace23c.json | Hide conditional lines by default | examples/js/loaders/LDrawLoader.js | @@ -550,16 +550,17 @@ THREE.LDrawLoader = ( function () {
var lines = createObject( parseScope.conditionalSegments, 2 );
lines.isConditionalLine = true;
+ lines.visible = false;
objGroup.add( lines );
}
if ( parentParseScope.groupObject ) {
objGroup.name = par... | false |
Other | mrdoob | three.js | add08253d3962f0b1e234b54cf921327a7bee3c4.json | remove morph target changes | examples/jsm/loaders/FBXLoader.js | @@ -1590,11 +1590,12 @@ var FBXLoader = ( function () {
},
+
// Parse single node mesh geometry in FBXTree.Objects.Geometry
parseMeshGeometry: function ( relationships, geoNode, deformers ) {
var skeletons = deformers.skeletons;
- var morphTargets = [];
+ var morphTargets = deformers.morphTargets... | false |
Other | mrdoob | three.js | 6406684fdfd294f7523c05fe2967727a6dd368e8.json | remove morph target changes | examples/js/loaders/FBXLoader.js | @@ -1542,11 +1542,12 @@ THREE.FBXLoader = ( function () {
},
+
// Parse single node mesh geometry in FBXTree.Objects.Geometry
parseMeshGeometry: function ( relationships, geoNode, deformers ) {
var skeletons = deformers.skeletons;
- var morphTargets = [];
+ var morphTargets = deformers.morphTarge... | false |
Other | mrdoob | three.js | 1aa70297edd063e397a250f6dcbfe53524abebd8.json | Fix breakage on Chrome 73 | examples/js/vr/HelioWebXRPolyfill.js | @@ -72,7 +72,7 @@ if ( /(Helio)/g.test( navigator.userAgent ) && "xr" in navigator ) {
// WebXRManager - xrFrame.getPose() Polyfill - line 259
- const tempGetPose = frame.getPose.bind( frame );
+ const tempGetPose = (isHelio96 ? null : frame.getPose.bind( frame ));
frame.getPose = ... | false |
Other | mrdoob | three.js | f1ba3a32ed065887364328c6d8b9168eee761be0.json | Remove indent size from .editorconfig | .editorconfig | @@ -9,7 +9,6 @@ insert_final_newline = true
[*.{js,ts,html}]
charset = utf-8
indent_style = tab
-indent_size = 2
[*.{js,ts}]
trim_trailing_whitespace = true | false |
Other | mrdoob | three.js | ce7287e4354f959205f89c177d5f928660d7cc33.json | Specify output type | examples/webgl_loader_gltf.html | @@ -53,13 +53,10 @@
scene = new THREE.Scene();
- var loader = new THREE.RGBELoader().setPath( 'textures/equirectangular/' );
- loader.load( 'pedestrian_overpass_2k.hdr', function ( texture ) {
-
- texture.encoding = THREE.RGBEEncoding;
- texture.minFilter = THREE.NearestFilter;
- texture.magF... | true |
Other | mrdoob | three.js | ce7287e4354f959205f89c177d5f928660d7cc33.json | Specify output type | examples/webgl_loader_gltf_extensions.html | @@ -154,13 +154,10 @@
// Load background and generate envMap
- var loader = new THREE.RGBELoader().setPath( 'textures/equirectangular/' );
- loader.load( 'venice_sunset_2k.hdr', function ( texture ) {
-
- texture.encoding = THREE.RGBEEncoding;
- texture.minFilter = THREE.NearestFilter;
- text... | true |
Other | mrdoob | three.js | ce7287e4354f959205f89c177d5f928660d7cc33.json | Specify output type | examples/webgl_loader_texture_hdr.html | @@ -55,7 +55,7 @@
camera = new THREE.OrthographicCamera( - aspect, aspect, 1, - 1, 0, 1 );
new THREE.RGBELoader()
- .setType( THREE.UnsignedByteType ) // alt: THREE.FloatType
+ .setType( THREE.UnsignedByteType ) // alt: THREE.FloatType, THREE.HalfFloatType
.load( 'textures/memorial.hdr', funct... | true |
Other | mrdoob | three.js | 274b5ddbc46367803e54e706950bb8ad9ea7097b.json | Implement mipmap support in BasisTextureLoader
This change makes sure that we load all mipmaps present in the .basis
file. This is important for multiple reasons, one of them being that to
use .basis files in glTF out of the box, the texture has to have a
complete mipchain (otherwise the texture is incomplete as per W... | examples/js/loaders/BasisTextureLoader.js | @@ -117,9 +117,7 @@ THREE.BasisTextureLoader = class BasisTextureLoader {
var config = this.workerConfig;
- var { data, width, height } = message;
-
- var mipmaps = [ { data, width, height } ];
+ var { width, height, mipmaps } = message;
var texture;
@@ -305,9 +303,17 @@ THREE.BasisTextureLoa... | false |
Other | mrdoob | three.js | f035349d9deed70872f46e7b11af4a7631533f91.json | Remove temporary variables. | src/geometries/ExtrudeGeometry.js | @@ -396,8 +396,7 @@ function ExtrudeBufferGeometry( shapes, options ) {
t = b / bevelSegments;
z = bevelThickness * Math.cos( t * Math.PI / 2 );
- var s = Math.sin( t * Math.PI / 2 );
- bs = bevelSize * s + bevelBaseSize;
+ bs = bevelSize * Math.sin( t * Math.PI / 2 ) + bevelBaseSize;
// contract ... | false |
Other | mrdoob | three.js | c191afb0e1ff7fb8666fb61777d62569744a1a21.json | Fix a bug in GLTFExporter | examples/js/exporters/GLTFExporter.js | @@ -1377,7 +1377,7 @@ THREE.GLTFExporter.prototype = {
var key = getUID( geometry.index );
- if ( groups[ i ].start !== undefined || groups[ i ] !== undefined ) {
+ if ( groups[ i ].start !== undefined || groups[ i ].count !== undefined ) {
key += ':' + groups[ i ].start + ':' + groups[ i ].c... | false |
Other | mrdoob | three.js | 6e9861b48e727e71b8372104164042ad43d168cc.json | Support hemisphere light probe | src/lights/LightProbe.js | @@ -28,6 +28,45 @@ LightProbe.prototype = Object.assign( Object.create( Light.prototype ), {
isLightProbe: true,
+ setAmbientProbe: function ( color, intensity ) {
+
+ this.color.set( color );
+
+ this.intensity = intensity !== undefined ? intensity : 1;
+
+ this.sh.zero();
+
+ // without extra factor of PI i... | false |
Other | mrdoob | three.js | 1c3eefb65f6b7b1b13e306351530409149bcc206.json | Fix a bug | examples/js/exporters/GLTFExporter.js | @@ -1251,7 +1251,7 @@ THREE.GLTFExporter.prototype = {
if ( accessor !== null ) {
attributes[ attributeName ] = accessor;
- setAttributeCache( attribute, accessor );
+ setAttributeCache( accessor, attribute );
}
@@ -1339,7 +1339,7 @@ THREE.GLTFExporter.prototype = {
}
targe... | false |
Other | mrdoob | three.js | 0ea77c013a3e7cf645a310c584318c15945d8d17.json | Update bevelSize docs. | docs/api/en/geometries/ExtrudeBufferGeometry.html | @@ -75,7 +75,7 @@ <h3>[name]([param:Array shapes], [param:Object options])</h3>
<li>depth — float. Depth to extrude the shape. Default is 100.</li>
<li>bevelEnabled — bool. Apply beveling to the shape. Default is true.</li>
<li>bevelThickness — float. How deep into the original shape the bevel goes. Defa... | true |
Other | mrdoob | three.js | 0ea77c013a3e7cf645a310c584318c15945d8d17.json | Update bevelSize docs. | docs/api/en/geometries/ExtrudeGeometry.html | @@ -75,7 +75,7 @@ <h3>[name]([param:Array shapes], [param:Object options])</h3>
<li>depth — float. Depth to extrude the shape. Default is 100.</li>
<li>bevelEnabled — bool. Apply beveling to the shape. Default is true.</li>
<li>bevelThickness — float. How deep into the original shape the bevel goes. Defa... | true |
Other | mrdoob | three.js | 0ea77c013a3e7cf645a310c584318c15945d8d17.json | Update bevelSize docs. | docs/api/en/geometries/TextBufferGeometry.html | @@ -73,7 +73,7 @@ <h3>[name]([param:String text], [param:Object parameters])</h3>
<li>curveSegments — Integer. Number of points on the curves. Default is 12.</li>
<li>bevelEnabled — Boolean. Turn on bevel. Default is False.</li>
<li>bevelThickness — Float. How deep into text bevel goes. Default is 10.</li>
... | true |
Other | mrdoob | three.js | 0ea77c013a3e7cf645a310c584318c15945d8d17.json | Update bevelSize docs. | docs/api/en/geometries/TextGeometry.html | @@ -73,7 +73,7 @@ <h3>[name]([param:String text], [param:Object parameters])</h3>
<li>curveSegments — Integer. Number of points on the curves. Default is 12.</li>
<li>bevelEnabled — Boolean. Turn on bevel. Default is False.</li>
<li>bevelThickness — Float. How deep into text bevel goes. Default is 10.</li>
... | true |
Other | mrdoob | three.js | 571ce5798c7b6156a2497a5621b54ec93a29e3e4.json | Update LOD documents | docs/api/en/objects/LOD.html | @@ -72,7 +72,7 @@ <h3>[property:array levels]</h3>
<h2>Methods</h2>
<p>See the base [page:Object3D] class for common methods.</p>
- <h3>[method:LOD addLevel]( [param:Object3D object], [param:Float distance] )</h3>
+ <h3>[method:this addLevel]( [param:Object3D object], [param:Float distance] )</h3>
<p>
[... | true |
Other | mrdoob | three.js | 571ce5798c7b6156a2497a5621b54ec93a29e3e4.json | Update LOD documents | docs/api/zh/objects/LOD.html | @@ -69,7 +69,7 @@ <h3>[property:array levels]</h3>
<h2>方法</h2>
<p>请参阅其基类[page:Object3D]来查看共有方法。</p>
- <h3>[method:LOD addLevel]( [param:Object3D object], [param:Float distance] )</h3>
+ <h3>[method:this addLevel]( [param:Object3D object], [param:Float distance] )</h3>
<p>
[page:Object3D object] —— 在这个层次... | true |
Other | mrdoob | three.js | d139bb914e9c38f7255128b40610b5ae6ff43a75.json | Update LOD documents | docs/api/en/objects/LOD.html | @@ -43,13 +43,6 @@ <h2>Example</h2>
scene.add( lod );
</code>
- <p>
- Note that for the LOD to switch between the different detail levels, you will
- have to call [page:.update update]( camera ) in your render loop. See the source code
- for this example for details:
- [example:webgl_lod WebGL / LOD]
- </di... | true |
Other | mrdoob | three.js | d139bb914e9c38f7255128b40610b5ae6ff43a75.json | Update LOD documents | docs/api/zh/objects/LOD.html | @@ -41,12 +41,6 @@ <h2>示例</h2>
scene.add( lod );
</code>
- <p>
- 请注意,要使得LOD在各不同细节层次之间进行切换,你将需要在你的渲染循环中调用[page:.update update]( camera )。
- 详情请查看这个示例中的源代码:
- [example:webgl_lod WebGL / LOD]
- </div>
-
<h2>Constructor</h2>
<h3>[name]( )</h3>
<p>
@@ -57,6 +51,13 @@ <h3>[name]( )</h3>
<h2>属性</h2>
... | true |
Other | mrdoob | three.js | 800880a22baf2599450b9d806e2d95d08f256791.json | Update LOD document | docs/api/en/objects/LOD.html | @@ -72,7 +72,7 @@ <h3>[property:array levels]</h3>
<h2>Methods</h2>
<p>See the base [page:Object3D] class for common methods.</p>
- <h3>[method:null addLevel]( [param:Object3D object], [param:Float distance] )</h3>
+ <h3>[method:LOD addLevel]( [param:Object3D object], [param:Float distance] )</h3>
<p>
[... | true |
Other | mrdoob | three.js | 800880a22baf2599450b9d806e2d95d08f256791.json | Update LOD document | docs/api/zh/objects/LOD.html | @@ -69,7 +69,7 @@ <h3>[property:array levels]</h3>
<h2>方法</h2>
<p>请参阅其基类[page:Object3D]来查看共有方法。</p>
- <h3>[method:null addLevel]( [param:Object3D object], [param:Float distance] )</h3>
+ <h3>[method:LOD addLevel]( [param:Object3D object], [param:Float distance] )</h3>
<p>
[page:Object3D object] —— 在这个层次... | true |
Other | mrdoob | three.js | 0122d2545531626532a829a693df067e3c391e15.json | Remove `subobjectLoad` function, add comments | examples/js/loaders/LDrawLoader.js | @@ -475,7 +475,15 @@ THREE.LDrawLoader = ( function () {
subobject.url = subobjectURL;
// Load the subobject
- subobjectLoad( subobjectURL, onSubobjectLoaded, undefined, onSubobjectError, subobject );
+ // Use another file loader here so we can keep track of the subobject information
+ // and ... | false |
Other | mrdoob | three.js | 97c9defb42634425cfa5e5795b846c62f9a784c2.json | Update code style | editor/js/Menubar.Add.js | @@ -391,15 +391,17 @@ Menubar.Add = function ( editor ) {
// OrthographicCamera
var option = new UI.Row();
- option.setClass('option');
- option.setTextContent(strings.getKey('menubar/add/orthographiccamera'));
- option.onClick(function(){
+ option.setClass( 'option' );
+ option.setTextContent( strings.getKey( 'm... | true |
Other | mrdoob | three.js | 97c9defb42634425cfa5e5795b846c62f9a784c2.json | Update code style | editor/js/Sidebar.Object.js | @@ -149,42 +149,42 @@ Sidebar.Object = function ( editor ) {
// left
var objectLeftRow = new UI.Row();
- var objectLeft = new UI.Number().onChange(update);
+ var objectLeft = new UI.Number().onChange( update );
- objectLeftRow.add(new UI.Text(strings.getKey('sidebar/object/left')).setWidth('90px'));
- objectLef... | true |
Other | mrdoob | three.js | 97c9defb42634425cfa5e5795b846c62f9a784c2.json | Update code style | editor/js/Viewport.js | @@ -503,12 +503,15 @@ var Viewport = function ( editor ) {
signals.viewportCameraChanged.add( function ( viewportCamera ) {
- if(viewportCamera.isPerspectiveCamera) {
+ if ( viewportCamera.isPerspectiveCamera ) {
+
viewportCamera.aspect = editor.camera.aspect;
viewportCamera.projectionMatrix.copy( edito... | true |
Other | mrdoob | three.js | d1c244492a18bb8e0bbe3ca3343a0688df66f9f0.json | Remove redundant renormalization and add comment | examples/js/animation/MMDPhysics.js | @@ -1046,11 +1046,15 @@ THREE.MMDPhysics = ( function () {
thQ.set( q.x(), q.y(), q.z(), q.w() );
thQ2.setFromRotationMatrix( this.bone.matrixWorld );
thQ2.conjugate();
- thQ2.multiply( thQ ).normalize();
+ thQ2.multiply( thQ );
//this.bone.quaternion.multiply( thQ2 );
thQ3.setFromRotationMa... | false |
Other | mrdoob | three.js | 3d06bc0f2191750e6f401b54dedcd044225a8c87.json | Update webgl_lod example | examples/webgl_lod.html | @@ -74,7 +74,6 @@
scene = new THREE.Scene();
scene.fog = new THREE.Fog( 0x000000, 1, 15000 );
- scene.autoUpdate = false;
var light = new THREE.PointLight( 0xff2200 );
light.position.set( 0, 0, 0 );
@@ -153,17 +152,6 @@
controls.update( clock.getDelta() );
- scene.updateMatrixWorl... | false |
Other | mrdoob | three.js | 9c0b8a57be4464b30f420357af2cd9308fda0442.json | Add .autoUpdate to LOD | src/objects/LOD.js | @@ -20,6 +20,8 @@ function LOD() {
}
} );
+ this.autoUpdate = true;
+
}
LOD.prototype = Object.assign( Object.create( Object3D.prototype ), { | true |
Other | mrdoob | three.js | 9c0b8a57be4464b30f420357af2cd9308fda0442.json | Add .autoUpdate to LOD | src/renderers/WebGLRenderer.js | @@ -1244,6 +1244,10 @@ function WebGLRenderer( parameters ) {
groupOrder = object.renderOrder;
+ } else if ( object.isLOD ) {
+
+ if ( object.autoUpdate ) object.update( camera );
+
} else if ( object.isLight ) {
currentRenderState.pushLight( object ); | true |
Other | mrdoob | three.js | 14d58824ea8973d4200e7c021623024ac7252a9b.json | Add missing LOD.isLOD | src/objects/LOD.js | @@ -26,6 +26,8 @@ LOD.prototype = Object.assign( Object.create( Object3D.prototype ), {
constructor: LOD,
+ isLOD: true,
+
copy: function ( source ) {
Object3D.prototype.copy.call( this, source, false ); | false |
Other | mrdoob | three.js | e2b702c13ccd1acb1539123f369913d45164df7d.json | Add gl_Position as a keyword | editor/js/libs/codemirror/mode/glsl.js | @@ -205,7 +205,7 @@
"do for while if else in out inout float int void bool true false " +
"lowp mediump highp precision invariant discard return mat2 mat3 " +
"mat4 vec2 vec3 vec4 ivec2 ivec3 ivec4 bvec2 bvec3 bvec4 sampler2D " +
- "samplerCube struct gl_FragCoord gl_FragColor";
+ "samplerCube stru... | false |
Other | mrdoob | three.js | 74c27264d7582b0b481d44e3cc673be73110db98.json | Add double side support | examples/js/loaders/LDrawLoader.js | @@ -1046,9 +1046,10 @@ THREE.LDrawLoader = ( function () {
}
- var bfcEnabled = false;
+ var bfcCertified = false;
var bfcCCW = true;
var bfcInverted = false;
+ var bfcCull = true;
// Parse all line commands
for ( lineIndex = 0; lineIndex < numLines; lineIndex ++ ) {
@@ -1152,7 +1153,7 @... | false |
Other | mrdoob | three.js | 7d2e5be900680cede5ac76f8e12f3510a22c6c66.json | Add anti aliasing to the LDraw example | examples/webgl_loader_ldraw.html | @@ -97,7 +97,7 @@
//
- renderer = new THREE.WebGLRenderer();
+ renderer = new THREE.WebGLRenderer( { antialias: true } );
renderer.setPixelRatio( window.devicePixelRatio );
renderer.setSize( window.innerWidth, window.innerHeight );
container.appendChild( renderer.domElement ); | false |
Other | mrdoob | three.js | 16d17ab3230c7358e771c1a50932ac3a4d5cb7be.json | Update code style | editor/js/Sidebar.Geometry.LatheGeometry.js | @@ -2,7 +2,7 @@
* @author rfm1201
*/
-Sidebar.Geometry.LatheGeometry = function( editor, object ) {
+Sidebar.Geometry.LatheGeometry = function ( editor, object ) {
var strings = editor.strings;
@@ -48,8 +48,8 @@ Sidebar.Geometry.LatheGeometry = function( editor, object ) {
var pointsRow = new UI.Row();
... | true |
Other | mrdoob | three.js | 16d17ab3230c7358e771c1a50932ac3a4d5cb7be.json | Update code style | editor/js/Sidebar.Geometry.TubeGeometry.js | @@ -18,8 +18,8 @@ Sidebar.Geometry.TubeGeometry = function ( editor, object ) {
var pointsRow = new UI.Row();
pointsRow.add( new UI.Text( strings.getKey( 'sidebar/geometry/tube_geometry/path' ) ).setWidth( '90px' ) );
- var points = new UI.Points3().setValue(parameters.path.points).onChange(update);
- pointsRow.a... | true |
Other | mrdoob | three.js | 16d17ab3230c7358e771c1a50932ac3a4d5cb7be.json | Update code style | editor/js/libs/ui.three.js | @@ -75,7 +75,7 @@ UI.Texture = function ( mapping ) {
reader.addEventListener( 'load', function ( event ) {
var image = document.createElement( 'img' );
- image.addEventListener( 'load', function( event ) {
+ image.addEventListener( 'load', function ( event ) {
var texture = new THREE.Text... | true |
Other | mrdoob | three.js | d9a108f65099321a80c2d4c84a6a3ff328c408df.json | Update LatheGeometry to use Points2 | editor/js/Sidebar.Geometry.LatheGeometry.js | @@ -45,99 +45,18 @@ Sidebar.Geometry.LatheGeometry = function( editor, object ) {
// points
- var lastPointIdx = 0;
- var pointsUI = [];
-
var pointsRow = new UI.Row();
pointsRow.add( new UI.Text( strings.getKey( 'sidebar/geometry/lathe_geometry/points' ) ).setWidth( '90px' ) );
- var points = new UI.Span()... | false |
Other | mrdoob | three.js | 4d77551ca2d49ad7db8fd75126d565613cdd6f87.json | Add .renderOutline() to OutlineEffect | examples/js/effects/OutlineEffect.js | @@ -3,6 +3,41 @@
*
* Reference: https://en.wikipedia.org/wiki/Cel_shading
*
+ * API
+ *
+ * 1. Traditional
+ *
+ * var effect = new THREE.OutlineEffect( renderer );
+ *
+ * function render() {
+ *
+ * effect.render( scene, camera );
+ *
+ * }
+ *
+ * 2. VR compatible
+ *
+ * var effect = new THREE.OutlineEffect(... | false |
Other | mrdoob | three.js | e13d5287dba54c05121f3a4a3a808a40fa51c11a.json | Add point light to camera | examples/webgl_geometry_colors_lookuptable.html | @@ -79,6 +79,7 @@
perpCamera = new THREE.PerspectiveCamera( 60, width / height, 1, 100 );
perpCamera.position.set( 0, 0, 10 );
+ scene.add(perpCamera);
verticalLegendGroup = new THREE.Group();
horizontalLegendGroup = new THREE.Group();
@@ -89,9 +90,6 @@
orthoCamera = new THREE.Orthograph... | false |
Other | mrdoob | three.js | e4e8ed68bcf6595eb7b7c4e2a41be47ff83dffbb.json | Update code style | examples/js/math/Lut.js | @@ -5,7 +5,7 @@
THREE.Lut = function ( colormap, numberofcolors ) {
this.lut = [];
- this.setColorMap(colormap, numberofcolors);
+ this.setColorMap( colormap, numberofcolors );
return this;
};
@@ -64,37 +64,39 @@ THREE.Lut.prototype = {
},
- setColorMap: function(colormap, numberofcolors){
+ setColorMap... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.