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
d2fd74e7b551b049b48e30bf191926aae87291fa.json
use modules in all examples
threejs/threejs-shadertoy-basic.html
@@ -19,11 +19,8 @@ <body> <canvas id="c"></canvas> </body> -<script src="resources/threejs/r108/three.min.js"></script> -<script> -'use strict'; - -/* global THREE */ +<script type="module"> +import * as THREE from './resources/threejs/r108/build/three.module.js'; function main() { const canvas = docum...
true
Other
mrdoob
three.js
d2fd74e7b551b049b48e30bf191926aae87291fa.json
use modules in all examples
threejs/threejs-shadertoy-bleepy-blocks.html
@@ -19,11 +19,8 @@ <body> <canvas id="c"></canvas> </body> -<script src="resources/threejs/r108/three.min.js"></script> -<script> -'use strict'; - -/* global THREE */ +<script type="module"> +import * as THREE from './resources/threejs/r108/build/three.module.js'; function main() { const canvas = docum...
true
Other
mrdoob
three.js
d2fd74e7b551b049b48e30bf191926aae87291fa.json
use modules in all examples
threejs/threejs-shadertoy-prep.html
@@ -19,11 +19,8 @@ <body> <canvas id="c"></canvas> </body> -<script src="resources/threejs/r108/three.min.js"></script> -<script> -'use strict'; - -/* global THREE */ +<script type="module"> +import * as THREE from './resources/threejs/r108/build/three.module.js'; function main() { const canvas = docum...
true
Other
mrdoob
three.js
d2fd74e7b551b049b48e30bf191926aae87291fa.json
use modules in all examples
threejs/threejs-shadows-directional-light-shadow-acne.html
@@ -20,13 +20,10 @@ <body> <canvas id="c"></canvas> </body> -<script src="resources/threejs/r108/three.min.js"></script> -<script src="resources/threejs/r108/js/controls/OrbitControls.js"></script> -<script src="../3rdparty/dat.gui.min.js"></script> -<script> -'use strict'; - -/* global THREE, dat */ +<scrip...
true
Other
mrdoob
three.js
d2fd74e7b551b049b48e30bf191926aae87291fa.json
use modules in all examples
threejs/threejs-shadows-directional-light-with-camera-gui.html
@@ -20,13 +20,10 @@ <body> <canvas id="c"></canvas> </body> -<script src="resources/threejs/r108/three.min.js"></script> -<script src="resources/threejs/r108/js/controls/OrbitControls.js"></script> -<script src="../3rdparty/dat.gui.min.js"></script> -<script> -'use strict'; - -/* global THREE, dat */ +<scrip...
true
Other
mrdoob
three.js
d2fd74e7b551b049b48e30bf191926aae87291fa.json
use modules in all examples
threejs/threejs-shadows-directional-light-with-camera-helper.html
@@ -20,13 +20,10 @@ <body> <canvas id="c"></canvas> </body> -<script src="resources/threejs/r108/three.min.js"></script> -<script src="resources/threejs/r108/js/controls/OrbitControls.js"></script> -<script src="../3rdparty/dat.gui.min.js"></script> -<script> -'use strict'; - -/* global THREE, dat */ +<scrip...
true
Other
mrdoob
three.js
d2fd74e7b551b049b48e30bf191926aae87291fa.json
use modules in all examples
threejs/threejs-shadows-directional-light.html
@@ -20,13 +20,10 @@ <body> <canvas id="c"></canvas> </body> -<script src="resources/threejs/r108/three.min.js"></script> -<script src="resources/threejs/r108/js/controls/OrbitControls.js"></script> -<script src="../3rdparty/dat.gui.min.js"></script> -<script> -'use strict'; - -/* global THREE, dat */ +<scrip...
true
Other
mrdoob
three.js
d2fd74e7b551b049b48e30bf191926aae87291fa.json
use modules in all examples
threejs/threejs-shadows-fake.html
@@ -20,11 +20,8 @@ <body> <canvas id="c"></canvas> </body> -<script src="resources/threejs/r108/three.min.js"></script> -<script> -'use strict'; - -/* global THREE */ +<script type="module"> +import * as THREE from './resources/threejs/r108/build/three.module.js'; function main() { const canvas = docum...
true
Other
mrdoob
three.js
d2fd74e7b551b049b48e30bf191926aae87291fa.json
use modules in all examples
threejs/threejs-shadows-point-light.html
@@ -20,13 +20,10 @@ <body> <canvas id="c"></canvas> </body> -<script src="resources/threejs/r108/three.min.js"></script> -<script src="resources/threejs/r108/js/controls/OrbitControls.js"></script> -<script src="../3rdparty/dat.gui.min.js"></script> -<script> -'use strict'; - -/* global THREE, dat */ +<scrip...
true
Other
mrdoob
three.js
d2fd74e7b551b049b48e30bf191926aae87291fa.json
use modules in all examples
threejs/threejs-shadows-spot-light-with-camera-gui.html
@@ -20,13 +20,10 @@ <body> <canvas id="c"></canvas> </body> -<script src="resources/threejs/r108/three.min.js"></script> -<script src="resources/threejs/r108/js/controls/OrbitControls.js"></script> -<script src="../3rdparty/dat.gui.min.js"></script> -<script> -'use strict'; - -/* global THREE, dat */ +<scrip...
true
Other
mrdoob
three.js
d2fd74e7b551b049b48e30bf191926aae87291fa.json
use modules in all examples
threejs/threejs-shadows-spot-light-with-shadow-radius.html
@@ -20,13 +20,10 @@ <body> <canvas id="c"></canvas> </body> -<script src="resources/threejs/r108/three.min.js"></script> -<script src="resources/threejs/r108/js/controls/OrbitControls.js"></script> -<script src="../3rdparty/dat.gui.min.js"></script> -<script> -'use strict'; - -/* global THREE, dat */ +<scrip...
true
Other
mrdoob
three.js
d2fd74e7b551b049b48e30bf191926aae87291fa.json
use modules in all examples
threejs/threejs-textured-cube-6-textures.html
@@ -19,11 +19,8 @@ <body> <canvas id="c"></canvas> </body> -<script src="resources/threejs/r108/three.min.js"></script> -<script> -'use strict'; - -/* global THREE */ +<script type="module"> +import * as THREE from './resources/threejs/r108/build/three.module.js'; function main() { const canvas = docum...
true
Other
mrdoob
three.js
d2fd74e7b551b049b48e30bf191926aae87291fa.json
use modules in all examples
threejs/threejs-textured-cube-adjust.html
@@ -19,12 +19,9 @@ <body> <canvas id="c"></canvas> </body> -<script src="resources/threejs/r108/three.min.js"></script> -<script src="../3rdparty/dat.gui.min.js"></script> -<script> -'use strict'; - -/* global THREE, dat */ +<script type="module"> +import * as THREE from './resources/threejs/r108/build/three...
true
Other
mrdoob
three.js
d2fd74e7b551b049b48e30bf191926aae87291fa.json
use modules in all examples
threejs/threejs-textured-cube-wait-for-all-textures.html
@@ -44,11 +44,8 @@ <div class="progress"><div class="progressbar"></div></div> </div> </body> -<script src="resources/threejs/r108/three.min.js"></script> -<script> -'use strict'; - -/* global THREE */ +<script type="module"> +import * as THREE from './resources/threejs/r108/build/three.module.js'; fu...
true
Other
mrdoob
three.js
d2fd74e7b551b049b48e30bf191926aae87291fa.json
use modules in all examples
threejs/threejs-textured-cube-wait-for-texture.html
@@ -19,11 +19,8 @@ <body> <canvas id="c"></canvas> </body> -<script src="resources/threejs/r108/three.min.js"></script> -<script> -'use strict'; - -/* global THREE */ +<script type="module"> +import * as THREE from './resources/threejs/r108/build/three.module.js'; function main() { const canvas = docum...
true
Other
mrdoob
three.js
d2fd74e7b551b049b48e30bf191926aae87291fa.json
use modules in all examples
threejs/threejs-textured-cube.html
@@ -19,11 +19,8 @@ <body> <canvas id="c"></canvas> </body> -<script src="resources/threejs/r108/three.min.js"></script> -<script> -'use strict'; - -/* global THREE */ +<script type="module"> +import * as THREE from './resources/threejs/r108/build/three.module.js'; function main() { const canvas = docum...
true
Other
mrdoob
three.js
d2fd74e7b551b049b48e30bf191926aae87291fa.json
use modules in all examples
threejs/threejs-tips-preservedrawingbuffer.html
@@ -19,11 +19,8 @@ <body> <canvas id="c"></canvas> </body> -<script src="resources/threejs/r108/three.min.js"></script> -<script> -'use strict'; - -/* global THREE */ +<script type="module"> +import * as THREE from './resources/threejs/r108/build/three.module.js'; function main() { const canvas = docum...
true
Other
mrdoob
three.js
d2fd74e7b551b049b48e30bf191926aae87291fa.json
use modules in all examples
threejs/threejs-tips-screenshot-bad.html
@@ -36,11 +36,8 @@ <canvas id="c"></canvas> <button id="screenshot" type="button">Save...</button> </body> -<script src="resources/threejs/r108/three.min.js"></script> -<script> -'use strict'; - -/* global THREE */ +<script type="module"> +import * as THREE from './resources/threejs/r108/build/three.module...
true
Other
mrdoob
three.js
d2fd74e7b551b049b48e30bf191926aae87291fa.json
use modules in all examples
threejs/threejs-tips-screenshot-good.html
@@ -36,11 +36,8 @@ <canvas id="c"></canvas> <button id="screenshot" type="button">Save...</button> </body> -<script src="resources/threejs/r108/three.min.js"></script> -<script> -'use strict'; - -/* global THREE */ +<script type="module"> +import * as THREE from './resources/threejs/r108/build/three.module...
true
Other
mrdoob
three.js
d2fd74e7b551b049b48e30bf191926aae87291fa.json
use modules in all examples
threejs/threejs-tips-tabindex.html
@@ -36,8 +36,8 @@ </div> </div> </body> -<script> -'use strict'; +<script type="module"> + document.querySelectorAll('canvas').forEach((canvas) => { const ctx = canvas.getContext('2d');
true
Other
mrdoob
three.js
d2fd74e7b551b049b48e30bf191926aae87291fa.json
use modules in all examples
threejs/threejs-tips-transparent-canvas.html
@@ -46,11 +46,8 @@ <h1>Cubes-R-Us!</h1> </div> </div> </body> -<script src="resources/threejs/r108/three.min.js"></script> -<script> -'use strict'; - -/* global THREE */ +<script type="module"> +import * as THREE from './resources/threejs/r108/build/three.module.js'; function main() { const canvas ...
true
Other
mrdoob
three.js
d2fd74e7b551b049b48e30bf191926aae87291fa.json
use modules in all examples
threejs/threejs-transparency-doubleside-hack.html
@@ -19,12 +19,9 @@ <body> <canvas id="c"></canvas> </body> -<script src="resources/threejs/r108/three.min.js"></script> -<script src="resources/threejs/r108/js/controls/OrbitControls.js"></script> -<script> -'use strict'; - -/* global THREE */ +<script type="module"> +import * as THREE from './resources/thre...
true
Other
mrdoob
three.js
d2fd74e7b551b049b48e30bf191926aae87291fa.json
use modules in all examples
threejs/threejs-transparency-doubleside.html
@@ -19,12 +19,9 @@ <body> <canvas id="c"></canvas> </body> -<script src="resources/threejs/r108/three.min.js"></script> -<script src="resources/threejs/r108/js/controls/OrbitControls.js"></script> -<script> -'use strict'; - -/* global THREE */ +<script type="module"> +import * as THREE from './resources/thre...
true
Other
mrdoob
three.js
d2fd74e7b551b049b48e30bf191926aae87291fa.json
use modules in all examples
threejs/threejs-transparency-intersecting-planes-alphatest.html
@@ -19,13 +19,10 @@ <body> <canvas id="c"></canvas> </body> -<script src="resources/threejs/r108/three.min.js"></script> -<script src="resources/threejs/r108/js/controls/OrbitControls.js"></script> -<script src="../3rdparty/dat.gui.min.js"></script> -<script> -'use strict'; - -/* global THREE, dat */ +<scrip...
true
Other
mrdoob
three.js
d2fd74e7b551b049b48e30bf191926aae87291fa.json
use modules in all examples
threejs/threejs-transparency-intersecting-planes-fixed.html
@@ -19,12 +19,9 @@ <body> <canvas id="c"></canvas> </body> -<script src="resources/threejs/r108/three.min.js"></script> -<script src="resources/threejs/r108/js/controls/OrbitControls.js"></script> -<script> -'use strict'; - -/* global THREE */ +<script type="module"> +import * as THREE from './resources/thre...
true
Other
mrdoob
three.js
d2fd74e7b551b049b48e30bf191926aae87291fa.json
use modules in all examples
threejs/threejs-transparency-intersecting-planes.html
@@ -19,12 +19,9 @@ <body> <canvas id="c"></canvas> </body> -<script src="resources/threejs/r108/three.min.js"></script> -<script src="resources/threejs/r108/js/controls/OrbitControls.js"></script> -<script> -'use strict'; - -/* global THREE */ +<script type="module"> +import * as THREE from './resources/thre...
true
Other
mrdoob
three.js
d2fd74e7b551b049b48e30bf191926aae87291fa.json
use modules in all examples
threejs/threejs-transparency.html
@@ -19,12 +19,9 @@ <body> <canvas id="c"></canvas> </body> -<script src="resources/threejs/r108/three.min.js"></script> -<script src="resources/threejs/r108/js/controls/OrbitControls.js"></script> -<script> -'use strict'; - -/* global THREE */ +<script type="module"> +import * as THREE from './resources/thre...
true
Other
mrdoob
three.js
d2fd74e7b551b049b48e30bf191926aae87291fa.json
use modules in all examples
threejs/threejs-voxel-geometry-culled-faces-ui.html
@@ -70,12 +70,9 @@ </div> </div> </body> -<script src="resources/threejs/r108/three.min.js"></script> -<script src="resources/threejs/r108/js/controls/OrbitControls.js"></script> -<script> -'use strict'; - -/* global THREE */ +<script type="module"> +import * as THREE from './resources/threejs/r108/build...
true
Other
mrdoob
three.js
d2fd74e7b551b049b48e30bf191926aae87291fa.json
use modules in all examples
threejs/threejs-voxel-geometry-culled-faces-with-textures.html
@@ -19,12 +19,9 @@ <body> <canvas id="c"></canvas> </body> -<script src="resources/threejs/r108/three.min.js"></script> -<script src="resources/threejs/r108/js/controls/OrbitControls.js"></script> -<script> -'use strict'; - -/* global THREE */ +<script type="module"> +import * as THREE from './resources/thre...
true
Other
mrdoob
three.js
d2fd74e7b551b049b48e30bf191926aae87291fa.json
use modules in all examples
threejs/threejs-voxel-geometry-culled-faces.html
@@ -19,12 +19,9 @@ <body> <canvas id="c"></canvas> </body> -<script src="resources/threejs/r108/three.min.js"></script> -<script src="resources/threejs/r108/js/controls/OrbitControls.js"></script> -<script> -'use strict'; - -/* global THREE */ +<script type="module"> +import * as THREE from './resources/thre...
true
Other
mrdoob
three.js
d2fd74e7b551b049b48e30bf191926aae87291fa.json
use modules in all examples
threejs/threejs-voxel-geometry-merged.html
@@ -19,13 +19,10 @@ <body> <canvas id="c"></canvas> </body> -<script src="resources/threejs/r108/three.min.js"></script> -<script src="resources/threejs/r108/js/utils/BufferGeometryUtils.js"></script> -<script src="resources/threejs/r108/js/controls/OrbitControls.js"></script> -<script> -'use strict'; - -/* ...
true
Other
mrdoob
three.js
d2fd74e7b551b049b48e30bf191926aae87291fa.json
use modules in all examples
threejs/threejs-voxel-geometry-separate-cubes.html
@@ -19,12 +19,9 @@ <body> <canvas id="c"></canvas> </body> -<script src="resources/threejs/r108/three.min.js"></script> -<script src="resources/threejs/r108/js/controls/OrbitControls.js"></script> -<script> -'use strict'; - -/* global THREE */ +<script type="module"> +import * as THREE from './resources/thre...
true
Other
mrdoob
three.js
d2fd74e7b551b049b48e30bf191926aae87291fa.json
use modules in all examples
threejs/threejs-webvr-basic-vr-optional.html
@@ -28,13 +28,10 @@ <a href="?" id="nonvr">Use Non-VR Mode</a> </div> </body> -<script src="resources/threejs/r108/three.min.js"></script> -<script src="resources/threejs/r108/js/vr/WebVR.js"></script> -<script src="resources/threejs/r108/js/controls/OrbitControls.js"></script> -<script> -'use strict'; -...
true
Other
mrdoob
three.js
d2fd74e7b551b049b48e30bf191926aae87291fa.json
use modules in all examples
threejs/threejs-webvr-basic-w-background.html
@@ -19,18 +19,15 @@ <body> <canvas id="c"></canvas> </body> -<script src="resources/threejs/r108/three.min.js"></script> -<script src="resources/threejs/r108/js/vr/WebVR.js"></script> -<script> -'use strict'; - -/* global THREE */ +<script type="module"> +import * as THREE from './resources/threejs/r108/buil...
true
Other
mrdoob
three.js
d2fd74e7b551b049b48e30bf191926aae87291fa.json
use modules in all examples
threejs/threejs-webvr-basic.html
@@ -19,18 +19,15 @@ <body> <canvas id="c"></canvas> </body> -<script src="resources/threejs/r108/three.min.js"></script> -<script src="resources/threejs/r108/js/vr/WebVR.js"></script> -<script> -'use strict'; - -/* global THREE */ +<script type="module"> +import * as THREE from './resources/threejs/r108/buil...
true
Other
mrdoob
three.js
d2fd74e7b551b049b48e30bf191926aae87291fa.json
use modules in all examples
threejs/threejs-webvr-look-to-select-selector.html
@@ -19,11 +19,8 @@ <body> <canvas id="c"></canvas> </body> -<script src="resources/threejs/r108/three.min.js"></script> -<script> -'use strict'; - -/* global THREE */ +<script type="module"> +import * as THREE from './resources/threejs/r108/build/three.module.js'; function main() { const canvas = docum...
true
Other
mrdoob
three.js
d2fd74e7b551b049b48e30bf191926aae87291fa.json
use modules in all examples
threejs/threejs-webvr-look-to-select-w-cursor.html
@@ -19,18 +19,15 @@ <body> <canvas id="c"></canvas> </body> -<script src="resources/threejs/r108/three.min.js"></script> -<script src="resources/threejs/r108/js/vr/WebVR.js"></script> -<script> -'use strict'; - -/* global THREE */ +<script type="module"> +import * as THREE from './resources/threejs/r108/buil...
true
Other
mrdoob
three.js
d2fd74e7b551b049b48e30bf191926aae87291fa.json
use modules in all examples
threejs/threejs-webvr-look-to-select.html
@@ -19,18 +19,15 @@ <body> <canvas id="c"></canvas> </body> -<script src="resources/threejs/r108/three.min.js"></script> -<script src="resources/threejs/r108/js/vr/WebVR.js"></script> -<script> -'use strict'; - -/* global THREE */ +<script type="module"> +import * as THREE from './resources/threejs/r108/buil...
true
Other
mrdoob
three.js
d2fd74e7b551b049b48e30bf191926aae87291fa.json
use modules in all examples
threejs/threejs-webvr-point-to-select-w-move.html
@@ -19,19 +19,16 @@ <body> <canvas id="c"></canvas> </body> -<script src="resources/threejs/r108/three.min.js"></script> -<script src="resources/threejs/r108/js/vr/WebVR.js"></script> -<script src="resources/threejs/r108/js/utils/SceneUtils.js"></script> -<script> -'use strict'; - -/* global THREE */ +<scrip...
true
Other
mrdoob
three.js
d2fd74e7b551b049b48e30bf191926aae87291fa.json
use modules in all examples
threejs/threejs-webvr-point-to-select.html
@@ -19,18 +19,15 @@ <body> <canvas id="c"></canvas> </body> -<script src="resources/threejs/r108/three.min.js"></script> -<script src="resources/threejs/r108/js/vr/WebVR.js"></script> -<script> -'use strict'; - -/* global THREE */ +<script type="module"> +import * as THREE from './resources/threejs/r108/buil...
true
Other
mrdoob
three.js
53471122b49e92f301656c7b6274af224e61866c.json
add dat.gui module
3rdparty/dat.gui.module.js
@@ -0,0 +1,2523 @@ +/** + * dat-gui JavaScript Controller Library + * http://code.google.com/p/dat-gui + * + * Copyright 2011 Data Arts Team, Google Creative Lab + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtai...
false
Other
mrdoob
three.js
c3978af0c81fd3eb574f9b19511177bd63685c0e.json
copy jsm to correct folder
Gruntfile.js
@@ -185,8 +185,9 @@ module.exports = function(grunt) { files: [ { expand: true, cwd: `${threePath}/build/`, src: 'three.js', dest: `${basePath}/`, }, { expand: true, cwd: `${threePath}/build/`, src: 'three.min.js', dest: `${basePath}/`, }, + { expand: true, cwd: `${threeP...
false
Other
mrdoob
three.js
aa2db5e656e377ff0157ab21154246149267847c.json
copy jsm folder when getting new three.js
Gruntfile.js
@@ -186,6 +186,7 @@ module.exports = function(grunt) { { expand: true, cwd: `${threePath}/build/`, src: 'three.js', dest: `${basePath}/`, }, { expand: true, cwd: `${threePath}/build/`, src: 'three.min.js', dest: `${basePath}/`, }, { expand: true, cwd: `${threePath}/examples/js/`,...
false
Other
mrdoob
three.js
2ffa100f9a36924d721c8b8095b0a1b6c622b79b.json
use https for baseURL
Gruntfile.js
@@ -124,7 +124,7 @@ module.exports = function(grunt) { const buildSettings = { outDir: 'out', - baseUrl: 'http://threejsfundamentals.org', + baseUrl: 'https://threejsfundamentals.org', rootFolder: 'threejs', lessonGrep: 'threejs*.md', siteName: 'ThreeJSFundamentals',
false
Other
mrdoob
three.js
273871385e5651212d69ac8a3c06f43b9414fa11.json
convert ambient to class
src/lights/AmbientLight.js
@@ -1,20 +1,17 @@ import { Light } from './Light.js'; -function AmbientLight( color, intensity ) { +class AmbientLight extends Light { - Light.call( this, color, intensity ); + constructor( color, intensity ) { - this.type = 'AmbientLight'; + super( color, intensity ); -} - -AmbientLight.prototype = Object.as...
false
Other
mrdoob
three.js
93f47339e1e53ed5a6a09c5bbcd0afbfb50a62a8.json
Convert selected color to linear
examples/webgl_materials_matcap.html
@@ -25,7 +25,7 @@ var mesh, renderer, scene, camera; var API = { - color: 0xffffff, + color: 0xffffff, // sRGB exposure: 1.0 }; @@ -80,7 +80,7 @@ mesh.material = new THREE.MeshMatcapMaterial( { - color: API.color, + color: new THREE.Color().setHex( API.color ).convertSRGBT...
false
Other
mrdoob
three.js
97557b6a9ee0f906612dac0b3a779d47bb96fca9.json
Fix enum in the switch case (#23540)
examples/webgl_lines_fat.html
@@ -230,14 +230,14 @@ switch ( val ) { - case '0': + case 0: line.visible = true; line1.visible = false; break; - case '1': + case 1: line.visible = false; line1.visible = true; @@ -285,7 +285,7 @@ switch ( val ) { - case '0': ...
true
Other
mrdoob
three.js
97557b6a9ee0f906612dac0b3a779d47bb96fca9.json
Fix enum in the switch case (#23540)
examples/webgl_lines_fat_wireframe.html
@@ -191,14 +191,14 @@ switch ( val ) { - case '0': + case 0: wireframe.visible = true; wireframe1.visible = false; break; - case '1': + case 1: wireframe.visible = false; wireframe1.visible = true; @@ -240,7 +240,7 @@ switch ( val ) {...
true
Other
mrdoob
three.js
6ccadd1000e5b4ef6c5d6657ef859a4745cf946b.json
Add type conversions in ShaderNode (#23544) * Add type conversions to float, int, and color * update code style Co-authored-by: sunag <jcdeconto@igalia.com>
examples/jsm/renderers/nodes/ShaderNode.js
@@ -195,18 +195,36 @@ export const nodeObject = ( val ) => { export const float = ( val ) => { + if ( val?.isNode === true ) { + + return nodeObject( new ConvertNode( val, 'float' ) ); + + } + return nodeObject( new FloatNode( val ).setConst( true ) ); }; export const int = ( val ) => { + if ( val?.isNo...
false
Other
mrdoob
three.js
31df72c8b528a8ef28c94fa926c843f789f3c0e5.json
Add more functions to the ShaderNode (#23539) * Update ShaderNode.js * Add remainder operator * Add xor * Update OperatorNode.getNodeType * Fix % operator
examples/jsm/renderers/nodes/ShaderNode.js
@@ -5,6 +5,7 @@ import VarNode from './core/VarNode.js'; // inputs import ColorNode from './inputs/ColorNode.js'; import FloatNode from './inputs/FloatNode.js'; +import IntNode from './inputs/IntNode.js'; import Vector2Node from './inputs/Vector2Node.js'; import Vector3Node from './inputs/Vector3Node.js'; import ...
true
Other
mrdoob
three.js
31df72c8b528a8ef28c94fa926c843f789f3c0e5.json
Add more functions to the ShaderNode (#23539) * Update ShaderNode.js * Add remainder operator * Add xor * Update OperatorNode.getNodeType * Fix % operator
examples/jsm/renderers/nodes/math/OperatorNode.js
@@ -41,15 +41,19 @@ class OperatorNode extends TempNode { return 'void'; - } else if ( op === '=' ) { + } else if ( op === '=' || op === '%' ) { return typeA; - } else if ( op === '==' || op === '&&' ) { + } else if ( op === '&' || op === '|' || op === '^' || op === '>>' || op === '<<' ) { + + ...
true
Other
mrdoob
three.js
ddbfd26da0c87badf632f85bc2c4b0a88d9da8c2.json
implement tests (#25009)
test/unit/src/core/Object3D.tests.js
@@ -12,6 +12,7 @@ import { w, eps } from '../math/Constants.tests.js'; +import { EventDispatcher } from '../../../../src/core/EventDispatcher.js'; const matrixEquals4 = ( a, b ) => { @@ -54,10 +55,12 @@ export default QUnit.module( 'Core', () => { }; // INHERITANCE - QUnit.todo( 'Extending', ( assert...
true
Other
mrdoob
three.js
ddbfd26da0c87badf632f85bc2c4b0a88d9da8c2.json
implement tests (#25009)
test/unit/src/objects/Bone.tests.js
@@ -1,15 +1,18 @@ /* global QUnit */ -// import { Bone } from '../../../../src/objects/Bone.js'; +import { Object3D } from '../../../../src/core/Object3D.js'; +import { Bone } from '../../../../src/objects/Bone.js'; export default QUnit.module( 'Objects', () => { QUnit.module( 'Bone', () => { // INHERITA...
true
Other
mrdoob
three.js
ddbfd26da0c87badf632f85bc2c4b0a88d9da8c2.json
implement tests (#25009)
test/unit/src/objects/Group.tests.js
@@ -1,15 +1,18 @@ /* global QUnit */ -// import { Group } from '../../../../src/objects/Group.js'; +import { Object3D } from '../../../../src/core/Object3D.js'; +import { Group } from '../../../../src/objects/Group.js'; export default QUnit.module( 'Objects', () => { QUnit.module( 'Group', () => { // INH...
true
Other
mrdoob
three.js
ddbfd26da0c87badf632f85bc2c4b0a88d9da8c2.json
implement tests (#25009)
test/unit/src/objects/Line.tests.js
@@ -1,15 +1,18 @@ /* global QUnit */ -// import { Line } from '../../../../src/objects/Line.js'; +import { Object3D } from '../../../../src/core/Object3D.js'; +import { Line } from '../../../../src/objects/Line.js'; export default QUnit.module( 'Objects', () => { QUnit.module( 'Line', () => { // INHERITA...
true
Other
mrdoob
three.js
ddbfd26da0c87badf632f85bc2c4b0a88d9da8c2.json
implement tests (#25009)
test/unit/src/objects/LineLoop.tests.js
@@ -1,16 +1,21 @@ /* global QUnit */ -// import { LineLoop } from '../../../../src/objects/LineLoop.js'; +import { Object3D } from '../../../../src/core/Object3D.js'; +import { Line } from '../../../../src/objects/Line.js'; +import { LineLoop } from '../../../../src/objects/LineLoop.js'; export default QUnit.modu...
true
Other
mrdoob
three.js
ddbfd26da0c87badf632f85bc2c4b0a88d9da8c2.json
implement tests (#25009)
test/unit/src/objects/LineSegments.tests.js
@@ -1,15 +1,20 @@ /* global QUnit */ -// import { LineSegments } from '../../../../src/objects/LineSegments.js'; +import { Object3D } from '../../../../src/core/Object3D.js'; +import { Line } from '../../../../src/objects/Line.js'; +import { LineSegments } from '../../../../src/objects/LineSegments.js'; export de...
true
Other
mrdoob
three.js
ddbfd26da0c87badf632f85bc2c4b0a88d9da8c2.json
implement tests (#25009)
test/unit/src/objects/Mesh.tests.js
@@ -1,5 +1,6 @@ /* global QUnit */ +import { Object3D } from '../../../../src/core/Object3D.js'; import { Mesh } from '../../../../src/objects/Mesh.js'; import { Raycaster } from '../../../../src/core/Raycaster.js'; import { PlaneGeometry } from '../../../../src/geometries/PlaneGeometry.js'; @@ -12,9 +13,11 @@ ex...
true
Other
mrdoob
three.js
ddbfd26da0c87badf632f85bc2c4b0a88d9da8c2.json
implement tests (#25009)
test/unit/src/objects/Points.tests.js
@@ -1,15 +1,18 @@ /* global QUnit */ -// import { Points } from '../../../../src/objects/Points.js'; +import { Object3D } from '../../../../src/core/Object3D.js'; +import { Points } from '../../../../src/objects/Points.js'; export default QUnit.module( 'Objects', () => { QUnit.module( 'Points', () => { /...
true
Other
mrdoob
three.js
ddbfd26da0c87badf632f85bc2c4b0a88d9da8c2.json
implement tests (#25009)
test/unit/src/objects/SkinnedMesh.tests.js
@@ -1,15 +1,20 @@ /* global QUnit */ -// import { SkinnedMesh } from '../../../../src/objects/SkinnedMesh.js'; +import { Object3D } from '../../../../src/core/Object3D.js'; +import { Mesh } from '../../../../src/objects/Mesh.js'; +import { SkinnedMesh } from '../../../../src/objects/SkinnedMesh.js'; export defaul...
true
Other
mrdoob
three.js
ddbfd26da0c87badf632f85bc2c4b0a88d9da8c2.json
implement tests (#25009)
test/unit/src/objects/Sprite.tests.js
@@ -1,15 +1,18 @@ /* global QUnit */ -// import { Sprite } from '../../../../src/objects/Sprite.js'; +import { Object3D } from '../../../../src/core/Object3D.js'; +import { Sprite } from '../../../../src/objects/Sprite.js'; export default QUnit.module( 'Objects', () => { QUnit.module( 'Sprite', () => { /...
true
Other
mrdoob
three.js
2bc5ae9acfd0e8a6436bef40e8466f43a32090fb.json
Fix code error in load-gltf.html (#24976)
manual/en/load-gltf.html
@@ -271,7 +271,7 @@ <h1>Loading a .GLTF File</h1> - cars = root.getObjectByName('Cars'); + const loadedCars = root.getObjectByName('Cars'); + const fixes = [ -+ { prefix: 'Car_08', rot: [Math.PI * .5, 0, Math.PI +* .5], }, ++ { prefix: 'Car_08', rot: [Math.PI * .5, 0, Math.PI * .5], }, + { p...
true
Other
mrdoob
three.js
2bc5ae9acfd0e8a6436bef40e8466f43a32090fb.json
Fix code error in load-gltf.html (#24976)
manual/ja/load-gltf.html
@@ -249,7 +249,7 @@ <h1>でGLFTファイルを読み込む</h1> - cars = root.getObjectByName('Cars'); + const loadedCars = root.getObjectByName('Cars'); + const fixes = [ -+ { prefix: 'Car_08', rot: [Math.PI * .5, 0, Math.PI +* .5], }, ++ { prefix: 'Car_08', rot: [Math.PI * .5, 0, Math.PI * .5], }, + { prefix:...
true
Other
mrdoob
three.js
2bc5ae9acfd0e8a6436bef40e8466f43a32090fb.json
Fix code error in load-gltf.html (#24976)
manual/ko/load-gltf.html
@@ -262,7 +262,7 @@ <h1>에서 .GLTF 파일 불러오기</h1> - cars = root.getObjectByName('Cars'); + const loadedCars = root.getObjectByName('Cars'); + const fixes = [ -+ { prefix: 'Car_08', rot: [Math.PI * .5, 0, Math.PI +* .5], }, ++ { prefix: 'Car_08', rot: [Math.PI * .5, 0, Math.PI * .5], }, + { prefi...
true
Other
mrdoob
three.js
2bc5ae9acfd0e8a6436bef40e8466f43a32090fb.json
Fix code error in load-gltf.html (#24976)
manual/zh/load-gltf.html
@@ -262,7 +262,7 @@ <h1>加载 .gltf 文件</h1> - cars = root.getObjectByName('Cars'); + const loadedCars = root.getObjectByName('Cars'); + const fixes = [ -+ { prefix: 'Car_08', rot: [Math.PI * .5, 0, Math.PI +* .5], }, ++ { prefix: 'Car_08', rot: [Math.PI * .5, 0, Math.PI * .5], }, + { prefix: 'C...
true
Other
mrdoob
three.js
268aa2d46f9ca88f0d57621e59c1128f6c0241a5.json
Remove outdated code (#24977)
examples/jsm/shaders/MMDToonShader.js
@@ -45,8 +45,6 @@ void RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in Geometric #define RE_Direct RE_Direct_BlinnPhong #define RE_IndirectDiffuse RE_IndirectDiffuse_BlinnPhong - -#define Material_LightProbeLOD( material ) (0) `; const mmd_toon_matcap_fragment = /* glsl */`
true
Other
mrdoob
three.js
268aa2d46f9ca88f0d57621e59c1128f6c0241a5.json
Remove outdated code (#24977)
src/renderers/shaders/ShaderChunk/lights_fragment_begin.glsl.js
@@ -5,7 +5,6 @@ export default /* glsl */` * * Instructions for use: * - Ensure that both RE_Direct, RE_IndirectDiffuse and RE_IndirectSpecular are defined - * - If you have defined an RE_IndirectSpecular, you need to also provide a Material_LightProbeLOD. <---- ??? * - Create a material parameter that is to be...
true
Other
mrdoob
three.js
268aa2d46f9ca88f0d57621e59c1128f6c0241a5.json
Remove outdated code (#24977)
src/renderers/shaders/ShaderChunk/lights_lambert_pars_fragment.glsl.js
@@ -25,6 +25,4 @@ void RE_IndirectDiffuse_Lambert( const in vec3 irradiance, const in GeometricCon #define RE_Direct RE_Direct_Lambert #define RE_IndirectDiffuse RE_IndirectDiffuse_Lambert - -#define Material_LightProbeLOD( material ) (0) `;
true
Other
mrdoob
three.js
268aa2d46f9ca88f0d57621e59c1128f6c0241a5.json
Remove outdated code (#24977)
src/renderers/shaders/ShaderChunk/lights_phong_pars_fragment.glsl.js
@@ -29,6 +29,4 @@ void RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in Geometric #define RE_Direct RE_Direct_BlinnPhong #define RE_IndirectDiffuse RE_IndirectDiffuse_BlinnPhong - -#define Material_LightProbeLOD( material ) (0) `;
true
Other
mrdoob
three.js
268aa2d46f9ca88f0d57621e59c1128f6c0241a5.json
Remove outdated code (#24977)
src/renderers/shaders/ShaderChunk/lights_toon_pars_fragment.glsl.js
@@ -23,6 +23,4 @@ void RE_IndirectDiffuse_Toon( const in vec3 irradiance, const in GeometricContex #define RE_Direct RE_Direct_Toon #define RE_IndirectDiffuse RE_IndirectDiffuse_Toon - -#define Material_LightProbeLOD( material ) (0) `;
true
Other
mrdoob
three.js
dbbde82cd84be119c28f588e259bc19518ace55a.json
Set default to working color space (#24965)
src/math/Color.js
@@ -1,6 +1,6 @@ import { clamp, euclideanModulo, lerp } from './MathUtils.js'; import { ColorManagement, SRGBToLinear, LinearToSRGB } from './ColorManagement.js'; -import { SRGBColorSpace, LinearSRGBColorSpace } from '../constants.js'; +import { SRGBColorSpace } from '../constants.js'; const _colorKeywords = { 'al...
false
Other
mrdoob
three.js
727ef10fdfd3c3710248f1567f291d925a589b64.json
Remove outdated comment (#24966)
src/renderers/webgl/WebGLLights.js
@@ -333,10 +333,6 @@ function WebGLLights( extensions, capabilities ) { const uniforms = cache.get( light ); - // (a) intensity is the total visible light emitted - //uniforms.color.copy( color ).multiplyScalar( intensity / ( light.width * light.height * Math.PI ) ); - - // (b) intensity is the bright...
false
Other
mrdoob
three.js
f974f3d9c1c9f1650ef272726af718fc3bdd759c.json
Update OrbitControls documentation (#24951) after having a hard time searching for a good value to start fine-tuning the dumping factor I found that the default value is 0.05, I was using way higher numbers. Hope this value in the documentation saves people time
docs/examples/en/controls/OrbitControls.html
@@ -96,6 +96,7 @@ <h3> <p> The damping inertia used if [page:.enableDamping] is set to true.<br> Note that for this to work, you must call [page:.update] () in your animation loop. + Default is 0.05. </p> <h3>[property:HTMLDOMElement domElement]</h3>
false
Other
mrdoob
three.js
735d376fc58a3b78d58fdb8dacd47bd6fd4b2d69.json
Update JSFiddle links in issue template (#24944)
.github/ISSUE_TEMPLATE/bug_report.md
@@ -28,8 +28,8 @@ Steps to reproduce the behavior: ***Live example*** -* [jsfiddle-latest-release](https://jsfiddle.net/hbfpj2wv/2/) -* [jsfiddle-dev](https://jsfiddle.net/086yzvgc/) +* [jsfiddle-latest-release](https://jsfiddle.net/g3atw6k5/) +* [jsfiddle-dev](https://jsfiddle.net/eL7gqyhd/) **Expected behavio...
false
Other
mrdoob
three.js
2f77862098bad45d095e99d2863dddd1ec94d559.json
fix .repeatWrapping() (#24922)
examples/jsm/renderers/webgpu/nodes/WebGPUNodeBuilder.js
@@ -78,9 +78,9 @@ fn threejs_mod( x : f32, y : f32 ) -> f32 { } ` ), repeatWrapping: new CodeNode( ` -fn threejs_repeatWrapping( uv : vec2<f32>, dimension : vec2<i32> ) -> vec2<i32> { +fn threejs_repeatWrapping( uv : vec2<f32>, dimension : vec2<u32> ) -> vec2<u32> { - let uvScaled = vec2<i32>( uv * vec2<f32>( dim...
false
Other
mrdoob
three.js
6671e7c4b7544207bc4e6c7bc9fcf5fc88bbb4e6.json
Clarify range of attenuationDistance (#24917)
docs/api/en/materials/MeshPhysicalMaterial.html
@@ -90,7 +90,7 @@ <h3>[property:Color attenuationColor]</h3> <h3>[property:Float attenuationDistance]</h3> <p> - Density of the medium given as the average distance that light travels in the medium before interacting with a particle. The value is given in world space. Default is `Infinity`. + Density of the m...
true
Other
mrdoob
three.js
6671e7c4b7544207bc4e6c7bc9fcf5fc88bbb4e6.json
Clarify range of attenuationDistance (#24917)
docs/api/it/materials/MeshPhysicalMaterial.html
@@ -94,6 +94,7 @@ <h3>[property:Float attenuationDistance]</h3> <p> Densità del mezzo, data come distanza media percorsa dalla luce nel mezzo prima di interagire con una particella. Il valore è indicato nello spazio del mondo. Il valore predefinito è `0`. + Density of the medium given as the average distan...
true
Other
mrdoob
three.js
6671e7c4b7544207bc4e6c7bc9fcf5fc88bbb4e6.json
Clarify range of attenuationDistance (#24917)
docs/api/zh/materials/MeshPhysicalMaterial.html
@@ -81,7 +81,7 @@ <h3>[property:Color attenuationColor]</h3> <h3>[property:Float attenuationDistance]</h3> <p> - Density of the medium given as the average distance that light travels in the medium before interacting with a particle. The value is given in world space. Default is *0*. + Density of the medium g...
true
Other
mrdoob
three.js
542343752ea588f46370cff9cc20278a102cdf7e.json
add missing example
threejs/lessons/threejs-post-processing-3dlut.md
@@ -486,6 +486,9 @@ Note that Adobe LUTs are not designed for online usage. They are large files. Yo The sample below is just a modification of the code above. We only draw the background picture, no glTF file. That picture is the an identity lut image created from the script above. We then use the effect to apply w...
false
Other
mrdoob
three.js
8ef676c18f0805b6868c6b44623f35bcd1811870.json
add continuous build
Gruntfile.js
@@ -15,6 +15,11 @@ module.exports = function(grunt) { return !s_ignoreRE.test(filename); } + const s_isMdRE = /\.md$/i; + function mdsOnly(filename) { + return s_isMdRE.test(filename); + } + function notFolder(filename) { return !fs.statSync(filename).isDirectory(); } @@ -58,6 +63,11 @@ modul...
true
Other
mrdoob
three.js
8ef676c18f0805b6868c6b44623f35bcd1811870.json
add continuous build
build/js/build.js
@@ -11,6 +11,8 @@ if (parseInt((/^v(\d+)\./).exec(process.version)[1]) < requiredNodeVersion) { module.exports = function(settings) { // wrapper in case we're in module_context mode +const hackyProcessSelectFiles = settings.filenames !== undefined; + const cache = new (require('inmemfilecache'))(); const Fe...
true
Other
mrdoob
three.js
84d6c7f553ca60e0ca8591364974f4e92d838a24.json
add watch for simple copy
Gruntfile.js
@@ -58,6 +58,33 @@ module.exports = function(grunt) { clean: [ 'out/**/*', ], + watch: { + main: { + files: [ + 'threejs/**', + '3rdparty/**', + ], + tasks: ['copy'], + options: { + spawn: false, + }, + }, + }, + }); + + le...
false
Other
mrdoob
three.js
385f0240ba53cf2981b7da5c045dc85aac6f2114.json
require node 11
build/js/build.js
@@ -4,6 +4,11 @@ 'use strict'; +const requiredNodeVersion = 11; +if (parseInt((/^v(\d+)\./).exec(process.version)[1]) < requiredNodeVersion) { + throw Error(`requires at least node: ${requiredNodeVersion}`); +} + module.exports = function(settings) { // wrapper in case we're in module_context mode const cache...
false
Other
mrdoob
three.js
d2ac2e90f489528d9e6e0a62a5ebd17d75b69586.json
use node 11
.travis.yml
@@ -1,6 +1,6 @@ language: node_js node_js: - - "8.4" + - "11" script: - npm run build env:
false
Other
mrdoob
three.js
5877f6b0408d3a3b186b13c985e0e52494a022cc.json
use new build that fixes md links and checks them
Gruntfile.js
@@ -64,6 +64,7 @@ module.exports = function(grunt) { const buildStuff = require('./build/js/build'); const finish = this.async(); buildStuff({ + outDir: 'out', baseUrl: 'http://threejsfundamentals.org', rootFolder: 'threejs', lessonGrep: 'threejs*.md',
true
Other
mrdoob
three.js
5877f6b0408d3a3b186b13c985e0e52494a022cc.json
use new build that fixes md links and checks them
build/js/build.js
@@ -1,4 +1,7 @@ -/* global module require */ +/* global module require process */ +/* eslint no-undef: "error" */ +/* eslint no-console: "off" */ + 'use strict'; module.exports = function(settings) { // wrapper in case we're in module_context mode @@ -19,6 +22,12 @@ const url = require('url'); //process.t...
true
Other
mrdoob
three.js
b6b702c50b236fee662c30c9e79c570861270d2d.json
add language tags to code blocks
threejs/lessons/threejs-cameras.md
@@ -44,7 +44,7 @@ To do that we'll make a `MinMaxGUIHelper` for the `near` and `far` settings so ` is always greater than `near`. It will have `min` and `max` properties that dat.GUI will adjust. When adjusted they'll set the 2 properties we specify. -```javascript +```js class MinMaxGUIHelper { constructor(ob...
true
Other
mrdoob
three.js
b6b702c50b236fee662c30c9e79c570861270d2d.json
add language tags to code blocks
threejs/lessons/threejs-debugging-javascript.md
@@ -75,14 +75,14 @@ Then pick "Disable Cache (while DevTools is open)". Inside all devtools is a *console*. It shows warnings and error messages. You can print your own info to the console with with `console.log` as in -``` +```js console.log(someObject.position.x, someObject.position.y, someObject.position.z); `...
true
Other
mrdoob
three.js
b6b702c50b236fee662c30c9e79c570861270d2d.json
add language tags to code blocks
threejs/lessons/threejs-fog.md
@@ -21,7 +21,7 @@ There's also `FogExp2` which grows expotentially with distance from the camera. To use either type of fog you create one and and assign it to the scene as in -``` +```js const scene = new THREE.Scene(); { const color = 0xFFFFFF; // white @@ -33,7 +33,7 @@ const scene = new THREE.Scene(); ...
true
Other
mrdoob
three.js
b6b702c50b236fee662c30c9e79c570861270d2d.json
add language tags to code blocks
threejs/lessons/threejs-fundamentals.md
@@ -29,7 +29,7 @@ so let's start with "Hello Cube!" The first thing we need is a `<canvas>` tag so -``` +```html <body> <canvas id="c"></canvas> </body> @@ -38,7 +38,7 @@ The first thing we need is a `<canvas>` tag so Three.js will draw into that canvas so we need to look it up and pass it to three.js. -`...
true
Other
mrdoob
three.js
b6b702c50b236fee662c30c9e79c570861270d2d.json
add language tags to code blocks
threejs/lessons/threejs-lights.md
@@ -13,7 +13,7 @@ Starting with one of our previous samples let's update the camera. We'll set the field of view to 45 degrees, the far plane to 100 units, and we'll move the camera 10 units up and 20 units back from the origin -```javascript +```js *const fov = 45; const aspect = 2; // the canvas default const...
true
Other
mrdoob
three.js
b6b702c50b236fee662c30c9e79c570861270d2d.json
add language tags to code blocks
threejs/lessons/threejs-load-gltf.md
@@ -69,7 +69,7 @@ for loading .OBJ and replaced it with code for loading .GLTF The old .OBJ code was -``` +```js const objLoader = new THREE.OBJLoader2(); objLoader.loadMtl('resources/models/windmill/windmill-fixed.mtl', null, (materials) => { materials.Material.side = THREE.DoubleSide; @@ -84,7 +84,7 @@ objL...
true
Other
mrdoob
three.js
b6b702c50b236fee662c30c9e79c570861270d2d.json
add language tags to code blocks
threejs/lessons/threejs-load-obj.md
@@ -44,7 +44,7 @@ that were being added to the scene. From that the first thing we need to do is include the `OBJLoader2` loader in our scene. The `OBJLoader2` also needs the `LoadingSupport.js` file so let's add both. -``` +```html <script src="resources/threejs/r98/js/loaders/LoadingSupport.js"></script> <scri...
true
Other
mrdoob
three.js
b6b702c50b236fee662c30c9e79c570861270d2d.json
add language tags to code blocks
threejs/lessons/threejs-materials.md
@@ -14,7 +14,7 @@ accomplish. There are 2 ways to set most material properties. One at creation time which we've seen before. -``` +```js const material = new THREE.MeshPhongMaterial({ color: 0xFF0000, // red (can also use a CSS color string here) flatShading: true, @@ -23,15 +23,15 @@ const material = ne...
true
Other
mrdoob
three.js
b6b702c50b236fee662c30c9e79c570861270d2d.json
add language tags to code blocks
threejs/lessons/threejs-multiple-scenes.md
@@ -35,7 +35,7 @@ issues for the same reasons. Let's start with a simple example with just 2 scenes. First we'll make the HTML -``` +```html <canvas id="c"></canvas> <p> <span id="box" class="diagram left"></span> @@ -51,7 +51,7 @@ make the HTML Then we can setup the CSS maybe something like this -``` +``...
true
Other
mrdoob
three.js
b6b702c50b236fee662c30c9e79c570861270d2d.json
add language tags to code blocks
threejs/lessons/threejs-picking.md
@@ -18,7 +18,7 @@ A few changes We'll parent the camera to another object so we can spin that other object and the camera will move around the scene just like a selfie stick. -``` +```js *const fov = 60; const aspect = 2; // the canvas default const near = 0.1; @@ -38,21 +38,21 @@ const scene = new THREE.Scene...
true
Other
mrdoob
three.js
b6b702c50b236fee662c30c9e79c570861270d2d.json
add language tags to code blocks
threejs/lessons/threejs-prerequisites.md
@@ -29,7 +29,7 @@ Lots of 20yr old pages use HTML like That style is deprecated. Put your scripts at the bottom of the page. -``` +```html <html> <head> ... @@ -62,7 +62,7 @@ Put `'use strict';` at the top of every JavaScript file. It will help prevent lo ## Know how closures work -``` +```js functio...
true
Other
mrdoob
three.js
b6b702c50b236fee662c30c9e79c570861270d2d.json
add language tags to code blocks
threejs/lessons/threejs-primitives.md
@@ -80,7 +80,7 @@ with the [examples from the previous article](threejs-responsive.html). Near the top let's set a background color -``` +```js const scene = new THREE.Scene(); +scene.background = new THREE.Color(0xAAAAAA); ``` @@ -90,7 +90,7 @@ This tells three.js to clear to lightish gray. The camera needs t...
true
Other
mrdoob
three.js
b6b702c50b236fee662c30c9e79c570861270d2d.json
add language tags to code blocks
threejs/lessons/threejs-rendertargets.md
@@ -8,15 +8,15 @@ Let's make a simple example. We'll start with an example from [the article on re Rendering to a render target just almost exactly the same as normal rendering. First we create a `WebGLRenderTarget`. -``` +```js const rtWidth = 512; const rtHeight = 512; const renderTarget = new THREE.WebGLRend...
true
Other
mrdoob
three.js
b6b702c50b236fee662c30c9e79c570861270d2d.json
add language tags to code blocks
threejs/lessons/threejs-responsive.md
@@ -18,7 +18,7 @@ in the middle of a document is another example. The last sample we had used a plain canvas with no css and no size -``` +```html <canvas id="c"></canvas> ``` @@ -29,7 +29,7 @@ of something is to use CSS. Let's make the canvas fill the page by adding CSS -``` +```html <style> html, body ...
true