Skip to content

Commit dd6ab3c

Browse files
authored
Added reflectivity property to GUI (#22054)
1 parent c463204 commit dd6ab3c

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

examples/webgl_materials_physical_transmission.html

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
opacity: 1,
2828
metalness: 0,
2929
roughness: 0,
30+
reflectivity: 0.5,
3031
envMapIntensity: 1,
3132
lightIntensity: 1,
3233
exposure: 1
@@ -92,6 +93,7 @@
9293
color: params.color,
9394
metalness: params.metalness,
9495
roughness: params.roughness,
96+
reflectivity: params.reflectivity,
9597
alphaMap: texture,
9698
envMap: hdrCubeRenderTarget.texture,
9799
envMapIntensity: params.envMapIntensity,
@@ -154,6 +156,13 @@
154156

155157
} );
156158

159+
gui.add( params, 'reflectivity', 0, 1, 0.01 )
160+
.onChange( function () {
161+
162+
material.reflectivity = params.reflectivity;
163+
164+
} );
165+
157166
gui.add( params, 'envMapIntensity', 0, 1, 0.01 )
158167
.name( 'envMap intensity' )
159168
.onChange( function () {
@@ -205,10 +214,10 @@
205214

206215
requestAnimationFrame( animate );
207216

208-
const t = performance.now();
217+
//const t = performance.now();
209218

210-
mesh.rotation.x = t * 0.0002;
211-
mesh.rotation.z = - t * 0.0002;
219+
//mesh.rotation.x = t * 0.0002;
220+
//mesh.rotation.z = - t * 0.0002;
212221

213222
stats.begin();
214223
renderer.render( scene, camera );

0 commit comments

Comments
 (0)