Overview of @maptalks/gltf-loader
master@maptalks/gltf-loader is a vanilla JavaScript GLTF loader designed to work within the maptalks ecosystem. It allows developers to load and integrate GLTF models into their maps.repository·master·Indexed 26 days ago
https://github.com/maptalks/maptalks.jsA WebGL and WebGPU driven 2D/3D map engine designed for high performance and rich 3D features, including support for Vector Tiles, 3DTiles, and GLTF. The ecosystem includes plugins for spatial analysis (Viewshed, Flood, Skyline, Insight, Cut, Excavate, CrossCut, and HeightLimit), a GLTF loader, 3DTiles support via Geo3DTilesLayer, and fusion.gl, a WebGL sandbox library that allows multiple environments to share a single WebGL Context.
@maptalks/gltf-loader is a vanilla JavaScript GLTF loader designed to work within the maptalks ecosystem. It allows developers to load and integrate GLTF models into their maps.fusion.gl is a WebGL sandbox library that allows multiple sandbox WebGL environments to share a single WebGL Context. This is useful for integrating different WebGL frameworks (like Three.js) into the same canvas without state conflicts.
Key features:
maptalks is a lightweight JavaScript library designed for creating integrated 2D/3D maps. Key features include:
The traffic package is a tool designed to render traffic effects on maps, inspired by the lo-th/root project. You can view the implementation and visual results in the official demo.
https://fuzhenn.github.io/traffic/demo/You can install the maptalks.analysis plugin using npm or via a CDN.
npm:
npm install @maptalks/analysisCDN:
Use the following unpkg URL:
https://unpkg.com/@maptalks/analysis/dist/maptalks.analysis.js
npm install @maptalks/analysisDownload the latest release from GitHub and reference the local paths to the CSS and JS files in your HTML page.
<link href="path/to/maptalks.css" rel="stylesheet" type="text/css" />
<script src="path/to/maptalks.min.js" type="text/javascript"></script>You can install the TransformControl plugin via npm or use it directly from a CDN.
NPM:
npm install @maptalks/transform-controlCDN:
https://unpkg.com/@maptalks/transform-control/dist/transform-control.js
To add maptalks to your project using a package manager, run the following command:
npm install maptalks --saveTo use the 3dtiles plugin, include the following scripts in your HTML. Note that it requires maptalks and @maptalks/gl as dependencies.
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/maptalks@next/dist/maptalks.min.js"></script>
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/@maptalks/gl/dist/maptalksgl.js"></script>
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/@maptalks/3dtiles@latest/dist/maptalks.3dtiles.js"></script>You can include maptalks directly in your HTML file using a CDN. Ensure you include both the CSS and the JavaScript files.
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/maptalks/dist/maptalks.min.css">
<script src="https://cdn.jsdelivr.net/npm/maptalks/dist/maptalks.min.js"></script>To contribute or debug the codebase, ensure you meet the following requirements:
18.16.1.pnpm@9.x is currently used.pnpm ipnpm buildpnpm run dev (run this in the root folder of the package you are debugging).pnpm i
pnpm build
pnpm run devYou can install the GLTF layer package using npm or include it via CDN.
```bash
npm install @maptalks/gltf-layerOr use unpkg CDN:
https://unpkg.com/@maptalks/gltf-layer@0.2.0/dist/maptalks.gltf.js