Commit c2dfd0f5 authored by Alessandro Portale's avatar Alessandro Portale

Update Canvas3D application wizard to Qt 5.7 level

Upgraded r74 three.js port, which is compatible with Qt 5.6 and Qt 5.7.

Some three.js features require Canvas3D 1.1 API,
so increased the import version in the template.

Change-Id: I1ae37237073d4149f56c1d93579b20a576496e33
Reviewed-by: default avatarMiikka Heikkinen <miikka.heikkinen@theqtcompany.com>
Reviewed-by: default avatarEike Ziller <eike.ziller@theqtcompany.com>
Reviewed-by: default avatarAlessandro Portale <alessandro.portale@theqtcompany.com>
parent 8cfef965
import QtQuick 2.4
import QtCanvas3D 1.0
import QtCanvas3D 1.1
import QtQuick.Window 2.2
import "glcode.js" as GLCode
......
......@@ -9,7 +9,6 @@ function initializeGL(canvas) {
camera.position.z = 5;
var material = new THREE.MeshBasicMaterial({ color: 0x80c342,
ambient: 0x000000,
shading: THREE.SmoothShading });
var cubeGeometry = new THREE.BoxGeometry(1, 1, 1);
cube = new THREE.Mesh(cubeGeometry, material);
......
......@@ -7,7 +7,7 @@
"trDisplayName": "Qt Canvas 3D Application",
"trDisplayCategory": "Application",
"icon": "3dapplication.png",
"featuresRequired": [ "QtSupport.Wizards.FeatureQtCanvas3d" ],
"featuresRequired": [ "QtSupport.Wizards.FeatureQtCanvas3d1.1" ],
"enabled": "%{JS: [ %{Plugins} ].indexOf('QmakeProjectManager') >= 0}",
"options":
......
......@@ -441,10 +441,10 @@ QSet<Id> BaseQtVersion::availableFeatures() const
return features;
features.insert(Constants::FEATURE_QT_3D);
features.insert(Constants::FEATURE_QT_CANVAS3D);
features.unite(versionedIds(Constants::FEATURE_QT_QUICK_PREFIX, 2, 5));
features.unite(versionedIds(Constants::FEATURE_QT_QUICK_CONTROLS_PREFIX, 1, 4));
features.unite(versionedIds(Constants::FEATURE_QT_CANVAS3D_PREFIX, 1, 0));
if (qtVersion().matches(5, 5))
return features;
......@@ -452,6 +452,7 @@ QSet<Id> BaseQtVersion::availableFeatures() const
features.unite(versionedIds(Constants::FEATURE_QT_QUICK_PREFIX, 2, 6));
features.unite(versionedIds(Constants::FEATURE_QT_QUICK_CONTROLS_PREFIX, 1, 5));
features.unite(versionedIds(Constants::FEATURE_QT_LABS_CONTROLS_PREFIX, 1, 0));
features.unite(versionedIds(Constants::FEATURE_QT_CANVAS3D_PREFIX, 1, 1));
if (qtVersion().matches(5, 6))
return features;
......
......@@ -54,7 +54,7 @@ const char FEATURE_QT_LABS_CONTROLS_PREFIX[] = "QtSupport.Wizards.FeatureQt.labs
const char FEATURE_QT_QUICK_UI_FILES[] = "QtSupport.Wizards.FeatureQtQuick.UiFiles";
const char FEATURE_QT_WEBKIT[] = "QtSupport.Wizards.FeatureQtWebkit";
const char FEATURE_QT_3D[] = "QtSupport.Wizards.FeatureQt3d";
const char FEATURE_QT_CANVAS3D[] = "QtSupport.Wizards.FeatureQtCanvas3d";
const char FEATURE_QT_CANVAS3D_PREFIX[] = "QtSupport.Wizards.FeatureQtCanvas3d";
const char FEATURE_QT_CONSOLE[] = "QtSupport.Wizards.FeatureQtConsole";
const char FEATURE_MOBILE[] = "QtSupport.Wizards.FeatureMobile";
const char FEATURE_DESKTOP[] = "QtSupport.Wizards.FeatureDesktop";
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment