From b2471725393e13c7e23ef4e34496598384672e28 Mon Sep 17 00:00:00 2001 From: Alexandre f26 Date: Fri, 21 Jul 2023 16:52:31 +0200 Subject: [PATCH 1/5] examples(Glb): load a glb on 3D map --- CONTRIBUTORS.md | 3 ++ examples/itowns_GLB.html | 92 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 95 insertions(+) create mode 100644 examples/itowns_GLB.html diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 835d010b51..fca198e284 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -45,6 +45,9 @@ The following people have contributed to iTowns. * [Diginove](http://diginove.com/index.php/fr/diginove-lexpertise-en-traitement-dimages/): * [Michel Benet](https://github.com/mbenevole) +* [Futurmap] (https://www.futurmap.com/) + * [Alexandre Calmels] (http://github.com/exareyn) + The following organizations are the current maintainers of iTowns: * IGN (http://www.ign.fr) * Ciril Group (https://www.cirilgroup.com/) diff --git a/examples/itowns_GLB.html b/examples/itowns_GLB.html new file mode 100644 index 0000000000..37f42537f0 --- /dev/null +++ b/examples/itowns_GLB.html @@ -0,0 +1,92 @@ + + + + Display a Glb/Gltf object with iTowns + + + + + + + + + +
+ + + + From 21a363c06bb3434b1b7da21e7442cfb8f9c9ad7f Mon Sep 17 00:00:00 2001 From: Alexandre f26 Date: Wed, 26 Jul 2023 16:04:49 +0200 Subject: [PATCH 2/5] examples(glb): add functional test --- examples/itowns_GLB.html | 4 ++-- test/functional/itowns_GLB.js | 15 +++++++++++++++ 2 files changed, 17 insertions(+), 2 deletions(-) create mode 100644 test/functional/itowns_GLB.js diff --git a/examples/itowns_GLB.html b/examples/itowns_GLB.html index 37f42537f0..2ace11eaee 100644 --- a/examples/itowns_GLB.html +++ b/examples/itowns_GLB.html @@ -64,8 +64,8 @@ "EPSG:4326", 4.829501189714537, 45.78510982365657 - ).as("EPSG:4978"); - model.position.set(coord.x, coord.y, coord.z); + ).as("EPSG:4978").toVector3(); + model.position.add(coord); // Set his own position to work with Itowns referencement object = model; diff --git a/test/functional/itowns_GLB.js b/test/functional/itowns_GLB.js new file mode 100644 index 0000000000..44f036ad22 --- /dev/null +++ b/test/functional/itowns_GLB.js @@ -0,0 +1,15 @@ +const assert = require('assert'); + +describe('itowns_GLB', function _() { + let result; + before(async () => { + result = await loadExample( + 'examples/itowns_GLB.html', + this.fullTitle(), + ); + }); + + it('should run', async () => { + assert.ok(result); + }); +}); From f69c0465c520c7d85ca52ff8aed255edc2f05bef Mon Sep 17 00:00:00 2001 From: Alexandre f26 Date: Thu, 27 Jul 2023 15:17:44 +0200 Subject: [PATCH 3/5] examples(glb): correct rotation and rename file --- examples/config.json | 3 +- .../{itowns_GLB.html => misc_gltf_model.html} | 32 +++++++++++-------- 2 files changed, 20 insertions(+), 15 deletions(-) rename examples/{itowns_GLB.html => misc_gltf_model.html} (79%) diff --git a/examples/config.json b/examples/config.json index 61406adb4d..02db85e80f 100644 --- a/examples/config.json +++ b/examples/config.json @@ -82,7 +82,8 @@ "misc_custom_controls": "Define custom controls", "misc_custom_label": "Custom label popup", "misc_camera_traveling": "Camera traveling", - "misc_instancing": "3D objects instancing" + "misc_instancing": "3D objects instancing", + "misc_gltf_model": "Load gltf/glb model" }, "Widgets": { diff --git a/examples/itowns_GLB.html b/examples/misc_gltf_model.html similarity index 79% rename from examples/itowns_GLB.html rename to examples/misc_gltf_model.html index 2ace11eaee..c1c9ade4d3 100644 --- a/examples/itowns_GLB.html +++ b/examples/misc_gltf_model.html @@ -14,20 +14,19 @@