Skip to content

Commit

Permalink
Release
Browse files Browse the repository at this point in the history
  • Loading branch information
tentone committed Jul 10, 2023
1 parent 8f8812d commit 80ebd36
Show file tree
Hide file tree
Showing 35 changed files with 420 additions and 392 deletions.
9 changes: 9 additions & 0 deletions build/geo-three.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,9 @@ class MapNode extends three.Mesh {
try {
const material = self.material;
material.dispose();
if (material.map && material.map !== MapNode.defaultTexture) {
material.map.dispose();
}
}
catch (e) { }
try {
Expand Down Expand Up @@ -823,6 +826,12 @@ class MapHeightNodeShader extends MapHeightNode {
this.geometry = MapHeightNodeShader.geometry;
}
}
dispose() {
super.dispose();
if (this.material.userData.heightMap.value && this.material.userData.heightMap.value !== MapHeightNodeShader.defaultHeightTexture) {
this.material.userData.heightMap.value.dispose();
}
}
}
MapHeightNodeShader.defaultHeightTexture = TextureUtils.createFillTexture('#0186C0');
MapHeightNodeShader.geometrySize = 256;
Expand Down
9 changes: 9 additions & 0 deletions build/geo-three.js
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,9 @@
try {
const material = self.material;
material.dispose();
if (material.map && material.map !== MapNode.defaultTexture) {
material.map.dispose();
}
}
catch (e) { }
try {
Expand Down Expand Up @@ -825,6 +828,12 @@
this.geometry = MapHeightNodeShader.geometry;
}
}
dispose() {
super.dispose();
if (this.material.userData.heightMap.value && this.material.userData.heightMap.value !== MapHeightNodeShader.defaultHeightTexture) {
this.material.userData.heightMap.value.dispose();
}
}
}
MapHeightNodeShader.defaultHeightTexture = TextureUtils.createFillTexture('#0186C0');
MapHeightNodeShader.geometrySize = 256;
Expand Down
9 changes: 9 additions & 0 deletions build/geo-three.module.js
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,9 @@ class MapNode extends Mesh {
try {
const material = self.material;
material.dispose();
if (material.map && material.map !== MapNode.defaultTexture) {
material.map.dispose();
}
}
catch (e) { }
try {
Expand Down Expand Up @@ -821,6 +824,12 @@ class MapHeightNodeShader extends MapHeightNode {
this.geometry = MapHeightNodeShader.geometry;
}
}
dispose() {
super.dispose();
if (this.material.userData.heightMap.value && this.material.userData.heightMap.value !== MapHeightNodeShader.defaultHeightTexture) {
this.material.userData.heightMap.value.dispose();
}
}
}
MapHeightNodeShader.defaultHeightTexture = TextureUtils.createFillTexture('#0186C0');
MapHeightNodeShader.geometrySize = 256;
Expand Down
1 change: 1 addition & 0 deletions build/nodes/MapHeightNodeShader.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ export declare class MapHeightNodeShader extends MapHeightNode {
loadData(): Promise<void>;
loadHeightGeometry(): Promise<void>;
raycast(raycaster: Raycaster, intersects: Intersection[]): void;
dispose(): void;
}
2 changes: 1 addition & 1 deletion docs/assets/search.js

Large diffs are not rendered by default.

44 changes: 22 additions & 22 deletions docs/classes/BingMapsProvider.html

Large diffs are not rendered by default.

