Skip to content

Commit 710bc3a

Browse files
committed
1 parent b2428fa commit 710bc3a

5 files changed

Lines changed: 69 additions & 10 deletions

File tree

itowns/dev/dist/itowns.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

itowns/dev/dist/itowns.umd.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

itowns/dev/docs/api/View/GlobeView.html

Lines changed: 59 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -161,23 +161,34 @@ <h4>Parameters</h4>
161161

162162
<li>
163163
<code>options.farFactor</code>
164-
(default: <code>20</code>)
164+
(default: <code>0.3</code>)
165165

166166

167-
&mdash; <span><p>Controls how far the camera can see.
168-
The maximum view distance is this factor times the camera's altitude (above sea level).</p></span>
167+
&mdash; <span><p>Controls the far plane distance at low altitudes.
168+
Value between 0 and 1. Lower values reduce far distance near the ground. At higher altitudes,
169+
far distance transitions to full horizon distance.</p></span>
169170

170171

171172

172173
</li>
173174

174175
<li>
175-
<code>options.fogSpread</code>
176-
(default: <code>0.5</code>)
176+
<code>options.maxFarAltitude</code>
177+
(default: <code>80000</code>)
177178

178179

179-
&mdash; <span><p>Proportion of the visible depth range that contains fog.
180-
Between 0 and 1.</p></span>
180+
&mdash; <span><p>the altitude at which the horizon is fully visible (meters).</p></span>
181+
182+
183+
184+
</li>
185+
186+
<li>
187+
<code>options.minFarDistance</code>
188+
(default: <code>10000</code>)
189+
190+
191+
&mdash; <span><p>the minimum horizon distance (meters).</p></span>
181192

182193

183194

@@ -385,6 +396,47 @@ <h4>Parameters</h4>
385396

386397

387398

399+
</div>
400+
401+
<hr/>
402+
403+
404+
405+
<div class="method">
406+
<h3>
407+
<span class="method-name">computeHorizonScaleFactor</span>
408+
(
409+
410+
411+
)
412+
:
413+
414+
<span class="type">number</span>
415+
416+
417+
418+
</h3>
419+
420+
421+
422+
<div class="description">
423+
<p>This factor scales down the visible horizon at low altitudes based on farFactor and maxFarAltitude.
424+
farFactor sets its minimum at sea level and maxFarAltitude the altitude at which the horizon is fully visible.</p>
425+
</div>
426+
427+
428+
429+
430+
<h4>Returns</h4>
431+
432+
<p>Scale factor between farFactor and 1</p>
433+
434+
435+
436+
437+
438+
439+
388440
</div>
389441

390442
<hr/>

itowns/dev/examples/demo/dist/demo/tsconfig.tsbuildinfo

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

itowns/dev/examples/view_multiglobe.html

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,10 @@
113113
object3ds[0].updateMatrixWorld(true);
114114
object3ds[1].updateMatrixWorld(true);
115115

116+
view.dispatchEvent({
117+
type: itowns.VIEW_EVENTS.CAMERA_MOVED,
118+
});
119+
116120
if (t < 1) {
117121
// animation is not finished, schedule a new view update
118122
view.notifyChange(cameraThree);
@@ -153,6 +157,9 @@
153157
geo.altitude *= 1.1;
154158
}
155159
cameraThree.position.copy(geo.as('EPSG:4978'));
160+
view.dispatchEvent({
161+
type: itowns.VIEW_EVENTS.CAMERA_MOVED,
162+
});
156163
view.notifyChange(cameraThree);
157164
};
158165
viewerDiv.addEventListener('DOMMouseScroll', onMouseWheel);

0 commit comments

Comments
 (0)