summaryrefslogtreecommitdiffstats
path: root/demos
diff options
context:
space:
mode:
authordpope <daniel.pope@nokia.com>2011-04-20 11:34:28 +1000
committerdpope <daniel.pope@nokia.com>2011-04-20 11:34:28 +1000
commitea11cfad8fdb491e94b7024bbdec125db8f57c1c (patch)
tree5fb2b8b0abfb883f936641dedba8c73b4e0b75e6 /demos
parent2997c73557342141abc595c4d2bce4972c0e8f60 (diff)
parentc9bd610968b034819b79243ce9bd720da5f9c0d6 (diff)
Merge branch 'master' of scm.dev.nokia.troll.no:qt/quick3d
Diffstat (limited to 'demos')
-rw-r--r--demos/quick3d/lander/Jet.qml77
-rw-r--r--demos/quick3d/lander/README5
-rw-r--r--demos/quick3d/lander/dropshadow.pngbin3996 -> 0 bytes
-rw-r--r--demos/quick3d/lander/flame.pngbin9004 -> 0 bytes
-rw-r--r--demos/quick3d/lander/icon-l-qtquick3d.pngbin6565 -> 0 bytes
-rw-r--r--demos/quick3d/lander/lander.desktop8
-rw-r--r--demos/quick3d/lander/lander.qml393
-rw-r--r--demos/quick3d/lander/lander.qmlproject16
-rw-r--r--demos/quick3d/lander/meshes/lintel.3dsbin3631854 -> 0 bytes
-rw-r--r--demos/quick3d/lander/meshes/lunar-lander.3dsbin23456 -> 0 bytes
-rw-r--r--demos/quick3d/model_viewer/model_viewer.pro5
-rw-r--r--demos/quick3d/model_viewer/qml/model_viewer.qml109
-rw-r--r--demos/quick3d/qmlres.h9
-rw-r--r--demos/quick3d/robo_bounce/qml/robobounce.qml48
-rw-r--r--demos/quick3d/robo_bounce/robo_bounce.pro5
-rw-r--r--demos/quick3d/tea_service/tea_service.pro5
16 files changed, 52 insertions, 628 deletions
diff --git a/demos/quick3d/lander/Jet.qml b/demos/quick3d/lander/Jet.qml
deleted file mode 100644
index 266c8c427..000000000
--- a/demos/quick3d/lander/Jet.qml
+++ /dev/null
@@ -1,77 +0,0 @@
-import QtQuick 1.0
-import Qt3D 1.0
-import Qt3D.Shapes 1.0
-
-Item3D {
- // We want to scale the flame, but keep the top constant so it
- // looks like it's attached to the lander's foot, so we use a
- // container Item3D to translate the flame's origin
-
- // This magic number lines up the jet with the bottom of the lander model
- y: -0.97 - 0.25 + 0.5
- id: jet
-
- property real scaleFactor: 1.0
- property real internalScaleFactor: 1.0
-
- Behavior on scaleFactor { NumberAnimation { duration: 200 }}
-
- transform: Scale3D { scale: jet.scaleFactor * internalScaleFactor * 0.5 }
-
- SequentialAnimation {
- running: true
- loops: Animation.Infinite
- NumberAnimation { target: jet;property: "internalScaleFactor";
- from: 1.0; to: 0.8; duration: 100 }
- PauseAnimation { duration: 100 }
- NumberAnimation { target: jet; property: "internalScaleFactor";
- from: 0.8; to: 1.0; duration: 100 }
- PauseAnimation { duration: 100 }
- }
-
- Quad {
- y: -1.0
- pretransform: Rotation3D { axis: Qt.vector3d(1, 0, 0); angle: 90 }
- effect: flame
- }
-
- ShaderProgram {
- id: flame
- blending: true
- texture: "flame.png"
- property real interpolationFactor : 1.0
-
- SequentialAnimation on interpolationFactor {
- running: true
- loops: Animation.Infinite
- NumberAnimation { to : 1.0; duration: 150; }
- NumberAnimation { to : 0.0; duration: 150; }
- }
-
- vertexShader: "
- attribute highp vec4 qt_Vertex;
- attribute highp vec4 qt_MultiTexCoord0;
- uniform mediump mat4 qt_ModelViewProjectionMatrix;
- varying highp vec4 texCoord;
-
- void main(void)
- {
- gl_Position = qt_ModelViewProjectionMatrix * qt_Vertex;
- texCoord = qt_MultiTexCoord0;
- }
- "
- fragmentShader: "
- varying highp vec4 texCoord;
- uniform sampler2D qt_Texture0;
- uniform sampler2D texture2;
- uniform mediump float interpolationFactor;
-
- void main(void)
- {
- mediump vec4 col1 = texture2D(qt_Texture0, texCoord.st);
- mediump vec4 col2 = texture2D(texture2, texCoord.st);
- gl_FragColor = mix(col1, col2, interpolationFactor);
- }
- "
- }
-}
diff --git a/demos/quick3d/lander/README b/demos/quick3d/lander/README
deleted file mode 100644
index b089fd32a..000000000
--- a/demos/quick3d/lander/README
+++ /dev/null
@@ -1,5 +0,0 @@
-Lander is intended to use the Joystix font available for free from Ray Larabie via:
-http://typodermicfonts.com/the-larabie-fonts-collection
-
-Licencing does not allow distribution in ttf form as part of the source package, so please download and place the "JOYSTIX.TTF" file in this directory.
-
diff --git a/demos/quick3d/lander/dropshadow.png b/demos/quick3d/lander/dropshadow.png
deleted file mode 100644
index 105d34e4a..000000000
--- a/demos/quick3d/lander/dropshadow.png
+++ /dev/null
Binary files differ
diff --git a/demos/quick3d/lander/flame.png b/demos/quick3d/lander/flame.png
deleted file mode 100644
index 8b80c0c2a..000000000
--- a/demos/quick3d/lander/flame.png
+++ /dev/null
Binary files differ
diff --git a/demos/quick3d/lander/icon-l-qtquick3d.png b/demos/quick3d/lander/icon-l-qtquick3d.png
deleted file mode 100644
index 69deef3f6..000000000
--- a/demos/quick3d/lander/icon-l-qtquick3d.png
+++ /dev/null
Binary files differ
diff --git a/demos/quick3d/lander/lander.desktop b/demos/quick3d/lander/lander.desktop
deleted file mode 100644
index 09241e0ec..000000000
--- a/demos/quick3d/lander/lander.desktop
+++ /dev/null
@@ -1,8 +0,0 @@
-[Desktop Entry]
-Type=Application
-Name=Lunar Lander
-Icon=icon-l-qtquick3d
-Exec=/usr/bin/lander -fullscreen
-OnlyShowIn=X-MeeGo;
-X-MeeGo-Logical-Id=qtn_comm_appname_lander
-X-MeeGo-Translation-Catalog=essentials
diff --git a/demos/quick3d/lander/lander.qml b/demos/quick3d/lander/lander.qml
deleted file mode 100644
index 59140585b..000000000
--- a/demos/quick3d/lander/lander.qml
+++ /dev/null
@@ -1,393 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
-** the names of its contributors may be used to endorse or promote
-** products derived from this software without specific prior written
-** permission.
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import Qt 4.7
-import Qt3D 1.0
-import Qt3D.Shapes 1.0
-
-Rectangle {
- id: screen
- width: 1000
- height: 800
- color: "black"
-
- // Joystix font available for free from Ray Larabie via
- // http://typodermicfonts.com/the-larabie-fonts-collection
- // Licence does *NOT* allow distribution in ttf form as part of the
- // source package.
- FontLoader { source: "JOYSTIX.TTF" }
- // Normally, you'd give the font an id and use fontId.name
- // we hard-wire it here in order to get a silent failure if
- // the font is not present.
- property string fontString: "Joystix";
-
- Viewport {
- id: viewport
- y: 30
- anchors.fill: parent
- visible: false
-
- Rectangle {
- id: fuelGauge
- }
-
- camera: Camera {
- eye.x: cameraTarget.x
- // Keep the lander and pad in view for reasonable values
- eye.y: (Math.abs(lander.x) * 2.0) + (lander.y * 2.0) + (Math.abs(lander.z) * 2.0) + 5.0
- // eye.y: (Math.abs(lander.x) * 2.0) + (lander.y * 2.0) + 5.0
- eye.z: lander.z + 20.0
- // eye.z: 20.0
- center: cameraTarget.position
- }
-
- Item3D {
- id:cameraTarget
- x: ((lander.x + landingPad.x) / 2.0)
- y: 0
- z: 0
- }
-
- Item3D {
- // Landing pad must come before lander so that transparency on
- // the flames is in the correct order
- id: landingPad
- scale: 0.005
- y: -2.4
- mesh: Mesh { source: "meshes/lintel.3ds"}
-
- // HACK. There should be API for this
- property real yMax : y + 2.4;
- }
-
- Quad {
- // Simple drop shadow
- x: lander.x
- y: landingPad.yMax
- z: lander.z
- scale: 2.0
- effect: Effect { texture: "dropshadow.png"; blending: true }
- }
-
- Item3D {
- id: lander
- scale: 0.5
- mesh: Mesh { source: "meshes/lunar-lander.3ds" }
- effect: Effect {
- color: "#aaca00"
- texture: "rusty.png"
- decal: true
- }
-
- transform: [
- Rotation3D {
- Behavior on angle { NumberAnimation { duration: 200}}
- axis: Qt.vector3d(-1.0,0,0)
- angle: gameLogic.zBoostInput * 50
- },
- Rotation3D {
- Behavior on angle { NumberAnimation { duration: 200}}
- axis: Qt.vector3d(0,0,1.0)
- angle: gameLogic.xBoostInput * 50
- }
- ]
-
- // HACK. There should be API for this
- property real yMin: -0.37;
- property bool jetsVisible: true
- property real yBoostScaleFactor: (gameLogic.yboosting ? 1.2 : 0.7)
- property real activeScaleFactor: 1.3
-
- // Draw back to front to avoid depth vs transparancy issues
-
- // Back
- Jet {
- z: -2.7
- scaleFactor: lander.yBoostScaleFactor -
- gameLogic.zBoostInput * lander.activeScaleFactor
- enabled: lander.jetsVisible
- }
-
- // Left
- Jet {
- x: -2.7
- scaleFactor: lander.yBoostScaleFactor -
- gameLogic.xBoostInput * lander.activeScaleFactor
- enabled: lander.jetsVisible
- }
-
- // Right
- Jet {
- x: 2.7
- scaleFactor: lander.yBoostScaleFactor +
- gameLogic.xBoostInput * lander.activeScaleFactor
- enabled: lander.jetsVisible
- }
-
- // Front
- Jet {
- z: 2.7
- scaleFactor: lander.yBoostScaleFactor +
- gameLogic.zBoostInput * lander.activeScaleFactor
- enabled: lander.jetsVisible
- }
- }
-
- MouseArea {
- id: gameInputPad
- anchors.fill: parent
- enabled: false
-
- onMousePositionChanged: {
- gameLogic.yboosting = true;
- gameLogic.xBoostInput = (mouseX / viewport.width) - 0.5;
- gameLogic.zBoostInput = (mouseY / viewport.height) - 0.5;
- }
- onPressed: {
- gameLogic.yboosting = true;
- gameLogic.xBoostInput = (mouseX / viewport.width) - 0.5;
- gameLogic.zBoostInput = (mouseY / viewport.height) - 0.5;
- }
- onReleased: {
- gameLogic.yboosting = false;
- gameLogic.xBoostInput = 0.0;
- gameLogic.zBoostInput = 0.0;
- }
- }
-
- // TODO : Key input
-
- Item {
- id: gameLogic
- visible: false
- property string state: "titleScreen"
-
- // Game State
- property int score : 0
- property int hiScore : 0
- property real xBoostInput: 0.0
- property real xVelocity : 0
- property real xBoostFactor: gravity
-
- property bool yboosting: false
- property real yVelocity : 0
- property real yBoostFactor: gravity * 2.0
-
- property real zBoostInput: 0.0
- property real zVelocity : 0
- property real zBoostFactor: gravity
-
- // Constants
- property real gravity: 0.1 / 60.0;
-
- Timer {
- id: simulationTickTimer
- running: false
- interval: 1000.0 / 60.0
- repeat: true
- onTriggered: {
- gameLogic.tick()
- }
- }
-
- function tick() {
- // apply gravity and user inputs to velocities
- yVelocity -= gravity;
- if (yboosting)
- yVelocity += yBoostFactor;
- xVelocity -= xBoostInput * xBoostFactor;
- zVelocity -= zBoostInput * zBoostFactor;
-
- // update lander position
- lander.x += xVelocity;
- lander.y += yVelocity;
- lander.z += zVelocity;
-
- // Check win condition
- if (lander.y + lander.yMin <= landingPad.yMax)
- {
- // Correct very fast landings
- lander.y = landingPad.yMax - lander.yMin;
- win();
- }
- }
-
- function win() {
- // Theoretical max score is 100^5, or 10,000,000,000
- score = Math.floor(sanitize(xVelocity) / sanitize(yVelocity) /
- sanitize(zVelocity) / sanitize(lander.x)
- / sanitize(lander.z)
- );
- if (score > hiScore) hiScore = score;
- simulationTickTimer.running = false;
- endGame();
- }
-
- // When calculating scores, don't divide by zero and ignore sign.
- // Can't have infinite scores, and don't want negative ones!
- function sanitize(value) {
- return Math.max(0.01, Math.abs(value));
- }
-
- function newGame() {
- titleBar.visible = false;
- tapToStart.visible = false;
- viewport.visible = true;
- simulationTickTimer.running = true;
- gameInputPad.enabled = true;
- lander.jetsVisible = true;
-
- // reset state
- score = 0;
- xBoostInput = 0.0
- xVelocity = 0
- zBoostInput = 0.0
- zVelocity = 0
- yboosting = false
-
- // Random starting position
- lander.position = Qt.vector3d(Math.random() * 10.0 - 5.0,
- 5.0,
- Math.random() * 10.0 - 5.0);
- // add a small positive yVelocity to give the player a chance
- // to get their bearings
- yVelocity = 0.1
- }
-
- function endGame() {
- simulationTickTimer.running = false;
- // Tidy up visuals
- titleBar.visible = true;
- tapToStart.visible = true;
- gameInputPad.enabled = false;
- lander.jetsVisible = false;
- gameLogic.zBoostInput = 0.0;
- gameLogic.xBoostInput = 0.0;
- gameLogic.yboosting = false;
- }
- }
- }
-
- Row {
- id: scoreBar
- anchors.left: parent.left
- anchors.right: parent.right
- Column {
- // Player 1 Score
- width: parent.width / 3.0
- Text {
- text: "Player 1"
- anchors.horizontalCenter: parent.horizontalCenter
- font.family: fontString;
- color: "red"
- }
- Text {
- id: scoreBoardText
- text: "Score: " + gameLogic.score
- anchors.horizontalCenter: parent.horizontalCenter
- font.family: fontString;
- color: "white"
- }
- }
- Column {
- // Hi Score
- width: parent.width / 3.0
- Text {
- text: "Hi Score"
- anchors.horizontalCenter: parent.horizontalCenter
- font.family: fontString;
- color: "red"
- }
- Text {
- text: "Score: " + gameLogic.hiScore
- anchors.horizontalCenter: parent.horizontalCenter
- font.family: fontString;
- color: "white"
- }
- }
- Column {
- // Player 2 Score (Not used)
- width: screen.width / 3.0
- Text {
- text: "Player 2"
- anchors.horizontalCenter: parent.horizontalCenter
- font.family: fontString;
- color: "red"
- }
- }
- }
-
- Text {
- id: titleBar
- anchors.horizontalCenter: parent.horizontalCenter
- y: screen.height / 5.0
- text: "Qt-Lander"
- font.family: fontString
- font.pointSize: 48
- color: "white"
- SequentialAnimation on color {
- loops: Animation.Infinite
- ColorAnimation { to: "#ff0000"; duration: 100 }
- ColorAnimation { to: "#ffff00"; duration: 100 }
- ColorAnimation { to: "#00ff00"; duration: 100 }
- ColorAnimation { to: "#00ffff"; duration: 100 }
- ColorAnimation { to: "#0000ff"; duration: 100 }
- ColorAnimation { to: "#ff00ff"; duration: 100 }
- }
- }
-
- Item {
- id: tapToStart
- anchors.fill: parent
- Text {
- text: "Tap to Play"
- anchors.centerIn: parent
- font.family: fontString
- font.pointSize: 20
- color: "#2288ff"
- }
- MouseArea {
- // Note - this mousearea will be obscured by the game's mousearea
- // during play
- anchors.fill: parent
- onClicked: gameLogic.newGame();
- }
- }
-}
diff --git a/demos/quick3d/lander/lander.qmlproject b/demos/quick3d/lander/lander.qmlproject
deleted file mode 100644
index d4909f868..000000000
--- a/demos/quick3d/lander/lander.qmlproject
+++ /dev/null
@@ -1,16 +0,0 @@
-import QmlProject 1.0
-
-Project {
- /* Include .qml, .js, and image files from current directory and subdirectories */
- QmlFiles {
- directory: "."
- }
- JavaScriptFiles {
- directory: "."
- }
- ImageFiles {
- directory: "."
- }
- /* List of plugin directories passed to QML runtime */
- // importPaths: [ " ../exampleplugin " ]
-}
diff --git a/demos/quick3d/lander/meshes/lintel.3ds b/demos/quick3d/lander/meshes/lintel.3ds
deleted file mode 100644
index 572c50256..000000000
--- a/demos/quick3d/lander/meshes/lintel.3ds
+++ /dev/null
Binary files differ
diff --git a/demos/quick3d/lander/meshes/lunar-lander.3ds b/demos/quick3d/lander/meshes/lunar-lander.3ds
deleted file mode 100644
index 7403fdefe..000000000
--- a/demos/quick3d/lander/meshes/lunar-lander.3ds
+++ /dev/null
Binary files differ
diff --git a/demos/quick3d/model_viewer/model_viewer.pro b/demos/quick3d/model_viewer/model_viewer.pro
index 67b270128..eb042aec8 100644
--- a/demos/quick3d/model_viewer/model_viewer.pro
+++ b/demos/quick3d/model_viewer/model_viewer.pro
@@ -8,6 +8,11 @@ HEADERS += ../qmlres.h
QT += declarative
!package:DESTDIR = ../../../bin
+# for cleanup on Windows platforms - avoid deletion prompts
+win32 {
+ QMAKE_DEL_FILE = del /q
+ QMAKE_DEL_DIR = rmdir /s /q
+}
qmlResources.files = qml
symbian {
diff --git a/demos/quick3d/model_viewer/qml/model_viewer.qml b/demos/quick3d/model_viewer/qml/model_viewer.qml
index 251547a72..8b5456484 100644
--- a/demos/quick3d/model_viewer/qml/model_viewer.qml
+++ b/demos/quick3d/model_viewer/qml/model_viewer.qml
@@ -70,109 +70,6 @@ Rectangle {
NumberAnimation { properties: "x"; easing.type: Easing.OutQuad; duration: 600 }
}
-
- Viewport {
- visible: false
- x: 800
- id: viewport1
- width: 800; height: 500
- picking: false
-
- camera: Camera {
- eye: Qt.vector3d(0, 0, 350)
- farPlane: 2000
- }
-
-
- Text {
- id: imgSrc
- text: "Image Source"; font.family: "Helvetica"; font.pointSize: 22; color: "white"
- anchors.top: parent.top
- z: 10
- }
-
- LongButton {
- //width: 800
- id: imgSrcButton
- anchors.top: imgSrc.bottom
- anchors.topMargin: 2
- z: 10
- }
- Text {
- id: displayOptions
- anchors.top: imgSrcButton.bottom
- anchors.topMargin: 2
- text: "Display Options"; font.family: "Helvetica"; font.pointSize: 22; color: "white"
- z: 10
- }
- FourButtons {
- id: displayOptionsButton
- anchors.top: displayOptions.bottom
- anchors.topMargin: 2
- z: 10
- }
- Text {
- id: texture
- anchors.top: displayOptionsButton.bottom
- anchors.topMargin: 2
- text: "Texture"; font.family: "Helvetica"; font.pointSize:22; color: "white"
- z: 10
- }
- LongButton {
- id: textureButton
- anchors.top: texture.bottom
- anchors.topMargin: 2
- z: 10
- }
- Text {
- id: navigation
- anchors.top: textureButton.bottom
- anchors.topMargin: 2
- text: "Navigation"; font.family: "Helvetica"; font.pointSize: 22; color: "white"
- z: 10
- }
- FourButtons {
- id: navigationButton
- anchors.top: navigation.bottom
- anchors.topMargin: 2
- z: 10
- }
- Text {
- id: background
- anchors.top: navigationButton.bottom
- anchors.topMargin: 2
- text: "Background"; font.family: "Helvetica"; font.pointSize: 22; color: "white"
- z: 10
- }
- LongButton {
- id: backgroundButton
- anchors.top: background.bottom
- anchors.topMargin: 2
- z: 10
- }
-
- //Button 1
- MainButton {
- id: button1c
- anchors.top: parent.top
- imageSource: "images/cog.svg"
-
-
- MouseArea {
- //property bool on: false
- anchors.fill: parent
- onClicked: {
- //source_mesh.options = "ForceSmooth";
- //source_mesh.source = textInput.text;
- parent.bounce = true;
-
- if (mainwindow.state == "")mainwindow.state = "Open"; else mainwindow.state = "";
- }
- }
- }
-
- }
-
Item {
width: 800; height: 500
@@ -274,7 +171,7 @@ Rectangle {
//Button 1
- MainButton {
+ /* MainButton {
id: button1
anchors.top: parent.top
imageSource: "images/cog.svg"
@@ -290,12 +187,12 @@ Rectangle {
if (mainwindow.state == "")mainwindow.state = "Open"; else mainwindow.state = "";
}
}
- }
+ }*/
//Button 2
MainButton {
id: button2
- anchors.top: button1.bottom
+ anchors.top: parent.top
imageSource: "images/zoomin.svg";
property bool zoom: false
property real changeScale: 1.1
diff --git a/demos/quick3d/qmlres.h b/demos/quick3d/qmlres.h
index 7c287379b..e80fa38b5 100644
--- a/demos/quick3d/qmlres.h
+++ b/demos/quick3d/qmlres.h
@@ -89,7 +89,16 @@ static QString q_get_qmldir(const QString &name)
if (dir.cd(QLatin1String("resources")) && dir.exists())
{
QString app = QCoreApplication::applicationFilePath();
+ app = QDir::toNativeSeparators(app);
+ //For windows platforms the "app" filepath should have the .exe extension removed.
+ const QString winExtension = ".exe";
+ if (app.right(winExtension.length()) == winExtension) {
+ app = app.left(app.length() - winExtension.length());
+ }
+
+ //Grab just the app name itself.
app = app.section(QDir::separator(), -1);
+
if (dir.cd(QLatin1String("demos")) && dir.cd(app) && dir.exists())
{
qml = dir.filePath(qml);
diff --git a/demos/quick3d/robo_bounce/qml/robobounce.qml b/demos/quick3d/robo_bounce/qml/robobounce.qml
index 28e79ebdd..34d8d50e3 100644
--- a/demos/quick3d/robo_bounce/qml/robobounce.qml
+++ b/demos/quick3d/robo_bounce/qml/robobounce.qml
@@ -339,12 +339,13 @@ Image {
PropertyAction{target: theCamera; property: "fieldOfView"; value: 11.45}
PropertyAction{target: spinSign; property: "angle"; value: 0}
PropertyAction{target: robot; property: "position"; value: Qt.vector3d(0,10,4)}
- PropertyAction{target: pitch; property: "angle"; value: 0}
- PropertyAction{target: roll; property: "angle"; value: 75}
- PropertyAction{target: yaw; property: "angle"; value: 90}
+ PropertyAction{target: pitch; property: "angle"; value: -15}
+ PropertyAction{target: roll; property: "angle"; value: 0}
+ PropertyAction{target: yaw; property: "angle"; value: 0}
PropertyAction{target: spinSign; property: "angle"; value: 0}
PropertyAction{target: innerCube; property: "scale"; value: 0.95}
PropertyAction{target: signCube; property: "scale"; value: 2.375}
+ PropertyAction{target: headroll; property: "angle"; value: -45}
}
},
Transition {
@@ -371,7 +372,7 @@ Image {
NumberAnimation {target: signCube; property: "scale"; to: 0.0; duration: 2500; easing.type: "InOutQuad"}
Vector3dAnimation {target: robot; property: "position"; to: Qt.vector3d(0,0,4); duration: 1000; easing.type: "OutBounce"}
PauseAnimation {duration: 500}
- NumberAnimation { target:roll; property: "angle"; to: 0; duration: 2500; easing.type: "InOutElastic"}
+ NumberAnimation { target:pitch; property: "angle"; to: -90; duration: 2500; easing.type: "InOutElastic"}
NumberAnimation { target: theCamera; property: "fieldOfView"; to: 20; duration: 1000; easing.type: "InOutQuad" }
NumberAnimation { target: headroll; property: "angle"; to: 0; duration: 500; easing.type: "OutElastic"}
NumberAnimation { target: headyaw; property: "angle"; to: 30; duration: 70; easing.type: "InOutQuad"}
@@ -387,9 +388,9 @@ Image {
PauseAnimation{duration: 1000}
ParallelAnimation {
SequentialAnimation {
- NumberAnimation {target: pitch; property: "angle"; to: -10; duration: 500; easing.type: "InOutBack"}
+ NumberAnimation {target: roll; property: "angle"; to: -20; duration: 500; easing.type: "InOutBack"}
PauseAnimation{duration: 1000}
- NumberAnimation {target: pitch; property: "angle"; to: 0; duration: 500; easing.type: "InOutBack"}
+ NumberAnimation {target: roll; property: "angle"; to: 0; duration: 500; easing.type: "InOutBack"}
}
Vector3dAnimation {target: robot; property: "position"; to: Qt.vector3d(0,0,0); duration: 2000; easing.type: "InOutBack"}
}
@@ -468,7 +469,7 @@ Image {
NumberAnimation {target: spinSmallCube; property: "angle"; to: 360; easing.type: "InOutQuad"; duration: 1750}
SequentialAnimation {
Vector3dAnimation {target: smallCube; property: "position"; to: Qt.vector3d(0,3.2,0); easing.type: "InQuad"; duration: 250}
- PropertyAction {target: robotHead; property: "y"; value: 9.00;}
+ PropertyAction {target: robotHead; property: "z"; value: -9.0;}
ParallelAnimation {
NumberAnimation {target: smallCube; property: "x"; to: 2; easing.type: "Linear"; duration: 1500}
SequentialAnimation {
@@ -479,7 +480,7 @@ Image {
}
}
PauseAnimation {duration: 500 }
- NumberAnimation { target: robotHead; property: "y"; to: 9.2; easing.type: "OutBounce"; duration: 250 }
+ NumberAnimation { target: robotHead; property: "z"; to: -9.2; easing.type: "OutBounce"; duration: 250 }
PauseAnimation {duration: 500 }
NumberAnimation { target: headyaw; property: "angle"; to: 30; duration: 70; easing.type: "InOutQuad"}
NumberAnimation { target: headyaw; property: "angle"; to: -30; duration: 70; easing.type: "InOutQuad"}
@@ -490,11 +491,11 @@ Image {
NumberAnimation { target: headyaw; property: "angle"; to: 30; duration: 70; easing.type: "InOutQuad"}
NumberAnimation { target: headyaw; property: "angle"; to: -30; duration: 70; easing.type: "InOutQuad"}
NumberAnimation { target: headyaw; property: "angle"; to: 00; duration: 100; easing.type: "OutQuad"}
- NumberAnimation { target: yaw; property: "angle"; to: 180; duration: 250; easing.type: "InOutQuad"}
+ NumberAnimation { target: yaw; property: "angle"; to: 90; duration: 250; easing.type: "InOutQuad"}
NumberAnimation { target: armBend; property: "angle"; to: -45; duration: 500; easing.type: "InOutQuad"}
ParallelAnimation {
NumberAnimation { target: robot; property: "x"; to: 0.5; duration: 500; easing.type: "InQuad"}
- NumberAnimation { target: pitch; property: "angle"; to: 30; duration: 500; easing.type: "InOutQuad"}
+ NumberAnimation { target: roll; property: "angle"; to: 30; duration: 500; easing.type: "InOutQuad"}
}
ParallelAnimation {
NumberAnimation { target: robot; property: "x"; to: 3.5; duration: 1000; easing.type: "Linear"}
@@ -508,14 +509,14 @@ Image {
}
ParallelAnimation {
SequentialAnimation {
- NumberAnimation {target: pitch; property: "angle"; to: -10; duration: 750; easing.type: "InOutBack"}
+ NumberAnimation {target: roll; property: "angle"; to: -10; duration: 750; easing.type: "InOutBack"}
PauseAnimation{duration: 1500}
- NumberAnimation {target: pitch; property: "angle"; to: 0; duration: 750; easing.type: "InOutBack"}
+ NumberAnimation {target: roll; property: "angle"; to: 0; duration: 750; easing.type: "InOutBack"}
}
Vector3dAnimation {target: robot; property: "position"; to: Qt.vector3d(0,0,0); duration: 3000; easing.type: "InOutBack"}
}
}
- NumberAnimation { target: yaw; property: "angle"; to: 90; duration: 250; easing.type: "InOutQuad"}
+ NumberAnimation { target: yaw; property: "angle"; to: 0; duration: 250; easing.type: "InOutQuad"}
NumberAnimation { target: armBend; property: "angle"; to: -90; duration: 500; easing.type: "InOutQuad"}
PauseAnimation { duration: 1000 }
PropertyAction {target: smallCube; property: "position"; value: Qt.vector3d(0,10,0)}
@@ -564,7 +565,7 @@ Image {
Robot {
id: robot
- position: Qt.vector3d(0,10,4)
+ position: Qt.vector3d(0,0,4)
onClicked: {
heartbeat.restart();
@@ -573,16 +574,17 @@ Image {
}
transform: [
- Rotation3D {id: pitch; angle: 0; axis: Qt.vector3d(0,0,1)},
- Rotation3D {id: roll; angle: 75; axis: Qt.vector3d(1,0,0)},
- Rotation3D {id: yaw; angle: 90; axis: Qt.vector3d(0,1,0)}
+ Rotation3D {id: correct; angle: 90; axis: Qt.vector3d(0,1,0)},
+ Rotation3D {id: pitch; angle: -90; axis: Qt.vector3d(0,0,1)},
+ Rotation3D {id: roll; angle: 0; axis: Qt.vector3d(1,0,0)},
+ Rotation3D {id: yaw; angle: 0; axis: Qt.vector3d(0,1,0)}
]
Item3D {
id: robotArms
mesh: Mesh { source: "Assets/roboticArms.3ds"}
- transform: Rotation3D{id: armBend; angle: -90;axis: Qt.vector3d(0,0,1)}
- position: Qt.vector3d(.18, 5.4,0)
+ transform: Rotation3D{id: armBend; angle: -90;axis: Qt.vector3d(0,1,0)}
+ position: Qt.vector3d(.18, 0,-5.4)
SequentialAnimation {
running: false
@@ -596,11 +598,11 @@ Image {
Item3D {
id: robotHead
mesh: Mesh { source: "Assets/roboticHead.3ds" }
- position: Qt.vector3d(0,9.1,0)
+ position: Qt.vector3d(0,0,-9.1)
transform: [
- Rotation3D {id: headpitch; angle: 0; axis: Qt.vector3d(0,0,1)},
- Rotation3D {id: headroll; angle: 45; axis: Qt.vector3d(1,0,0)},
- Rotation3D {id: headyaw; angle: 0; axis: Qt.vector3d(0,1,0)}
+ Rotation3D {id: headyaw; angle: 0; axis: Qt.vector3d(0,0,1)},
+ Rotation3D {id: headroll; angle: -45; axis: Qt.vector3d(1,0,0)},
+ Rotation3D {id: headpitch; angle: 0; axis: Qt.vector3d(0,1,0)}
]
}
}
diff --git a/demos/quick3d/robo_bounce/robo_bounce.pro b/demos/quick3d/robo_bounce/robo_bounce.pro
index edba7b33d..aaa6a37c6 100644
--- a/demos/quick3d/robo_bounce/robo_bounce.pro
+++ b/demos/quick3d/robo_bounce/robo_bounce.pro
@@ -8,6 +8,11 @@ HEADERS += ../qmlres.h
QT += declarative
!package:DESTDIR = ../../../bin
+# for cleanup on Windows platforms - avoid deletion prompts
+win32 {
+ QMAKE_DEL_FILE = del /q
+ QMAKE_DEL_DIR = rmdir /s /q
+}
qmlResources.files = qml
symbian {
diff --git a/demos/quick3d/tea_service/tea_service.pro b/demos/quick3d/tea_service/tea_service.pro
index fe173f88d..0d277e463 100644
--- a/demos/quick3d/tea_service/tea_service.pro
+++ b/demos/quick3d/tea_service/tea_service.pro
@@ -8,6 +8,11 @@ HEADERS += ../qmlres.h
QT += declarative
!package:DESTDIR = ../../../bin
+# for cleanup on Windows platforms - avoid deletion prompts
+win32 {
+ QMAKE_DEL_FILE = del /q
+ QMAKE_DEL_DIR = rmdir /s /q
+}
qmlResources.files = qml
symbian {