hai_core 0.7.0

Core implementation of Hai game engine, and general 2D rendering library using WebGPU as well.
Documentation
use std::sync::Arc;

use crate::base::SurfaceSize;
use crate::resource::ResourceManager;

use super::Node;

pub trait Focusable: Node {
    /**

       Check whether the input point is on the node-like, coordinate of the point is relative to its parent.

       You may need to select property width and height, then handle `anchor` property to make it work.
       Or, if it is not square, you may need to do something more complex to calculate the correct area.
    */
    fn contains(&self, x: f32, y: f32, payload: &FocusablePayload) -> bool;
}

#[derive(Debug)]
pub struct FocusablePayload {
    pub surface_size: SurfaceSize,
    pub resource_manager: Arc<ResourceManager>,
}