From fadf8879ed3616b745aee76d3c833f88d3c84f22 Mon Sep 17 00:00:00 2001 From: Gunnar Sletta Date: Tue, 5 Jun 2012 07:39:35 +0200 Subject: Work with latest declarative --- examples/animatedbackground/BackgroundSwirls.qml | 5 ++--- examples/animatedbackground/Swirl.qml | 6 +++--- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/examples/animatedbackground/BackgroundSwirls.qml b/examples/animatedbackground/BackgroundSwirls.qml index cc91833..c1c4dde 100644 --- a/examples/animatedbackground/BackgroundSwirls.qml +++ b/examples/animatedbackground/BackgroundSwirls.qml @@ -102,12 +102,11 @@ Item { system: particles emitRate: Math.sqrt(parent.width * parent.height) / 30 lifeSpan: 2000 - emitting: true size: 4 sizeVariation: 2 - acceleration: AngledDirection { angle: 90; angleVariation: 360; magnitude: 20; } - speed: AngledDirection { angle: -90; angleVariation: 360; magnitude: 10; } + acceleration: AngleDirection { angle: 90; angleVariation: 360; magnitude: 20; } + speed: AngleDirection { angle: -90; angleVariation: 360; magnitude: 10; } } diff --git a/examples/animatedbackground/Swirl.qml b/examples/animatedbackground/Swirl.qml index 51f039b..56d8331 100644 --- a/examples/animatedbackground/Swirl.qml +++ b/examples/animatedbackground/Swirl.qml @@ -36,7 +36,7 @@ import QtQuick 2.0 -ShaderEffectItem { +ShaderEffect { id: shader width: 400 @@ -79,7 +79,7 @@ ShaderEffectItem { uniform highp float tz; uniform highp float tw; uniform highp float amplitude; - uniform highp mat4 qt_ModelViewProjectionMatrix; + uniform highp mat4 qt_Matrix; attribute highp vec4 qt_Vertex; attribute highp vec2 qt_MultiTexCoord0; varying highp vec2 qt_TexCoord0; @@ -92,7 +92,7 @@ ShaderEffectItem { pos.y += mix(y1, y2, qt_MultiTexCoord0.y) * amplitude * 0.5; - gl_Position = qt_ModelViewProjectionMatrix * pos; + gl_Position = qt_Matrix * pos; qt_TexCoord0 = qt_MultiTexCoord0; } " -- cgit v1.2.3 From 766a43ca4190b32617e1361548d028271263378a Mon Sep 17 00:00:00 2001 From: Gunnar Sletta Date: Mon, 13 Aug 2012 09:45:32 +0200 Subject: Update to latest declarative --- examples/animatedbackground/BackgroundSwirls.qml | 9 +++++---- examples/animatedbackground/SlideDeck.qml | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/examples/animatedbackground/BackgroundSwirls.qml b/examples/animatedbackground/BackgroundSwirls.qml index c1c4dde..5321842 100644 --- a/examples/animatedbackground/BackgroundSwirls.qml +++ b/examples/animatedbackground/BackgroundSwirls.qml @@ -58,10 +58,12 @@ Item { property color color2: Qt.rgba(0.8, 0.8, 1, 0.3) gradient: Gradient { - GradientStop { position: 0; color: colorTableItem.color1 } + GradientStop { position: 0.0; color: "transparent"} + GradientStop { position: 0.05; color: colorTableItem.color1 } GradientStop { position: 0.3; color: "transparent" } GradientStop { position: 0.7; color: "transparent" } - GradientStop { position: 1; color: colorTableItem.color2 } + GradientStop { position: 0.95; color: colorTableItem.color2 } + GradientStop { position: 1.0; color: "transparent" } } visible: false @@ -106,8 +108,7 @@ Item { sizeVariation: 2 acceleration: AngleDirection { angle: 90; angleVariation: 360; magnitude: 20; } - speed: AngleDirection { angle: -90; angleVariation: 360; magnitude: 10; } - + velocity: AngleDirection { angle: -90; angleVariation: 360; magnitude: 10; } } } diff --git a/examples/animatedbackground/SlideDeck.qml b/examples/animatedbackground/SlideDeck.qml index e0835a6..ba3d2ed 100644 --- a/examples/animatedbackground/SlideDeck.qml +++ b/examples/animatedbackground/SlideDeck.qml @@ -55,7 +55,7 @@ Presentation { title: "Composition" content: [ "Gradient Rectangle", - "Swirls using ShaderEffectItem", + "Swirls using ShaderEffect", " Movement using a vertexShader", " Colorized using a gradient rect converted to a texture", " Controlled using QML properties and animations", -- cgit v1.2.3