Sign in

    moui_3d_xr

    Neutral WebXR and OpenXR contracts for MoUI

    moui
    3d
    xr
    openxr
    webxr
    Download zip
    Author
    Version
    0.2.1
    License
    Apache-2.0
    Last updated
    5 days ago
    Downloads
    10

    Dependencies

    wzzc-dev/moui_3d_xr does not have a README file

    XrBackend

    pub(all) enum XrBackend {
    WebXr
    OpenXr
    } derive(Eq, ToJson,
    Debug
    )

    XrBackend::equal

    fn XrBackend::equal(XrBackend, XrBackend) -> Bool

    XrBackend::not_equal

    fn XrBackend::not_equal(x : XrBackend, y : XrBackend) -> Bool

    XrBackend::to_json

    fn XrBackend::to_json(XrBackend) -> Json

    XrFrame

    pub(all) struct XrFrame {
    timestamp : Double
    views : Array[XrView]
    input_sources : Array[XrInputSource]
    } derive(
    Debug
    )

    XrFrame::input_sources

    fn XrFrame::input_sources(self : XrFrame) -> Array[XrInputSource]

    XrFrame::new

    fn XrFrame::new(timestamp~ : Double, views~ : Array[XrView], input_sources? : Array[XrInputSource]) -> XrFrame

    XrFrame::timestamp

    fn XrFrame::timestamp(self : XrFrame) -> Double

    XrFrame::to_repr

    XrFrame::views

    fn XrFrame::views(self : XrFrame) -> Array[XrView]

    XrInputSource

    pub(all) struct XrInputSource {
    id : String
    handedness : String
    grip : XrPose?
    target_ray : XrPose?
    } derive(
    Debug
    )

    XrInputSource::grip

    fn XrInputSource::grip(self : XrInputSource) -> XrPose?

    XrInputSource::handedness

    fn XrInputSource::handedness(self : XrInputSource) -> String

    XrInputSource::id

    fn XrInputSource::id(self : XrInputSource) -> String

    XrInputSource::new

    fn XrInputSource::new(id~ : String, handedness? : String, grip? : XrPose?, target_ray? : XrPose?) -> XrInputSource

    XrInputSource::target_ray

    fn XrInputSource::target_ray(self : XrInputSource) -> XrPose?

    XrPose

    pub(all) struct XrPose {
    position :
    Vec3

    orientation :
    Quat

    } derive(Eq, ToJson,
    Debug
    )

    XrPose::equal

    fn XrPose::equal(XrPose, XrPose) -> Bool

    XrPose::new

    fn XrPose::new(position~ :
    Vec3
    , orientation~ :
    Quat
    ) -> XrPose

    XrPose::not_equal

    fn XrPose::not_equal(x : XrPose, y : XrPose) -> Bool

    XrPose::orientation

    fn XrPose::orientation(self : XrPose) ->
    Quat

    XrPose::position

    fn XrPose::position(self : XrPose) ->
    Vec3

    XrPose::to_json

    fn XrPose::to_json(XrPose) -> Json

    XrPose::to_repr

    XrProviderDescriptor

    pub(all) struct XrProviderDescriptor {
    backend : XrBackend
    id : String
    status : String
    } derive(Eq, ToJson,
    Debug
    )

    XrProviderDescriptor::backend

    XrProviderDescriptor::equal

    XrProviderDescriptor::id

    XrProviderDescriptor::new

    fn XrProviderDescriptor::new(backend~ : XrBackend, id~ : String, status~ : String) -> XrProviderDescriptor

    XrProviderDescriptor::not_equal

    XrProviderDescriptor::status

    fn XrProviderDescriptor::status(self : XrProviderDescriptor) -> String

    XrProviderDescriptor::to_json

    XrResult

    pub(all) enum XrResult {
    Presented
    Unavailable(String)
    Failed(String)
    } derive(Eq, ToJson,
    Debug
    )

    XrResult::equal

    fn XrResult::equal(XrResult, XrResult) -> Bool

    XrResult::not_equal

    fn XrResult::not_equal(x : XrResult, y : XrResult) -> Bool

    XrResult::to_json

    fn XrResult::to_json(XrResult) -> Json

    XrResult::to_repr

    XrSessionMode

    pub(all) enum XrSessionMode {
    Inline
    ImmersiveVr
    ImmersiveAr
    } derive(Eq, ToJson,
    Debug
    )

    XrSessionMode::equal

    XrSessionMode::not_equal

    fn XrSessionMode::not_equal(x : XrSessionMode, y : XrSessionMode) -> Bool

    XrSessionMode::to_json

    XrView

    pub(all) struct XrView {
    view :
    Mat4

    projection :
    Mat4

    viewport_x : Int
    viewport_y : Int
    viewport_width : Int
    viewport_height : Int
    } derive(
    Debug
    )

    XrView::new

    fn XrView::new(view~ :
    Mat4
    , projection~ :
    Mat4
    , viewport_x~ : Int, viewport_y~ : Int, viewport_width~ : Int, viewport_height~ : Int) -> XrView

    XrView::projection

    fn XrView::projection(self : XrView) ->
    Mat4

    XrView::to_repr

    XrView::view

    XrView::viewport_height

    fn XrView::viewport_height(self : XrView) -> Int

    XrView::viewport_width

    fn XrView::viewport_width(self : XrView) -> Int

    openxr_descriptor

    fn openxr_descriptor() -> XrProviderDescriptor

    webxr_descriptor

    fn webxr_descriptor() -> XrProviderDescriptor

    Powered by MoonBit

    Site sourceReport issuePackagesBuild queueSkillsStatistics

    © 2026 mooncakes.io