mirror of
https://github.com/maplibre/maplibre-rs.git
synced 2025-12-08 19:05:57 +00:00
Merge branch 'main' into patch-1
This commit is contained in:
commit
63ab400c3b
24
.github/workflows/rust.yml
vendored
24
.github/workflows/rust.yml
vendored
@ -53,12 +53,12 @@ jobs:
|
||||
run: |
|
||||
echo "$SSH_KEY" > id_rsa
|
||||
chmod 600 id_rsa
|
||||
ssh -o StrictHostKeyChecking=no -i id_rsa max@maxammann.org 'mkdir -p ~/public_html/mapr/api-docs && find ~/public_html/mapr/api-docs -type f -not -name ".htaccess" -delete'
|
||||
rsync -e "ssh -o StrictHostKeyChecking=no -i id_rsa" -r "target/x86_64-unknown-linux-gnu/doc/." max@maxammann.org:~/public_html/mapr/api-docs/
|
||||
ssh -o StrictHostKeyChecking=no -i id_rsa max@maxammann.org 'mkdir -p ~/public_html/maplibre-rs/api-docs && find ~/public_html/maplibre-rs/api-docs -type f -not -name ".htaccess" -delete'
|
||||
rsync -e "ssh -o StrictHostKeyChecking=no -i id_rsa" -r "target/x86_64-unknown-linux-gnu/doc/." max@maxammann.org:~/public_html/maplibre-rs/api-docs/
|
||||
- uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: mapr
|
||||
path: target/debug/mapr
|
||||
name: maplibre-rs
|
||||
path: target/debug/maplibre
|
||||
|
||||
build-aarch64-android:
|
||||
runs-on: ubuntu-20.04
|
||||
@ -85,8 +85,8 @@ jobs:
|
||||
run: just build-apk
|
||||
- uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: mapr.apk
|
||||
path: target/debug/apk/mapr-demo.apk
|
||||
name: maplibre-rs.apk
|
||||
path: target/debug/apk/maplibre-rs-demo.apk
|
||||
|
||||
build-wasm-webgl:
|
||||
runs-on: ubuntu-20.04
|
||||
@ -118,8 +118,8 @@ jobs:
|
||||
run: |
|
||||
echo "$SSH_KEY" > id_rsa
|
||||
chmod 600 id_rsa
|
||||
ssh -o StrictHostKeyChecking=no -i id_rsa max@maxammann.org 'mkdir -p ~/public_html/mapr/webgl && find ~/public_html/mapr/webgl -type f -not -name ".htaccess" -delete'
|
||||
rsync -e "ssh -o StrictHostKeyChecking=no -i id_rsa" -r "dist/demo/." max@maxammann.org:~/public_html/mapr/webgl/
|
||||
ssh -o StrictHostKeyChecking=no -i id_rsa max@maxammann.org 'mkdir -p ~/public_html/maplibre-rs/webgl && find ~/public_html/maplibre-rs/webgl -type f -not -name ".htaccess" -delete'
|
||||
rsync -e "ssh -o StrictHostKeyChecking=no -i id_rsa" -r "dist/demo/." max@maxammann.org:~/public_html/maplibre-rs/webgl/
|
||||
|
||||
build-wasm-webgpu:
|
||||
runs-on: ubuntu-20.04
|
||||
@ -151,8 +151,8 @@ jobs:
|
||||
run: |
|
||||
echo "$SSH_KEY" > id_rsa
|
||||
chmod 600 id_rsa
|
||||
ssh -o StrictHostKeyChecking=no -i id_rsa max@maxammann.org 'mkdir -p ~/public_html/mapr/webgpu && find ~/public_html/mapr/webgpu -type f -not -name ".htaccess" -delete'
|
||||
rsync -e "ssh -o StrictHostKeyChecking=no -i id_rsa" -r "dist/demo/." max@maxammann.org:~/public_html/mapr/webgpu/
|
||||
ssh -o StrictHostKeyChecking=no -i id_rsa max@maxammann.org 'mkdir -p ~/public_html/maplibre-rs/webgpu && find ~/public_html/maplibre-rs/webgpu -type f -not -name ".htaccess" -delete'
|
||||
rsync -e "ssh -o StrictHostKeyChecking=no -i id_rsa" -r "dist/demo/." max@maxammann.org:~/public_html/maplibre-rs/webgpu/
|
||||
|
||||
book:
|
||||
runs-on: ubuntu-20.04
|
||||
@ -185,5 +185,5 @@ jobs:
|
||||
run: |
|
||||
echo "$SSH_KEY" > id_rsa
|
||||
chmod 600 id_rsa
|
||||
ssh -o StrictHostKeyChecking=no -i id_rsa max@maxammann.org 'mkdir -p ~/public_html/mapr/docs && find ~/public_html/mapr/docs -type f -not -name ".htaccess" -delete'
|
||||
rsync -e "ssh -o StrictHostKeyChecking=no -i id_rsa" -r "book/." max@maxammann.org:~/public_html/mapr/docs/
|
||||
ssh -o StrictHostKeyChecking=no -i id_rsa max@maxammann.org 'mkdir -p ~/public_html/maplibre-rs/docs && find ~/public_html/maplibre-rs/docs -type f -not -name ".htaccess" -delete'
|
||||
rsync -e "ssh -o StrictHostKeyChecking=no -i id_rsa" -r "book/." max@maxammann.org:~/public_html/maplibre-rs/docs/
|
||||
|
||||
2
.gitignore
vendored
2
.gitignore
vendored
@ -18,7 +18,7 @@ dist/
|
||||
|
||||
# Cache by reqwest-middleware-cache
|
||||
*reqwest*cache*
|
||||
*mapr*cache*
|
||||
*maplibre*cache*
|
||||
|
||||
logs/
|
||||
|
||||
|
||||
12
.idea/dataSources.xml
generated
12
.idea/dataSources.xml
generated
@ -1,12 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="DataSourceManagerImpl" format="xml" multifile-model="true">
|
||||
<data-source source="LOCAL" name="munich.sqlite" uuid="d1659a46-8238-4780-afd2-39e3c47040f0">
|
||||
<driver-ref>sqlite.xerial</driver-ref>
|
||||
<synchronize>true</synchronize>
|
||||
<jdbc-driver>org.sqlite.JDBC</jdbc-driver>
|
||||
<jdbc-url>jdbc:sqlite:$PROJECT_DIR$/test-data/munich-12.mbtiles</jdbc-url>
|
||||
<working-dir>$ProjectFileDir$</working-dir>
|
||||
</data-source>
|
||||
</component>
|
||||
</project>
|
||||
10
.idea/mapr.iml → .idea/maplibre-rs.iml
generated
10
.idea/mapr.iml → .idea/maplibre-rs.iml
generated
@ -2,16 +2,14 @@
|
||||
<module type="CPP_MODULE" version="4">
|
||||
<component name="NewModuleRootManager">
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$/benches" isTestSource="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/examples" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/libs/mbtiles/src" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/libs/style_spec/src" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/libs/vector_tile/src" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/libs/tilejson_spec/src" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/libs/wgsl_validate/src" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/examples" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/benches" isTestSource="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/libs/mbtiles/src" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/libs/tilejson_spec/src" isTestSource="false" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/target" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/libs/mbtiles/target" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
2
.idea/modules.xml
generated
2
.idea/modules.xml
generated
@ -2,7 +2,7 @@
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/mapr.iml" filepath="$PROJECT_DIR$/.idea/mapr.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/maplibre-rs.iml" filepath="$PROJECT_DIR$/.idea/maplibre-rs.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
||||
2
Cargo.lock
generated
2
Cargo.lock
generated
@ -1750,7 +1750,7 @@ dependencies = [
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "mapr"
|
||||
name = "maplibre"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"bytemuck",
|
||||
|
||||
@ -8,7 +8,7 @@ members = [
|
||||
]
|
||||
|
||||
[package]
|
||||
name = "mapr"
|
||||
name = "maplibre"
|
||||
version = "0.1.0"
|
||||
authors = ["Maximilian Ammann <max@maxammann.org>"]
|
||||
edition = "2021"
|
||||
@ -126,7 +126,7 @@ name = "render"
|
||||
harness = false
|
||||
|
||||
[package.metadata.android]
|
||||
apk_name = "mapr-demo"
|
||||
apk_name = "maplibre-rs-demo"
|
||||
[[package.metadata.android.uses_permission]]
|
||||
name = "android.permission.INTERNET"
|
||||
[[package.metadata.android.uses_permission]]
|
||||
|
||||
52
README.md
52
README.md
@ -1,9 +1,9 @@
|
||||
<h1 align="center">mapr</h1>
|
||||
<h1 align="center">maplibre-rs</h1>
|
||||
<p align="center">
|
||||
<img width="200px" src="https://static-assets.mapbox.com/www/logos/mapbox-logo-black.png" alt="Mapbox Logo">
|
||||
</p>
|
||||
<div align="center">
|
||||
<img width="300px" src="docs/src/figures/mapr-ios.png" alt="Preview">
|
||||
<img width="300px" src="docs/src/figures/maplibre-rs-ios.png" alt="Preview">
|
||||
</div>
|
||||
<div align="center">
|
||||
<strong>Native Maps for Web, Mobile and Linux</strong>
|
||||
@ -15,12 +15,12 @@
|
||||
<div align="center">
|
||||
<img src="https://img.shields.io/badge/stability-experimental-orange.svg?style=flat-square"
|
||||
alt="Stability" />
|
||||
<a href="https://github.com/maxammann/mapr/actions/workflows/rust.yml">
|
||||
<img src="https://github.com/maxammann/mapr/actions/workflows/rust.yml/badge.svg"
|
||||
<a href="https://github.com/maplibre/maplibre-rs/actions/workflows/rust.yml">
|
||||
<img src="https://github.com/maplibre/maplibre-rs/actions/workflows/rust.yml/badge.svg"
|
||||
alt="Build status" />
|
||||
</a>
|
||||
<a href="https://matrix.to/#/#mapr:matrix.org">
|
||||
<img src="https://img.shields.io/static/v1?label=Space&message=%23mapr&color=blue&logo=matrix"
|
||||
<a href="https://matrix.to/#/#maplibre:matrix.org">
|
||||
<img src="https://img.shields.io/static/v1?label=Space&message=%23maplibre&color=blue&logo=matrix"
|
||||
alt="Build status" />
|
||||
</a>
|
||||
</div>
|
||||
@ -31,13 +31,13 @@
|
||||
Example
|
||||
</a>
|
||||
<span> | </span>
|
||||
<a href="https://maxammann.org/mapr/docs">
|
||||
<a href="https://maxammann.org/maplibre-rs/docs">
|
||||
Book
|
||||
</a> | </span>
|
||||
<a href="https://maxammann.org/mapr/api-docs/mapr/">
|
||||
<a href="https://maxammann.org/maplibre-rs/api-docs/maplibre/">
|
||||
API
|
||||
</a> | </span>
|
||||
<a href="https://matrix.to/#/#mapr:matrix.org">
|
||||
<a href="https://matrix.to/#/#maplibre:matrix.org">
|
||||
Chat in Matrix Space
|
||||
</a>
|
||||
</h3>
|
||||
@ -53,16 +53,16 @@ next-gen mapping solution.
|
||||
|
||||
## Description
|
||||
|
||||
mapr is a portable and performant vector maps renderer. We aim to support web, mobile and desktop applications. This
|
||||
maplibre-rs is a portable and performant vector maps renderer. We aim to support web, mobile and desktop applications. This
|
||||
is achieved by the novel [WebGPU](https://www.w3.org/TR/webgpu/) specification. Plenty of native implementations are
|
||||
already implementing this specification. On the web, it is implemented by Firefox, Chrome and Safari. There are also
|
||||
standalone implementations that directly use Vulkan, OpenGL or Metal as a backend. Those backends allow mapr to run on
|
||||
standalone implementations that directly use Vulkan, OpenGL or Metal as a backend. Those backends allow maplibre-rs to run on
|
||||
mobile and desktop applications.
|
||||
|
||||
Rust is used as a Lingua-franka on all platforms. This is made possible by WebAssembly, which allows us to use Rust for
|
||||
web development.
|
||||
|
||||
The goal of mapr is to render maps to visualize data. Right now the goal of mapr is not to replace existing
|
||||
The goal of maplibre-rs is to render maps to visualize data. Right now the goal of maplibre-rs is not to replace existing
|
||||
vector map renderers like Google Maps, Apple Maps or MapLibre. The current implementation serves as a proof-of-concept
|
||||
of the used technology stack. It is unclear whether the high-performance requirements of rendering maps using vector
|
||||
graphics are achievable using the current stack.
|
||||
@ -86,9 +86,12 @@ https://user-images.githubusercontent.com/905221/163552617-5db04c66-23e3-4915-87
|
||||
* Rendering Text
|
||||
* Per-Feature Rendering
|
||||
* Rendering:
|
||||
* Labels
|
||||
* Symbols
|
||||
* Raster data
|
||||
* 3D terrain
|
||||
* Hill-shade (DEM)
|
||||
* Collision detection
|
||||
* Support for:
|
||||
* GeoJSON
|
||||
* API for:
|
||||
@ -96,31 +99,12 @@ https://user-images.githubusercontent.com/905221/163552617-5db04c66-23e3-4915-87
|
||||
* Swift
|
||||
* Java/Kotlin
|
||||
|
||||
## Repository Layout
|
||||
|
||||
(Note: to be changed)
|
||||
|
||||
```bash
|
||||
.
|
||||
├── docs # Documentation for mapr
|
||||
├── src # The source code of the mapr library
|
||||
├── libs # Libraries which will eventually be published as separate crates
|
||||
│ ├── mbtiles # Library for extracting .mbtiles files
|
||||
│ ├── style_spec # Library for interpreting MapLibre style specifications
|
||||
│ └── wgsl_validate # Library for validating WGSL shaders
|
||||
├── apple # Platform specific files for Apple (iOS and macOS)
|
||||
├── web # Platform specific files for Web (WebGL and WebGPU)
|
||||
├── benches # Benchmarks for specific parts of the library
|
||||
├── examples # Examples that can be run
|
||||
└── test-data # Geo data which can be used for tests (Usually as .mbtiles)
|
||||
```
|
||||
|
||||
## Building & Running
|
||||
|
||||
Now, to clone the project:
|
||||
|
||||
```bash
|
||||
git clone --recursive git@github.com/maxammann/mapr
|
||||
git clone --recursive git@github.com:maplibre/maplibre-rs
|
||||
```
|
||||
|
||||
and then build it for running on a desktop:
|
||||
@ -136,7 +120,7 @@ cargo run --example desktop --
|
||||
```
|
||||
|
||||
More information about building for different platforms can be
|
||||
found [here](https://maxammann.org/mapr-docs/building.html).
|
||||
found [here](https://maxammann.org/maplibre-rs/docs/development-guide/building.html).
|
||||
|
||||
> __Note for Mac__: Before opening the XCode project, you need to build manually using the following command:
|
||||
> `cargo build --target aarch64-apple-darwin --lib`
|
||||
@ -160,4 +144,4 @@ dependency.
|
||||
cargo doc --open
|
||||
```
|
||||
|
||||
You can also view the up-to-date documentation [here](https://maxammann.org/mapr/docs/).
|
||||
You can also view the up-to-date documentation [here](https://maxammann.org/maplibre-rs/docs/).
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
use criterion::{criterion_group, criterion_main, Criterion};
|
||||
use mapr::window::FromWindow;
|
||||
use mapr::{MapBuilder, ScheduleMethod, TokioScheduleMethod};
|
||||
use maplibre::window::FromWindow;
|
||||
use maplibre::{MapBuilder, ScheduleMethod, TokioScheduleMethod};
|
||||
|
||||
fn render(c: &mut Criterion) {
|
||||
c.bench_function("render", |b| {
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
use criterion::{criterion_group, criterion_main, Criterion};
|
||||
use lyon::tessellation::VertexBuffers;
|
||||
use mapr::benchmarking::io::static_tile_fetcher::StaticTileFetcher;
|
||||
use mapr::benchmarking::tessellation::Tessellated;
|
||||
use maplibre::benchmarking::io::static_tile_fetcher::StaticTileFetcher;
|
||||
use maplibre::benchmarking::tessellation::Tessellated;
|
||||
use std::io::Cursor;
|
||||
|
||||
const MUNICH_X: u32 = 17425;
|
||||
|
||||
@ -3,4 +3,4 @@ authors = ["Maximilian Ammann"]
|
||||
language = "en"
|
||||
multilingual = false
|
||||
src = "src"
|
||||
title = "mapr documentation"
|
||||
title = "maplibe-rs documentation"
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
# mapr documentation
|
||||
# maplibre-rs documentation
|
||||
|
||||
[Introduction](./introduction.md)
|
||||
[Supported Platforms](./supported-platforms.md)
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
|
||||
## Talks
|
||||
|
||||
* [Project_ Demonstration_mapr](https://docs.google.com/presentation/d/1mhpKTIf3iv3T1Lucfuyiry5Vg9bNuzLCXkLLKN3R1AA/edit?usp=sharing)
|
||||
* [2022-04-13-World-in-Vectors](https://docs.google.com/presentation/d/e/2PACX-1vRsi-sGsqwUXEIQDClaZF4BH2RgjufQQ-yxFDWeOGrm0EbIf4H4lFY3U4at4cAIlxSTWi4XyF2LKjRu/pub)
|
||||
|
||||
## Related Projects
|
||||
|
||||
|
||||
@ -1,3 +1,3 @@
|
||||
# Developer Log
|
||||
|
||||
I'm regularly releasing blog posts [on my blog](https://maxammann.org/categories/mapr/).
|
||||
I'm regularly releasing blog posts [on my blog](https://maxammann.org/categories/maplibre/).
|
||||
@ -1,7 +1,7 @@
|
||||
# Caching
|
||||
|
||||
The caching for mapr is handled on the networking layer. This means that data which is fetched over slow IO is cached in
|
||||
the format of the network requests. The mapr library is not introducing a separate serialization format for caching.
|
||||
The caching for maplibre-rs is handled on the networking layer. This means that data which is fetched over slow IO is cached in
|
||||
the format of the network requests. The maplibre-rs library is not introducing a separate serialization format for caching.
|
||||
|
||||
Instead, caching functionality of HTTP client libraries of the web platform are used. This has the advantage that we can
|
||||
honor HTTP headers which configure caching. This is very important for fetched tiles, as they can have an expiry date.
|
||||
|
||||
File diff suppressed because one or more lines are too long
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
File diff suppressed because one or more lines are too long
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
@ -53,7 +53,7 @@ cd web
|
||||
npm run start
|
||||
```
|
||||
|
||||
If you want to run mapr with WebGL which is supported on every major browser, then you have to use the following
|
||||
If you want to run maplibre-rs with WebGL which is supported on every major browser, then you have to use the following
|
||||
command.
|
||||
|
||||
```bash
|
||||
|
||||
|
Before Width: | Height: | Size: 715 KiB After Width: | Height: | Size: 715 KiB |
@ -1,5 +1,5 @@
|
||||
use mapr::window::FromWindow;
|
||||
use mapr::{MapBuilder, ScheduleMethod, TokioScheduleMethod};
|
||||
use maplibre::window::FromWindow;
|
||||
use maplibre::{MapBuilder, ScheduleMethod, TokioScheduleMethod};
|
||||
|
||||
#[cfg(feature = "enable-tracing")]
|
||||
fn enable_tracing() {
|
||||
|
||||
6
justfile
6
justfile
@ -25,12 +25,12 @@ webpack-production: nightly-toolchain
|
||||
|
||||
wasm-pack-webgl: nightly-toolchain
|
||||
./wasm-pack-v0.10.1-x86_64-unknown-linux-musl/wasm-pack build . \
|
||||
--release --target web --out-dir dist/mapr -- \
|
||||
--release --target web --out-dir web/dist/maplibre-rs -- \
|
||||
--features "web-webgl" -Z build-std=std,panic_abort
|
||||
|
||||
wasm-pack: nightly-toolchain
|
||||
./wasm-pack-v0.10.1-x86_64-unknown-linux-musl/wasm-pack build . \
|
||||
--release --target web --out-dir dist/mapr -- \
|
||||
--release --target web --out-dir web/dist/maplibre-rs -- \
|
||||
-Z build-std=std,panic_abort
|
||||
|
||||
build-web-webgl: nightly-toolchain
|
||||
@ -42,7 +42,7 @@ build-web: nightly-toolchain
|
||||
wasm-bindgen:
|
||||
cargo install wasm-bindgen-cli
|
||||
# TODO: Untested: --reference-types
|
||||
wasm-bindgen --target web --out-dir dist/mapr-pain-bindgen target/wasm32-unknown-unknown/debug/mapr.wasm
|
||||
wasm-bindgen --target web --out-dir web/dist/maplibre-rs-plain-bindgen target/wasm32-unknown-unknown/debug/maplibre.wasm
|
||||
|
||||
build-wasm-bindgen: build-web wasm-bindgen
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
//! File which exposes all kinds of coordinates used throughout mapr
|
||||
//! File which exposes all kinds of coordinates used throughout maplibre-rs
|
||||
|
||||
use std::fmt;
|
||||
use std::fmt::Formatter;
|
||||
|
||||
@ -30,7 +30,7 @@ impl HttpSourceClient {
|
||||
Self {
|
||||
#[cfg(not(target_arch = "wasm32"))]
|
||||
inner_client: crate::platform::http_client::ReqwestHttpClient::new(Some(
|
||||
"./mapr-cache".to_string(), // TODO make path dynamic
|
||||
"./maplibre-cache".to_string(), // TODO make path dynamic
|
||||
)),
|
||||
#[cfg(target_arch = "wasm32")]
|
||||
inner_client: crate::platform::http_client::WHATWGFetchHttpClient::new(),
|
||||
|
||||
@ -8,7 +8,7 @@ pub use std::time::Instant;
|
||||
pub const COLOR_TEXTURE_FORMAT: wgpu::TextureFormat = wgpu::TextureFormat::Bgra8UnormSrgb;
|
||||
|
||||
#[no_mangle]
|
||||
pub fn mapr_apple_main() {
|
||||
pub fn maplibre_apple_main() {
|
||||
env_logger::init_from_env(env_logger::Env::default().default_filter_or("info"));
|
||||
|
||||
MapBuilder::from_window("A fantastic window!")
|
||||
|
||||
@ -67,7 +67,7 @@ pub async fn run(scheduler_ptr: *mut Scheduler) {
|
||||
let scheduler: Box<Scheduler> = unsafe { Box::from_raw(scheduler_ptr) };
|
||||
|
||||
// Either call forget or the main loop to keep worker loop alive
|
||||
MapBuilder::from_canvas("mapr")
|
||||
MapBuilder::from_canvas("maplibre")
|
||||
.with_existing_scheduler(*scheduler)
|
||||
.build()
|
||||
.initialize()
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
//! This module implements the rendering algorithm of mapr. It manages the whole communication with
|
||||
//! the GPU.
|
||||
//! This module implements the rendering algorithm of maplibre-rs. It manages the whole
|
||||
//! communication with the GPU.
|
||||
|
||||
mod buffer_pool;
|
||||
mod options;
|
||||
|
||||
2
web/.gitignore
vendored
2
web/.gitignore
vendored
@ -1,5 +1,5 @@
|
||||
node_modules
|
||||
|
||||
libs/mapr*
|
||||
libs/maplibre*
|
||||
|
||||
dist
|
||||
@ -1,4 +1,4 @@
|
||||
import init, {create_pool_scheduler, new_thread_local_state, run} from "./dist/libs/mapr"
|
||||
import init, {create_pool_scheduler, new_thread_local_state, run} from "./dist/libs/maplibre"
|
||||
import {Spector} from "spectorjs"
|
||||
import {WebWorkerMessageType} from "./types"
|
||||
import {
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "web",
|
||||
"version": "0.0.1",
|
||||
"description": "A mapr demo",
|
||||
"description": "A maplibre demo",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"start": "RUSTUP_TOOLCHAIN=nightly-2022-04-04-x86_64-unknown-linux-gnu webpack-dev-server --mode=development",
|
||||
@ -14,7 +14,7 @@
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/maxammann/mapr"
|
||||
"url": "https://github.com/maplibre/maplibre-rs"
|
||||
},
|
||||
"dependencies": {
|
||||
"spectorjs": "^0.9.27",
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import init, {child_entry_point} from "./dist/libs/mapr"
|
||||
import init, {child_entry_point} from "./dist/libs/maplibre"
|
||||
|
||||
onmessage = async message => {
|
||||
const initialised = init(message.data[0], message.data[1]).catch(err => {
|
||||
|
||||
@ -4,6 +4,6 @@
|
||||
<title><%= htmlWebpackPlugin.options.title %></title>
|
||||
</head>
|
||||
<body style="margin: 0; padding: 0; width:100%; height: 100%; max-height: 100%;">
|
||||
<canvas id="mapr" style="position:absolute;"></canvas>
|
||||
<canvas id="maplibre" style="position:absolute;"></canvas>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@ -52,7 +52,7 @@ module.exports = (env) => ({
|
||||
WEBGL: !!env.webgl
|
||||
}),
|
||||
new HtmlWebpackPlugin({
|
||||
title: 'mapr',
|
||||
title: 'maplibre demo',
|
||||
}),
|
||||
new WasmPackPlugin({
|
||||
crateDirectory: path.resolve(__dirname, '../'),
|
||||
@ -73,7 +73,7 @@ module.exports = (env) => ({
|
||||
// ],
|
||||
|
||||
// The same as the `--out-dir` option for `wasm-pack`
|
||||
outDir: path.resolve(__dirname, 'dist/libs/mapr'),
|
||||
outDir: path.resolve(__dirname, 'dist/libs/maplibre'),
|
||||
|
||||
// The same as the `--out-name` option for `wasm-pack`
|
||||
// outName: "index",
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import init, {InitOutput, tessellate_layers} from "./dist/libs/mapr"
|
||||
import init, {InitOutput, tessellate_layers} from "./dist/libs/maplibre"
|
||||
import {WebWorkerMessageType} from "./types"
|
||||
|
||||
let module: Promise<InitOutput> = null
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user