From 536842f76f85841ff1bbdf5e34d28c0efc50709a Mon Sep 17 00:00:00 2001 From: Alexandre CUER Date: Sun, 1 Nov 2026 20:38:30 +0100 Subject: [PATCH 1/4] add three.js modules in the vendor folder --- lib/modules/components/idf-viewer.js | 4 +- vendor/README.md | 18 + vendor/three/build/three.module.js | 667 +++++++++++++ .../examples/jsm/controls/OrbitControls.js | 931 ++++++++++++++++++ .../examples/jsm/loaders/ColladaLoaders.js | 711 +++++++++++++ .../three/examples/jsm/loaders/TGALoader.js | 849 ++++++++++++++++ 6 files changed, 3178 insertions(+), 2 deletions(-) create mode 100644 vendor/README.md create mode 100644 vendor/three/build/three.module.js create mode 100644 vendor/three/examples/jsm/controls/OrbitControls.js create mode 100644 vendor/three/examples/jsm/loaders/ColladaLoaders.js create mode 100644 vendor/three/examples/jsm/loaders/TGALoader.js diff --git a/lib/modules/components/idf-viewer.js b/lib/modules/components/idf-viewer.js index c0dd4e3..99c071b 100644 --- a/lib/modules/components/idf-viewer.js +++ b/lib/modules/components/idf-viewer.js @@ -17,9 +17,9 @@ * Attributs : src, color-mode, no-toolbar, no-legend, no-grid * Événements : "idf-loaded" (detail: { model }), "idf-error" (detail: { error }) */ +import * as THREE from '/vendor/three/build/three.module.js'; -import * as THREE from 'https://cdn.jsdelivr.net/npm/three@0.170.0/+esm'; -import { OrbitControls } from 'https://cdn.jsdelivr.net/npm/three@0.170.0/examples/jsm/controls/OrbitControls.js/+esm'; +import { OrbitControls } from '/vendor/three/examples/jsm/controls/OrbitControls.js'; import { parseGeometryIDF } from './idf-parser.js'; import { buildPolygonGeometry, polygonNormal } from './idf-geometry.js'; import { t } from "../locales/locales.js"; diff --git a/vendor/README.md b/vendor/README.md new file mode 100644 index 0000000..a57f16a --- /dev/null +++ b/vendor/README.md @@ -0,0 +1,18 @@ +# modules three.js + +A way to import three.js is through cdn + +```js +import * as THREE from 'https://cdn.jsdelivr.net/npm/three@0.170.0/+esm'; +import { OrbitControls } from 'https://cdn.jsdelivr.net/npm/three@0.170.0/examples/jsm/controls/OrbitControls.js/+esm'; +``` + +## controls + +https://github.com/mrdoob/three.js/blob/dev/examples/jsm/controls/OrbitControls.js + +## loaders + +https://github.com/mrdoob/three.js/blob/dev/examples/jsm/loaders/ColladaLoader.js + +https://github.com/mrdoob/three.js/blob/dev/examples/jsm/loaders/TGALoader.js \ No newline at end of file diff --git a/vendor/three/build/three.module.js b/vendor/three/build/three.module.js new file mode 100644 index 0000000..22acb00 --- /dev/null +++ b/vendor/three/build/three.module.js @@ -0,0 +1,667 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + three.js/build/three.module.js at dev · mrdoob/three.js · GitHub + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + +
+ Skip to content + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + +
+
+ + + + +
+ +
+ + + + + + + + +
+ + + + + + + +
+ + + + + + + + + +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + +

Latest commit

 

History

History
19537 lines (12022 loc) · 643 KB

three.module.js

File metadata and controls

19537 lines (12022 loc) · 643 KB
+
+ + + + +
+ +
+ +
+
+ +
+ +
+

Footer

+ + + + +
+
+ + + + + © 2026 GitHub, Inc. + +
+ + +
+
+ + + + + + + + + + + + + + + + + + + + +
+
+
+ + + diff --git a/vendor/three/examples/jsm/controls/OrbitControls.js b/vendor/three/examples/jsm/controls/OrbitControls.js new file mode 100644 index 0000000..b179ce5 --- /dev/null +++ b/vendor/three/examples/jsm/controls/OrbitControls.js @@ -0,0 +1,931 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + three.js/examples/jsm/controls/OrbitControls.js at dev · mrdoob/three.js · GitHub + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + +
+ Skip to content + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + +
+
+ + + + +
+ +
+ + + + + + + + +
+ + + + + + + +
+ + + + + + + + + +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + +

Latest commit

 

History

History
1985 lines (1254 loc) · 40 KB