32 changes: 16 additions & 16 deletions docs/classes/CancelablePromise.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/classes/CanvasUtils.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ <h4>Hierarchy</h4>
<ul class="tsd-hierarchy">
<li><span class="target">CanvasUtils</span></li></ul></section><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/tentone/geo-three/blob/7da4525/source/utils/CanvasUtils.ts#L4">source/utils/CanvasUtils.ts:4</a></li></ul></aside>
<li>Defined in <a href="https://github.com/tentone/geo-three/blob/8f8812d/source/utils/CanvasUtils.ts#L4">source/utils/CanvasUtils.ts:4</a></li></ul></aside>
<section class="tsd-panel-group tsd-index-group">
<section class="tsd-panel tsd-index-panel">
<details class="tsd-index-content tsd-index-accordion" open><summary class="tsd-accordion-summary tsd-index-summary">
Expand Down Expand Up @@ -68,7 +68,7 @@ <h5>height: <span class="tsd-signature-type">number</span></h5>
</div></li></ul></div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">HTMLCanvasElement</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">OffscreenCanvas</span></h4><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/tentone/geo-three/blob/7da4525/source/utils/CanvasUtils.ts#L14">source/utils/CanvasUtils.ts:14</a></li></ul></aside></li></ul></section></section></div>
<li>Defined in <a href="https://github.com/tentone/geo-three/blob/8f8812d/source/utils/CanvasUtils.ts#L14">source/utils/CanvasUtils.ts:14</a></li></ul></aside></li></ul></section></section></div>
<div class="col-4 col-menu menu-sticky-wrap menu-highlight">
<div class="tsd-navigation settings">
<details class="tsd-index-accordion"><summary class="tsd-accordion-summary">
Expand Down
18 changes: 9 additions & 9 deletions docs/classes/DebugProvider.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ <h4>Hierarchy</h4>
<ul class="tsd-hierarchy">
<li><span class="target">DebugProvider</span></li></ul></li></ul></section><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/tentone/geo-three/blob/7da4525/source/providers/DebugProvider.ts#L8">source/providers/DebugProvider.ts:8</a></li></ul></aside>
<li>Defined in <a href="https://github.com/tentone/geo-three/blob/8f8812d/source/providers/DebugProvider.ts#L8">source/providers/DebugProvider.ts:8</a></li></ul></aside>
<section class="tsd-panel-group tsd-index-group">
<section class="tsd-panel tsd-index-panel">
<details class="tsd-index-content tsd-index-accordion" open><summary class="tsd-accordion-summary tsd-index-summary">
Expand Down Expand Up @@ -67,46 +67,46 @@ <h3 class="tsd-anchor-link"><span>bounds</span><a href="#bounds" aria-label="Per
</div><aside class="tsd-sources">
<p>Inherited from <a href="MapProvider.html">MapProvider</a>.<a href="MapProvider.html#bounds">bounds</a></p>
<ul>
<li>Defined in <a href="https://github.com/tentone/geo-three/blob/7da4525/source/providers/MapProvider.ts#L30">source/providers/MapProvider.ts:30</a></li></ul></aside></section>
<li>Defined in <a href="https://github.com/tentone/geo-three/blob/8f8812d/source/providers/MapProvider.ts#L30">source/providers/MapProvider.ts:30</a></li></ul></aside></section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><a id="center" class="tsd-anchor"></a>
<h3 class="tsd-anchor-link"><span>center</span><a href="#center" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
<div class="tsd-signature">center<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol"> = []</span></div>
<div class="tsd-comment tsd-typography"><p>Map center point.</p>
</div><aside class="tsd-sources">
<p>Inherited from <a href="MapProvider.html">MapProvider</a>.<a href="MapProvider.html#center">center</a></p>
<ul>
<li>Defined in <a href="https://github.com/tentone/geo-three/blob/7da4525/source/providers/MapProvider.ts#L35">source/providers/MapProvider.ts:35</a></li></ul></aside></section>
<li>Defined in <a href="https://github.com/tentone/geo-three/blob/8f8812d/source/providers/MapProvider.ts#L35">source/providers/MapProvider.ts:35</a></li></ul></aside></section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><a id="maxZoom" class="tsd-anchor"></a>
<h3 class="tsd-anchor-link"><span>max<wbr/>Zoom</span><a href="#maxZoom" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
<div class="tsd-signature">max<wbr/>Zoom<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> = 20</span></div>
<div class="tsd-comment tsd-typography"><p>Maximum tile level.</p>
</div><aside class="tsd-sources">
<p>Inherited from <a href="MapProvider.html">MapProvider</a>.<a href="MapProvider.html#maxZoom">maxZoom</a></p>
<ul>
<li>Defined in <a href="https://github.com/tentone/geo-three/blob/7da4525/source/providers/MapProvider.ts#L25">source/providers/MapProvider.ts:25</a></li></ul></aside></section>
<li>Defined in <a href="https://github.com/tentone/geo-three/blob/8f8812d/source/providers/MapProvider.ts#L25">source/providers/MapProvider.ts:25</a></li></ul></aside></section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><a id="minZoom" class="tsd-anchor"></a>
<h3 class="tsd-anchor-link"><span>min<wbr/>Zoom</span><a href="#minZoom" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
<div class="tsd-signature">min<wbr/>Zoom<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> = 0</span></div>
<div class="tsd-comment tsd-typography"><p>Minimum tile level.</p>
</div><aside class="tsd-sources">
<p>Inherited from <a href="MapProvider.html">MapProvider</a>.<a href="MapProvider.html#minZoom">minZoom</a></p>
<ul>
<li>Defined in <a href="https://github.com/tentone/geo-three/blob/7da4525/source/providers/MapProvider.ts#L20">source/providers/MapProvider.ts:20</a></li></ul></aside></section>
<li>Defined in <a href="https://github.com/tentone/geo-three/blob/8f8812d/source/providers/MapProvider.ts#L20">source/providers/MapProvider.ts:20</a></li></ul></aside></section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><a id="name" class="tsd-anchor"></a>
<h3 class="tsd-anchor-link"><span>name</span><a href="#name" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
<div class="tsd-signature">name<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> = &#39;&#39;</span></div>
<div class="tsd-comment tsd-typography"><p>Name of the map provider</p>
</div><aside class="tsd-sources">
<p>Inherited from <a href="MapProvider.html">MapProvider</a>.<a href="MapProvider.html#name">name</a></p>
<ul>
<li>Defined in <a href="https://github.com/tentone/geo-three/blob/7da4525/source/providers/MapProvider.ts#L15">source/providers/MapProvider.ts:15</a></li></ul></aside></section>
<li>Defined in <a href="https://github.com/tentone/geo-three/blob/8f8812d/source/providers/MapProvider.ts#L15">source/providers/MapProvider.ts:15</a></li></ul></aside></section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class"><a id="resolution" class="tsd-anchor"></a>
<h3 class="tsd-anchor-link"><span>resolution</span><a href="#resolution" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
<div class="tsd-signature">resolution<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> = 256</span></div>
<div class="tsd-comment tsd-typography"><p>Resolution in px of each tile.</p>
</div><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/tentone/geo-three/blob/7da4525/source/providers/DebugProvider.ts#L13">source/providers/DebugProvider.ts:13</a></li></ul></aside></section></section>
<li>Defined in <a href="https://github.com/tentone/geo-three/blob/8f8812d/source/providers/DebugProvider.ts#L13">source/providers/DebugProvider.ts:13</a></li></ul></aside></section></section>
<section class="tsd-panel-group tsd-member-group">
<h2>Methods</h2>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="fetchTile" class="tsd-anchor"></a>
Expand Down Expand Up @@ -137,7 +137,7 @@ <h5>y: <span class="tsd-signature-type">number</span></h5>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">&gt;</span></h4><aside class="tsd-sources">
<p>Overrides <a href="MapProvider.html">MapProvider</a>.<a href="MapProvider.html#fetchTile">fetchTile</a></p>
<ul>
<li>Defined in <a href="https://github.com/tentone/geo-three/blob/7da4525/source/providers/DebugProvider.ts#L15">source/providers/DebugProvider.ts:15</a></li></ul></aside></li></ul></section>
<li>Defined in <a href="https://github.com/tentone/geo-three/blob/8f8812d/source/providers/DebugProvider.ts#L15">source/providers/DebugProvider.ts:15</a></li></ul></aside></li></ul></section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a id="getMetaData" class="tsd-anchor"></a>
<h3 class="tsd-anchor-link"><span>get<wbr/>Meta<wbr/>Data</span><a href="#getMetaData" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
Expand All @@ -149,7 +149,7 @@ <h3 class="tsd-anchor-link"><span>get<wbr/>Meta<wbr/>Data</span><a href="#getMet
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4><aside class="tsd-sources">
<p>Inherited from <a href="MapProvider.html">MapProvider</a>.<a href="MapProvider.html#getMetaData">getMetaData</a></p>
<ul>
<li>Defined in <a href="https://github.com/tentone/geo-three/blob/7da4525/source/providers/MapProvider.ts#L57">source/providers/MapProvider.ts:57</a></li></ul></aside></li></ul></section></section></div>
<li>Defined in <a href="https://github.com/tentone/geo-three/blob/8f8812d/source/providers/MapProvider.ts#L57">source/providers/MapProvider.ts:57</a></li></ul></aside></li></ul></section></section></div>
<div class="col-4 col-menu menu-sticky-wrap menu-highlight">
<div class="tsd-navigation settings">
<details class="tsd-index-accordion"><summary class="tsd-accordion-summary">
Expand Down
8 changes: 4 additions & 4 deletions docs/classes/Geolocation.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ <h4>Hierarchy</h4>
<ul class="tsd-hierarchy">
<li><span class="target">Geolocation</span></li></ul></section><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/tentone/geo-three/blob/7da4525/source/utils/Geolocation.ts#L4">source/utils/Geolocation.ts:4</a></li></ul></aside>
<li>Defined in <a href="https://github.com/tentone/geo-three/blob/8f8812d/source/utils/Geolocation.ts#L4">source/utils/Geolocation.ts:4</a></li></ul></aside>
<section class="tsd-panel-group tsd-index-group">
<section class="tsd-panel tsd-index-panel">
<details class="tsd-index-content tsd-index-accordion" open><summary class="tsd-accordion-summary tsd-index-summary">
Expand Down Expand Up @@ -54,7 +54,7 @@ <h5>latitude: <span class="tsd-signature-type">number</span></h5></li>
<h5>longitude: <span class="tsd-signature-type">number</span></h5></li></ul></div>
<h4 class="tsd-returns-title">Returns <a href="Geolocation.html" class="tsd-signature-type" data-tsd-kind="Class">Geolocation</a></h4><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/tentone/geo-three/blob/7da4525/source/utils/Geolocation.ts#L16">source/utils/Geolocation.ts:16</a></li></ul></aside></li></ul></section></section>
<li>Defined in <a href="https://github.com/tentone/geo-three/blob/8f8812d/source/utils/Geolocation.ts#L16">source/utils/Geolocation.ts:16</a></li></ul></aside></li></ul></section></section>
<section class="tsd-panel-group tsd-member-group">
<h2>Properties</h2>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class"><a id="latitude" class="tsd-anchor"></a>
Expand All @@ -63,14 +63,14 @@ <h3 class="tsd-anchor-link"><span>latitude</span><a href="#latitude" aria-label=
<div class="tsd-comment tsd-typography"><p>Latitude in degrees. Range from -90° to 90°.</p>
</div><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/tentone/geo-three/blob/7da4525/source/utils/Geolocation.ts#L9">source/utils/Geolocation.ts:9</a></li></ul></aside></section>
<li>Defined in <a href="https://github.com/tentone/geo-three/blob/8f8812d/source/utils/Geolocation.ts#L9">source/utils/Geolocation.ts:9</a></li></ul></aside></section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class"><a id="longitude" class="tsd-anchor"></a>
<h3 class="tsd-anchor-link"><span>longitude</span><a href="#longitude" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
<div class="tsd-signature">longitude<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div>
<div class="tsd-comment tsd-typography"><p>Latitude in degrees. Range from -180° to 180°.</p>
</div><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/tentone/geo-three/blob/7da4525/source/utils/Geolocation.ts#L14">source/utils/Geolocation.ts:14</a></li></ul></aside></section></section></div>
<li>Defined in <a href="https://github.com/tentone/geo-three/blob/8f8812d/source/utils/Geolocation.ts#L14">source/utils/Geolocation.ts:14</a></li></ul></aside></section></section></div>
<div class="col-4 col-menu menu-sticky-wrap menu-highlight">
<div class="tsd-navigation settings">
<details class="tsd-index-accordion"><summary class="tsd-accordion-summary">
Expand Down
Loading

0 comments on commit 80ebd36

Please sign in to comment.