Skip to content

Commit

Permalink
Manual: Clean up examples. (#23377)
Browse files Browse the repository at this point in the history
  • Loading branch information
Mugen87 authored Jan 29, 2022
1 parent 144c217 commit b559473
Show file tree
Hide file tree
Showing 29 changed files with 103 additions and 106 deletions.
3 changes: 2 additions & 1 deletion manual/examples/cleanup-loaded-files.html
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@
function main() {
const canvas = document.querySelector('#c');
const renderer = new THREE.WebGLRenderer({canvas});
renderer.outputEncoding = THREE.sRGBEncoding;

const fov = 75;
const aspect = 2; // the canvas default
Expand All @@ -120,7 +121,7 @@

function addLight(...pos) {
const color = 0xFFFFFF;
const intensity = 1;
const intensity = 0.8;
const light = new THREE.DirectionalLight(color, intensity);
light.position.set(...pos);
scene.add(light);
Expand Down
18 changes: 9 additions & 9 deletions manual/examples/game-check-animations.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,13 @@
height: 1em;
background-color: #888;
background-image: linear-gradient(
-45deg,
rgba(255, 255, 255, .5) 25%,
transparent 25%,
transparent 50%,
rgba(255, 255, 255, .5) 50%,
rgba(255, 255, 255, .5) 75%,
transparent 75%,
-45deg,
rgba(255, 255, 255, .5) 25%,
transparent 25%,
transparent 50%,
rgba(255, 255, 255, .5) 50%,
rgba(255, 255, 255, .5) 75%,
transparent 75%,
transparent
);
background-size: 50px 50px;
Expand Down Expand Up @@ -94,6 +94,7 @@
function main() {
const canvas = document.querySelector('#c');
const renderer = new THREE.WebGLRenderer({canvas});
renderer.outputEncoding = THREE.sRGBEncoding;

const fov = 45;
const aspect = 2; // the canvas default
Expand All @@ -111,7 +112,7 @@

function addLight(...pos) {
const color = 0xFFFFFF;
const intensity = 1;
const intensity = 0.8;
const light = new THREE.DirectionalLight(color, intensity);
light.position.set(...pos);
scene.add(light);
Expand Down Expand Up @@ -246,4 +247,3 @@
main();
</script>
</html>

4 changes: 2 additions & 2 deletions manual/examples/game-conga-line-w-notes.html
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@
function main() {
const canvas = document.querySelector('#c');
const renderer = new THREE.WebGLRenderer({canvas});
renderer.outputEncoding = THREE.sRGBEncoding;

const fov = 45;
const aspect = 2; // the canvas default
Expand All @@ -188,7 +189,7 @@

function addLight(...pos) {
const color = 0xFFFFFF;
const intensity = 1;
const intensity = 0.8;
const light = new THREE.DirectionalLight(color, intensity);
light.position.set(...pos);
scene.add(light);
Expand Down Expand Up @@ -977,4 +978,3 @@
main();
</script>
</html>

4 changes: 2 additions & 2 deletions manual/examples/game-conga-line.html
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@
function main() {
const canvas = document.querySelector('#c');
const renderer = new THREE.WebGLRenderer({canvas});
renderer.outputEncoding = THREE.sRGBEncoding;

const fov = 45;
const aspect = 2; // the canvas default
Expand All @@ -188,7 +189,7 @@

function addLight(...pos) {
const color = 0xFFFFFF;
const intensity = 1;
const intensity = 0.8;
const light = new THREE.DirectionalLight(color, intensity);
light.position.set(...pos);
scene.add(light);
Expand Down Expand Up @@ -816,4 +817,3 @@
main();
</script>
</html>

18 changes: 9 additions & 9 deletions manual/examples/game-just-player.html
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,13 @@
height: 1em;
background-color: #888;
background-image: linear-gradient(
-45deg,
rgba(255, 255, 255, .5) 25%,
transparent 25%,
transparent 50%,
rgba(255, 255, 255, .5) 50%,
rgba(255, 255, 255, .5) 75%,
transparent 75%,
-45deg,
rgba(255, 255, 255, .5) 25%,
transparent 25%,
transparent 50%,
rgba(255, 255, 255, .5) 50%,
rgba(255, 255, 255, .5) 75%,
transparent 75%,
transparent
);
background-size: 50px 50px;
Expand Down Expand Up @@ -100,6 +100,7 @@
function main() {
const canvas = document.querySelector('#c');
const renderer = new THREE.WebGLRenderer({canvas});
renderer.outputEncoding = THREE.sRGBEncoding;

const fov = 45;
const aspect = 2; // the canvas default
Expand All @@ -118,7 +119,7 @@

function addLight(...pos) {
const color = 0xFFFFFF;
const intensity = 1;
const intensity = 0.8;
const light = new THREE.DirectionalLight(color, intensity);
light.position.set(...pos);
scene.add(light);
Expand Down Expand Up @@ -359,4 +360,3 @@
main();
</script>
</html>

18 changes: 9 additions & 9 deletions manual/examples/game-load-models.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,13 @@
height: 1em;
background-color: #888;
background-image: linear-gradient(
-45deg,
rgba(255, 255, 255, .5) 25%,
transparent 25%,
transparent 50%,
rgba(255, 255, 255, .5) 50%,
rgba(255, 255, 255, .5) 75%,
transparent 75%,
-45deg,
rgba(255, 255, 255, .5) 25%,
transparent 25%,
transparent 50%,
rgba(255, 255, 255, .5) 50%,
rgba(255, 255, 255, .5) 75%,
transparent 75%,
transparent
);
background-size: 50px 50px;
Expand Down Expand Up @@ -94,6 +94,7 @@
function main() {
const canvas = document.querySelector('#c');
const renderer = new THREE.WebGLRenderer({canvas});
renderer.outputEncoding = THREE.sRGBEncoding;

const fov = 45;
const aspect = 2; // the canvas default
Expand All @@ -111,7 +112,7 @@

function addLight(...pos) {
const color = 0xFFFFFF;
const intensity = 1;
const intensity = 0.8;
const light = new THREE.DirectionalLight(color, intensity);
light.position.set(...pos);
scene.add(light);
Expand Down Expand Up @@ -219,4 +220,3 @@
main();
</script>
</html>

4 changes: 2 additions & 2 deletions manual/examples/game-player-input.html
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@
function main() {
const canvas = document.querySelector('#c');
const renderer = new THREE.WebGLRenderer({canvas});
renderer.outputEncoding = THREE.sRGBEncoding;

const fov = 45;
const aspect = 2; // the canvas default
Expand All @@ -158,7 +159,7 @@

function addLight(...pos) {
const color = 0xFFFFFF;
const intensity = 1;
const intensity = 0.8;
const light = new THREE.DirectionalLight(color, intensity);
light.position.set(...pos);
scene.add(light);
Expand Down Expand Up @@ -561,4 +562,3 @@
main();
</script>
</html>

6 changes: 3 additions & 3 deletions manual/examples/load-gltf-animated-cars.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
function main() {
const canvas = document.querySelector('#c');
const renderer = new THREE.WebGLRenderer({canvas});
renderer.outputEncoding = THREE.sRGBEncoding;

const fov = 45;
const aspect = 2; // the canvas default
Expand Down Expand Up @@ -79,14 +80,14 @@
{
const skyColor = 0xB1E1FF; // light blue
const groundColor = 0xB97A20; // brownish orange
const intensity = 1;
const intensity = 0.6;
const light = new THREE.HemisphereLight(skyColor, groundColor, intensity);
scene.add(light);
}

{
const color = 0xFFFFFF;
const intensity = 1;
const intensity = 0.8;
const light = new THREE.DirectionalLight(color, intensity);
light.position.set(5, 10, 2);
scene.add(light);
Expand Down Expand Up @@ -275,4 +276,3 @@
main();
</script>
</html>

6 changes: 3 additions & 3 deletions manual/examples/load-gltf-car-path-fixed.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
function main() {
const canvas = document.querySelector('#c');
const renderer = new THREE.WebGLRenderer({canvas});
renderer.outputEncoding = THREE.sRGBEncoding;

const fov = 45;
const aspect = 2; // the canvas default
Expand Down Expand Up @@ -79,14 +80,14 @@
{
const skyColor = 0xB1E1FF; // light blue
const groundColor = 0xB97A20; // brownish orange
const intensity = 1;
const intensity = 0.6;
const light = new THREE.HemisphereLight(skyColor, groundColor, intensity);
scene.add(light);
}

{
const color = 0xFFFFFF;
const intensity = 1;
const intensity = 0.8;
const light = new THREE.DirectionalLight(color, intensity);
light.position.set(5, 10, 2);
scene.add(light);
Expand Down Expand Up @@ -251,4 +252,3 @@
main();
</script>
</html>

6 changes: 3 additions & 3 deletions manual/examples/load-gltf-car-path.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
function main() {
const canvas = document.querySelector('#c');
const renderer = new THREE.WebGLRenderer({canvas});
renderer.outputEncoding = THREE.sRGBEncoding;

const fov = 45;
const aspect = 2; // the canvas default
Expand Down Expand Up @@ -79,14 +80,14 @@
{
const skyColor = 0xB1E1FF; // light blue
const groundColor = 0xB97A20; // brownish orange
const intensity = 1;
const intensity = 0.6;
const light = new THREE.HemisphereLight(skyColor, groundColor, intensity);
scene.add(light);
}

{
const color = 0xFFFFFF;
const intensity = 1;
const intensity = 0.8;
const light = new THREE.DirectionalLight(color, intensity);
light.position.set(5, 10, 2);
scene.add(light);
Expand Down Expand Up @@ -248,4 +249,3 @@
main();
</script>
</html>

6 changes: 3 additions & 3 deletions manual/examples/load-gltf-dump-scenegraph-extra.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
function main() {
const canvas = document.querySelector('#c');
const renderer = new THREE.WebGLRenderer({canvas});
renderer.outputEncoding = THREE.sRGBEncoding;

const fov = 45;
const aspect = 2; // the canvas default
Expand Down Expand Up @@ -79,14 +80,14 @@
{
const skyColor = 0xB1E1FF; // light blue
const groundColor = 0xB97A20; // brownish orange
const intensity = 1;
const intensity = 0.6;
const light = new THREE.HemisphereLight(skyColor, groundColor, intensity);
scene.add(light);
}

{
const color = 0xFFFFFF;
const intensity = 1;
const intensity = 0.8;
const light = new THREE.DirectionalLight(color, intensity);
light.position.set(5, 10, 2);
scene.add(light);
Expand Down Expand Up @@ -195,4 +196,3 @@
main();
</script>
</html>

6 changes: 3 additions & 3 deletions manual/examples/load-gltf-dump-scenegraph.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
function main() {
const canvas = document.querySelector('#c');
const renderer = new THREE.WebGLRenderer({canvas});
renderer.outputEncoding = THREE.sRGBEncoding;

const fov = 45;
const aspect = 2; // the canvas default
Expand Down Expand Up @@ -79,14 +80,14 @@
{
const skyColor = 0xB1E1FF; // light blue
const groundColor = 0xB97A20; // brownish orange
const intensity = 1;
const intensity = 0.6;
const light = new THREE.HemisphereLight(skyColor, groundColor, intensity);
scene.add(light);
}

{
const color = 0xFFFFFF;
const intensity = 1;
const intensity = 0.8;
const light = new THREE.DirectionalLight(color, intensity);
light.position.set(5, 10, 2);
scene.add(light);
Expand Down Expand Up @@ -185,4 +186,3 @@
main();
</script>
</html>

5 changes: 3 additions & 2 deletions manual/examples/load-gltf-rotate-cars-fixed.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
function main() {
const canvas = document.querySelector('#c');
const renderer = new THREE.WebGLRenderer({canvas});
renderer.outputEncoding = THREE.sRGBEncoding;

const fov = 45;
const aspect = 2; // the canvas default
Expand Down Expand Up @@ -79,14 +80,14 @@
{
const skyColor = 0xB1E1FF; // light blue
const groundColor = 0xB97A20; // brownish orange
const intensity = 1;
const intensity = 0.6;
const light = new THREE.HemisphereLight(skyColor, groundColor, intensity);
scene.add(light);
}

{
const color = 0xFFFFFF;
const intensity = 1;
const intensity = 0.8;
const light = new THREE.DirectionalLight(color, intensity);
light.position.set(5, 10, 2);
scene.add(light);
Expand Down
Loading

0 comments on commit b559473

Please sign in to comment.