Adjust example

This commit is contained in:
Maximilian Ammann 2021-12-31 17:44:03 +01:00
parent 53903c5fbc
commit a1ef55a0fe
3 changed files with 7 additions and 6 deletions

View File

@ -10,9 +10,9 @@ use crate::render::state::State;
pub async fn setup(window: winit::window::Window, event_loop: EventLoop<()>, cache: Cache) { pub async fn setup(window: winit::window::Window, event_loop: EventLoop<()>, cache: Cache) {
info!("== mapr =="); info!("== mapr ==");
for x in 0..2 { for x in 0..6 {
for y in 0..2 { for y in 0..6 {
cache.fetch((2179 + x, 1421 + y, 12).into()) cache.fetch((2178 + x, 1421 + y, 12).into())
} }
} }

View File

@ -386,7 +386,7 @@ impl State {
} }
pub fn upload_tile_geometry(&mut self, cache: &Cache) { pub fn upload_tile_geometry(&mut self, cache: &Cache) {
const OFFSET_X: u32 = 2179; const OFFSET_X: u32 = 2178;
const OFFSET_Y: u32 = 1421; const OFFSET_Y: u32 = 1421;
let upload = cache.pop_all(); let upload = cache.pop_all();

View File

@ -1,3 +1,4 @@
use lyon::lyon_tessellation::LineJoin;
use lyon::tessellation; use lyon::tessellation;
use lyon::tessellation::geometry_builder::MaxIndex; use lyon::tessellation::geometry_builder::MaxIndex;
use lyon::tessellation::{ use lyon::tessellation::{
@ -97,7 +98,7 @@ impl<
tesselator tesselator
.tessellate_path( .tessellate_path(
&tile_path, &tile_path,
&StrokeOptions::tolerance(DEFAULT_TOLERANCE), &StrokeOptions::default(),
&mut BuffersBuilder::new(buffer, WithId(prim_id)), &mut BuffersBuilder::new(buffer, WithId(prim_id)),
) )
.unwrap(); .unwrap();
@ -119,7 +120,7 @@ impl<
tesselator tesselator
.tessellate_path( .tessellate_path(
&tile_path, &tile_path,
&FillOptions::tolerance(DEFAULT_TOLERANCE), &FillOptions::default(),
&mut BuffersBuilder::new(buffer, WithId(prim_id)), &mut BuffersBuilder::new(buffer, WithId(prim_id)),
) )
.unwrap(); .unwrap();