load a few extra tiles
This commit is contained in:
parent
069f98d604
commit
01637895b6
4 changed files with 5 additions and 5 deletions
6
crates/client/dist/index.html
vendored
6
crates/client/dist/index.html
vendored
|
@ -94,7 +94,7 @@
|
|||
}
|
||||
}
|
||||
</style>
|
||||
<link rel="modulepreload" href="/wxbox-client-263c84fc1942c2bc.js" crossorigin="anonymous" integrity="sha384-KUIh+urSU4nqO6N7Q5y59ClO7Q1fHdV7qTTYeGc7hENeGUzLNg/BG6IhFceGJrcf"><link rel="preload" href="/wxbox-client-263c84fc1942c2bc_bg.wasm" crossorigin="anonymous" integrity="sha384-/6swccxrEymN9GDB22cvwwHby2GEnLq9hVjqFlX9ePRhAyAHNy6OtFZMAuQui2Oz" as="fetch" type="application/wasm"></head>
|
||||
<link rel="modulepreload" href="/wxbox-client-43bdf179bb0c5f46.js" crossorigin="anonymous" integrity="sha384-KUIh+urSU4nqO6N7Q5y59ClO7Q1fHdV7qTTYeGc7hENeGUzLNg/BG6IhFceGJrcf"><link rel="preload" href="/wxbox-client-43bdf179bb0c5f46_bg.wasm" crossorigin="anonymous" integrity="sha384-PYPIkq+UvlzCRWv/x6MZTiOvEh2cKbAhjpWDATZYqYOGNJHW1iQon/NX52UpKDJ3" as="fetch" type="application/wasm"></head>
|
||||
|
||||
<body>
|
||||
<!-- The WASM code will resize the canvas dynamically -->
|
||||
|
@ -111,8 +111,8 @@
|
|||
|
||||
|
||||
<script type="module">
|
||||
import init, * as bindings from '/wxbox-client-263c84fc1942c2bc.js';
|
||||
const wasm = await init({ module_or_path: '/wxbox-client-263c84fc1942c2bc_bg.wasm' });
|
||||
import init, * as bindings from '/wxbox-client-43bdf179bb0c5f46.js';
|
||||
const wasm = await init({ module_or_path: '/wxbox-client-43bdf179bb0c5f46_bg.wasm' });
|
||||
|
||||
|
||||
window.wasmBindings = bindings;
|
||||
|
|
Binary file not shown.
|
@ -102,8 +102,8 @@ impl Map {
|
|||
// lat, long is top left
|
||||
// tiles are rendered at 256x256. how many can we fit?
|
||||
debug!("viewport is {}px, we can render {}", viewport_width, viewport_width / 256);
|
||||
let tiles_x = viewport_width as isize / 256;
|
||||
let tiles_y = viewport_height as isize / 256;
|
||||
let tiles_x = (viewport_width as f32 / 256.0).ceil() as isize + 1;
|
||||
let tiles_y = (viewport_height as f32 / 256.0).ceil() as isize + 1;
|
||||
|
||||
let mut tiles = vec![];
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue