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/models/gltf/rolex.glb
Binary file not shown.
Binary file modified examples/screenshots/webgl_watch.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 10 additions & 10 deletions examples/webgl_watch.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<body>
<div id="container"></div>
<div id="info">
<a href="https://threejs.org" target="_blank" rel="noopener">three.js</a> - Rolex + aomap - 610 ko
<a href="https://threejs.org" target="_blank" rel="noopener">three.js</a> - Rolex + aomap - 1200 ko
</div>

<script type="importmap">
Expand Down Expand Up @@ -47,9 +47,9 @@
const torad = Math.PI / 180;

const setting = {
roughness: 0.09,
roughness: 0.1,
metalness: 1.0,
opacity: 0.4,
opacity: 0.8,
threshold: 0,
strength: 0.007,
radius: 0.0,
Expand All @@ -71,10 +71,9 @@
renderer.setPixelRatio( window.devicePixelRatio );
renderer.setSize( window.innerWidth, window.innerHeight );
renderer.setAnimationLoop( animate );
renderer.toneMapping = THREE.ACESFilmicToneMapping;
renderer.toneMapping = THREE.NeutralToneMapping;
renderer.toneMappingExposure = 0.7;
renderer.shadowMap.enabled = true;
renderer.shadowMap.type = THREE.VSMShadowMap;
container.appendChild( renderer.domElement );

taaPass = new TAARenderPass( scene, camera );
Expand Down Expand Up @@ -111,8 +110,9 @@
if ( child.isMesh ) {

child.material.vertexColors = false;
materials[ child.material.name ] = child.material;
if ( child.name !== 'glass' ) {
if ( materials[ child.material.name ] ) child.material = materials[ child.material.name ];
else materials[ child.material.name ] = child.material;
if ( child.name !== 'glass' && child.name !== 'floor' ) {

child.receiveShadow = true;
child.castShadow = true;
Expand Down Expand Up @@ -157,11 +157,11 @@
controls.update();

dirLight = new THREE.DirectionalLight( 0xFFFFFF, 6 );
dirLight.position.set( - 0.1, 0.6, 0.4 );
dirLight.position.set( 0.2, 0.6, 0.4 );
dirLight.castShadow = true;
scene.add( dirLight );
const shadow = dirLight.shadow;
shadow.mapSize.width = shadow.mapSize.height = 1024;
shadow.mapSize.width = shadow.mapSize.height = 2048;
shadow.radius = 8;
shadow.bias = - 0.0005;
const shadowCam = shadow.camera, s = 0.5;
Expand All @@ -173,7 +173,7 @@
//scene.add( new THREE.CameraHelper(shadowCam) );

pointLight = new THREE.PointLight( 0x7b8cad, 1, 0, 2 );
pointLight.position.set( 0.3, - 0.2, - 0.2 );
pointLight.position.set( - 0.3, - 0.2, - 0.2 );
scene.add( pointLight );

window.addEventListener( 'resize', onWindowResize );
Expand Down
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.