Sign in

    mgstudio

    Download zip
    Author
    Version
    0.1.2
    License
    Apache-2.0
    Last updated
    8 months ago
    Downloads
    64

    #Milky2018/mgstudio

    mgstudio-engine is a small Bevy-inspired runtime core implemented in MoonBit.

    #Text2d pipeline (engine-led)

    Text rendering is implemented in the guest (engine) and only relies on the host runtime for I/O and GPU texture updates:

    • Shaping / line-breaking / BiDi: Milky2018/moon_cosmic
    • Glyph rasterization: Milky2018/moon_swash
    • Font bytes: host provides asset_load_font + asset_font_bytes_* (read-only)
    • Glyph atlas upload: host provides asset_create_dynamic_texture and asset_update_texture_region_bytes

    The legacy host APIs font_rasterize_glyph / font_measure_advance are kept only for backwards-compatibility and are not used by the current engine text pipeline.

    default_plugins

    fn[W :
    DefaultPluginsWorld
    +
    ChangeTickWorld
    +
    SystemContextWorld
    +
    SpawnWorld
    +
    Has_Transform
    +
    Has_Parent
    +
    Has_Children
    +
    Has_GlobalTransform
    +
    Has_Visibility
    +
    Has_InheritedVisibility
    +
    Has_ViewVisibility
    +
    HasRes_RenderState
    +
    Has_RenderLayers
    +
    Has_Sprite
    +
    Has_ScissorRect
    +
    Has_Anchor
    +
    Has_Camera2d
    +
    Has_Camera
    +
    Has_Projection
    +
    Has_RenderTarget
    +
    Has_Mesh2d
    +
    Has_ColorMaterial
    +
    Has_GpuMesh2d
    +
    Has_RigidBody2d
    +
    Has_Collider2d
    +
    Has_ColliderParent2d
    +
    Has_KinematicCharacterController2d
    +
    Has_KinematicCharacterControllerOutput2d
    +
    Has_Velocity2d
    +
    Has_Damping2d
    +
    Has_GravityScale2d
    +
    Has_LockedAxes2d
    +
    Has_Ccd2d
    +
    Has_Dominance2d
    +
    Has_Sleeping2d
    +
    Has_ExternalForce2d
    +
    Has_ExternalImpulse2d
    +
    Has_RigidBodyEnabled2d
    +
    Has_AdditionalMassProperties2d
    +
    Has_AdditionalSolverIterations2d
    +
    Has_ContactForceEventThreshold2d
    +
    Has_ColliderDensity2d
    +
    Has_Friction2d
    +
    Has_FrictionCombineRule2d
    +
    Has_Restitution2d
    +
    Has_RestitutionCombineRule2d
    +
    Has_CollisionGroups2d
    +
    Has_SolverGroups2d
    +
    Has_ColliderEnabled2d
    +
    Has_ActiveCollisionTypes2d
    +
    Has_ActiveEvents2d
    +
    Has_ActiveHooks2d
    +
    Has_ContactSkin2d
    +
    Has_ColliderMassProperties2d
    +
    Has_ImpulseJoint2d
    +
    Has_MultibodyJoint2d
    +
    Has_RapierBodyHandle2d
    +
    Has_RapierColliderHandle2d
    +
    Has_RapierImpulseJointHandle2d
    +
    Has_RapierMultibodyJointHandle2d
    +
    HasRes_Physics2dConfig
    +
    HasRes_Physics2dContext
    +
    HasRes_Physics2dEvents
    +
    Has_RigidBody3d
    +
    Has_Collider3d
    +
    Has_Velocity3d
    +
    Has_RapierBodyHandle3d
    +
    Has_RapierColliderHandle3d
    +
    HasRes_Physics3dConfig
    +
    HasRes_Physics3dContext
    +
    HasRes_Physics3dEvents
    +
    HasRes_PickingEvents
    +
    HasRes_PickingState
    +
    HasRes_PickingHits
    +
    HasRes_PointerInputs
    +
    HasRes_A11yState
    +
    HasRes_UiContext
    +
    HasRes_UiScale
    +
    HasRes_UiStack
    +
    Has_UiRoot
    +
    Has_Node
    +
    Has_ContentSize
    +
    Has_ImageNodeSize
    +
    Has_ZIndex
    +
    Has_GlobalZIndex
    +
    Has_ScrollPosition
    +
    Has_UiLayout
    +
    Has_CalculatedClip
    +
    Has_RelativeCursorPosition
    +
    Has_FocusPolicy
    +
    Has_BackgroundColor
    +
    Has_UiImage
    +
    Has_ImageNode
    +
    Has_ButtonColors
    +
    Has_Button
    +
    Has_Label
    +
    Has_Interaction
    +
    Has_UiText
    +
    Has_AccessibilityLabel
    +
    Has_Outline
    +
    Has_BoxShadow
    +
    Has_UiBoxShadowSamples
    +
    Has_BorderColor
    +
    Has_BorderRadius
    +
    Has_UiAntiAlias
    ] default_plugins() -> Array[(
    App
    [W]) ->
    App
    [W]]

    Default plugin bundle, aligned with Bevy's DefaultPlugins concept.

    Implementation lives in Milky2018/mgstudio/internal (similar to Bevy's bevy_internal) and is forwarded here for a stable user-facing API.

    default_plugins_nearest

    fn[W :
    DefaultPluginsWorld
    +
    ChangeTickWorld
    +
    SystemContextWorld
    +
    SpawnWorld
    +
    Has_Transform
    +
    Has_Parent
    +
    Has_Children
    +
    Has_GlobalTransform
    +
    Has_Visibility
    +
    Has_InheritedVisibility
    +
    Has_ViewVisibility
    +
    HasRes_RenderState
    +
    Has_RenderLayers
    +
    Has_Sprite
    +
    Has_ScissorRect
    +
    Has_Anchor
    +
    Has_Camera2d
    +
    Has_Camera
    +
    Has_Projection
    +
    Has_RenderTarget
    +
    Has_Mesh2d
    +
    Has_ColorMaterial
    +
    Has_GpuMesh2d
    +
    Has_RigidBody2d
    +
    Has_Collider2d
    +
    Has_ColliderParent2d
    +
    Has_KinematicCharacterController2d
    +
    Has_KinematicCharacterControllerOutput2d
    +
    Has_Velocity2d
    +
    Has_Damping2d
    +
    Has_GravityScale2d
    +
    Has_LockedAxes2d
    +
    Has_Ccd2d
    +
    Has_Dominance2d
    +
    Has_Sleeping2d
    +
    Has_ExternalForce2d
    +
    Has_ExternalImpulse2d
    +
    Has_RigidBodyEnabled2d
    +
    Has_AdditionalMassProperties2d
    +
    Has_AdditionalSolverIterations2d
    +
    Has_ContactForceEventThreshold2d
    +
    Has_ColliderDensity2d
    +
    Has_Friction2d
    +
    Has_FrictionCombineRule2d
    +
    Has_Restitution2d
    +
    Has_RestitutionCombineRule2d
    +
    Has_CollisionGroups2d
    +
    Has_SolverGroups2d
    +
    Has_ColliderEnabled2d
    +
    Has_ActiveCollisionTypes2d
    +
    Has_ActiveEvents2d
    +
    Has_ActiveHooks2d
    +
    Has_ContactSkin2d
    +
    Has_ColliderMassProperties2d
    +
    Has_ImpulseJoint2d
    +
    Has_MultibodyJoint2d
    +
    Has_RapierBodyHandle2d
    +
    Has_RapierColliderHandle2d
    +
    Has_RapierImpulseJointHandle2d
    +
    Has_RapierMultibodyJointHandle2d
    +
    HasRes_Physics2dConfig
    +
    HasRes_Physics2dContext
    +
    HasRes_Physics2dEvents
    +
    Has_RigidBody3d
    +
    Has_Collider3d
    +
    Has_Velocity3d
    +
    Has_RapierBodyHandle3d
    +
    Has_RapierColliderHandle3d
    +
    HasRes_Physics3dConfig
    +
    HasRes_Physics3dContext
    +
    HasRes_Physics3dEvents
    +
    HasRes_PickingEvents
    +
    HasRes_PickingState
    +
    HasRes_PickingHits
    +
    HasRes_PointerInputs
    +
    HasRes_A11yState
    +
    HasRes_UiContext
    +
    HasRes_UiScale
    +
    HasRes_UiStack
    +
    Has_UiRoot
    +
    Has_Node
    +
    Has_ContentSize
    +
    Has_ImageNodeSize
    +
    Has_ZIndex
    +
    Has_GlobalZIndex
    +
    Has_ScrollPosition
    +
    Has_UiLayout
    +
    Has_CalculatedClip
    +
    Has_RelativeCursorPosition
    +
    Has_FocusPolicy
    +
    Has_BackgroundColor
    +
    Has_UiImage
    +
    Has_ImageNode
    +
    Has_ButtonColors
    +
    Has_Button
    +
    Has_Label
    +
    Has_Interaction
    +
    Has_UiText
    +
    Has_AccessibilityLabel
    +
    Has_Outline
    +
    Has_BoxShadow
    +
    Has_UiBoxShadowSamples
    +
    Has_BorderColor
    +
    Has_BorderRadius
    +
    Has_UiAntiAlias
    ] default_plugins_nearest() -> Array[(
    App
    [W]) ->
    App
    [W]]

    Default plugin bundle with "nearest" sampling for textures (useful for pixel art).