Skip to content

Commit

Permalink
Examples: Clean up (#22029)
Browse files Browse the repository at this point in the history
* Clean up

* Update screenshot
  • Loading branch information
WestLangley committed Jun 21, 2021
1 parent 64c6990 commit 1debe8b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 12 deletions.
Binary file modified examples/screenshots/webgl_materials_physical_transmission.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 6 additions & 12 deletions examples/webgl_materials_physical_transmission.html
Expand Up @@ -9,7 +9,7 @@
<body>

<div id="container"></div>
<div id="info"><a href="https://threejs.org" target="_blank" rel="noopener">threejs</a> - Transmission with Premultiplied Alpha (right) and without (left)</div>
<div id="info"><a href="https://threejs.org" target="_blank" rel="noopener">threejs</a> - Transmission</div>

<script type="module">

Expand All @@ -36,7 +36,7 @@
let camera, scene, renderer;

let hdrCubeRenderTarget;
let mesh1, mesh2;
let mesh;

const hdrEquirect = new RGBELoader()
.setDataType( THREE.UnsignedByteType )
Expand Down Expand Up @@ -65,7 +65,6 @@
renderer.outputEncoding = THREE.sRGBEncoding;

scene = new THREE.Scene();
scene.background = hdrEquirect;

camera = new THREE.PerspectiveCamera( 40, window.innerWidth / window.innerHeight, 1, 2000 );
camera.position.set( 0, 0, 120 );
Expand Down Expand Up @@ -102,13 +101,8 @@
transparent: true
} );

mesh1 = new THREE.Mesh( geometry, material );
mesh1.position.x = - 30.0;
scene.add( mesh1 );

mesh2 = new THREE.Mesh( geometry, material );
mesh2.position.x = 30.0;
scene.add( mesh2 );
mesh = new THREE.Mesh( geometry, material );
scene.add( mesh );

//

Expand Down Expand Up @@ -213,8 +207,8 @@

const t = performance.now();

mesh1.rotation.x = mesh2.rotation.x = t * 0.0002;
mesh1.rotation.z = mesh2.rotation.z = - t * 0.0002;
mesh.rotation.x = t * 0.0002;
mesh.rotation.z = - t * 0.0002;

stats.begin();
renderer.render( scene, camera );
Expand Down

0 comments on commit 1debe8b

Please sign in to comment.