cadre/component

View on A-Frame document

Types

pub type Property {
  Property(value: String)
  Boolean(value: Bool)
  Integer(value: Int)
  Number(value: Float)
  Vec2(value: vec2.Vec2(Float))
  Vec3(value: vec3.Vec3(Float))
  Vec4(value: vec4.Vec4(Float))
  Array(values: List(Property))
}

Constructors

  • Property(value: String)
  • Boolean(value: Bool)
  • Integer(value: Int)
  • Number(value: Float)
  • Vec2(value: vec2.Vec2(Float))
  • Vec3(value: vec3.Vec3(Float))
  • Vec4(value: vec4.Vec4(Float))
  • Array(values: List(Property))

Values

pub fn anchored(
  properties: List(#(String, Property)),
) -> attribute.Attribute(message)
pub fn animation(
  properties: List(#(String, Property)),
) -> attribute.Attribute(message)
pub fn animation_(
  id: String,
  properties: List(#(String, Property)),
) -> attribute.Attribute(message)
pub fn ar_hit_test(
  properties: List(#(String, Property)),
) -> attribute.Attribute(message)
pub fn background(
  properties: List(#(String, Property)),
) -> attribute.Attribute(message)
pub fn camera(
  properties: List(#(String, Property)),
) -> attribute.Attribute(message)
pub fn cursor(
  properties: List(#(String, Property)),
) -> attribute.Attribute(message)
pub fn debug(is_debug: Bool) -> attribute.Attribute(message)
pub fn device_orientation_permission_ui(
  properties: List(#(String, Property)),
) -> attribute.Attribute(message)
pub fn embedded(
  is_embedded: Bool,
) -> attribute.Attribute(message)
pub fn fog(
  properties: List(#(String, Property)),
) -> attribute.Attribute(message)
pub fn geometry(
  properties: List(#(String, Property)),
) -> attribute.Attribute(message)
pub fn gltf_model(value: String) -> attribute.Attribute(message)
pub fn hand_controls(
  properties: List(#(String, Property)),
) -> attribute.Attribute(message)
pub fn hand_tracking_controls(
  properties: List(#(String, Property)),
) -> attribute.Attribute(message)
pub fn hand_tracking_grab_controls(
  properties: List(#(String, Property)),
) -> attribute.Attribute(message)
pub fn hide_on_enter_ar(
  is_hide_on_enter_ar: Bool,
) -> attribute.Attribute(message)
pub fn hide_on_enter_vr(
  is_hide_on_enter_vr: Bool,
) -> attribute.Attribute(message)
pub fn keyboard_shortcuts(
  properties: List(#(String, Property)),
) -> attribute.Attribute(message)
pub fn laser_controls(
  properties: List(#(String, Property)),
) -> attribute.Attribute(message)
pub fn layer(
  properties: List(#(String, Property)),
) -> attribute.Attribute(message)
pub fn light(
  properties: List(#(String, Property)),
) -> attribute.Attribute(message)
pub fn line(
  properties: List(#(String, Property)),
) -> attribute.Attribute(message)
pub fn line_(
  id: String,
  properties: List(#(String, Property)),
) -> attribute.Attribute(message)
pub fn link(
  properties: List(#(String, Property)),
) -> attribute.Attribute(message)
pub fn loading_screen(
  properties: List(#(String, Property)),
) -> attribute.Attribute(message)
pub fn logitech_mx_ink_controls(
  properties: List(#(String, Property)),
) -> attribute.Attribute(message)
pub fn look_controls(
  properties: List(#(String, Property)),
) -> attribute.Attribute(message)
pub fn magicleap_controls(
  properties: List(#(String, Property)),
) -> attribute.Attribute(message)
pub fn material(
  properties: List(#(String, Property)),
) -> attribute.Attribute(message)
pub fn meta_touch_controls(
  properties: List(#(String, Property)),
) -> attribute.Attribute(message)
pub fn obb_collider(
  properties: List(#(String, Property)),
) -> attribute.Attribute(message)
pub fn obj_model(
  properties: List(#(String, Property)),
) -> attribute.Attribute(message)
pub fn pool(
  properties: List(#(String, Property)),
) -> attribute.Attribute(message)
pub fn pool_(
  id: String,
  properties: List(#(String, Property)),
) -> attribute.Attribute(message)
pub fn position(
  position: vec3.Vec3(Float),
) -> attribute.Attribute(message)
pub fn property(
  name: String,
  property: Property,
) -> attribute.Attribute(message)

Create an A-Frame attribute. This is like saying element.setAttribute("position", "0 0 0") in JavaScript. Attributes will be rendered when calling element.to_string.

pub fn raycaster(
  properties: List(#(String, Property)),
) -> attribute.Attribute(message)
pub fn real_world_meshing(
  is_real_world_meshing: Bool,
) -> attribute.Attribute(message)
pub fn reflection(
  properties: List(#(String, Property)),
) -> attribute.Attribute(message)
pub fn renderer(
  properties: List(#(String, Property)),
) -> attribute.Attribute(message)
pub fn rotation(
  rotation: vec3.Vec3(Float),
) -> attribute.Attribute(message)
pub fn scale(
  scale: vec3.Vec3(Float),
) -> attribute.Attribute(message)
pub fn screenshot(
  properties: List(#(String, Property)),
) -> attribute.Attribute(message)
pub fn shadow(
  properties: List(#(String, Property)),
) -> attribute.Attribute(message)
pub fn sound(
  properties: List(#(String, Property)),
) -> attribute.Attribute(message)
pub fn stats(is_stats: Bool) -> attribute.Attribute(message)
pub fn text(
  properties: List(#(String, Property)),
) -> attribute.Attribute(message)
pub fn tracked_controls(
  properties: List(#(String, Property)),
) -> attribute.Attribute(message)
pub fn visible(visible: Bool) -> attribute.Attribute(message)
pub fn vive_controls(
  properties: List(#(String, Property)),
) -> attribute.Attribute(message)
pub fn vive_focus_controls(
  properties: List(#(String, Property)),
) -> attribute.Attribute(message)
pub fn wasd_controls(
  properties: List(#(String, Property)),
) -> attribute.Attribute(message)
pub fn webxr(
  properties: List(#(String, Property)),
) -> attribute.Attribute(message)
pub fn windows_motion_controls(
  properties: List(#(String, Property)),
) -> attribute.Attribute(message)
pub fn xr_mode_ui(
  properties: List(#(String, Property)),
) -> attribute.Attribute(message)
Search Document