aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/core/lumina-desktop-unified/extrafiles/screensavers
diff options
context:
space:
mode:
authorKen Moore <ken@ixsystems.com>2017-10-12 10:26:39 -0400
committerKen Moore <ken@ixsystems.com>2017-10-12 10:26:39 -0400
commit0de3da7df93ab5791b62d2b3da0a4fc9abdd4e4d (patch)
tree09c5e4dba1760324f985e6378c3098c0bcd4bc39 /src-qt5/core/lumina-desktop-unified/extrafiles/screensavers
parentUpdate lumina-checkpass with 2 additional options: (diff)
downloadlumina-0de3da7df93ab5791b62d2b3da0a4fc9abdd4e4d.tar.gz
lumina-0de3da7df93ab5791b62d2b3da0a4fc9abdd4e4d.tar.bz2
lumina-0de3da7df93ab5791b62d2b3da0a4fc9abdd4e4d.zip
Add a new screensaver: Warp
This is a starfield "warping" effect screensaver. Also turn off a bunch of debugging within the C++ screensaver plugin system
Diffstat (limited to 'src-qt5/core/lumina-desktop-unified/extrafiles/screensavers')
-rw-r--r--src-qt5/core/lumina-desktop-unified/extrafiles/screensavers/Warp.json25
-rw-r--r--src-qt5/core/lumina-desktop-unified/extrafiles/screensavers/qml_scripts/Warp.qml57
2 files changed, 82 insertions, 0 deletions
diff --git a/src-qt5/core/lumina-desktop-unified/extrafiles/screensavers/Warp.json b/src-qt5/core/lumina-desktop-unified/extrafiles/screensavers/Warp.json
new file mode 100644
index 00000000..888df01f
--- /dev/null
+++ b/src-qt5/core/lumina-desktop-unified/extrafiles/screensavers/Warp.json
@@ -0,0 +1,25 @@
+{
+ "name" : {
+ "default" : "Warp"
+ },
+ "description" : {
+ "default" : "Warp trail through the stars"
+ },
+ "author" : {
+ "name" : "Ken Moore",
+ "email" : "ken@ixsystems.com",
+ "website" : "https://github.com/beanpole135",
+ "company" : "iXsystems",
+ "company_website" : "http://ixsystems.com"
+ },
+ "meta" : {
+ "license" : "3-clause BSD",
+ "license_url" : "https://github.com/trueos/lumina/blob/master/LICENSE",
+ "copyright" : "Copyright (c) 2017, Ken Moore (ken@ixsystems.com)",
+ "date_created" : "20171012",
+ "version" : "1.0"
+ },
+ "qml" : {
+ "exec" : "qml_scripts/Warp.qml"
+ }
+}
diff --git a/src-qt5/core/lumina-desktop-unified/extrafiles/screensavers/qml_scripts/Warp.qml b/src-qt5/core/lumina-desktop-unified/extrafiles/screensavers/qml_scripts/Warp.qml
new file mode 100644
index 00000000..4ad4378f
--- /dev/null
+++ b/src-qt5/core/lumina-desktop-unified/extrafiles/screensavers/qml_scripts/Warp.qml
@@ -0,0 +1,57 @@
+import QtQuick 2.0
+import QtGraphicalEffects 1.0
+
+Rectangle {
+ id : canvas
+ anchors.fill: parent
+ color: "black"
+
+ // CREATE STARFIELD
+ Repeater {
+ model: Math.round(Math.random()*canvas.width/10)+500
+ Rectangle {
+ parent: canvas
+ x: Math.round(Math.random()*canvas.width)
+ y: Math.round(Math.random()*canvas.height)
+ width: Math.round(Math.random()*3)+3
+ height: width
+ radius: width/2
+ color: "white"
+ }
+ } //end of Repeater
+
+ // NOW CREATE THE WARP EFFECT
+ ZoomBlur {
+ id: blur
+ anchors.fill: canvas
+ source: canvas
+ samples: 24
+ length: canvas.width / 20
+ horizontalOffset: 0
+ verticalOffset: 0
+
+ Behavior on horizontalOffset{
+ NumberAnimation{
+ duration: 3000
+ }
+ }
+ Behavior on verticalOffset{
+ NumberAnimation{
+ duration: 3000
+ }
+ }
+ } //end of zoom blur
+
+ Timer {
+ interval: 5
+ repeat: true
+ running: true
+ property bool starting: true
+ onTriggered: {
+ if(starting){ interval = 3010; starting = false; }
+ blur.horizontalOffset = (Math.random()*canvas.width/4) - (canvas.width/8)
+ blur.verticalOffset = (Math.random()*canvas.height/4) - (canvas.height/8)
+ }
+ } //end of timer
+
+} //end of canvas rectangle
bgstack15