Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified examples/screenshots/webgl_materials_physical_transmission.jpg
Loading
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
Original file line number Diff line number Diff line change
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;
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: background was not removed. There were two backgrounds specified.


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