OrbitControls.js

File metadata and controls

1985 lines (1254 loc) · 40 KB
+
+ + + + +
+ +
+ +
+
+ +
+ +
+

Footer

+ + + + +
+
+ + + + + © 2026 GitHub, Inc. + +
+ + +
+
+ + + + + + + + + + + + + + + + + + + + +
+
+
+ + + diff --git a/vendor/three/examples/jsm/loaders/ColladaLoaders.js b/vendor/three/examples/jsm/loaders/ColladaLoaders.js new file mode 100644 index 0000000..001cef0 --- /dev/null +++ b/vendor/three/examples/jsm/loaders/ColladaLoaders.js @@ -0,0 +1,711 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + three.js/examples/jsm/loaders/ColladaLoader.js at dev · mrdoob/three.js · GitHub + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + +
+ Skip to content + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + +
+
+ + + + +
+ +
+ + + + + + + + +
+ + + + + + + +
+ + + + + + + + + +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + +

Latest commit

 

History

History
161 lines (117 loc) · 4.24 KB

ColladaLoader.js

File metadata and controls

161 lines (117 loc) · 4.24 KB
+
+ + + + +
+ +
+ +
+
+ +
+ +
+

Footer

+ + + + +
+
+ + + + + © 2026 GitHub, Inc. + +
+ + +
+
+ + + + + + + + + + + + + + + + + + + + +
+
+
+ + + diff --git a/vendor/three/examples/jsm/loaders/TGALoader.js b/vendor/three/examples/jsm/loaders/TGALoader.js new file mode 100644 index 0000000..fec331c --- /dev/null +++ b/vendor/three/examples/jsm/loaders/TGALoader.js @@ -0,0 +1,849 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + three.js/examples/jsm/loaders/TGALoader.js at dev · mrdoob/three.js · GitHub + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + +
+ Skip to content + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + +
+
+ + + + +
+ +
+ + + + + + + + +
+ + + + + + + +
+ + + + + + + + + +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + +

Latest commit

 

History

History
539 lines (357 loc) · 11.6 KB

TGALoader.js

File metadata and controls

539 lines (357 loc) · 11.6 KB
+
+ + + + +
+ +
+ +
+
+ +
+ +
+

Footer

