mirror of https://github.com/qt/qtdoc.git
FX&MaterialShowroom: Use strict equality operators
Pick-to: 6.10 Change-Id: I8556cf105e84d8977567bf462ddc394ff90666d5 Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
This commit is contained in:
parent
6749ea650e
commit
9509c7cfff
|
@ -85,7 +85,7 @@ Model {
|
||||||
states: [
|
states: [
|
||||||
State {
|
State {
|
||||||
name: "Dragon"
|
name: "Dragon"
|
||||||
when: floor.aoState == 1
|
when: floor.aoState === 1
|
||||||
|
|
||||||
PropertyChanges {
|
PropertyChanges {
|
||||||
target: floorMat_local
|
target: floorMat_local
|
||||||
|
@ -96,7 +96,7 @@ Model {
|
||||||
},
|
},
|
||||||
State {
|
State {
|
||||||
name: "Bunny"
|
name: "Bunny"
|
||||||
when: floor.aoState == 2
|
when: floor.aoState === 2
|
||||||
|
|
||||||
PropertyChanges {
|
PropertyChanges {
|
||||||
target: floorMat_local
|
target: floorMat_local
|
||||||
|
@ -107,7 +107,7 @@ Model {
|
||||||
},
|
},
|
||||||
State {
|
State {
|
||||||
name: "matball"
|
name: "matball"
|
||||||
when: floor.aoState == 0
|
when: floor.aoState === 0
|
||||||
|
|
||||||
PropertyChanges {
|
PropertyChanges {
|
||||||
target: floorMat_local
|
target: floorMat_local
|
||||||
|
@ -118,7 +118,7 @@ Model {
|
||||||
},
|
},
|
||||||
State {
|
State {
|
||||||
name: "none"
|
name: "none"
|
||||||
when: floor.aoState == 3
|
when: floor.aoState === 3
|
||||||
|
|
||||||
PropertyChanges {
|
PropertyChanges {
|
||||||
target: floorMat_local
|
target: floorMat_local
|
||||||
|
|
|
@ -257,7 +257,7 @@ Item {
|
||||||
}
|
}
|
||||||
|
|
||||||
function processInput() {
|
function processInput() {
|
||||||
if (root.controlledObject == undefined)
|
if (root.controlledObject)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (moveForward)
|
if (moveForward)
|
||||||
|
|
|
@ -77,7 +77,7 @@ Item {
|
||||||
states: [
|
states: [
|
||||||
State {
|
State {
|
||||||
name: "Sunrise"
|
name: "Sunrise"
|
||||||
when: buttonTabs.activeBtn == "Sunrise"
|
when: buttonTabs.activeBtn === "Sunrise"
|
||||||
|
|
||||||
PropertyChanges {
|
PropertyChanges {
|
||||||
target: buttonTabs
|
target: buttonTabs
|
||||||
|
@ -88,7 +88,7 @@ Item {
|
||||||
|
|
||||||
State {
|
State {
|
||||||
name: "Midday"
|
name: "Midday"
|
||||||
when: buttonTabs.activeBtn == "Midday"
|
when: buttonTabs.activeBtn === "Midday"
|
||||||
|
|
||||||
PropertyChanges {
|
PropertyChanges {
|
||||||
target: buttonTabs
|
target: buttonTabs
|
||||||
|
@ -99,7 +99,7 @@ Item {
|
||||||
|
|
||||||
State {
|
State {
|
||||||
name: "Sunset"
|
name: "Sunset"
|
||||||
when: buttonTabs.activeBtn == "Sunset"
|
when: buttonTabs.activeBtn === "Sunset"
|
||||||
|
|
||||||
PropertyChanges {
|
PropertyChanges {
|
||||||
target: buttonTabs
|
target: buttonTabs
|
||||||
|
|
|
@ -33,7 +33,7 @@ Rectangle {
|
||||||
layer.format: ShaderEffectSource.RGB
|
layer.format: ShaderEffectSource.RGB
|
||||||
|
|
||||||
environment: layout.dotBtns.sceneState
|
environment: layout.dotBtns.sceneState
|
||||||
== 2 ? colorful : (layout.dotBtns.sceneState == 1 ? studio : bright)
|
=== 2 ? colorful : (layout.dotBtns.sceneState === 1 ? studio : bright)
|
||||||
|
|
||||||
Node {
|
Node {
|
||||||
id: scene
|
id: scene
|
||||||
|
@ -43,7 +43,7 @@ Rectangle {
|
||||||
|
|
||||||
Node {
|
Node {
|
||||||
id: brightLights
|
id: brightLights
|
||||||
visible: layout.dotBtns.sceneState == 0
|
visible: layout.dotBtns.sceneState === 0
|
||||||
DirectionalLight {
|
DirectionalLight {
|
||||||
visible: true
|
visible: true
|
||||||
shadowBias: 0.02
|
shadowBias: 0.02
|
||||||
|
@ -77,7 +77,7 @@ Rectangle {
|
||||||
|
|
||||||
Node {
|
Node {
|
||||||
id: colorfulLights
|
id: colorfulLights
|
||||||
visible: layout.dotBtns.sceneState == 2
|
visible: layout.dotBtns.sceneState === 2
|
||||||
DirectionalLight {
|
DirectionalLight {
|
||||||
shadowMapFar: 5000
|
shadowMapFar: 5000
|
||||||
shadowBias: 0.02
|
shadowBias: 0.02
|
||||||
|
@ -96,9 +96,9 @@ Rectangle {
|
||||||
id: floor
|
id: floor
|
||||||
receivesReflections: true
|
receivesReflections: true
|
||||||
aoState: material_pop_up.modelsL.selection
|
aoState: material_pop_up.modelsL.selection
|
||||||
== "None" ? 3 : (material_pop_up.modelsL.selection
|
=== "None" ? 3 : (material_pop_up.modelsL.selection
|
||||||
== "Dragon" ? 1 : (material_pop_up.modelsL.selection
|
=== "Dragon" ? 1 : (material_pop_up.modelsL.selection
|
||||||
== "Rabbit" ? 2 : 0))
|
=== "Rabbit" ? 2 : 0))
|
||||||
scale.x: 150
|
scale.x: 150
|
||||||
scale.y: 150
|
scale.y: 150
|
||||||
scale.z: 150
|
scale.z: 150
|
||||||
|
@ -113,7 +113,7 @@ Rectangle {
|
||||||
Model {
|
Model {
|
||||||
id: studioFloor
|
id: studioFloor
|
||||||
y: -1
|
y: -1
|
||||||
visible: layout.dotBtns.sceneState == 1
|
visible: layout.dotBtns.sceneState === 1
|
||||||
opacity: 1
|
opacity: 1
|
||||||
source: "#Rectangle"
|
source: "#Rectangle"
|
||||||
eulerRotation.z: 0
|
eulerRotation.z: 0
|
||||||
|
@ -286,36 +286,36 @@ Rectangle {
|
||||||
|
|
||||||
HeatwaveEffect {
|
HeatwaveEffect {
|
||||||
id: heatwave
|
id: heatwave
|
||||||
visible: material_pop_up.effectsL.selection == "Heatwave"
|
visible: material_pop_up.effectsL.selection === "Heatwave"
|
||||||
}
|
}
|
||||||
|
|
||||||
RainEffect {
|
RainEffect {
|
||||||
id: rain
|
id: rain
|
||||||
sceneCamera: sceneCamera
|
sceneCamera: sceneCamera
|
||||||
visible: material_pop_up.effectsL.selection == "Rain"
|
visible: material_pop_up.effectsL.selection === "Rain"
|
||||||
}
|
}
|
||||||
|
|
||||||
SmokeEffect {
|
SmokeEffect {
|
||||||
id: smoke
|
id: smoke
|
||||||
visible: material_pop_up.effectsL.selection == "Smoke"
|
visible: material_pop_up.effectsL.selection === "Smoke"
|
||||||
}
|
}
|
||||||
|
|
||||||
SteamEffect {
|
SteamEffect {
|
||||||
id: steam
|
id: steam
|
||||||
y: 100
|
y: 100
|
||||||
visible: material_pop_up.effectsL.selection == "Steam"
|
visible: material_pop_up.effectsL.selection === "Steam"
|
||||||
z: 100
|
z: 100
|
||||||
}
|
}
|
||||||
|
|
||||||
SnowEffect {
|
SnowEffect {
|
||||||
id: snow
|
id: snow
|
||||||
visible: material_pop_up.effectsL.selection == "Snow"
|
visible: material_pop_up.effectsL.selection === "Snow"
|
||||||
}
|
}
|
||||||
|
|
||||||
FireEffect {
|
FireEffect {
|
||||||
id: fire
|
id: fire
|
||||||
sceneCamera: sceneCamera
|
sceneCamera: sceneCamera
|
||||||
visible: material_pop_up.effectsL.selection == "Flames"
|
visible: material_pop_up.effectsL.selection === "Flames"
|
||||||
}
|
}
|
||||||
|
|
||||||
Node {
|
Node {
|
||||||
|
@ -324,7 +324,7 @@ Rectangle {
|
||||||
|
|
||||||
SparksEffect {
|
SparksEffect {
|
||||||
id: sparks
|
id: sparks
|
||||||
visible: material_pop_up.effectsL.selection == "Sparks"
|
visible: material_pop_up.effectsL.selection === "Sparks"
|
||||||
y: 100
|
y: 100
|
||||||
z: 250
|
z: 250
|
||||||
}
|
}
|
||||||
|
@ -332,23 +332,23 @@ Rectangle {
|
||||||
|
|
||||||
ShockwaveEffect {
|
ShockwaveEffect {
|
||||||
id: shockwave
|
id: shockwave
|
||||||
visible: material_pop_up.effectsL.selection == "Shockwave"
|
visible: material_pop_up.effectsL.selection === "Shockwave"
|
||||||
}
|
}
|
||||||
|
|
||||||
DustEffect {
|
DustEffect {
|
||||||
id: dust
|
id: dust
|
||||||
sceneCamera: sceneCamera
|
sceneCamera: sceneCamera
|
||||||
visible: material_pop_up.effectsL.selection == "Dust"
|
visible: material_pop_up.effectsL.selection === "Dust"
|
||||||
}
|
}
|
||||||
|
|
||||||
FlashEffect {
|
FlashEffect {
|
||||||
id: flash
|
id: flash
|
||||||
visible: material_pop_up.effectsL.selection == "Flash"
|
visible: material_pop_up.effectsL.selection === "Flash"
|
||||||
}
|
}
|
||||||
|
|
||||||
ExplosionEffect {
|
ExplosionEffect {
|
||||||
id: explosion
|
id: explosion
|
||||||
visible: material_pop_up.effectsL.selection == "Explosion"
|
visible: material_pop_up.effectsL.selection === "Explosion"
|
||||||
}
|
}
|
||||||
|
|
||||||
BubblesEffect {
|
BubblesEffect {
|
||||||
|
@ -356,7 +356,7 @@ Rectangle {
|
||||||
sceneCamera: sceneCamera
|
sceneCamera: sceneCamera
|
||||||
x: 0
|
x: 0
|
||||||
y: 125.976
|
y: 125.976
|
||||||
visible: material_pop_up.effectsL.selection == "Bubbles"
|
visible: material_pop_up.effectsL.selection === "Bubbles"
|
||||||
z: 62.12978
|
z: 62.12978
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -364,7 +364,7 @@ Rectangle {
|
||||||
id: cloud
|
id: cloud
|
||||||
sceneCamera: sceneCamera
|
sceneCamera: sceneCamera
|
||||||
y: 100
|
y: 100
|
||||||
visible: material_pop_up.effectsL.selection == "Clouds"
|
visible: material_pop_up.effectsL.selection === "Clouds"
|
||||||
time: 10000
|
time: 10000
|
||||||
startTime: 0
|
startTime: 0
|
||||||
}
|
}
|
||||||
|
@ -407,7 +407,7 @@ Rectangle {
|
||||||
id: materialBall
|
id: materialBall
|
||||||
y: 4
|
y: 4
|
||||||
|
|
||||||
visible: material_pop_up.modelsL.selection == "Qt material ball"
|
visible: material_pop_up.modelsL.selection === "Qt material ball"
|
||||||
source: "file:content/Meshes/materialBall.mesh"
|
source: "file:content/Meshes/materialBall.mesh"
|
||||||
castsReflections: false
|
castsReflections: false
|
||||||
receivesReflections: true
|
receivesReflections: true
|
||||||
|
@ -421,7 +421,7 @@ Rectangle {
|
||||||
id: bunny
|
id: bunny
|
||||||
x: 50
|
x: 50
|
||||||
y: -75
|
y: -75
|
||||||
visible: material_pop_up.modelsL.selection == "Rabbit"
|
visible: material_pop_up.modelsL.selection === "Rabbit"
|
||||||
source: "file:content/Meshes/bunnyUV.mesh"
|
source: "file:content/Meshes/bunnyUV.mesh"
|
||||||
castsReflections: false
|
castsReflections: false
|
||||||
z: -50
|
z: -50
|
||||||
|
@ -436,7 +436,7 @@ Rectangle {
|
||||||
Model {
|
Model {
|
||||||
id: dragon
|
id: dragon
|
||||||
y: -10
|
y: -10
|
||||||
visible: material_pop_up.modelsL.selection == "Dragon"
|
visible: material_pop_up.modelsL.selection === "Dragon"
|
||||||
source: "file:content/Meshes/stanford_Dragon.mesh"
|
source: "file:content/Meshes/stanford_Dragon.mesh"
|
||||||
eulerRotation.x: -90
|
eulerRotation.x: -90
|
||||||
castsReflections: false
|
castsReflections: false
|
||||||
|
@ -1384,7 +1384,7 @@ Rectangle {
|
||||||
id: sparkrotation
|
id: sparkrotation
|
||||||
target: sparkrotation
|
target: sparkrotation
|
||||||
property: "phase"
|
property: "phase"
|
||||||
running: material_pop_up.effectsL.selection == "Sparks"
|
running: material_pop_up.effectsL.selection === "Sparks"
|
||||||
loops: -1
|
loops: -1
|
||||||
easing.bezierCurve: [0.2, 0.2, 0.8, 0.8, 1, 1]
|
easing.bezierCurve: [0.2, 0.2, 0.8, 0.8, 1, 1]
|
||||||
duration: 10000
|
duration: 10000
|
||||||
|
@ -1409,7 +1409,7 @@ Rectangle {
|
||||||
states: [
|
states: [
|
||||||
State {
|
State {
|
||||||
name: "silverState"
|
name: "silverState"
|
||||||
when: rectangle1.matselText == "Silver"
|
when: rectangle1.matselText === "Silver"
|
||||||
PropertyChanges {
|
PropertyChanges {
|
||||||
target: rectangle1
|
target: rectangle1
|
||||||
matChoice: silver
|
matChoice: silver
|
||||||
|
@ -1417,7 +1417,7 @@ Rectangle {
|
||||||
},
|
},
|
||||||
State {
|
State {
|
||||||
name: "steelState"
|
name: "steelState"
|
||||||
when: rectangle1.matselText == "Brushed Steel"
|
when: rectangle1.matselText === "Brushed Steel"
|
||||||
PropertyChanges {
|
PropertyChanges {
|
||||||
target: rectangle1
|
target: rectangle1
|
||||||
matChoice: steelBrushed
|
matChoice: steelBrushed
|
||||||
|
@ -1425,7 +1425,7 @@ Rectangle {
|
||||||
},
|
},
|
||||||
State {
|
State {
|
||||||
name: "copperState"
|
name: "copperState"
|
||||||
when: rectangle1.matselText == "Copper"
|
when: rectangle1.matselText === "Copper"
|
||||||
PropertyChanges {
|
PropertyChanges {
|
||||||
target: rectangle1
|
target: rectangle1
|
||||||
matChoice: copper
|
matChoice: copper
|
||||||
|
@ -1433,7 +1433,7 @@ Rectangle {
|
||||||
},
|
},
|
||||||
State {
|
State {
|
||||||
name: "glassState"
|
name: "glassState"
|
||||||
when: rectangle1.matselText == "Wax"
|
when: rectangle1.matselText === "Wax"
|
||||||
PropertyChanges {
|
PropertyChanges {
|
||||||
target: rectangle1
|
target: rectangle1
|
||||||
matChoice: waxMat
|
matChoice: waxMat
|
||||||
|
@ -1441,7 +1441,7 @@ Rectangle {
|
||||||
},
|
},
|
||||||
State {
|
State {
|
||||||
name: "woodState"
|
name: "woodState"
|
||||||
when: rectangle1.matselText == "Wood"
|
when: rectangle1.matselText === "Wood"
|
||||||
PropertyChanges {
|
PropertyChanges {
|
||||||
target: rectangle1
|
target: rectangle1
|
||||||
matChoice: wood
|
matChoice: wood
|
||||||
|
@ -1449,7 +1449,7 @@ Rectangle {
|
||||||
},
|
},
|
||||||
State {
|
State {
|
||||||
name: "stoneState"
|
name: "stoneState"
|
||||||
when: rectangle1.matselText == "Stone"
|
when: rectangle1.matselText === "Stone"
|
||||||
PropertyChanges {
|
PropertyChanges {
|
||||||
target: rectangle1
|
target: rectangle1
|
||||||
matChoice: stone
|
matChoice: stone
|
||||||
|
@ -1457,7 +1457,7 @@ Rectangle {
|
||||||
},
|
},
|
||||||
State {
|
State {
|
||||||
name: "carbonfiberState"
|
name: "carbonfiberState"
|
||||||
when: rectangle1.matselText == "Carbon Fiber"
|
when: rectangle1.matselText === "Carbon Fiber"
|
||||||
PropertyChanges {
|
PropertyChanges {
|
||||||
target: rectangle1
|
target: rectangle1
|
||||||
matChoice: carbonFiber
|
matChoice: carbonFiber
|
||||||
|
@ -1465,7 +1465,7 @@ Rectangle {
|
||||||
},
|
},
|
||||||
State {
|
State {
|
||||||
name: "plasticState"
|
name: "plasticState"
|
||||||
when: rectangle1.matselText == "Plastic"
|
when: rectangle1.matselText === "Plastic"
|
||||||
PropertyChanges {
|
PropertyChanges {
|
||||||
target: rectangle1
|
target: rectangle1
|
||||||
matChoice: plasticTextured
|
matChoice: plasticTextured
|
||||||
|
@ -1473,7 +1473,7 @@ Rectangle {
|
||||||
},
|
},
|
||||||
State {
|
State {
|
||||||
name: "fabricState"
|
name: "fabricState"
|
||||||
when: rectangle1.matselText == "Fabric"
|
when: rectangle1.matselText === "Fabric"
|
||||||
PropertyChanges {
|
PropertyChanges {
|
||||||
target: rectangle1
|
target: rectangle1
|
||||||
matChoice: fabric
|
matChoice: fabric
|
||||||
|
@ -1481,7 +1481,7 @@ Rectangle {
|
||||||
},
|
},
|
||||||
State {
|
State {
|
||||||
name: "leatherState"
|
name: "leatherState"
|
||||||
when: rectangle1.matselText == "Leather"
|
when: rectangle1.matselText === "Leather"
|
||||||
PropertyChanges {
|
PropertyChanges {
|
||||||
target: rectangle1
|
target: rectangle1
|
||||||
matChoice: leather
|
matChoice: leather
|
||||||
|
|
Loading…
Reference in New Issue