-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
31ad298
commit a9aa45e
Showing
5 changed files
with
81 additions
and
69 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>MapTiler 3D Models</title> | ||
<meta charset="utf-8" /> | ||
<meta | ||
name="viewport" | ||
content="initial-scale=1,maximum-scale=1,user-scalable=no" | ||
/> | ||
<script src="https://cdn.jsdelivr.net/npm/[email protected]"></script> | ||
<script src="https://mrdoob.github.io/stats.js/build/stats.min.js"></script> | ||
<script> | ||
window.addEventListener("load", () => { | ||
const stats = new Stats(); | ||
stats.dom.style.left = "unset"; | ||
stats.dom.style.right = 0; | ||
document.body.appendChild(stats.dom); | ||
requestAnimationFrame(function loop(){ | ||
stats.update(); | ||
requestAnimationFrame(loop) | ||
}); | ||
}); | ||
</script> | ||
<style> | ||
body { | ||
margin: 0; | ||
padding: 0; | ||
font-family: sans-serif; | ||
} | ||
|
||
#map { | ||
position: absolute; | ||
top: 0; | ||
bottom: 0; | ||
width: 100%; | ||
} | ||
|
||
.lil-gui.autoPlace { | ||
right: inherit; | ||
left: 15px; | ||
} | ||
</style> | ||
</head> | ||
|
||
<body> | ||
<div id="map"></div> | ||
<script type="module" src="../../src/demos/mountains.ts"></script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,51 +1,31 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<html lang="en"> | ||
<head> | ||
<title>MapTiler 3D Models</title> | ||
<meta charset="utf-8" /> | ||
<meta | ||
name="viewport" | ||
content="initial-scale=1,maximum-scale=1,user-scalable=no" | ||
<meta charset="UTF-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>Document</title> | ||
<link | ||
rel="stylesheet" | ||
href="https://cdn.jsdelivr.net/npm/water.css@2/out/water.css" | ||
/> | ||
<script src="https://cdn.jsdelivr.net/npm/[email protected]"></script> | ||
<script src="https://mrdoob.github.io/stats.js/build/stats.min.js"></script> | ||
<script> | ||
window.addEventListener("load", () => { | ||
const stats = new Stats(); | ||
stats.dom.style.left = "unset"; | ||
stats.dom.style.right = 0; | ||
document.body.appendChild(stats.dom); | ||
requestAnimationFrame(function loop(){ | ||
stats.update(); | ||
requestAnimationFrame(loop) | ||
}); | ||
}); | ||
</script> | ||
<style> | ||
body { | ||
margin: 0; | ||
padding: 0; | ||
font-family: sans-serif; | ||
} | ||
|
||
#map { | ||
position: absolute; | ||
top: 0; | ||
bottom: 0; | ||
width: 100%; | ||
/* width: 800px; | ||
height: 600px; */ | ||
} | ||
|
||
.lil-gui.autoPlace { | ||
right: inherit; | ||
left: 15px; | ||
} | ||
</style> | ||
</head> | ||
|
||
<body> | ||
<div id="map"></div> | ||
<script type="module" src="src/example.ts"></script> | ||
<h1>MapTiler 3D Examples</h1> | ||
<ul> | ||
<li> | ||
<a href="demos/mountains.html">Mountains</a> | ||
</li> | ||
<li><a href="demos/multi.html">Multi</a></li> | ||
<li><a href="demos/plane.html">Terrain</a></li> | ||
<li> | ||
<a href="demos/point_cad_model01.html">Point Cloud - CAD-like view</a> | ||
</li> | ||
<li> | ||
<a href="demos/point_cloud_dundee.html">Point Cloud - Dundee</a> | ||
</li> | ||
<li><a href="demos/point_cloud_NMH.html">Point Cloud - NMH</a></li> | ||
<li><a href="demos/point_cloud_shore.html">Point Cloud - Shore</a></li> | ||
</ul> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,7 @@ | ||
import type { GlobeTransform } from "maplibre-gl/src/geo/projection/globe_transform"; | ||
import type { Object3D, PointLight } from "three"; | ||
|
||
const isGlobeTransform = (transform: object): transform is GlobeTransform => { | ||
if ("isGlobeRendering" in transform) { | ||
return true; | ||
} | ||
|
||
return false; | ||
}; | ||
|
||
const isPointLight = (object3D: Object3D): object3D is PointLight => { | ||
return "isPointLight" in object3D && object3D.isPointLight === true; | ||
}; | ||
|
||
export { isGlobeTransform, isPointLight }; | ||
export { isPointLight }; |