Volver al ranking

iTowns/itowns

JavaScriptitowns-project.org

A Three.js-based framework written in Javascript/WebGL for visualizing 3D geospatial data

webgljavascript3dgisvisualizationimmersion-vrglobepointcloudwmswfswebmappingitowns
Crecimiento de estrellas
Estrellas
1.3k
Forks
320
Crecimiento semanal
Issues
240
5001k
ene 2023mar 2024may 2025jul 2026
Artefactosnpmnpm install itowns
README

iTowns

Coverage Status example branch parameter DeepScan grade Discord

iTowns examples

iTowns is a Three.js-based framework written in Javascript/WebGL for visualizing 2D and 3D geospatial data.

It supports various protocols and formats such as WMS, WMTS, TMS, MVT, 3D Tiles, GEOJSON, GPX, etc. that can be displayed as base maps, terrain elevation, vector features and 3D models and stylized with a dedicated API. Take a look at the documentation, the interactive demo and the list of examples to see what you can do with iTowns.

It officially targets the last two major versions of Firefox, Chromium-based browsers (Chrome, Edge, ...) and Safari at the date of each release. Older browsers supporting WebGL 2.0 may work, but we do not offer support.

Running it locally

iTowns can be run locally using either npm or Docker. Both methods serve them on port 8080.

Using npm

Requires Node.js (LTS version recommended).

git clone https://github.com/itowns/itowns.git
cd itowns
npm ci
npm start

Using Docker

Requires Docker.

git clone https://github.com/itowns/itowns.git
cd itowns
docker build -t itowns .
docker run -p 8080:8080 itowns

Alternatively, you can build and run directly from a remote branch of itowns in a single command:

docker run -p 8080:8080 $(docker build -q https://github.com/itowns/itowns.git#<branch>)

Replace <branch> with the desired branch name (e.g. master, dev).

Using it in your project

You can use it with npm (the preferred way) or download a bundle from our github release page.

With npm

In your project:

To use all iTowns features, install itowns package :

npm install --save itowns
import { Coordinates } from 'itowns';

const coordinates = new Coordinates('EPSG:4326', 88., 50.3, 120.3);

// change projection system to pseudo mercator
coordinates.as('EPSG:3857');

To import Widget features

import { Navigation } from 'itowns/widgets';

const viewerDiv = document.getElementById('viewerDiv');

// Create a GlobeView
const view = new itowns.GlobeView(viewerDiv);

// Add navigation widget
const navigation = new Navigation(view, {
    position: 'bottom-right',
    translate: { y: -40 },
});

iTowns is currently moving to a monorepo organization and to a segmentation in sub-modules, allowing to import only some of itowns functionalities. Current itowns sub-modules are:

This package contains the ES5-compatible sources of iTowns, up to date with the latest release.

If you're using a module bundler (like wepback), you can directly write require('itowns') in your code.

With a bundle

Alternatively, we provide 2 bundles (ESM and UMD) you can directly include in your html files

UMD

The UMD bundle exposes itowns in window:

<script src="node_modules/itowns/dist/itowns.umd.js"></script>
<script type="text/javascript">
    const  coord = new itowns.Coordinates('EPSG:4326', 3.5, 44);
</script>

/!\ Please note that this UMD bundle also packages the peer dependencies, including threejs and proj4, see the pacjages.json files for a full list.

ESM

iTowns ESM bundle can be imported with importmap and used in a module script.

<script type="importmap">
{
    "imports": {
        "itowns": "node_modules/itowns/dist/itowns.js",
        "three": "https://unpkg.com/three@0.182.0/build/three.module.js"
    }
}
</script>
<script type="module">
    import * as THREE from 'three';
    import * as itowns from 'itowns';
    const  coord = new itowns.Coordinates('EPSG:4326', 3.5, 44);
</script>

Try modifications before they are released

If you want to try some features or bug fixes that are planned for the next release, we provide a version after each PR is merged:

npm install --save itowns@next

To switch back to the latest stable release:

npm install --save itowns@latest

Contributing

If you are interested in contributing to iTowns, please read the CONTRIBUTING guide and the CODING guide.

Licence

iTowns is dual-licenced under Cecill-B V1.0 and MIT. Incorporated libraries are published under their original licences.

See LICENSE.md for more information.

RoadMap

You will find the project Road map on the RoadMap wiki

Maintainers and governance

iTowns is an original work from French IGN, MATIS research laboratory. It has been funded through various research programs involving the French National Research Agency, Cap Digital, UPMC, Mines ParisTec, CNRS, LCPC and maintained by several organizations along the years (IGN, Oslandia, AtolCD, CIRIL Group). It has also received contributions from people listed here.

iTowns is currently maintained by IGN and CIRIL Group.

Contributions in any forms and new contributors and maintainers are welcome. Get in touch with us if you are interested :)

The governance of the project is open and explicited here.

IGN CIRIL Group

Repositorios relacionados
mrdoob/three.js

JavaScript 3D Library.

JavaScriptnpmMIT Licensejavascript3d
threejs.org
113.9k36.4k
pixijs/pixijs

The HTML5 Creation Engine: Create beautiful digital content with the fastest, most flexible 2D WebGL renderer.

TypeScriptnpmMIT Licensecanvas2dpixijs
pixijs.com
47.8k5k
phaserjs/phaser

Phaser is a fun, free and fast 2D game framework for making HTML5 games for desktop and mobile web browsers, supporting Canvas and WebGL rendering.

JavaScriptnpmMIT Licensephaserphaserjs
phaser.io
40k7.1k
BabylonJS/Babylon.js

Babylon.js is a powerful, beautiful, simple, and open game and rendering engine packed into a friendly JavaScript framework.

TypeScriptnpmApache License 2.0webglwebgl2
babylonjs.com
25.8k3.7k
xtermjs/xterm.js

A terminal for the web

TypeScriptnpmMIT Licensextermterminal
xtermjs.org
20.9k1.9k
google/filament

Filament is a real-time physically based rendering engine for Android, iOS, Windows, Linux, macOS, and WebGL2

C++Apache License 2.0pbrgraphics
google.github.io/filament/
20.3k2.2k
lettier/3d-game-shaders-for-beginners

🎮 A step-by-step guide to implementing SSAO, depth of field, lighting, normal mapping, and more for your 3D game.

C++shaders3d
lettier.github.io/3d-game-shaders-for-beginners/index.html
19.8k1.5k
tensorflow/tfjs

A WebGL accelerated JavaScript library for training and deploying ML models.

TypeScriptnpmApache License 2.0deep-learningtypescript
js.tensorflow.org
19.1k2k
plotly/plotly.py

The interactive graphing library for Python :sparkles:

PythonPyPIMIT Licensepythond3
plotly.com/python/
18.7k2.8k
plotly/plotly.js

Open-source JavaScript charting library behind Plotly and Dash

JavaScriptnpmMIT Licensedata-visualizationd3
plotly.com/javascript/
18.3k2k
kitao/pyxel

A retro game engine for Python

Rustcrates.ioOthergamegame-development
17.6k929
aframevr/aframe

:a: Web framework for building virtual reality experiences.

JavaScriptnpmMIT Licensevrwebvr
aframe.io
17.6k4.4k