~starkingdoms/starkingdoms

16ef421ba4cdf5ba7be055945b9e4ddb1e4759b8 — c0repwn3r 2 years ago ae2065e + 84005c5
merge
M client/src/rendering/renderer.rs => client/src/rendering/renderer.rs +4 -6
@@ 67,6 67,8 @@ impl Renderer for WebRenderer {
            context.save();

            //context.translate(player.x, player.y).map_err(|e: JsValue| e.as_string().unwrap())?;
            //gaah fuck why noo i didnt want this. godforsaken canvas rotation
            context.translate(player.x - client.x, player.y - client.y).map_err(|e: JsValue| e.as_string().unwrap())?; // fwip

            context.set_text_align("center");
            context.set_font("30px Segoe UI");


@@ 77,18 79,14 @@ impl Renderer for WebRenderer {

            let texture_image = document.get_element_by_id("tex-hearty").unwrap().dyn_into::<HtmlImageElement>().unwrap();
            debug!("H {} {}", player.x - 25f64 - client.x, player.y - 25f64 - client.y);
            context.draw_image_with_html_image_element_and_dw_and_dh(&texture_image, player.x - 25f64 - client.x, player.y - 25f64 - client.y, 50f64, 50f64).map_err(|e: JsValue| e.as_string().unwrap())?; // sktch
            //context.draw_image_with_html_image_element_and_dw_and_dh(&texture_image, player.x - 25f64 - client.x, player.y - 25f64 - client.y, 50f64, 50f64).map_err(|e: JsValue| e.as_string().unwrap())?;
            context.draw_image_with_html_image_element_and_dw_and_dh(&texture_image, -25f64, -25f64, 50f64, 50f64).map_err(|e: JsValue| e.as_string().unwrap())?; // sktch

            //context.rotate(-player.rotation).map_err(|e: JsValue| e.as_string().unwrap())?; // fwoop

            context.restore();
        }

        context.scale(0.25f64, 0.25f64).map_err(|e: JsValue| e.as_string().unwrap())?;

        // do not remove
        // im making this smiley an easter egg soon
        // i just have to go fix the broken build system first
/*
        context.begin_path();


M spacetime_py/__pycache__/ninja_syntax.cpython-310.pyc => spacetime_py/__pycache__/ninja_syntax.cpython-310.pyc +0 -0