diff options
author | Sean Harmer <sean.harmer@kdab.com> | 2017-04-03 09:25:12 +0100 |
---|---|---|
committer | Sean Harmer <sean.harmer@kdab.com> | 2017-04-03 09:25:52 +0100 |
commit | 4e316f58f7d063efc0c90fc5ffcfc4d20622f2c8 (patch) | |
tree | f14ec1d1a59d6605e3fefa3f75e24c5e9415e942 /tests/manual | |
parent | 172287f824b740a7e2ce75e811c0858cbe0c40c1 (diff) | |
parent | 89644c7f31b59fbb186bdcafd30c3aefb9ee0644 (diff) |
Merge branch '5.9' into dev
Change-Id: I5ba00475ad83132589f99348500a7103a03474b0
Diffstat (limited to 'tests/manual')
-rw-r--r-- | tests/manual/animation-keyframe-blendtree/DefaultSceneEntity.qml | 35 | ||||
-rw-r--r-- | tests/manual/animation-keyframe-blendtree/animation-keyframe-blendtree.pro | 5 | ||||
-rw-r--r-- | tests/manual/animation-keyframe-blendtree/main.cpp | 25 | ||||
-rw-r--r-- | tests/manual/animation-keyframe-blendtree/main.qml | 75 | ||||
-rw-r--r-- | tests/manual/animation-keyframe-blendtree/main.qrc | 8 | ||||
-rw-r--r-- | tests/manual/animation-keyframe-blendtree/sliding-cube.json | 469 | ||||
-rw-r--r-- | tests/manual/animation-keyframe-blendtree/sliding-pulsing-cube.json | 469 | ||||
-rw-r--r-- | tests/manual/animation-keyframe-simple/cubeanimation.json | 333 | ||||
-rw-r--r-- | tests/manual/animation-keyframe-simple/main.qml | 185 | ||||
-rw-r--r-- | tests/manual/buffercapture-qml/BufferSetterScene.qml | 2 | ||||
-rw-r--r-- | tests/manual/lod/main.qml | 6 | ||||
-rw-r--r-- | tests/manual/manual.pro | 1 | ||||
-rw-r--r-- | tests/manual/render-qml-to-texture-qml/main.qml | 16 |
13 files changed, 1344 insertions, 285 deletions
diff --git a/tests/manual/animation-keyframe-blendtree/DefaultSceneEntity.qml b/tests/manual/animation-keyframe-blendtree/DefaultSceneEntity.qml new file mode 100644 index 000000000..efffd44c9 --- /dev/null +++ b/tests/manual/animation-keyframe-blendtree/DefaultSceneEntity.qml @@ -0,0 +1,35 @@ +/************************************************************************* + * + * Copyright (c) 2016, Klaralvdalens Datakonsult AB (KDAB) + * All rights reserved. + * + * See the LICENSE.txt file shipped along with this file for the license. + * + *************************************************************************/ + +import Qt3D.Core 2.0 +import Qt3D.Render 2.0 +import Qt3D.Input 2.0 +import Qt3D.Extras 2.0 + +Entity { + id: root + property Camera camera + + components: [ + RenderSettings { + activeFrameGraph: ForwardRenderer { + camera: root.camera + } + }, + // Event Source will be set by the Qt3DQuickWindow + InputSettings { } + ] + + Entity { + components: [ + PointLight { intensity: 0.5 }, + Transform { translation: camera.position } + ] + } +} diff --git a/tests/manual/animation-keyframe-blendtree/animation-keyframe-blendtree.pro b/tests/manual/animation-keyframe-blendtree/animation-keyframe-blendtree.pro new file mode 100644 index 000000000..04db4207e --- /dev/null +++ b/tests/manual/animation-keyframe-blendtree/animation-keyframe-blendtree.pro @@ -0,0 +1,5 @@ +TEMPLATE = app +QT += 3dquickextras 3dquickanimation +SOURCES += main.cpp +RESOURCES += main.qrc +OTHER_FILES += main.qml DefaultSceneEntity.qml diff --git a/tests/manual/animation-keyframe-blendtree/main.cpp b/tests/manual/animation-keyframe-blendtree/main.cpp new file mode 100644 index 000000000..fc48fc702 --- /dev/null +++ b/tests/manual/animation-keyframe-blendtree/main.cpp @@ -0,0 +1,25 @@ +/************************************************************************* + * + * Copyright (c) 2016, Klaralvdalens Datakonsult AB (KDAB) + * All rights reserved. + * + * See the LICENSE.txt file shipped along with this file for the license. + * + *************************************************************************/ + +#include <QGuiApplication> +#include <Qt3DAnimation/QAnimationAspect> +#include <Qt3DQuickExtras/Qt3DQuickWindow> +#include <Qt3DQuick/QQmlAspectEngine> +#include <QQmlEngine> +#include <QQmlContext> + +int main(int argc, char **argv) +{ + QGuiApplication app(argc, argv); + Qt3DExtras::Quick::Qt3DQuickWindow view; + view.registerAspect(new Qt3DAnimation::QAnimationAspect()); + view.setSource(QUrl("qrc:/main.qml")); + view.show(); + return app.exec(); +} diff --git a/tests/manual/animation-keyframe-blendtree/main.qml b/tests/manual/animation-keyframe-blendtree/main.qml new file mode 100644 index 000000000..0c28b8fd3 --- /dev/null +++ b/tests/manual/animation-keyframe-blendtree/main.qml @@ -0,0 +1,75 @@ +/************************************************************************* + * + * Copyright (c) 2016, Klaralvdalens Datakonsult AB (KDAB) + * All rights reserved. + * + * See the LICENSE.txt file shipped along with this file for the license. + * + *************************************************************************/ + +import Qt3D.Core 2.0 +import Qt3D.Render 2.0 +import Qt3D.Input 2.0 +import Qt3D.Animation 2.9 +import Qt3D.Extras 2.0 + +DefaultSceneEntity { + id: scene + + Entity { + id: cube + + components: [ + Transform { + id: cubeTransform + translation: Qt.vector3d(5, 0, 0) + onTranslationChanged: console.log("t = " + translation) + }, + CuboidMesh { + }, + PhongMaterial { + id: cubeMaterial + ambient: Qt.rgba(0.02, 0.02, 0.02, 1.0) + diffuse: "red" + shininess: 50 + }, + ObjectPicker { + onClicked: blendedAnimator.running = true + }, + BlendedClipAnimator { + id: blendedAnimator + loops: 2 + + onRunningChanged: console.log("running = " + running) + + blendTree: LerpClipBlend { + blendFactor: 0.2 + startClip: ClipBlendValue { + clip: AnimationClip { source: "sliding-cube.json" } + } + endClip: ClipBlendValue { + clip: AnimationClip { source: "sliding-pulsing-cube.json" } + } + } + + channelMapper: ChannelMapper { + mappings: [ + ChannelMapping { channelName: "Location"; target: cubeTransform; property: "translation" }, + ChannelMapping { channelName: "Scale"; target: cubeTransform; property: "scale3D" } + ] + } + } + ] + } + + camera: Camera { + position: Qt.vector3d(10, 3, 15) + viewCenter: Qt.vector3d(2.5, 1, 0) + } + + OrbitCameraController { + camera: scene.camera + linearSpeed: 8 + lookSpeed: 180 + } +} diff --git a/tests/manual/animation-keyframe-blendtree/main.qrc b/tests/manual/animation-keyframe-blendtree/main.qrc new file mode 100644 index 000000000..4422a677e --- /dev/null +++ b/tests/manual/animation-keyframe-blendtree/main.qrc @@ -0,0 +1,8 @@ +<RCC> + <qresource prefix="/"> + <file>main.qml</file> + <file>DefaultSceneEntity.qml</file> + <file>sliding-cube.json</file> + <file>sliding-pulsing-cube.json</file> + </qresource> +</RCC> diff --git a/tests/manual/animation-keyframe-blendtree/sliding-cube.json b/tests/manual/animation-keyframe-blendtree/sliding-cube.json new file mode 100644 index 000000000..2404ea325 --- /dev/null +++ b/tests/manual/animation-keyframe-blendtree/sliding-cube.json @@ -0,0 +1,469 @@ +{ + "animations": [ + { + "animationName": "PulsingSlidingCube", + "channels": [ + { + "channelComponents": [ + { + "channelComponentName": "Location X", + "keyFrames": [ + { + "coords": [ + 0.0, + 0.0 + ], + "leftHandle": [ + -0.22774004936218262, + 0.0 + ], + "rightHandle": [ + 0.22774004936218262, + 0.0 + ] + }, + { + "coords": [ + 0.5833333333333334, + 0.6238380670547485 + ], + "leftHandle": [ + 0.3555932839711507, + 0.20872697234153748 + ], + "rightHandle": [ + 0.8273405234018961, + 1.0685999393463135 + ] + }, + { + "coords": [ + 1.2083333333333333, + 2.2338662147521973 + ], + "leftHandle": [ + 0.9643261432647705, + 1.5640573501586914 + ], + "rightHandle": [ + 1.4523404439290364, + 2.903675079345703 + ] + }, + { + "coords": [ + 1.8333333333333333, + 4.0551347732543945 + ], + "leftHandle": [ + 1.5893262227376301, + 3.515169620513916 + ], + "rightHandle": [ + 2.0773404439290366, + 4.595099925994873 + ] + }, + { + "coords": [ + 2.4583333333333335, + 5.0 + ], + "leftHandle": [ + 2.2143262227376304, + 5.0 + ], + "rightHandle": [ + 2.7023404439290366, + 5.0 + ] + } + ] + }, + { + "channelComponentName": "Location Z", + "keyFrames": [ + { + "coords": [ + 0.0, + 0.0 + ], + "leftHandle": [ + -0.22774004936218262, + 0.0 + ], + "rightHandle": [ + 0.22774004936218262, + 0.0 + ] + }, + { + "coords": [ + 0.5833333333333334, + 0.0 + ], + "leftHandle": [ + 0.3555932839711507, + 0.0 + ], + "rightHandle": [ + 0.8273405234018961, + 0.0 + ] + }, + { + "coords": [ + 1.2083333333333333, + 0.0 + ], + "leftHandle": [ + 0.9643261432647705, + 0.0 + ], + "rightHandle": [ + 1.4523404439290364, + 0.0 + ] + }, + { + "coords": [ + 1.8333333333333333, + 0.0 + ], + "leftHandle": [ + 1.5893262227376301, + 0.0 + ], + "rightHandle": [ + 2.0773404439290366, + 0.0 + ] + }, + { + "coords": [ + 2.4583333333333335, + 0.0 + ], + "leftHandle": [ + 2.2143262227376304, + 0.0 + ], + "rightHandle": [ + 2.7023404439290366, + 0.0 + ] + } + ] + }, + { + "channelComponentName": "Location Y", + "keyFrames": [ + { + "coords": [ + 0.0, + 0.0 + ], + "leftHandle": [ + -0.22774004936218262, + 0.0 + ], + "rightHandle": [ + 0.22774004936218262, + 0.0 + ] + }, + { + "coords": [ + 0.5833333333333334, + 0.0 + ], + "leftHandle": [ + 0.3555932839711507, + 0.0 + ], + "rightHandle": [ + 0.8273405234018961, + 0.0 + ] + }, + { + "coords": [ + 1.2083333333333333, + 0.0 + ], + "leftHandle": [ + 0.9643261432647705, + 0.0 + ], + "rightHandle": [ + 1.4523404439290364, + 0.0 + ] + }, + { + "coords": [ + 1.8333333333333333, + 0.0 + ], + "leftHandle": [ + 1.5893262227376301, + 0.0 + ], + "rightHandle": [ + 2.0773404439290366, + 0.0 + ] + }, + { + "coords": [ + 2.4583333333333335, + 0.0 + ], + "leftHandle": [ + 2.2143262227376304, + 0.0 + ], + "rightHandle": [ + 2.7023404439290366, + 0.0 + ] + } + ] + } + ], + "channelName": "Location" + }, + { + "channelComponents": [ + { + "channelComponentName": "Scale X", + "keyFrames": [ + { + "coords": [ + 0.0, + 1.0 + ], + "leftHandle": [ + -0.22774004936218262, + 1.0 + ], + "rightHandle": [ + 0.22774004936218262, + 1.0 + ] + }, + { + "coords": [ + 0.5833333333333334, + 1.0 + ], + "leftHandle": [ + 0.3555932839711507, + 1.0 + ], + "rightHandle": [ + 0.8273405234018961, + 1.0 + ] + }, + { + "coords": [ + 1.2083333333333333, + 1.0 + ], + "leftHandle": [ + 0.9643261432647705, + 1.0 + ], + "rightHandle": [ + 1.4523404439290364, + 1.0 + ] + }, + { + "coords": [ + 1.8333333333333333, + 1.0 + ], + "leftHandle": [ + 1.5893262227376301, + 1.0 + ], + "rightHandle": [ + 2.0773404439290366, + 1.0 + ] + }, + { + "coords": [ + 2.4583333333333335, + 1.0 + ], + "leftHandle": [ + 2.2143262227376304, + 1.0 + ], + "rightHandle": [ + 2.7023404439290366, + 1.0 + ] + } + ] + }, + { + "channelComponentName": "Scale Y", + "keyFrames": [ + { + "coords": [ + 0.0, + 1.0 + ], + "leftHandle": [ + -0.22774004936218262, + 1.0 + ], + "rightHandle": [ + 0.22774004936218262, + 1.0 + ] + }, + { + "coords": [ + 0.5833333333333334, + 1.0 + ], + "leftHandle": [ + 0.3555932839711507, + 1.0 + ], + "rightHandle": [ + 0.8273405234018961, + 1.0 + ] + }, + { + "coords": [ + 1.2083333333333333, + 1.0 + ], + "leftHandle": [ + 0.9643261432647705, + 1.0 + ], + "rightHandle": [ + 1.4523404439290364, + 1.0 + ] + }, + { + "coords": [ + 1.8333333333333333, + 1.0 + ], + "leftHandle": [ + 1.5893262227376301, + 1.0 + ], + "rightHandle": [ + 2.0773404439290366, + 1.0 + ] + }, + { + "coords": [ + 2.4583333333333335, + 1.0 + ], + "leftHandle": [ + 2.2143262227376304, + 1.0 + ], + "rightHandle": [ + 2.7023404439290366, + 1.0 + ] + } + ] + }, + { + "channelComponentName": "Scale Z", + "keyFrames": [ + { + "coords": [ + 0.0, + 1.0 + ], + "leftHandle": [ + -0.22774004936218262, + 1.0 + ], + "rightHandle": [ + 0.22774004936218262, + 1.0 + ] + }, + { + "coords": [ + 0.5833333333333334, + 1.0 + ], + "leftHandle": [ + 0.3555932839711507, + 1.0 + ], + "rightHandle": [ + 0.8273405234018961, + 1.0 + ] + }, + { + "coords": [ + 1.2083333333333333, + 1.0 + ], + "leftHandle": [ + 0.9643261432647705, + 1.0 + ], + "rightHandle": [ + 1.4523404439290364, + 1.0 + ] + }, + { + "coords": [ + 1.8333333333333333, + 1.0 + ], + "leftHandle": [ + 1.5893262227376301, + 1.0 + ], + "rightHandle": [ + 2.0773404439290366, + 1.0 + ] + }, + { + "coords": [ + 2.4583333333333335, + 1.0 + ], + "leftHandle": [ + 2.2143262227376304, + 1.0 + ], + "rightHandle": [ + 2.7023404439290366, + 1.0 + ] + } + ] + } + ], + "channelName": "Scale" + } + ] + } + ] +}
\ No newline at end of file diff --git a/tests/manual/animation-keyframe-blendtree/sliding-pulsing-cube.json b/tests/manual/animation-keyframe-blendtree/sliding-pulsing-cube.json new file mode 100644 index 000000000..9d6a8c7b8 --- /dev/null +++ b/tests/manual/animation-keyframe-blendtree/sliding-pulsing-cube.json @@ -0,0 +1,469 @@ +{ + "animations": [ + { + "animationName": "PulsingSlidingCube", + "channels": [ + { + "channelComponents": [ + { + "channelComponentName": "Location X", + "keyFrames": [ + { + "coords": [ + 0.0, + 0.0 + ], + "leftHandle": [ + -0.22774004936218262, + 0.0 + ], + "rightHandle": [ + 0.22774004936218262, + 0.0 + ] + }, + { + "coords": [ + 0.5833333333333334, + 0.6238380670547485 + ], + "leftHandle": [ + 0.3555932839711507, + 0.20872697234153748 + ], + "rightHandle": [ + 0.8273405234018961, + 1.0685999393463135 + ] + }, + { + "coords": [ + 1.2083333333333333, + 2.2338662147521973 + ], + "leftHandle": [ + 0.9643261432647705, + 1.5640573501586914 + ], + "rightHandle": [ + 1.4523404439290364, + 2.903675079345703 + ] + }, + { + "coords": [ + 1.8333333333333333, + 4.0551347732543945 + ], + "leftHandle": [ + 1.5893262227376301, + 3.515169620513916 + ], + "rightHandle": [ + 2.0773404439290366, + 4.595099925994873 + ] + }, + { + "coords": [ + 2.4583333333333335, + 5.0 + ], + "leftHandle": [ + 2.2143262227376304, + 5.0 + ], + "rightHandle": [ + 2.7023404439290366, + 5.0 + ] + } + ] + }, + { + "channelComponentName": "Location Z", + "keyFrames": [ + { + "coords": [ + 0.0, + 0.0 + ], + "leftHandle": [ + -0.22774004936218262, + 0.0 + ], + "rightHandle": [ + 0.22774004936218262, + 0.0 + ] + }, + { + "coords": [ + 0.5833333333333334, + 0.0 + ], + "leftHandle": [ + 0.3555932839711507, + 0.0 + ], + "rightHandle": [ + 0.8273405234018961, + 0.0 + ] + }, + { + "coords": [ + 1.2083333333333333, + 0.0 + ], + "leftHandle": [ + 0.9643261432647705, + 0.0 + ], + "rightHandle": [ + 1.4523404439290364, + 0.0 + ] + }, + { + "coords": [ + 1.8333333333333333, + 0.0 + ], + "leftHandle": [ + 1.5893262227376301, + 0.0 + ], + "rightHandle": [ + 2.0773404439290366, + 0.0 + ] + }, + { + "coords": [ + 2.4583333333333335, + 0.0 + ], + "leftHandle": [ + 2.2143262227376304, + 0.0 + ], + "rightHandle": [ + 2.7023404439290366, + 0.0 + ] + } + ] + }, + { + "channelComponentName": "Location Y", + "keyFrames": [ + { + "coords": [ + 0.0, + 0.0 + ], + "leftHandle": [ + -0.22774004936218262, + 0.0 + ], + "rightHandle": [ + 0.22774004936218262, + 0.0 + ] + }, + { + "coords": [ + 0.5833333333333334, + 0.0 + ], + "leftHandle": [ + 0.3555932839711507, + 0.0 + ], + "rightHandle": [ + 0.8273405234018961, + 0.0 + ] + }, + { + "coords": [ + 1.2083333333333333, + 0.0 + ], + "leftHandle": [ + 0.9643261432647705, + 0.0 + ], + "rightHandle": [ + 1.4523404439290364, + 0.0 + ] + }, + { + "coords": [ + 1.8333333333333333, + 0.0 + ], + "leftHandle": [ + 1.5893262227376301, + 0.0 + ], + "rightHandle": [ + 2.0773404439290366, + 0.0 + ] + }, + { + "coords": [ + 2.4583333333333335, + 0.0 + ], + "leftHandle": [ + 2.2143262227376304, + 0.0 + ], + "rightHandle": [ + 2.7023404439290366, + 0.0 + ] + } + ] + } + ], + "channelName": "Location" + }, + { + "channelComponents": [ + { + "channelComponentName": "Scale X", + "keyFrames": [ + { + "coords": [ + 0.0, + 1.0 + ], + "leftHandle": [ + -0.22774004936218262, + 1.0 + ], + "rightHandle": [ + 0.22774004936218262, + 1.0 + ] + }, + { + "coords": [ + 0.5833333333333334, + 0.5 + ], + "leftHandle": [ + 0.3555932839711507, + 0.5 + ], + "rightHandle": [ + 0.8273405234018961, + 0.5 + ] + }, + { + "coords": [ + 1.2083333333333333, + 1.0 + ], + "leftHandle": [ + 0.9643261432647705, + 1.0 + ], + "rightHandle": [ + 1.4523404439290364, + 1.0 + ] + }, + { + "coords": [ + 1.8333333333333333, + 0.5 + ], + "leftHandle": [ + 1.5893262227376301, + 0.5 + ], + "rightHandle": [ + 2.0773404439290366, + 0.5 + ] + }, + { + "coords": [ + 2.4583333333333335, + 1.0 + ], + "leftHandle": [ + 2.2143262227376304, + 1.0 + ], + "rightHandle": [ + 2.7023404439290366, + 1.0 + ] + } + ] + }, + { + "channelComponentName": "Scale Y", + "keyFrames": [ + { + "coords": [ + 0.0, + 1.0 + ], + "leftHandle": [ + -0.22774004936218262, + 1.0 + ], + "rightHandle": [ + 0.22774004936218262, + 1.0 + ] + }, + { + "coords": [ + 0.5833333333333334, + 0.5 + ], + "leftHandle": [ + 0.3555932839711507, + 0.5 + ], + "rightHandle": [ + 0.8273405234018961, + 0.5 + ] + }, + { + "coords": [ + 1.2083333333333333, + 1.0 + ], + "leftHandle": [ + 0.9643261432647705, + 1.0 + ], + "rightHandle": [ + 1.4523404439290364, + 1.0 + ] + }, + { + "coords": [ + 1.8333333333333333, + 0.5 + ], + "leftHandle": [ + 1.5893262227376301, + 0.5 + ], + "rightHandle": [ + 2.0773404439290366, + 0.5 + ] + }, + { + "coords": [ + 2.4583333333333335, + 1.0 + ], + "leftHandle": [ + 2.2143262227376304, + 1.0 + ], + "rightHandle": [ + 2.7023404439290366, + 1.0 + ] + } + ] + }, + { + "channelComponentName": "Scale Z", + "keyFrames": [ + { + "coords": [ + 0.0, + 1.0 + ], + "leftHandle": [ + -0.22774004936218262, + 1.0 + ], + "rightHandle": [ + 0.22774004936218262, + 1.0 + ] + }, + { + "coords": [ + 0.5833333333333334, + 0.5 + ], + "leftHandle": [ + 0.3555932839711507, + 0.5 + ], + "rightHandle": [ + 0.8273405234018961, + 0.5 + ] + }, + { + "coords": [ + 1.2083333333333333, + 1.0 + ], + "leftHandle": [ + 0.9643261432647705, + 1.0 + ], + "rightHandle": [ + 1.4523404439290364, + 1.0 + ] + }, + { + "coords": [ + 1.8333333333333333, + 0.5 + ], + "leftHandle": [ + 1.5893262227376301, + 0.5 + ], + "rightHandle": [ + 2.0773404439290366, + 0.5 + ] + }, + { + "coords": [ + 2.4583333333333335, + 1.0 + ], + "leftHandle": [ + 2.2143262227376304, + 1.0 + ], + "rightHandle": [ + 2.7023404439290366, + 1.0 + ] + } + ] + } + ], + "channelName": "Scale" + } + ] + } + ] +}
\ No newline at end of file diff --git a/tests/manual/animation-keyframe-simple/cubeanimation.json b/tests/manual/animation-keyframe-simple/cubeanimation.json index addf92907..3faff409c 100644 --- a/tests/manual/animation-keyframe-simple/cubeanimation.json +++ b/tests/manual/animation-keyframe-simple/cubeanimation.json @@ -1,87 +1,250 @@ { "animations": [ - { "object": "Cube", - "action": "CubeAction", - "range": [0.0, 60.0], - "groups": [ - { "group": "Location", - "channels": [ - { "name": "x", - "keyframes": [ - { "co": [0.0, 0.0], - "handle_left": [-0.4717472394307454, 0.0], - "handle_right": [0.4717472394307454, 0.0]} - ,{ "co": [1.2083333333333333, 2.430499792098999], - "handle_left": [0.7365860939025879, 1.4711904525756836], - "handle_right": [1.696347713470459, 3.42288875579834]} - ,{ "co": [2.4583333333333335, 5.0], - "handle_left": [1.9703189531962078, 5.0], - "handle_right": [2.9463475545247397, 5.0]} - ]} - ,{ "name": "z", - "keyframes": [ - { "co": [0.0, 0.0], - "handle_left": [-0.4717472394307454, 0.0], - "handle_right": [0.4717472394307454, 0.0]} - ,{ "co": [1.2083333333333333, 0.0], - "handle_left": [0.7365860939025879, 0.0], - "handle_right": [1.696347713470459, 0.0]} - ,{ "co": [2.4583333333333335, 0.0], - "handle_left": [1.9703189531962078, 0.0], - "handle_right": [2.9463475545247397, 0.0]} - ]} - ,{ "name": "y", - "keyframes": [ - { "co": [0.0, 0.0], - "handle_left": [-0.4717472394307454, 0.0], - "handle_right": [0.4717472394307454, 0.0]} - ,{ "co": [1.2083333333333333, 3.0], - "handle_left": [0.7365860939025879, 3.0], - "handle_right": [1.696347713470459, 3.0]} - ,{ "co": [2.4583333333333335, 0.0], - "handle_left": [1.9703189531962078, 0.0], - "handle_right": [2.9463475545247397, 0.0]} - ]} - ]} - ,{ "group": "Rotation", - "channels": [ - { "name": "w", - "keyframes": [ - { "co": [0.0, 1.0], - "handle_left": [-0.9597616195678711, 1.0], - "handle_right": [0.9597616195678711, 1.0]} - ,{ "co": [2.4583333333333335, -4.371138828673793e-08], - "handle_left": [1.4985717137654622, -4.371138828673793e-08], - "handle_right": [3.4180949529012046, -4.371138828673793e-08]} - ]} - ,{ "name": "x", - "keyframes": [ - { "co": [0.0, 0.0], - "handle_left": [-0.9597616195678711, 0.0], - "handle_right": [0.9597616195678711, 0.0]} - ,{ "co": [2.4583333333333335, 0.0], - "handle_left": [1.4985717137654622, 0.0], - "handle_right": [3.4180949529012046, 0.0]} - ]} - ,{ "name": "z", - "keyframes": [ - { "co": [0.0, -0.0], - "handle_left": [-0.9597616195678711, -0.0], - "handle_right": [0.9597616195678711, -0.0]} - ,{ "co": [2.4583333333333335, -1.0], - "handle_left": [1.4985717137654622, -1.0], - "handle_right": [3.4180949529012046, -1.0]} - ]} - ,{ "name": "y", - "keyframes": [ - { "co": [0.0, 0.0], - "handle_left": [-0.9597616195678711, 0.0], - "handle_right": [0.9597616195678711, 0.0]} - ,{ "co": [2.4583333333333335, 0.0], - "handle_left": [1.4985717137654622, 0.0], - "handle_right": [3.4180949529012046, 0.0]} - ]} - ]} - ]} - ] -} + { + "animationName": "CubeAction", + "channels": [ + { + "channelComponents": [ + { + "channelComponentName": "Location X", + "keyFrames": [ + { + "coords": [ + 0.0, + 0.0 + ], + "leftHandle": [ + -0.9597616195678711, + 0.0 + ], + "rightHandle": [ + 0.9597616195678711, + 0.0 + ] + }, + { + "coords": [ + 2.4583333333333335, + 5.0 + ], + "leftHandle": [ + 1.4985717137654622, + 5.0 + ], + "rightHandle": [ + 3.4180949529012046, + 5.0 + ] + } + ] + }, + { + "channelComponentName": "Location Z", + "keyFrames": [ + { + "coords": [ + 0.0, + 0.0 + ], + "leftHandle": [ + -0.9597616195678711, + 0.0 + ], + "rightHandle": [ + 0.9597616195678711, + 0.0 + ] + }, + { + "coords": [ + 2.4583333333333335, + 0.0 + ], + "leftHandle": [ + 1.4985717137654622, + 0.0 + ], + "rightHandle": [ + 3.4180949529012046, + 0.0 + ] + } + ] + }, + { + "channelComponentName": "Location Y", + "keyFrames": [ + { + "coords": [ + 0.0, + 0.0 + ], + "leftHandle": [ + -0.9597616195678711, + 0.0 + ], + "rightHandle": [ + 0.9597616195678711, + 0.0 + ] + }, + { + "coords": [ + 2.4583333333333335, + 0.0 + ], + "leftHandle": [ + 1.4985717137654622, + 0.0 + ], + "rightHandle": [ + 3.4180949529012046, + 0.0 + ] + } + ] + } + ], + "channelName": "Location" + }, + { + "channelComponents": [ + { + "channelComponentName": "Rotation W", + "keyFrames": [ + { + "coords": [ + 0.0, + 1.0 + ], + "leftHandle": [ + -0.9597616195678711, + 1.0 + ], + "rightHandle": [ + 0.9597616195678711, + 1.0 + ] + }, + { + "coords": [ + 2.4583333333333335, + -4.371138828673793e-08 + ], + "leftHandle": [ + 1.4985717137654622, + -4.371138828673793e-08 + ], + "rightHandle": [ + 3.4180949529012046, + -4.371138828673793e-08 + ] + } + ] + }, + { + "channelComponentName": "Rotation X", + "keyFrames": [ + { + "coords": [ + 0.0, + 0.0 + ], + "leftHandle": [ + -0.9597616195678711, + 0.0 + ], + "rightHandle": [ + 0.9597616195678711, + 0.0 + ] + }, + { + "coords": [ + 2.4583333333333335, + 0.0 + ], + "leftHandle": [ + 1.4985717137654622, + 0.0 + ], + "rightHandle": [ + 3.4180949529012046, + 0.0 + ] + } + ] + }, + { + "channelComponentName": "Rotation Z", + "keyFrames": [ + { + "coords": [ + 0.0, + -0.0 + ], + "leftHandle": [ + -0.9597616195678711, + -0.0 + ], + "rightHandle": [ + 0.9597616195678711, + -0.0 + ] + }, + { + "coords": [ + 2.4583333333333335, + -1.0 + ], + "leftHandle": [ + 1.4985717137654622, + -1.0 + ], + "rightHandle": [ + 3.4180949529012046, + -1.0 + ] + } + ] + }, + { + "channelComponentName": "Rotation Y", + "keyFrames": [ + { + "coords": [ + 0.0, + 0.0 + ], + "leftHandle": [ + -0.9597616195678711, + 0.0 + ], + "rightHandle": [ + 0.9597616195678711, + 0.0 + ] + }, + { + "coords": [ + 2.4583333333333335, + 0.0 + ], + "leftHandle": [ + 1.4985717137654622, + 0.0 + ], + "rightHandle": [ + 3.4180949529012046, + 0.0 + ] + } + ] + } + ], + "channelName": "Rotation" + } + ] + } + ] +}
\ No newline at end of file diff --git a/tests/manual/animation-keyframe-simple/main.qml b/tests/manual/animation-keyframe-simple/main.qml index 2c7be6879..17744209a 100644 --- a/tests/manual/animation-keyframe-simple/main.qml +++ b/tests/manual/animation-keyframe-simple/main.qml @@ -62,191 +62,6 @@ DefaultSceneEntity { ] } - Entity { - id: sphere - - components: [ - Transform { - id: sphereTransform - translation: Qt.vector3d(5, 0, 0) - onTranslationChanged: console.log("t = " + translation) - }, - SphereMesh { - }, - PhongMaterial { - id: sphereMaterial - ambient: Qt.rgba(0.02, 0.02, 0.02, 1.0) - diffuse: "red" - shininess: 50 - }, - ObjectPicker { - onClicked: blendedAnimator.running = true - }, - BlendedClipAnimator { - id: blendedAnimator - loops: 2 - - onRunningChanged: console.log("running = " + running) - - blendTree: LerpBlend { - blendFactor: 0.5 - clips: [ - AnimationClip { - source: "cubeanimation.json" - onDurationChanged: console.log("duration = " + duration) - }, - AnimationClip { - source: "pulsing-moving-cube.json" - onDurationChanged: console.log("duration = " + duration) - }] - } - - - // By default introspect parent Entity and try - // to map fcurve groups to properties of QTransform - // mapping: AutomaticAnimationMapping {} - - // To do more, we can be explicit - channelMapper: ChannelMapper { - mappings: [ - ChannelMapping { channelName: "Location"; target: sphereTransform; property: "translation" }, - ChannelMapping { channelName: "Rotation"; target: sphereTransform; property: "rotation" }, - ChannelMapping { channelName: "Scaling"; target: sphereTransform; property: "scale3D" }, - ChannelMapping { channelName: "Diffuse Color"; target: sphereMaterial; property: "diffuse" } - ] - } - } - ] - } - - Entity { - id: cube2 - - components: [ - Transform { - id: cube2Transform - translation: Qt.vector3d(2.5, 0, 0) - onTranslationChanged: console.log("t = " + translation) - }, - CuboidMesh { - }, - PhongMaterial { - id: cube2Material - ambient: Qt.rgba(0.8, 0.8, 0.8, 1.0) - diffuse: Qt.rgba(0.7, 0.7, 0.7, 1.0) - shininess: 50 - }, - ObjectPicker { - onClicked: blendedAnimator2.running = true - }, - BlendedClipAnimator { - id: blendedAnimator2 - loops: 2 - - onRunningChanged: console.log("running = " + running) - - blendTree: AdditiveBlend { - blendFactor: 0.5 - clips: [ - AnimationClip { - source: "pulsing-moving-cube.json" - onDurationChanged: console.log("duration = " + duration) - }, - AnimationClip { - source: "pulsing-cube-additive.json" - onDurationChanged: console.log("duration = " + duration) - }] - } - - // By default introspect parent Entity and try - // to map fcurve groups to properties of QTransform - // mapping: AutomaticAnimationMapping {} - - // To do more, we can be explicit - channelMapper: ChannelMapper { - mappings: [ - ChannelMapping { channelName: "Location"; target: cube2Transform; property: "translation" }, - ChannelMapping { channelName: "Rotation"; target: cube2Transform; property: "rotation" }, - ChannelMapping { channelName: "Scaling"; target: cube2Transform; property: "scale3D" }, - ChannelMapping { channelName: "Diffuse Color"; target: cube2Transform; property: "diffuse" } - ] - } - } - ] - } - - Entity { - id: cube3 - - components: [ - Transform { - id: cube3Transform - translation: Qt.vector3d(2.5, 0, 2) - onTranslationChanged: console.log("t = " + translation) - }, - CuboidMesh { - }, - PhongMaterial { - id: cube3Material - ambient: Qt.rgba(0.8, 0.8, 0.8, 1.0) - diffuse: "green" - shininess: 50 - }, - ObjectPicker { - onClicked: blendedAnimator3.running = true - }, - BlendedClipAnimator { - id: blendedAnimator3 - loops: 2 - - onRunningChanged: console.log("running = " + running) - - blendTree: LerpBlend { - blendFactor: 0.5 - AdditiveBlend { - blendFactor: 0.5 - clips: [ - AnimationClip { - source: "pulsing-moving-cube.json" - onDurationChanged: console.log("duration = " + duration) - }, - AnimationClip { - source: "pulsing-cube-additive.json" - onDurationChanged: console.log("duration = " + duration) - }] - } - LerpBlend { - blendFactor: 0.5 - clips: [ - AnimationClip { - source: "cubeanimation.json" - onDurationChanged: console.log("duration = " + duration) - }, - AnimationClip { - source: "pulsing-moving-cube.json" - onDurationChanged: console.log("duration = " + duration) - }] - } - } - - // By default introspect parent Entity and try - // to map fcurve groups to properties of QTransform - // mapping: AutomaticAnimationMapping {} - - // To do more, we can be explicit - channelMapper: ChannelMapper { - mappings: [ - ChannelMapping { channelName: "Location"; target: cube3Transform; property: "translation" }, - ChannelMapping { channelName: "Rotation"; target: cube3Transform; property: "rotation" }, - ChannelMapping { channelName: "Scaling"; target: cube3Transform; property: "scale3D" }, - ChannelMapping { channelName: "Diffuse Color"; target: cube3Transform; property: "diffuse" } - ] - } - } - ] - } - - camera: Camera { position: Qt.vector3d(10, 3, 15) viewCenter: Qt.vector3d(2.5, 1, 0) diff --git a/tests/manual/buffercapture-qml/BufferSetterScene.qml b/tests/manual/buffercapture-qml/BufferSetterScene.qml index 06eb046a3..2b2b2a85a 100644 --- a/tests/manual/buffercapture-qml/BufferSetterScene.qml +++ b/tests/manual/buffercapture-qml/BufferSetterScene.qml @@ -94,7 +94,7 @@ Entity { objectName: "buffer" type: Buffer.VertexBuffer data: initGraphBuffer() - access: Buffer.ReadWrite + accessType: Buffer.ReadWrite } ComputeMaterial { diff --git a/tests/manual/lod/main.qml b/tests/manual/lod/main.qml index 0c03ff257..80547dcff 100644 --- a/tests/manual/lod/main.qml +++ b/tests/manual/lod/main.qml @@ -126,7 +126,7 @@ Entity { id: lod camera: camera thresholds: [1000, 600, 300, 180] - thresholdType: LevelOfDetail.ProjectedScreenPixelSize + thresholdType: LevelOfDetail.ProjectedScreenPixelSizeThreshold volumeOverride: lod.createBoundingSphere(Qt.vector3d(0, 0, 0), 2.0) } ] @@ -149,7 +149,7 @@ Entity { camera: camera thresholds: [20, 35, 50, 65] - thresholdType: LevelOfDetail.DistanceToCamera + thresholdType: LevelOfDetail.DistanceToCameraThreshold volumeOverride: lodLoader.createBoundingSphere(Qt.vector3d(0, 0, 0), -1) sources: ["qrc:/SphereEntity.qml", "qrc:/CylinderEntity.qml", "qrc:/ConeEntity.qml", "qrc:/CuboidEntity.qml"] } @@ -171,7 +171,7 @@ Entity { LevelOfDetailSwitch { camera: camera thresholds: [20, 35, 50, 65] - thresholdType: LevelOfDetail.DistanceToCamera + thresholdType: LevelOfDetail.DistanceToCameraThreshold } ] diff --git a/tests/manual/manual.pro b/tests/manual/manual.pro index a7fe4b90d..a5f07b55d 100644 --- a/tests/manual/manual.pro +++ b/tests/manual/manual.pro @@ -43,6 +43,7 @@ SUBDIRS += \ render-qml-to-texture-qml \ video-texture-qml \ animation-keyframe-simple \ + animation-keyframe-blendtree \ distancefieldtext \ mesh-morphing \ anim-viewer diff --git a/tests/manual/render-qml-to-texture-qml/main.qml b/tests/manual/render-qml-to-texture-qml/main.qml index c793078d3..748e14f6e 100644 --- a/tests/manual/render-qml-to-texture-qml/main.qml +++ b/tests/manual/render-qml-to-texture-qml/main.qml @@ -89,6 +89,10 @@ QQ2.Item { } } + + entities: [plane1] + grabMouse: plane1.picker.pressed + InteractiveGui { } @@ -97,6 +101,7 @@ QQ2.Item { FirstPersonCameraController { id: controller camera: camera + enabled: !plane1.picker.pressed } components: [ @@ -132,17 +137,6 @@ QQ2.Item { property ObjectPicker picker: ObjectPicker { hoverEnabled: true dragEnabled: true - eventForward: EventForward { - id: eventForward - target: qmlTexture - focus: true - } - onPressed: { - controller.enabled = false - } - onReleased: { - controller.enabled = true - } } components: [planeMesh, material, transform, picker] |