diff options
Diffstat (limited to 'examples')
-rw-r--r-- | examples/qt3d/planets-qml/PlanetMaterial.qml | 6 | ||||
-rw-r--r-- | examples/qt3d/planets-qml/SolarSystem.qml | 5 |
2 files changed, 8 insertions, 3 deletions
diff --git a/examples/qt3d/planets-qml/PlanetMaterial.qml b/examples/qt3d/planets-qml/PlanetMaterial.qml index 4d50aee8d..309acf24d 100644 --- a/examples/qt3d/planets-qml/PlanetMaterial.qml +++ b/examples/qt3d/planets-qml/PlanetMaterial.qml @@ -115,7 +115,8 @@ Material { TextureImage { id: specularTextureImage // Get rid of runtime warnings. It's safe, as the texture just isn't used - source: specularMap !== "" ? specularMap : "qrc:/images/uranusmap.jpg" + source: specularMap !== "" ? specularMap + : "qrc:/images/solarsystemscope/uranusmap.jpg" } } }, @@ -133,7 +134,8 @@ Material { TextureImage { id: normalTextureImage // Get rid of runtime warnings. It's safe, as the texture just isn't used - source: normalMap !== "" ? normalMap : "qrc:/images/uranusmap.jpg" + source: normalMap !== "" ? normalMap + : "qrc:/images/solarsystemscope/uranusmap.jpg" } } }, diff --git a/examples/qt3d/planets-qml/SolarSystem.qml b/examples/qt3d/planets-qml/SolarSystem.qml index 3a717e62a..8c0cfccd4 100644 --- a/examples/qt3d/planets-qml/SolarSystem.qml +++ b/examples/qt3d/planets-qml/SolarSystem.qml @@ -395,7 +395,10 @@ Entity { var v = Math.atan2(yv, xv) // Calculate the distance (radius) - var r = Math.hypot(xv, yv) + // TODO: Math.hypot() is ES6 and QML JS is only ES5 currently. A patch to QtQml is + // required to get Math.hypot() to work. + //var r = Math.hypot(xv, yv) + var r = Math.sqrt(Math.pow(xv, 2) + Math.pow(yv, 2)) // From http://www.davidcolarusso.com/astro/ // Modified to compensate for the right handed coordinate system of OpenGL |