Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Q
qt3dstudio
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
public-demos
qt3dstudio
Commits
6597e7a2
Commit
6597e7a2
authored
Mar 29, 2019
by
Teemu Tamminen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added Smoother needle trails
parent
90897ccb
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
45 additions
and
6 deletions
+45
-6
LowEndCluster/SimulationData.qml
LowEndCluster/SimulationData.qml
+30
-0
LowEndCluster/main.qml
LowEndCluster/main.qml
+15
-6
No files found.
LowEndCluster/SimulationData.qml
View file @
6597e7a2
...
...
@@ -29,6 +29,7 @@ Item {
target
:
main
from
:
5
to
:
15
easing.type
:
Easing
.
InOutQuad
;
}
PropertyAnimation
{
property
:
"
rpm
"
...
...
@@ -36,6 +37,7 @@ Item {
target
:
main
from
:
1500
to
:
3800
easing.type
:
Easing
.
InOutQuad
;
}
}
ParallelAnimation
{
...
...
@@ -52,6 +54,7 @@ Item {
target
:
main
from
:
3800
to
:
2000
easing.type
:
Easing
.
InOutQuad
;
}
PropertyAnimation
{
property
:
"
speed
"
...
...
@@ -59,6 +62,7 @@ Item {
target
:
main
from
:
15
to
:
10
easing.type
:
Easing
.
InOutQuad
;
}
}
ParallelAnimation
{
...
...
@@ -69,6 +73,7 @@ Item {
target
:
main
from
:
10
to
:
35
easing.type
:
Easing
.
InOutQuad
;
}
PropertyAnimation
{
property
:
"
rpm
"
...
...
@@ -76,6 +81,7 @@ Item {
target
:
main
from
:
2000
to
:
4200
easing.type
:
Easing
.
InOutQuad
;
}
}
ParallelAnimation
{
...
...
@@ -92,6 +98,7 @@ Item {
target
:
main
from
:
4200
to
:
2400
easing.type
:
Easing
.
InOutQuad
;
}
PropertyAnimation
{
property
:
"
speed
"
...
...
@@ -99,6 +106,7 @@ Item {
target
:
main
from
:
35
to
:
30
easing.type
:
Easing
.
InOutQuad
;
}
}
ParallelAnimation
{
...
...
@@ -109,6 +117,7 @@ Item {
target
:
main
from
:
30
to
:
65
easing.type
:
Easing
.
InOutQuad
;
}
PropertyAnimation
{
property
:
"
rpm
"
...
...
@@ -116,6 +125,7 @@ Item {
target
:
main
from
:
2400
to
:
4600
easing.type
:
Easing
.
InOutQuad
;
}
}
ParallelAnimation
{
...
...
@@ -132,6 +142,7 @@ Item {
target
:
main
from
:
4600
to
:
2400
easing.type
:
Easing
.
InOutQuad
;
}
PropertyAnimation
{
property
:
"
speed
"
...
...
@@ -139,6 +150,7 @@ Item {
target
:
main
from
:
65
to
:
60
easing.type
:
Easing
.
InOutQuad
;
}
}
ParallelAnimation
{
...
...
@@ -149,6 +161,7 @@ Item {
target
:
main
from
:
60
to
:
95
easing.type
:
Easing
.
InOutQuad
;
}
PropertyAnimation
{
property
:
"
rpm
"
...
...
@@ -156,6 +169,7 @@ Item {
target
:
main
from
:
2400
to
:
4800
easing.type
:
Easing
.
InOutQuad
;
}
}
ParallelAnimation
{
...
...
@@ -172,6 +186,7 @@ Item {
target
:
main
from
:
4800
to
:
2400
easing.type
:
Easing
.
InOutQuad
;
}
PropertyAnimation
{
property
:
"
speed
"
...
...
@@ -179,6 +194,7 @@ Item {
target
:
main
from
:
95
to
:
90
easing.type
:
Easing
.
InOutQuad
;
}
}
ParallelAnimation
{
...
...
@@ -189,6 +205,7 @@ Item {
target
:
main
from
:
90
to
:
130
easing.type
:
Easing
.
InOutQuad
;
}
PropertyAnimation
{
property
:
"
rpm
"
...
...
@@ -196,6 +213,7 @@ Item {
target
:
main
from
:
2400
to
:
5200
easing.type
:
Easing
.
InOutQuad
;
}
}
ParallelAnimation
{
...
...
@@ -212,6 +230,7 @@ Item {
target
:
main
from
:
5200
to
:
6200
easing.type
:
Easing
.
InOutQuad
;
}
PropertyAnimation
{
property
:
"
speed
"
...
...
@@ -219,6 +238,7 @@ Item {
target
:
main
from
:
130
to
:
120
easing.type
:
Easing
.
InOutQuad
;
}
}
ParallelAnimation
{
...
...
@@ -229,6 +249,7 @@ Item {
target
:
main
from
:
120
to
:
60
easing.type
:
Easing
.
InOutQuad
;
}
PropertyAnimation
{
property
:
"
rpm
"
...
...
@@ -236,6 +257,7 @@ Item {
target
:
main
from
:
6200
to
:
2300
easing.type
:
Easing
.
InOutQuad
;
}
}
ParallelAnimation
{
...
...
@@ -252,6 +274,7 @@ Item {
target
:
main
from
:
2300
to
:
4000
easing.type
:
Easing
.
InOutQuad
;
}
PropertyAnimation
{
property
:
"
speed
"
...
...
@@ -259,6 +282,7 @@ Item {
target
:
main
from
:
60
to
:
50
easing.type
:
Easing
.
InOutQuad
;
}
}
ParallelAnimation
{
...
...
@@ -269,6 +293,7 @@ Item {
target
:
main
from
:
50
to
:
20
easing.type
:
Easing
.
InOutQuad
;
}
PropertyAnimation
{
property
:
"
rpm
"
...
...
@@ -276,6 +301,7 @@ Item {
target
:
main
from
:
4000
to
:
2300
easing.type
:
Easing
.
InOutQuad
;
}
}
ParallelAnimation
{
...
...
@@ -292,6 +318,7 @@ Item {
target
:
main
from
:
2300
to
:
4000
easing.type
:
Easing
.
InOutQuad
;
}
PropertyAnimation
{
property
:
"
speed
"
...
...
@@ -299,6 +326,7 @@ Item {
target
:
main
from
:
20
to
:
15
easing.type
:
Easing
.
InOutQuad
;
}
}
ParallelAnimation
{
...
...
@@ -309,6 +337,7 @@ Item {
target
:
main
from
:
15
to
:
5
easing.type
:
Easing
.
InOutQuad
;
}
PropertyAnimation
{
property
:
"
rpm
"
...
...
@@ -316,6 +345,7 @@ Item {
target
:
main
from
:
4000
to
:
1500
easing.type
:
Easing
.
InOutQuad
;
}
}
}
...
...
LowEndCluster/main.qml
View file @
6597e7a2
...
...
@@ -26,8 +26,8 @@ Window {
property
real
toptextoffset
:
0.0
property
bool
rpmForward
:
true
property
bool
speedForward
:
true
property
int
rpmTrailOpacity
:
10
0
property
int
speedTrailOpacity
:
10
0
property
real
rpmTrailOpacity
:
0
property
real
speedTrailOpacity
:
0
property
real
roadSpeed
:
sim
.
roadSpeed
*
(
sim
.
gear
*
2
)
// telltales
property
bool
leftblinker
:
false
...
...
@@ -44,17 +44,26 @@ Window {
readonly
property
int
secondsBetweenUpdates
:
60
// Use a 1 minute average for the average FPS counter
onRpmrotationChanged
:
{
if
(
rpmrotation
<
previousrpmrotation
)
if
(
rpmrotation
<
previousrpmrotation
)
{
rpmForward
=
false
;
else
rpmTrailOpacity
=
2
*
(
previousrpmrotation
-
rpmrotation
);
}
else
{
rpmForward
=
true
;
rpmTrailOpacity
=
-
2
*
(
previousrpmrotation
-
rpmrotation
);
}
previousrpmrotation
=
rpmrotation
;
}
onSpeedrotationChanged
:
{
if
(
speedrotation
<
previousspeedrotation
)
if
(
speedrotation
<
previousspeedrotation
)
{
speedForward
=
false
;
else
speedTrailOpacity
=
2
*
(
previousspeedrotation
-
speedrotation
);
}
else
{
speedForward
=
true
;
speedTrailOpacity
=
-
2
*
(
previousspeedrotation
-
speedrotation
);
}
previousspeedrotation
=
speedrotation
;
}
onFrameSwapped
:
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment