travel3dglobe 0.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Fabien
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,73 @@
1
+ # Travel3DGlobe
2
+
3
+ A reusable 3D globe component with a visual config editor that can export/import `globe-config.json`.
4
+
5
+ ## Editor App
6
+
7
+ Hosted editor (Vercel): `<VERCEL_APP_URL>`
8
+
9
+ This app lets you tune globe settings visually and export a config JSON for use in your own project.
10
+
11
+ ## Install
12
+
13
+ From npm:
14
+
15
+ ```bash
16
+ npm install <NPM_PACKAGE_NAME>
17
+ ```
18
+
19
+ From GitHub:
20
+
21
+ ```bash
22
+ npm install github:<GITHUB_USER>/<GITHUB_REPO>#<TAG_OR_BRANCH>
23
+ ```
24
+
25
+ ## Component Usage
26
+
27
+ ```js
28
+ import { createGlobe } from '<NPM_PACKAGE_NAME>';
29
+
30
+ const globe = await createGlobe({
31
+ container: document.getElementById('globe-root'),
32
+ config: {
33
+ highlightCodes: ['USA', 'CAN', 'MEX']
34
+ }
35
+ });
36
+
37
+ // optional runtime updates
38
+ await globe.setConfig({ showGrid: false, haloColor: '#33aaff' });
39
+
40
+ // optional: export current runtime config object
41
+ const cfg = globe.getConfig();
42
+
43
+ // required on unmount / cleanup
44
+ globe.destroy();
45
+ ```
46
+
47
+ Required:
48
+ - `container`: DOM element where the globe is mounted
49
+
50
+ Optional:
51
+ - `config`: partial globe config (missing fields use defaults)
52
+ - `enableDebugPanel`: `true | false` (default `true` in editor host usage)
53
+
54
+ Notes:
55
+ - Globe size follows the container size.
56
+ - Use CSS for responsive or fixed dimensions of the container.
57
+ - `globeScale` changes globe size inside the canvas, not the canvas size itself.
58
+
59
+ ## Project Structure
60
+
61
+ - `src/index.js`: package exports
62
+ - `src/core/globeComponent.js`: embeddable globe lifecycle/API
63
+ - `src/config/globeConfig.js`: config defaults + migration/normalization
64
+ - `src/debug/controls.js`: editor GUI
65
+ - `src/main.js`: editor/demo app entry
66
+
67
+ ## License
68
+
69
+ `<LICENSE_TYPE>` (for example `MIT`). See `LICENSE`.
70
+
71
+ ## Contributing
72
+
73
+ Contributions are welcome via issues and pull requests.