Skip to content

Call to undeclared geometry function/attribute in wasm crate #233

Description

@hugohil

Hey!
I was playing around with libprocessing today and couldn't build because of a undeclared call to geometry_attribute_dead in the wasm crate. From what i understand, there's no dead attribute in the geometry crate, but i'm no Rust or Bevy expert (yet! :D)

geometry_attribute_dead().to_bits()

#[derive(Resource)]
pub struct BuiltinAttributes {
pub position: Entity,
pub normal: Entity,
pub color: Entity,
pub uv: Entity,
pub rotation: Entity,
pub scale: Entity,
pub life: Entity,
pub velocity: Entity,
pub age: Entity,
}

impl BuiltinAttributes {
pub fn by_name(&self, name: &str) -> Option<Entity> {
Some(match name {
"position" => self.position,
"normal" => self.normal,
"color" => self.color,
"uv" => self.uv,
"rotation" => self.rotation,
"scale" => self.scale,
"life" => self.life,
"velocity" => self.velocity,
"age" => self.age,
_ => return None,
})
}
}

I got it to work by commenting the whole binding like so :

/*
#[wasm_bindgen(js_name = "geometryAttributeDead")]
pub fn js_geometry_attribute_dead() -> u64 {
    geometry_attribute_dead().to_bits()
}
*/

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions