bevy_wasm_scripting 0.2.0

Adds support for wasm/wat assets in Bevy, and enables easy scripting.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use bevy::prelude::Entity;

pub type EntityId = f64;

pub trait EntityIdTrait {
    fn to_entity(&self) -> Entity;
    fn from_entity(entity: Entity) -> Self;
}

impl EntityIdTrait for EntityId {
    fn to_entity(&self) -> Entity {
        Entity::from_bits(self.to_bits())
    }

    fn from_entity(entity: Entity) -> Self {
        Self::from_bits(entity.to_bits())
    }
}