From d3068fbc1589bcab7907f778251b99af29459f52 Mon Sep 17 00:00:00 2001 From: Pascal Schoen Date: Tue, 5 Oct 2021 15:50:07 +0200 Subject: [PATCH] Added controls for KHR_materials_iridescence to the web app UI --- app_web/index.html | 1 + app_web/src/logic/uimodel.js | 2 ++ app_web/src/main.js | 3 +++ app_web/src/ui/ui.js | 1 + assets/models | 2 +- 5 files changed, 8 insertions(+), 1 deletion(-) diff --git a/app_web/index.html b/app_web/index.html index fdac37f2..c5765a1d 100644 --- a/app_web/index.html +++ b/app_web/index.html @@ -323,6 +323,7 @@

Advanced Controls

KHR_materials_volume KHR_materials_ior KHR_materials_specular + KHR_materials_iridescence diff --git a/app_web/src/logic/uimodel.js b/app_web/src/logic/uimodel.js index 89db85d4..6ba004dc 100644 --- a/app_web/src/logic/uimodel.js +++ b/app_web/src/logic/uimodel.js @@ -75,6 +75,8 @@ class UIModel map( ({ newValue, oldValue }) => newValue)); this.iorEnabled = app.$watchAsObservable('iorEnabled').pipe( map( ({ newValue, oldValue }) => newValue)); + this.iridescenceEnabled = app.$watchAsObservable('iridescenceEnabled').pipe( + map( ({ newValue, oldValue }) => newValue)); this.specularEnabled = app.$watchAsObservable('specularEnabled').pipe( map( ({ newValue, oldValue }) => newValue)); this.iblEnabled = app.iblChanged$.pipe(pluck("event", "msg")); diff --git a/app_web/src/main.js b/app_web/src/main.js index 2a32f4d7..18bc2dae 100644 --- a/app_web/src/main.js +++ b/app_web/src/main.js @@ -199,6 +199,9 @@ async function main() uiModel.iorEnabled.subscribe( iorEnabled => { state.renderingParameters.enabledExtensions.KHR_materials_ior = iorEnabled; }); + uiModel.iridescenceEnabled.subscribe( iridescenceEnabled => { + state.renderingParameters.enabledExtensions.KHR_materials_iridescence = iridescenceEnabled; + }); uiModel.specularEnabled.subscribe( specularEnabled => { state.renderingParameters.enabledExtensions.KHR_materials_specular = specularEnabled; }); diff --git a/app_web/src/ui/ui.js b/app_web/src/ui/ui.js index fac02e5c..c0d7d025 100644 --- a/app_web/src/ui/ui.js +++ b/app_web/src/ui/ui.js @@ -91,6 +91,7 @@ const app = new Vue({ transmissionEnabled: true, volumeEnabled: true, iorEnabled: true, + iridescenceEnabled: true, specularEnabled: true, activeTab: 0, diff --git a/assets/models b/assets/models index 30203d9c..0f80ee52 160000 --- a/assets/models +++ b/assets/models @@ -1 +1 @@ -Subproject commit 30203d9c61288d0c6e4554eea3d5ebd2a31805ed +Subproject commit 0f80ee5275df59e07f7647d33cf54f08f2385eb9