map tile placement debugging
This commit is contained in:
parent
d5aea97931
commit
ca89a8d15d
4 changed files with 7 additions and 7 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-f7fb5fe8b7aea995.js" crossorigin="anonymous" integrity="sha384-wkhAe67T8C73+DmlG8JEq34RPAIiO8Jf+d3BH/nrBQ1b1NjMqo8csITaVtpbPBwV"><link rel="preload" href="/wxbox-client-f7fb5fe8b7aea995_bg.wasm" crossorigin="anonymous" integrity="sha384-S4pqZqxf4w0VeQcOCwl5kVOUPKF32nnmgmF2zfXPZumbEf5Gr524gAl4j0hlT2/K" as="fetch" type="application/wasm"></head>
|
||||
<link rel="modulepreload" href="/wxbox-client-28b62034c6896d47.js" crossorigin="anonymous" integrity="sha384-wkhAe67T8C73+DmlG8JEq34RPAIiO8Jf+d3BH/nrBQ1b1NjMqo8csITaVtpbPBwV"><link rel="preload" href="/wxbox-client-28b62034c6896d47_bg.wasm" crossorigin="anonymous" integrity="sha384-ow0yiVvZiDW6OWF6cYTSzuFo0LI6DMGTWCGFs9WoiJRhnge0QYDzOmr02jBTPGqk" 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-f7fb5fe8b7aea995.js';
|
||||
const wasm = await init({ module_or_path: '/wxbox-client-f7fb5fe8b7aea995_bg.wasm' });
|
||||
import init, * as bindings from '/wxbox-client-28b62034c6896d47.js';
|
||||
const wasm = await init({ module_or_path: '/wxbox-client-28b62034c6896d47_bg.wasm' });
|
||||
|
||||
|
||||
window.wasmBindings = bindings;
|
||||
|
|
Binary file not shown.
|
@ -104,13 +104,13 @@ impl Map {
|
|||
|
||||
|
||||
// for each tile, determine pixel coordinates, then offset by the tile fractionals
|
||||
for x in 0..=tiles_x+2 {
|
||||
for x in 1..tiles_x {
|
||||
let tile_x = tilex + x;
|
||||
for y in 0..=tiles_y+2 {
|
||||
for y in 1..3 {
|
||||
let tile_y = tiley + y;
|
||||
|
||||
let pixel_x = 512_f32 * x as f32 - (2.0*x_tile_frac as f32);
|
||||
let pixel_y = (-512_f32 * y as f32) + (2.0*y_tile_frac as f32);
|
||||
let pixel_x = 512_f32 * x as f32;
|
||||
let pixel_y = (-512_f32 * y as f32);
|
||||
|
||||
|
||||
// download the tile
|
||||
|
|
Loading…
Add table
Reference in a new issue