commit 8a15068f2f2b7885be34320b93ee212a5ac91c5f
Author: root <root@hub.scroll.pub> Date: 2024-12-30 02:08:33 +0000 Subject: Initial commit diff --git a/body.html b/body.html new file mode 100644 index 0000000..cafb660 --- /dev/null +++ b/body.html @@ -0,0 +1,17 @@ +<header> + <h1>Cesium Globe Explorer</h1> + <p>Explore the world in 3D with Cesium's powerful globe visualization</p> +</header> + +<main> + <div id="cesiumContainer"></div> + <div class="controls"> + <button id="resetView">Reset View</button> + <button id="flyToParis">Fly to Paris</button> + <button id="flyToNewYork">Fly to New York</button> + </div> +</main> + +<footer> + <p>Interactive 3D globe powered by Cesium</p> +</footer> \ No newline at end of file diff --git a/index.scroll b/index.scroll new file mode 100644 index 0000000..86be896 --- /dev/null +++ b/index.scroll @@ -0,0 +1,8 @@ +buildHtml +baseUrl https://cesiumglobe.scroll.pub +metaTags +editButton /edit.html +title Cesium Globe Explorer +style.css +body.html +script.js \ No newline at end of file diff --git a/prompt.json b/prompt.json new file mode 100644 index 0000000..b806037 --- /dev/null +++ b/prompt.json @@ -0,0 +1,25 @@ +{ + "id": "83484841-0162-4811-a62b-530416e2a253", + "object": "chat.completion", + "created": 1735524500, + "model": "deepseek-chat", + "choices": [ + { + "index": 0, + "message": { + "role": "assistant", + "content": "---domain---\ncesiumglobe.scroll.pub\n---index.scroll---\nbuildHtml\nbaseUrl https://cesiumglobe.scroll.pub\nmetaTags\neditButton /edit.html\ntitle Cesium Globe Explorer\nstyle.css\nbody.html\nscript.js\n---body.html---\n<header>\n <h1>Cesium Globe Explorer</h1>\n <p>Explore the world in 3D with Cesium's powerful globe visualization</p>\n</header>\n\n<main>\n <div id=\"cesiumContainer\"></div>\n <div class=\"controls\">\n <button id=\"resetView\">Reset View</button>\n <button id=\"flyToParis\">Fly to Paris</button>\n <button id=\"flyToNewYork\">Fly to New York</button>\n </div>\n</main>\n\n<footer>\n <p>Interactive 3D globe powered by Cesium</p>\n</footer>\n---style.css---\n:root {\n --primary-color: #4CAF50;\n --secondary-color: #2196F3;\n --background-color: #1e1e1e;\n --text-color: #ffffff;\n}\n\nbody {\n margin: 0;\n font-family: 'Segoe UI', system-ui, sans-serif;\n background-color: var(--background-color);\n color: var(--text-color);\n line-height: 1.6;\n}\n\nheader {\n text-align: center;\n padding: 2rem;\n background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));\n}\n\nh1 {\n font-size: 2.5rem;\n margin-bottom: 0.5rem;\n}\n\n#cesiumContainer {\n width: 100%;\n height: 75vh;\n position: relative;\n margin: 0 auto;\n border: 2px solid var(--primary-color);\n border-radius: 8px;\n overflow: hidden;\n}\n\n.controls {\n display: flex;\n justify-content: center;\n gap: 1rem;\n padding: 1rem;\n}\n\nbutton {\n padding: 0.8rem 1.5rem;\n border: none;\n border-radius: 4px;\n background-color: var(--secondary-color);\n color: white;\n cursor: pointer;\n transition: background-color 0.3s ease;\n}\n\nbutton:hover {\n background-color: var(--primary-color);\n}\n\nfooter {\n text-align: center;\n padding: 1rem;\n background-color: rgba(0, 0, 0, 0.2);\n}\n\n@media (max-width: 768px) {\n h1 {\n font-size: 2rem;\n }\n \n #cesiumContainer {\n height: 60vh;\n }\n \n .controls {\n flex-direction: column;\n align-items: center;\n }\n}\n---script.js---\n// Initialize Cesium Viewer\nconst viewer = new Cesium.Viewer('cesiumContainer', {\n terrainProvider: Cesium.createWorldTerrain()\n});\n\n// Set initial view\nviewer.camera.setView({\n destination: Cesium.Cartesian3.fromDegrees(0, 0, 10000000)\n});\n\n// Add event listeners for controls\ndocument.getElementById('resetView').addEventListener('click', () => {\n viewer.camera.setView({\n destination: Cesium.Cartesian3.fromDegrees(0, 0, 10000000)\n });\n});\n\ndocument.getElementById('flyToParis').addEventListener('click', () => {\n viewer.camera.flyTo({\n destination: Cesium.Cartesian3.fromDegrees(2.3522, 48.8566, 2000)\n });\n});\n\ndocument.getElementById('flyToNewYork').addEventListener('click', () => {\n viewer.camera.flyTo({\n destination: Cesium.Cartesian3.fromDegrees(-74.006, 40.7128, 2000)\n });\n});\n\n// Add basic lighting\nviewer.scene.globe.enableLighting = true;\n\n// Add imagery layer\nviewer.imageryLayers.addImageryProvider(\n new Cesium.IonImageryProvider({ assetId: 3812 })\n);\n\n// Add terrain\nviewer.terrainProvider = Cesium.createWorldTerrain();\n---end---" + }, + "logprobs": null, + "finish_reason": "stop" + } + ], + "usage": { + "prompt_tokens": 240, + "completion_tokens": 919, + "total_tokens": 1159, + "prompt_cache_hit_tokens": 0, + "prompt_cache_miss_tokens": 240 + }, + "system_fingerprint": "fp_f1afce2943" +} \ No newline at end of file diff --git a/readme.scroll b/readme.scroll new file mode 100644 index 0000000..6d79acb --- /dev/null +++ b/readme.scroll @@ -0,0 +1,2 @@ +# cesiumglobe.scroll.pub +Website generated by DeepSeek from prompt: create a website with cesium \ No newline at end of file diff --git a/script.js b/script.js new file mode 100644 index 0000000..9465334 --- /dev/null +++ b/script.js @@ -0,0 +1,39 @@ +// Initialize Cesium Viewer +const viewer = new Cesium.Viewer('cesiumContainer', { + terrainProvider: Cesium.createWorldTerrain() +}); + +// Set initial view +viewer.camera.setView({ + destination: Cesium.Cartesian3.fromDegrees(0, 0, 10000000) +}); + +// Add event listeners for controls +document.getElementById('resetView').addEventListener('click', () => { + viewer.camera.setView({ + destination: Cesium.Cartesian3.fromDegrees(0, 0, 10000000) + }); +}); + +document.getElementById('flyToParis').addEventListener('click', () => { + viewer.camera.flyTo({ + destination: Cesium.Cartesian3.fromDegrees(2.3522, 48.8566, 2000) + }); +}); + +document.getElementById('flyToNewYork').addEventListener('click', () => { + viewer.camera.flyTo({ + destination: Cesium.Cartesian3.fromDegrees(-74.006, 40.7128, 2000) + }); +}); + +// Add basic lighting +viewer.scene.globe.enableLighting = true; + +// Add imagery layer +viewer.imageryLayers.addImageryProvider( + new Cesium.IonImageryProvider({ assetId: 3812 }) +); + +// Add terrain +viewer.terrainProvider = Cesium.createWorldTerrain(); \ No newline at end of file diff --git a/style.css b/style.css new file mode 100644 index 0000000..189a63b --- /dev/null +++ b/style.css @@ -0,0 +1,77 @@ +:root { + --primary-color: #4CAF50; + --secondary-color: #2196F3; + --background-color: #1e1e1e; + --text-color: #ffffff; +} + +body { + margin: 0; + font-family: 'Segoe UI', system-ui, sans-serif; + background-color: var(--background-color); + color: var(--text-color); + line-height: 1.6; +} + +header { + text-align: center; + padding: 2rem; + background: linear-gradient(45deg, var(--primary-color), var(--secondary-color)); +} + +h1 { + font-size: 2.5rem; + margin-bottom: 0.5rem; +} + +#cesiumContainer { + width: 100%; + height: 75vh; + position: relative; + margin: 0 auto; + border: 2px solid var(--primary-color); + border-radius: 8px; + overflow: hidden; +} + +.controls { + display: flex; + justify-content: center; + gap: 1rem; + padding: 1rem; +} + +button { + padding: 0.8rem 1.5rem; + border: none; + border-radius: 4px; + background-color: var(--secondary-color); + color: white; + cursor: pointer; + transition: background-color 0.3s ease; +} + +button:hover { + background-color: var(--primary-color); +} + +footer { + text-align: center; + padding: 1rem; + background-color: rgba(0, 0, 0, 0.2); +} + +@media (max-width: 768px) { + h1 { + font-size: 2rem; + } + + #cesiumContainer { + height: 60vh; + } + + .controls { + flex-direction: column; + align-items: center; + } +} \ No newline at end of file