@bendyline/molen-earth
v0.0.9
Published
Molen Earth view: an embeddable real-world 3D view (streamed terrain, worldgen buildings, orbit/walk/drive navigation, vehicles, and map markers) behind one mountEarthView call
Maintainers
Readme
@bendyline/molen-earth
An embeddable real-world 3D view for Molen: streamed terrain, worldgen
buildings, landmarks and street surfaces, orbit/walk/drive/fly navigation (drivable parked cars, a
car on the nearest road, or an aircraft already in the air), ambient traffic and sound, map markers,
sky and haze, and adaptive quality — behind one mountEarthView call.
npm install @bendyline/molen-earth @bendyline/molen-client threeimport { mountEarthView } from '@bendyline/molen-earth/client';
const view = await mountEarthView({
canvas,
terrain: await (await fetch('/terrain/terrain-package.json')).json(),
baseUrl: new URL('/terrain/terrain-package.json', location.href),
camera: { latitude: 47.6205, longitude: -122.3493, range: 1500 },
});
view.flyTo({ latitude: 37.8199, longitude: -122.4783, range: 2500 });
view.setMode('fly'); // a P-51D over the view; vehicleStatus() feeds a HUD| Entry point | For |
|---|---|
| ./client | mountEarthView, loadEarthContent, openPacksFromIndex, createEarthWorldgen, EarthVehicles, EarthAircraft, createEarthSky, createEarthFog, earthPerformanceTier, earthMemoryBudget, earthInitialQualityLevel, earthOrbitMaxRange, earthCredits |
| ./workers/elevation, ./workers/landcover, ./workers/surface, ./workers/worldgen, ./workers/material | One-line worker entries: import '@bendyline/molen-earth/workers/elevation'; in a module worker, passed to mountEarthView({ workers }) |
Real-world data carries attribution obligations (ODbL for OpenStreetMap). view.credits lists
them; keep them visible. See the Earth view guide.
MIT, © Bendyline LLC.
