Skip to content

Commit

Permalink
Fix code indentation.
Browse files Browse the repository at this point in the history
  • Loading branch information
SamuelTallet committed Nov 22, 2019
1 parent 2389e0b commit 0096393
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions source/pbr/Viewport App/viewport.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,9 +135,9 @@ PBR.Viewport.app = clay.application.create('#app', {
// Plug & use a gamepad control.
this._gamepadControl = new clay.plugin.GamepadControl({
target: this._camera
});
});

// Sync controls with renderer.
// Sync controls with renderer.
this._orbitControl.on('update', function() {
self._advancedRenderer.render();
}, self);
Expand All @@ -146,17 +146,17 @@ PBR.Viewport.app = clay.application.create('#app', {
self._advancedRenderer.render();
}, self);

// Create an cubemap ambient light and an spherical harmonic ambient light for specular and diffuse
// lighting in PBR rendering.
// Create an cubemap ambient light and an spherical harmonic ambient light for specular and diffuse
// lighting in PBR rendering.
return app.createAmbientCubemapLight('assets/equirectangular.hdr', 0.8, 0.8)
.then(function (ambientLight){

PBR.Viewport.naturalLights.diffuse = ambientLight.diffuse;
PBR.Viewport.naturalLights.specular = ambientLight.specular;

// Create a directional light.
PBR.Viewport.naturalLights.direct = app.createDirectionalLight([-1, -1, -1], '#fff', 0.8);
PBR.Viewport.naturalLights.direct.shadowResolution = 4096;
PBR.Viewport.naturalLights.direct = app.createDirectionalLight([-1, -1, -1], '#fff', 0.8);
PBR.Viewport.naturalLights.direct.shadowResolution = 4096;

// Set HDR background image.
new clay.plugin.Skybox({
Expand Down Expand Up @@ -204,18 +204,18 @@ PBR.Viewport.app = clay.application.create('#app', {
clayMaterial.define('fragment', 'ALPHA_TEST');
clayMaterial.set('alphaCutoff', 0.6);

// Set parallax maps.
// Set parallax maps.
if ( glTFMaterial.extras && glTFMaterial.extras.parallaxOcclusionTextureURI ) {

app.loadTexture(glTFMaterial.extras.parallaxOcclusionTextureURI, {
convertToPOT: true,
anisotropic: 16,
flipY: false
}).then(function (parallaxOcclusionTexture) {
clayMaterial.set('parallaxOcclusionMap', parallaxOcclusionTexture);
clayMaterial.set('parallaxOcclusionScale', 0.05);
clayMaterial.set('parallaxMinLayers', 50);
clayMaterial.set('parallaxMaxLayers', 50);
clayMaterial.set('parallaxOcclusionMap', parallaxOcclusionTexture);
clayMaterial.set('parallaxOcclusionScale', 0.05);
clayMaterial.set('parallaxMinLayers', 50);
clayMaterial.set('parallaxMaxLayers', 50);
});

}
Expand Down

0 comments on commit 0096393

Please sign in to comment.