From 4d0e64e9a113d92afc26c76afa814b892f381800 Mon Sep 17 00:00:00 2001 From: Donovan Hutchence Date: Fri, 6 Dec 2024 15:43:03 +0000 Subject: [PATCH] Workaround tonemapping bug in viewer html (#316) --- src/templates/viewer-html-template.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/templates/viewer-html-template.ts b/src/templates/viewer-html-template.ts index 6ddb2b4b..c10640a9 100644 --- a/src/templates/viewer-html-template.ts +++ b/src/templates/viewer-html-template.ts @@ -202,6 +202,8 @@ const template = /* html */ ` this.entity.camera.horizontalFov = true; this.entity.camera.farClip = bbox.halfExtents.length() * 20; this.entity.camera.nearClip = this.entity.camera.farClip * 0.001; + // set NEUTRAL tonemapping until https://github.com/playcanvas/engine/pull/7179 is deployed + this.entity.camera.toneMapping = 5; if (bbox.halfExtents.length() > 100 || resetPosition || resetTarget) { this.resetCamera(bbox);