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