diff --git a/kria-cluster-3d-demo/presentation/contentPresentation.uip b/kria-cluster-3d-demo/presentation/contentPresentation.uip index 6ebf074d4a602b8bfd9f439cdf57001e0a3b4371..e686072df3dd6d7ba980dcc018c799c34a491b14 100644 --- a/kria-cluster-3d-demo/presentation/contentPresentation.uip +++ b/kria-cluster-3d-demo/presentation/contentPresentation.uip @@ -75,7 +75,7 @@ <Add ref="#CarBottom" diffuse="0.101961 0.101961 0.101961" importfile=".\Car\Car.import" shaderlighting="None" /> <Add ref="#Interior" diffuse="0.0901961 0.0901961 0.0901961" importfile=".\Car\Car.import" /> <Add ref="#body" importfile=".\Car\Car.import" /> - <Add ref="#lambert2" bumpamount="1" diffuse="0.870588 0 0" fresnelPower="5" importfile=".\Car\Car.import" normalmap="#lambert2_normalmap" opacity="100" specularamount="2" specularmodel="Default" specularroughness="0.001" speculartint="0.298039 0.298039 0.298039" /> + <Add ref="#lambert2" bumpamount="1" controlledproperty="$displayColor diffuse" diffuse="0.870588 0 0" fresnelPower="5" importfile=".\Car\Car.import" normalmap="#lambert2_normalmap" opacity="100" specularamount="2" specularmodel="Default" specularroughness="0.001" speculartint="0.298039 0.298039 0.298039" /> <Add ref="#lambert2_normalmap" sourcepath=".\Car\maps\outUV_normals.png" /> <Add ref="#Wheel_Back_Left" importfile=".\Car\Car.import" scale="90 38.141 38.141" > <AnimationTrack property="rotation.x" type="EaseInOut" >0 720 0 0 8 0 0 0</AnimationTrack> diff --git a/kria-cluster-3d-demo/presentation/digitalSpeed.uip b/kria-cluster-3d-demo/presentation/digitalSpeed.uip index 8d0fa4aa676aff0c1d0206660d8bb4c48f0fdc9d..5b0f73c88db760201808f52cea96cba88161db66 100644 --- a/kria-cluster-3d-demo/presentation/digitalSpeed.uip +++ b/kria-cluster-3d-demo/presentation/digitalSpeed.uip @@ -18,8 +18,8 @@ <Add ref="#Layer" background="SolidColor" /> <Add ref="#Camera" orthographic="True" /> <State id="Scene-Slide1" name="Slide1" > - <Add ref="#speed" name="speed" font="TitilliumWeb-Regular" position="0 40 0" size="90" textstring="0" /> - <Add ref="#kmh" name="kmh" font="TitilliumWeb-Regular" position="0 -40 0" size="30" textstring="kph" /> + <Add ref="#speed" name="speed" controlledproperty="$speedText textstring" font="TitilliumWeb-Regular" position="0 40 0" size="90" textstring="0" /> + <Add ref="#kmh" name="kmh" controlledproperty="$speedUnitSlide textstring" font="TitilliumWeb-Regular" position="0 -40 0" size="30" textstring="kph" /> </State> </State> </Logic> diff --git a/kria-cluster-3d-demo/presentation/digitalTacho.uip b/kria-cluster-3d-demo/presentation/digitalTacho.uip index d15488ed7718347b9e80abf602be79bb94e8fef1..cbdea9bbc827eb672323b6ac38272a902d171208 100644 --- a/kria-cluster-3d-demo/presentation/digitalTacho.uip +++ b/kria-cluster-3d-demo/presentation/digitalTacho.uip @@ -19,7 +19,7 @@ <Add ref="#Camera" orthographic="True" /> <State id="Scene-Slide1" name="Slide1" > <Add ref="#rpm" name="rpm" font="TitilliumWeb-Regular" position="0 -40 0" rotation="0 0 0" size="30" textstring="rpm x 1000" /> - <Add ref="#tacho" name="tacho" font="TitilliumWeb-Regular" opacity="99" position="0 40 0" size="90" textstring="0.0" /> + <Add ref="#tacho" name="tacho" controlledproperty="$tachoText textstring" font="TitilliumWeb-Regular" opacity="99" position="0 40 0" size="90" textstring="0.0" /> </State> </State> </Logic> diff --git a/kria-cluster-3d-demo/presentation/mainPresentation.uia b/kria-cluster-3d-demo/presentation/mainPresentation.uia index ef69b3d3dbff49da063642f0c3b9146edbdc38c9..3a6b97ba2eaa7ff2fe8dbbb083605f79f7302788 100644 --- a/kria-cluster-3d-demo/presentation/mainPresentation.uia +++ b/kria-cluster-3d-demo/presentation/mainPresentation.uia @@ -1,13 +1,6 @@ <?xml version="1.0" encoding="UTF-8" ?> <application> <assets initial="mainPresentation"> - <presentation id="mainPresentation" src="mainPresentation.uip"/> - <presentation id="contentPresentation" src="contentPresentation.uip"/> - <presentation id="digitalSpeed" src="digitalSpeed.uip"/> - <presentation id="digitalTacho" src="digitalTacho.uip"/> - <presentation id="SpeedBackground" src="speedBackground.uip"/> - <presentation id="TachoBackground" src="tachoBackground.uip"/> - <presentation-qml id="navigationStream" args="../qml/Navigation.qml"/> <dataInput name="mainSlide" type="String"/> <dataInput name="carSlide" type="String"/> <dataInput name="colorSlide" type="String"/> @@ -16,6 +9,14 @@ <dataInput name="speed" type="Ranged Number" min="0" max="260"/> <dataInput name="speedText" type="String"/> <dataInput name="tachoText" type="String"/> + <dataInput name="displayColor" type="Vector3"/> + <presentation id="mainPresentation" src="mainPresentation.uip"/> + <presentation id="contentPresentation" src="contentPresentation.uip"/> + <presentation id="digitalSpeed" src="digitalSpeed.uip"/> + <presentation id="digitalTacho" src="digitalTacho.uip"/> + <presentation id="SpeedBackground" src="speedBackground.uip"/> + <presentation id="TachoBackground" src="tachoBackground.uip"/> + <presentation-qml id="navigationStream" args="../qml/Navigation.qml"/> </assets> <statemachine ref="#logic"> <visual-states> diff --git a/kria-cluster-3d-demo/presentation/mainPresentation.uip b/kria-cluster-3d-demo/presentation/mainPresentation.uip index e4de2e953cef7303dfd415184e03922f4d8d3594..6594cf7b824905bfd4117eba620a37f21684f34b 100644 --- a/kria-cluster-3d-demo/presentation/mainPresentation.uip +++ b/kria-cluster-3d-demo/presentation/mainPresentation.uip @@ -8,7 +8,7 @@ <Effect id="VignetteEffect" name="VignetteEffect" sourcepath=".\VignetteEffect.effect" /> </Classes> <Graph > - <Scene id="Scene" backgroundcolor="0 0 0" controlledproperty="mainSlide @slide" > + <Scene id="Scene" backgroundcolor="0 0 0" controlledproperty="$mainSlide @slide" > <Layer id="Layer" > <Camera id="Camera" /> <Group id="Gaugesvol2" importid="__import__root__" > @@ -105,7 +105,7 @@ </Add> <Add ref="#tachomat" bumpamount="1" diffusemap="#tachomat_diffusemap" emissivecolor="0 0 0" fresnelPower="1" importfile=".\Gauges\Gauges.import" shaderlighting="Pixel" specularamount="0.2" specularmodel="Default" specularroughness="0.001" speculartint="0.0627451 0.0627451 0.0627451" /> <Add ref="#tachomat_diffusemap" sourcepath="Gauges/maps/tacho_new.jpg" subpresentation="TachoBackground" /> - <Add ref="#tachoNeedle" name="tachoNeedle" controlledproperty="tacho @timeline" endtime="1000" opacity="100" position="0 1 0" > + <Add ref="#tachoNeedle" name="tachoNeedle" controlledproperty="$tacho @timeline" endtime="1000" opacity="100" position="0 1 0" > <AnimationTrack property="opacity" type="EaseInOut" >0 100 0 0</AnimationTrack> </Add> <Add ref="#centerTacho" endtime="1000" importfile=".\Gauges\Gauges.import" position="0 1 -0" rotation="0 -0 0" sourcepath="GaugeCenter/meshes/centerTacho.mesh" > @@ -176,7 +176,7 @@ <AnimationTrack property="scale.z" type="EaseInOut" >0 1 0 0</AnimationTrack> </Add> <Add ref="#lambert8_001" name="lambert8" endtime="1000" referencedmaterial="#lambert8" /> - <Add ref="#speedNeedle" name="speedNeedle" controlledproperty="speed @timeline" endtime="1000" opacity="100" position="0 1 0" scale="1 1 1" > + <Add ref="#speedNeedle" name="speedNeedle" controlledproperty="$speed @timeline" endtime="1000" opacity="100" position="0 1 0" scale="1 1 1" > <AnimationTrack property="opacity" type="EaseInOut" >0 100 0 0</AnimationTrack> <AnimationTrack property="scale.x" type="EaseInOut" >0 1 0 0</AnimationTrack> <AnimationTrack property="scale.y" type="EaseInOut" >0 1 0 0</AnimationTrack> @@ -201,12 +201,12 @@ <Add ref="#Light_002" name="Light" brightness="250" castshadow="True" endtime="1000" expfade="0" lightambient="0.427451 0.427451 0.427451" lightdiffuse="0.901961 0.901961 0.901961" lightspecular="0.113725 0.109804 0.14902" lighttype="Point" linearfade="9.25926" position="0 48 -110" scale="4 1 1" shdwbias="0.032" shdwfactor="79.8333" shdwfilter="4.66667" shdwmapfar="1500" shdwmapres="10" /> <Add ref="#Map" name="Content_Layer" background="Transparent" height="70" left="15" top="17" width="72" /> <Add ref="#Camera_002" orthographic="True" /> - <Add ref="#Car" name="Car" controlledproperty="carSlide @slide" /> + <Add ref="#Car" name="Car" controlledproperty="$carSlide @slide" /> <Add ref="#map" name="Navigation" opacity="100" scale="25.9751 9.54456 1" sourcepath="#Rectangle" > <AnimationTrack property="opacity" type="EaseInOut" >0 100 0 0</AnimationTrack> </Add> <Add ref="#Material_001" diffusemap="#Material_001_diffusemap" shaderlighting="None" /> - <Add ref="#Material_001_diffusemap" sourcepath=".\Gauges\maps\map.jpg" subpresentation="navigationStream" /> + <Add ref="#Material_001_diffusemap" sourcepath="Gauges/maps/map.jpg" subpresentation="navigationStream" /> <Add ref="#VignetteEffect_001" name="VignetteEffect" vig_color="0 0 0" vig_radius="1.01626" vig_strenght="15" /> <State id="Scene-2D" name="2D" playmode="Play Through To..." > <Set ref="#Layer" endtime="1000" /> diff --git a/kria-cluster-3d-demo/presentation/speedBackground.uip b/kria-cluster-3d-demo/presentation/speedBackground.uip index d5ab5244ccdd80691c9914e0bf862e98487ddb9d..f84c9cb17b0ac9efb5a0a41750947cf484ba6a50 100644 --- a/kria-cluster-3d-demo/presentation/speedBackground.uip +++ b/kria-cluster-3d-demo/presentation/speedBackground.uip @@ -9,7 +9,7 @@ <ImageBuffer sourcepath="Gauges/maps/gaugespeed_mph.png" hasTransparency="True" /> </BufferData> <Graph > - <Scene id="Scene" controlledproperty="speedUnitSlide @slide" > + <Scene id="Scene" controlledproperty="$speedUnitSlide @slide" > <Layer id="Layer" > <Camera id="Camera" /> <Model id="speed_mph_new" > @@ -46,7 +46,7 @@ </Add> <Add ref="#Material_001" diffusemap="#Material_001_diffusemap" shaderlighting="None" /> <Add ref="#Material_001_diffusemap" sourcepath="Gauges/maps/gaugespeed_kph.png" /> - <Add ref="#gaugespeed_background" name="gaugespeed_background" controlledproperty="colorSlide @slide" /> + <Add ref="#gaugespeed_background" name="gaugespeed_background" controlledproperty="$colorSlide @slide" /> <State id="Scene-kph" name="kph" playmode="Stop at end" > <Set ref="#Layer" endtime="1000" /> <Set ref="#Camera" endtime="1000" /> diff --git a/kria-cluster-3d-demo/presentation/tachoBackground.uip b/kria-cluster-3d-demo/presentation/tachoBackground.uip index 9c1c023c27bfc2e66fc8934750bb9bd914f92d14..414cf32491e0a6d1dc3a803f9714a03e77094c69 100644 --- a/kria-cluster-3d-demo/presentation/tachoBackground.uip +++ b/kria-cluster-3d-demo/presentation/tachoBackground.uip @@ -35,7 +35,7 @@ </Add> <Add ref="#Material" diffusemap="#Material_diffusemap" shaderlighting="None" /> <Add ref="#Material_diffusemap" sourcepath="Gauges/maps/gaugetacho.png" /> - <Add ref="#gaugespeed_background" name="gaugetacho_background" controlledproperty="colorSlide @slide" /> + <Add ref="#gaugespeed_background" name="gaugetacho_background" controlledproperty="$colorSlide @slide" /> <State id="Scene-Tacho" name="Tacho" playmode="Stop at end" > <Set ref="#Layer" endtime="1000" /> <Set ref="#Camera" endtime="1000" /> diff --git a/kria-cluster-3d-demo/qml/OverlayContainer.qml b/kria-cluster-3d-demo/qml/OverlayContainer.qml index 375b06bde8aac5a36321b8388673bb1f50b3e306..406fe7b0593e979a4b1cbbd9434496ecf2632da9 100644 --- a/kria-cluster-3d-demo/qml/OverlayContainer.qml +++ b/kria-cluster-3d-demo/qml/OverlayContainer.qml @@ -54,12 +54,12 @@ OverlayContainerForm { id: indicatorContainer // Safety critical icons - property bool parkBrake: startupAnimation ? true : false - property bool flatTire: startupAnimation ? true : false - property bool fuelLevel: startupAnimation ? true : false - property bool seatbelt: startupAnimation ? true : false - property bool oilLevel: startupAnimation ? true : false - property bool brakeFailure: startupAnimation ? true : false + property bool parkBrake: mainview.startupAnimation ? true : false + property bool flatTire: mainview.startupAnimation ? true : false + property bool fuelLevel: mainview.startupAnimation ? true : false + property bool seatbelt: mainview.startupAnimation ? true : false + property bool oilLevel: mainview.startupAnimation ? true : false + property bool brakeFailure: mainview.startupAnimation ? true : false // Icon colors property string offIconColor: "#222324" diff --git a/kria-cluster-3d-demo/qml/SimuData.qml b/kria-cluster-3d-demo/qml/SimuData.qml index d609a01b3bb226776d420955debe760d12f45f32..4e7b8bd5473dde29e3c301d31847f34b6a8c0f6d 100644 --- a/kria-cluster-3d-demo/qml/SimuData.qml +++ b/kria-cluster-3d-demo/qml/SimuData.qml @@ -62,7 +62,7 @@ Item { SequentialAnimation { id: animation - running: !startupAnimation + running: !mainview.startupAnimation loops: Animation.Infinite PropertyAnimation { @@ -85,7 +85,7 @@ Item { } Timer { - running: !startupAnimation + running: !mainview.startupAnimation property bool turnLeft: true repeat: true interval: 5000 diff --git a/kria-cluster-3d-demo/qml/main.qml b/kria-cluster-3d-demo/qml/main.qml index 73d721bbdc472bcd2ab8b6baa261ed8e56ea42df..34cb14d49de88e3a50a301e7d4ec1a0ac234fd3d 100644 --- a/kria-cluster-3d-demo/qml/main.qml +++ b/kria-cluster-3d-demo/qml/main.qml @@ -110,42 +110,38 @@ Item { } DataInput { - id: tachometerNeedle name: "tacho" value: simuData.rpm } DataInput { - id: tachometerText name: "tachoText" value: (simuData.rpm / 1000.0).toFixed(1) } DataInput { - id: speedometerNeedle name: "speed" value: simuData.speed } DataInput { - id: speedometerText name: "speedText" value: useMetric ? simuData.speed.toFixed(0) : (simuData.speed / 1.625).toFixed(0) } DataInput { - id: displayColor name: "colorSlide" + value: redTheme ? "red" : "blue" } DataInput { - id: speedometerUnit name: "speedUnitSlide" + value: useMetric ? "kph" : "mph" } - Element { - id: carBodyMaterial - elementPath: "contentPresentation:Scene.Layer.Car.Car.body.lambert2" + DataInput { + name: "displayColor" + value: redTheme ? Qt.vector3d(0.855, 0.14, 0.144) : Qt.vector3d(0.08, 0.08, 1.0) } SubPresentationSettings { @@ -194,27 +190,6 @@ Item { visible: false } - onRedThemeChanged: { - if (redTheme) { - carBodyMaterial.setAttribute("diffuse.r", 0.855); - carBodyMaterial.setAttribute("diffuse.g", 0.14); - carBodyMaterial.setAttribute("diffuse.b", 0.144); - displayColor.setValue("red"); - } else { - carBodyMaterial.setAttribute("diffuse.r", 0.08); - carBodyMaterial.setAttribute("diffuse.g", 0.08); - carBodyMaterial.setAttribute("diffuse.b", 1.0); - displayColor.setValue("blue"); - } - } - - onUseMetricChanged: { - if (useMetric) - speedometerUnit.setValue("kph"); - else - speedometerUnit.setValue("mph"); - } - Keys.onRightPressed: { userActivity(); menuSelect(true);