mirror of
https://github.com/openglobus/openglobus.git
synced 2025-12-08 19:25:27 +00:00
Adding skybox example
This commit is contained in:
parent
0d633f0c60
commit
8829440dd0
BIN
sandbox/skyBox/nx.webp
Normal file
BIN
sandbox/skyBox/nx.webp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 174 KiB |
BIN
sandbox/skyBox/ny.webp
Normal file
BIN
sandbox/skyBox/ny.webp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 110 KiB |
BIN
sandbox/skyBox/nz.webp
Normal file
BIN
sandbox/skyBox/nz.webp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 175 KiB |
BIN
sandbox/skyBox/px.webp
Normal file
BIN
sandbox/skyBox/px.webp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 154 KiB |
BIN
sandbox/skyBox/py.webp
Normal file
BIN
sandbox/skyBox/py.webp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 105 KiB |
BIN
sandbox/skyBox/pz.webp
Normal file
BIN
sandbox/skyBox/pz.webp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 156 KiB |
23
sandbox/skyBox/skyBox.html
Normal file
23
sandbox/skyBox/skyBox.html
Normal file
@ -0,0 +1,23 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title>OpenGlobus SkyBox Example</title>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<script src="./skyBox.js" type="module"></script>
|
||||
<link rel="stylesheet" href="../../css/og.css" type="text/css" />
|
||||
<style>
|
||||
body {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
font-family: Arial, sans-serif;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="earth" style="position: absolute; width: 100%; height: 100%"></div>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
28
sandbox/skyBox/skyBox.js
Normal file
28
sandbox/skyBox/skyBox.js
Normal file
@ -0,0 +1,28 @@
|
||||
import {
|
||||
Globe,
|
||||
LonLat,
|
||||
OpenStreetMap,
|
||||
scene,
|
||||
control
|
||||
} from "../../lib/og.es.js";
|
||||
|
||||
const skybox = new scene.SkyBox({
|
||||
px: "./px.webp",
|
||||
nx: "./nx.webp",
|
||||
py: "./py.webp",
|
||||
ny: "./ny.webp",
|
||||
pz: "./pz.webp",
|
||||
nz: "./nz.webp"
|
||||
});
|
||||
|
||||
const globus = new Globe({
|
||||
target: "earth",
|
||||
name: "Earth",
|
||||
layers: [new OpenStreetMap()],
|
||||
atmosphereEnabled: true,
|
||||
skybox: skybox,
|
||||
controls: [
|
||||
new control.MouseNavigation({ minSlope: 0.35 }),
|
||||
new control.KeyboardNavigation({ autoActivate: true })
|
||||
]
|
||||
})
|
||||
Loading…
x
Reference in New Issue
Block a user