+ + + + +
+
+ + + + + © 2026 GitHub, Inc. + +
+ + +
+
+ + + + + + + + + + + + + + + + + + + + +
+
+
+ + + From fd80b7560bb3b500c0d4fc169daa4eb4d0d980f6 Mon Sep 17 00:00:00 2001 From: Alexandre CUER Date: Sun, 1 Nov 2026 20:46:17 +0100 Subject: [PATCH 2/4] use version number --- lib/modules/components/idf-viewer.js | 4 ++-- vendor/README.md | 2 ++ vendor/three/{ => r187}/build/three.module.js | 0 .../three/{ => r187}/examples/jsm/controls/OrbitControls.js | 0 .../three/{ => r187}/examples/jsm/loaders/ColladaLoaders.js | 0 vendor/three/{ => r187}/examples/jsm/loaders/TGALoader.js | 0 6 files changed, 4 insertions(+), 2 deletions(-) rename vendor/three/{ => r187}/build/three.module.js (100%) rename vendor/three/{ => r187}/examples/jsm/controls/OrbitControls.js (100%) rename vendor/three/{ => r187}/examples/jsm/loaders/ColladaLoaders.js (100%) rename vendor/three/{ => r187}/examples/jsm/loaders/TGALoader.js (100%) diff --git a/lib/modules/components/idf-viewer.js b/lib/modules/components/idf-viewer.js index 99c071b..058217f 100644 --- a/lib/modules/components/idf-viewer.js +++ b/lib/modules/components/idf-viewer.js @@ -17,9 +17,9 @@ * Attributs : src, color-mode, no-toolbar, no-legend, no-grid * Événements : "idf-loaded" (detail: { model }), "idf-error" (detail: { error }) */ -import * as THREE from '/vendor/three/build/three.module.js'; +import * as THREE from '/vendor/three/r187/build/three.module.js'; -import { OrbitControls } from '/vendor/three/examples/jsm/controls/OrbitControls.js'; +import { OrbitControls } from '/vendor/three/r187/examples/jsm/controls/OrbitControls.js'; import { parseGeometryIDF } from './idf-parser.js'; import { buildPolygonGeometry, polygonNormal } from './idf-geometry.js'; import { t } from "../locales/locales.js"; diff --git a/vendor/README.md b/vendor/README.md index a57f16a..06b6c63 100644 --- a/vendor/README.md +++ b/vendor/README.md @@ -7,6 +7,8 @@ import * as THREE from 'https://cdn.jsdelivr.net/npm/three@0.170.0/+esm'; import { OrbitControls } from 'https://cdn.jsdelivr.net/npm/three@0.170.0/examples/jsm/controls/OrbitControls.js/+esm'; ``` + + ## controls https://github.com/mrdoob/three.js/blob/dev/examples/jsm/controls/OrbitControls.js diff --git a/vendor/three/build/three.module.js b/vendor/three/r187/build/three.module.js similarity index 100% rename from vendor/three/build/three.module.js rename to vendor/three/r187/build/three.module.js diff --git a/vendor/three/examples/jsm/controls/OrbitControls.js b/vendor/three/r187/examples/jsm/controls/OrbitControls.js similarity index 100% rename from vendor/three/examples/jsm/controls/OrbitControls.js rename to vendor/three/r187/examples/jsm/controls/OrbitControls.js diff --git a/vendor/three/examples/jsm/loaders/ColladaLoaders.js b/vendor/three/r187/examples/jsm/loaders/ColladaLoaders.js similarity index 100% rename from vendor/three/examples/jsm/loaders/ColladaLoaders.js rename to vendor/three/r187/examples/jsm/loaders/ColladaLoaders.js diff --git a/vendor/three/examples/jsm/loaders/TGALoader.js b/vendor/three/r187/examples/jsm/loaders/TGALoader.js similarity index 100% rename from vendor/three/examples/jsm/loaders/TGALoader.js rename to vendor/three/r187/examples/jsm/loaders/TGALoader.js From 0b414363f282c1c1e554d0b645a6b0e6b3d763e7 Mon Sep 17 00:00:00 2001 From: Alexandre CUER Date: Sun, 1 Nov 2026 21:21:18 +0100 Subject: [PATCH 3/4] utilisation importmap et correction erreur de version r170 et non r187 --- _layouts/default.html | 8 + lib/modules/components/idf-viewer.js | 4 +- vendor/README.md | 20 - vendor/three/README.md | 18 + vendor/three/r170/build/three.module.js | 54571 ++++++++++++++++ .../examples/jsm/controls/OrbitControls.js | 1985 + vendor/three/r187/build/three.module.js | 667 - .../examples/jsm/controls/OrbitControls.js | 931 - .../examples/jsm/loaders/ColladaLoaders.js | 711 - .../r187/examples/jsm/loaders/TGALoader.js | 849 - 10 files changed, 56584 insertions(+), 3180 deletions(-) delete mode 100644 vendor/README.md create mode 100644 vendor/three/README.md create mode 100644 vendor/three/r170/build/three.module.js create mode 100644 vendor/three/r170/examples/jsm/controls/OrbitControls.js delete mode 100644 vendor/three/r187/build/three.module.js delete mode 100644 vendor/three/r187/examples/jsm/controls/OrbitControls.js delete mode 100644 vendor/three/r187/examples/jsm/loaders/ColladaLoaders.js delete mode 100644 vendor/three/r187/examples/jsm/loaders/TGALoader.js diff --git a/_layouts/default.html b/_layouts/default.html index 8b876cc..2af8e43 100644 --- a/_layouts/default.html +++ b/_layouts/default.html @@ -16,6 +16,14 @@

+ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - three.js/build/three.module.js at dev · mrdoob/three.js · GitHub - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - -
- Skip to content - - - - - - - - - - - - -
-
- - - - - - - - - - - - - - - -
-
- - - - - - - - - - - - - - - - - - - -
-
- - - - -
- -
- - - - - - - - -
- - - - - - - -
- - - - - - - - - -
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - -

Latest commit

 

History

History
19537 lines (12022 loc) · 643 KB

three.module.js

File metadata and controls

19537 lines (12022 loc) · 643 KB
-
- - - - -
- -
- -
-
- -
- -
-

Footer

- - - - -
-
- - - - - © 2026 GitHub, Inc. - -
- - -
-
- - - - - - - - - - - - - - - - - - - - -
-
-
- - - diff --git a/vendor/three/r187/examples/jsm/controls/OrbitControls.js b/vendor/three/r187/examples/jsm/controls/OrbitControls.js deleted file mode 100644 index b179ce5..0000000 --- a/vendor/three/r187/examples/jsm/controls/OrbitControls.js +++ /dev/null @@ -1,931 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - three.js/examples/jsm/controls/OrbitControls.js at dev · mrdoob/three.js · GitHub - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - -
- Skip to content - - - - - - - - - - - - -
-
- - - - - - - - - - - - - - - -
-
- - - - - - - - - - - - - - - - - - - -
-
- - - - -
- -
- - - - - - - - -
- - - - - - - -
- - - - - - - - - -
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - -

Latest commit

 

History

History
1985 lines (1254 loc) · 40 KB

OrbitControls.js

File metadata and controls

1985 lines (1254 loc) · 40 KB
-
- - - - -
- -
- -
-
- -
- -
-

Footer

- - - - -
-
- - - - - © 2026 GitHub, Inc. - -
- - -
-
- - - - - - - - - - - - - - - - - - - - -
-
-
- - - diff --git a/vendor/three/r187/examples/jsm/loaders/ColladaLoaders.js b/vendor/three/r187/examples/jsm/loaders/ColladaLoaders.js deleted file mode 100644 index 001cef0..0000000 --- a/vendor/three/r187/examples/jsm/loaders/ColladaLoaders.js +++ /dev/null @@ -1,711 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - three.js/examples/jsm/loaders/ColladaLoader.js at dev · mrdoob/three.js · GitHub - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - -
- Skip to content - - - - - - - - - - - - -
-
- - - - - - - - - - - - - - - -
-
- - - - - - - - - - - - - - - - - - - -
-
- - - - -
- -
- - - - - - - - -
- - - - - - - -
- - - - - - - - - -
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - -

Latest commit

 

History

History
161 lines (117 loc) · 4.24 KB

ColladaLoader.js

File metadata and controls

161 lines (117 loc) · 4.24 KB
-
- - - - -
- -
- -
-
- -
- -
-

Footer

- - - - -
-
- - - - - © 2026 GitHub, Inc. - -
- - -
-
- - - - - - - - - - - - - - - - - - - - -
-
-
- - - diff --git a/vendor/three/r187/examples/jsm/loaders/TGALoader.js b/vendor/three/r187/examples/jsm/loaders/TGALoader.js deleted file mode 100644 index fec331c..0000000 --- a/vendor/three/r187/examples/jsm/loaders/TGALoader.js +++ /dev/null @@ -1,849 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - three.js/examples/jsm/loaders/TGALoader.js at dev · mrdoob/three.js · GitHub - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - -
- Skip to content - - - - - - - - - - - - -
-
- - - - - - - - - - - - - - - -
-
- - - - - - - - - - - - - - - - - - - -
-
- - - - -
- -
- - - - - - - - -
- - - - - - - -
- - - - - - - - - -
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - -

Latest commit

 

History

History
539 lines (357 loc) · 11.6 KB

TGALoader.js

File metadata and controls

539 lines (357 loc) · 11.6 KB
-
- - - - -
- -
- -
-
- -
- -
-

Footer

- - - - -
-
- - - - - © 2026 GitHub, Inc. - -
- - -
-
- - - - - - - - - - - - - - - - - - - - -
-
-
- - - From fca4b08ae033ffc1bff14b69ae50da6535663fac Mon Sep 17 00:00:00 2001 From: Alexandre CUER Date: Sun, 1 Nov 2026 21:24:44 +0100 Subject: [PATCH 4/4] correctif README --- vendor/three/README.md | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/vendor/three/README.md b/vendor/three/README.md index 084d9df..f959e17 100644 --- a/vendor/three/README.md +++ b/vendor/three/README.md @@ -1,12 +1,4 @@ -# modules three.js - -A way to import three.js is through cdn - -```js -import * as THREE from 'https://cdn.jsdelivr.net/npm/three@0.170.0/+esm'; -import { OrbitControls } from 'https://cdn.jsdelivr.net/npm/three@0.170.0/examples/jsm/controls/OrbitControls.js/+esm'; -``` - +# three.js ## module, controls and loaders @@ -16,3 +8,10 @@ wget https://raw.githubusercontent.com/mrdoob/three.js/refs/tags/r170/examples/j wget https://raw.githubusercontent.com/mrdoob/three.js/refs/tags/r170/examples/jsm/loaders/ColladaLoader.js -O ./r170/examples/jsm/loaders/ColladaLoader.js wget https://raw.githubusercontent.com/mrdoob/three.js/refs/tags/r170/examples/jsm/loaders/TGALoader.js -O ./r170/examples/jsm/loaders/TGALoader.js ``` + +The initial way was to import `three.js`through cdn + +```js +import * as THREE from 'https://cdn.jsdelivr.net/npm/three@0.170.0/+esm'; +import { OrbitControls } from 'https://cdn.jsdelivr.net/npm/three@0.170.0/examples/jsm/controls/OrbitControls.js/+esm'; +``` \ No newline at end of file