Versions in this module Expand all Collapse all v0 v0.1.11 Nov 26, 2026 v0.1.10 Nov 23, 2026 v0.1.9 Nov 21, 2026 v0.1.8 Nov 20, 2026 v0.1.7 Nov 14, 2026 v0.1.6 Nov 13, 2026 v0.1.5 Nov 12, 2026 v0.1.4 Nov 11, 2026 v0.1.3 Nov 9, 2026 v0.1.2 Nov 9, 2026 Changes in this version + const InputTopic + const SceneTarget + var ErrAlreadyReplied = errors.New("module: request already replied") + var ErrBusy = errors.New("module: structural operation requires a tick boundary") + var ErrCanceled = errors.New("module: request canceled") + var ErrCommandFull = errors.New("module: structural command capacity reached") + var ErrDisposed = errors.New("module: instance disposed") + var ErrInvalid = errors.New("module: invalid argument") + var ErrOwnership = errors.New("module: entity belongs to another instance") + var ErrPendingFull = errors.New("module: pending request capacity reached") + var ErrQueueFull = errors.New("module: event queue capacity reached") + var ErrReadOnly = errors.New("module: slot does not allow external writes") + var ErrStaleRevision = errors.New("module: request slot revision changed") + var ErrStartupLimit = errors.New("module: scene startup did not settle within its batch/event budget") + var ErrTimeout = errors.New("module: request timed out") + var ErrType = errors.New("module: protocol type mismatch") + var ErrUnavailable = errors.New("module: request receiver unavailable") + func OnSlotsChange(c *Context, names []string, handler func(*Context) error) error + type AnimationsContent struct + type Collision2D struct + Element string + Normal [2]float32 + OtherType uint32 + Penetration float32 + Phase physics.CollisionPhase + Point [2]float32 + Type uint32 + type Collision3D struct + Element string + Normal [3]float32 + OtherType uint32 + Penetration float32 + Phase physics.CollisionPhase + Point [3]float32 + Type uint32 + type Content struct + func (c *Content) BindControl[T any](id string, v T) error + func (c *Content) ControlTextTabWidth(e ecs.Entity, text *scene.Text2D) (float32, bool) + func (c *Content) Define[P, S any](template html.Template, css string, b ContentBehavior[P, S]) (*html.Definition[P, S], error) + func (c *Content) Despawn(e ecs.Entity) bool + func (c *Content) Element(id string) (ecs.Entity, error) + func (c *Content) FindPart[P, T any](e ecs.Entity) (ecs.Entity, bool) + func (c *Content) Focus(e ecs.Entity) bool + func (c *Content) FocusedControl() ecs.Entity + func (c *Content) Font(name string) (*text.Font, error) + func (c *Content) Get[T any](e ecs.Entity) (T, bool) + func (c *Content) HTMLControl(e ecs.Entity, id string) (ecs.Entity, bool) + func (c *Content) HTMLNode(e ecs.Entity, id string) (html.Node, bool) + func (c *Content) HTMLRoot(e ecs.Entity) (html.Node, error) + func (c *Content) HTMLScrollStyle(e ecs.Entity, id string) (html.ScrollStyle, bool) + func (c *Content) HTMLSet(e ecs.Entity, source string) + func (c *Content) HTMLSetCSS(e ecs.Entity, cssText string) bool + func (c *Content) HTMLSetOffset(e ecs.Entity, id string, x, y float32) bool + func (c *Content) HTMLSetScroll(e ecs.Entity, id string, area ecs.Entity, x, y float32) bool + func (c *Content) Has[T any](e ecs.Entity) bool + func (c *Content) Insert[T any](e ecs.Entity, value T) error + func (c *Content) IsAlive(e ecs.Entity) bool + func (c *Content) ModelRig(name string) (*project.ModelRig, error) + func (c *Content) Mount[P, S any](e ecs.Entity, d *html.Definition[P, S], p P, s S, key uint64) (ecs.Entity, error) + func (c *Content) MustElement(id string) ecs.Entity + func (c *Content) MustMut[T any](e ecs.Entity) *T + func (c *Content) Mut[T any](e ecs.Entity) *T + func (c *Content) Query2[A, B any]() iter.Seq2[ecs.Entity, ecs.Components2[A, B]] + func (c *Content) Query[T any]() iter.Seq2[ecs.Entity, ecs.ComponentAccess[T]] + func (c *Content) ReadFile(name string) ([]byte, error) + func (c *Content) Ref[T any](e ecs.Entity) *T + func (c *Content) RefreshTransforms() error + func (c *Content) ReleaseHTML(e ecs.Entity) + func (c *Content) RemoveResource[T any]() (T, bool) + func (c *Content) ResourceMut[T any]() (*T, bool) + func (c *Content) Resource[T any]() (T, bool) + func (c *Content) Root() ecs.Entity + func (c *Content) ScrollOffset(e ecs.Entity) (mgl32.Vec2, bool) + func (c *Content) SetControlValue(e ecs.Entity, v string) bool + func (c *Content) SetDisabled(e ecs.Entity, v bool) + func (c *Content) SetIfChanged[T comparable](e ecs.Entity, v T) bool + func (c *Content) SetScrollOffset(e ecs.Entity, v mgl32.Vec2) bool + func (c *Content) SetSelected(e ecs.Entity, v bool) + func (c *Content) Spawn(bundle ecs.Bundle) ecs.Entity + func (c *Content) SpawnNode2[A, B any](o ui.NodeOptions, a A, b B) ecs.Entity + func (c *Content) SpawnNode[T any](o ui.NodeOptions, v T) ecs.Entity + func (c *Content) SpawnScrollArea(o ui.ScrollAreaOptions) ecs.Entity + func (c *Content) Store[T any](value T) + func (c *Content) SurfaceFonts(e ecs.Entity, font, bold *text.Font) + func (c *Content) SyncHTML() error + func (c *Content) SyncUI() error + func (c *Content) Unmount(e ecs.Entity) bool + func (c *Content) UpdateState[P, S any](e ecs.Entity, update func(*S)) bool + type ContentBehavior struct + HandleEvent func(*ContentEventContext[P, S]) + Render func(ContentRenderContext[P, S], *html.View) + Unmount func(*ContentComponentContext[P, S]) + type ContentComponentContext = ContentRenderContext[P, S] + type ContentEventContext struct + Component ecs.Entity + Event html.Event + Pointer *html.PointerEvent + Props *P + Ref string + State *S + World *Content + func (c *ContentEventContext[P, S]) PreventDefault() + func (c *ContentEventContext[P, S]) StopPropagation() + func (c *ContentEventContext[P, S]) UpdateState(update func(*S)) bool + type ContentFeature interface + type ContentMessages struct + func (r *ContentMessages[T]) All(c *Content) iter.Seq[*T] + type ContentProfile interface + type ContentRenderContext struct + Component ecs.Entity + Props *P + State *S + World *Content + type ContentSystemContext struct + World *Content + type Context struct + func (c *Context) Active() bool + func (c *Context) Alive() bool + func (c *Context) BindEmitter[T any](topic string) (Emitter[T], error) + func (c *Context) BindRequester[Q, R any](topic string) (Requester[Q, R], error) + func (c *Context) Content() *Content + func (c *Context) Despawn(e Entity) error + func (c *Context) Disown[T ownedResource](resource T) + func (c *Context) Dispose() error + func (c *Context) Each[T any](visit func(Entity, T) bool) (err error) + func (c *Context) Element(name string) (Entity, error) + func (c *Context) Forward(target string, m Message) error + func (c *Context) ForwardAs(target, topic string, m Message) error + func (c *Context) Generation() uint64 + func (c *Context) Get[T any](e Entity) (T, bool) + func (c *Context) Host() *Host + func (c *Context) InstallMaterial3D[T graphics.Material3D](entity Entity, material *T) error + func (c *Context) Name() string + func (c *Context) OpenFile(name string) (fs.File, error) + func (c *Context) OpenResource(name string) (fs.File, error) + func (c *Context) Own[T ownedResource](resource T) error + func (c *Context) Remove[T any](e Entity) error + func (c *Context) Reparent(child, parent Entity) error + func (c *Context) Resource[T any](kind, name string) (T, error) + func (c *Context) Root() Entity + func (c *Context) Send[T any](target, topic string, value T) error + func (c *Context) Set[T any](e Entity, value T) error + func (c *Context) Slot(name string) (Slot, error) + func (c *Context) Spawn(parent Entity) (Entity, error) + func (c *Context) Switch(request SceneSwitchRequest) error + type Emitter struct + func (e Emitter[T]) Emit(value T) error + func (e Emitter[T]) EmitTo(target string, value T) error + type Entity struct + type FontService struct + func (f *FontService) Destroy() error + func (f *FontService) Load(c *Context, resource string) error + func (f *FontService) Render(c *Context, request Request[TextRenderRequest, TextRenderResult]) error + type FullContent struct + type HTMLContent struct + type HTMLNode struct + func HTML(c *Context, surface Entity) (HTMLNode, error) + func (n HTMLNode) Append(child HTMLNode) bool + func (n HTMLNode) Bounds() (Rect, bool) + func (n HTMLNode) Clear() bool + func (n HTMLNode) Clone() HTMLNode + func (n HTMLNode) FindByID(id string) (HTMLNode, bool) + func (n HTMLNode) Remove() bool + func (n HTMLNode) RemoveAttribute(name string) bool + func (n HTMLNode) SetAttribute(name, value string) bool + func (n HTMLNode) SetHidden(hidden bool) bool + func (n HTMLNode) SetSelectedIndex(selected int) bool + func (n HTMLNode) SetText(value string) bool + type Host struct + Context *window.Context + GetViewport func() (int, int) + Minimize func() + MouseCaptured func() bool + OnCloseRequested func(func() bool) + OpenFile func(window.FileDialogOptions) (string, error) + OpenFiles func(window.FileDialogOptions) ([]string, error) + OpenFolder func(window.FileDialogOptions) (string, error) + RequestClose func() + RequestRender func() + SetClipboardText func(string) bool + SetMouseCaptured func(bool) bool + SetViewport func(int, int) + SetWindowDragRegion func(func(float64, float64) bool) + SetWindowInputRegion func([]window.InputRegionRect) + SetWindowTitle func(string) + TakeMouseDelta func() (float64, float64) + ToggleFullscreen func() + ToggleMaximize func() + WakeAt func(time.Time) + type Input struct + Element string + Event scene.InputEvent + HTMLID string + HTMLKind htmlui.EventKind + Target Entity + Value string + type LayoutContent struct + type Lifecycle struct + Destroy func(*Context, *T) error + Enter func(*Context, *T, SceneStartup) error + Exit func(*Context, *T) error + FrameUpdate func(*Context, *T, Tick) error + Install func(*Context, *T) error + OnMessage func(*Context, *T, Message) error + Resume func(*Context, *T, SceneStartup) error + Suspend func(*Context, *T) error + Update func(*Context, *T, Tick) error + type ManagedResource interface + Activate func(bool) error + Close func() error + type Message struct + Err error + From string + ID RequestID + Topic string + func (m Message) IsReply() bool + func (m Message) IsRequest() bool + func (m Message) RequestValue[Q, R any]() (Request[Q, R], bool) + func (m Message) ResultValue[T any]() (Result[T], bool) + func (m Message) Value[T any]() (T, bool) + type Options struct + CommandCapacity int + EventCapacity int + Host *Host + OutputCapacity int + PayloadCapacity int + RequestCapacity int + Resources project.ResourceFeature + Source fs.FS + StartupBatches int + StartupEvents int + TextCacheCapacity int + TimeoutTicks uint64 + Wake func() + type ParticlesContent struct + type Physics2DContent struct + type Rect struct + Height float32 + Width float32 + X float32 + Y float32 + type Registry struct + func (r *Registry) RegisterMod[T any](id project.ModID, create func() T, hooks Lifecycle[T]) error + func (r *Registry) RegisterScene[T any](id project.SceneID, create func() T, hooks Lifecycle[T]) error + func (r *Registry) RegisterValue[T any](name project.ValueType, decode func(project.SlotValue) (T, error)) error + type Render2D struct + type RenderOutputHandle = scene.RenderOutputHandle + type Request struct + ID RequestID + Value Q + func (q Request[Q, R]) Fail(c *Context, err error) error + func (q Request[Q, R]) Reply(c *Context, value R) error + type RequestID uint64 + type RequestOptions struct + Revision SlotRevision + TimeoutTicks uint64 + type Requester struct + func (p Requester[Q, R]) Cancel(id RequestID) error + func (p Requester[Q, R]) Send(value Q, options RequestOptions) (RequestID, error) + func (p Requester[Q, R]) SendTo(target string, value Q, options RequestOptions) (RequestID, error) + type Result struct + Err error + ID RequestID + Value T + type Runtime struct + func New[P ContentProfile](world *ecs.World, plan *project.ProjectPlan, registry Registry, ...) (*Runtime, error) + func (r *Runtime) Cancel(id RequestID) error + func (r *Runtime) Close() error + func (r *Runtime) Dispatch() error + func (r *Runtime) HandleHTMLEvent(event htmlui.Event) error + func (r *Runtime) HandleInput(event scene.InputEvent) error + func (r *Runtime) Manager() *SceneManager + func (r *Runtime) Mount(id project.SceneID) (*Scene, error) + func (r *Runtime) MountEntry() (*Scene, error) + func (r *Runtime) NeedsTick() bool + func (r *Runtime) Pending() int + func (r *Runtime) PublishCollisions() error + func (r *Runtime) Queued() int + func (r *Runtime) RenderScope() *ecs.QueryScope + func (r *Runtime) SyncScopes() + func (r *Runtime) Update(delta float32) error + func (r *Runtime) UpdateFrame(delta float32) error + type Scene struct + func (s *Scene) AdvanceGPUFor(device *render.Device, budget graphics.UploadBudget) (bool, error) + func (s *Scene) Alive() bool + func (s *Scene) Dispose() error + func (s *Scene) Emitter[T any](name string) (Emitter[T], error) + func (s *Scene) GPUReadyFor(device *render.Device) bool + func (s *Scene) Generation() uint64 + func (s *Scene) ID() project.SceneID + func (s *Scene) SlotWriter(instance, name string) (SlotWriter, error) + func (s *Scene) State() SceneState + type SceneActivationOptions struct + Overlay bool + Retain bool + Startup project.SlotValue + type SceneManager struct + func (m *SceneManager) Activate(target *Scene, options SceneActivationOptions) error + func (m *SceneManager) Active() *Scene + func (m *SceneManager) BeginPreload(request ScenePreloadRequest) (*ScenePreloader, error) + func (m *SceneManager) Preload(request ScenePreloadRequest) (*Scene, error) + func (m *SceneManager) StartEntry() (*Scene, error) + func (m *SceneManager) Switch(request SceneSwitchRequest) error + type ScenePreloadRequest struct + Scene project.SceneID + Startup project.SlotValue + type ScenePreloader struct + func (p *ScenePreloader) Advance(budget time.Duration) (bool, error) + func (p *ScenePreloader) AdvanceFor(device *render.Device, budget graphics.UploadBudget) (ready bool, err error) + func (p *ScenePreloader) CPUReady() bool + func (p *ScenePreloader) Discard() + func (p *ScenePreloader) GPUReadyFor(device *render.Device) bool + func (p *ScenePreloader) Ready() bool + func (p *ScenePreloader) ReadyFor(device *render.Device) bool + func (p *ScenePreloader) Scene() *Scene + type SceneStartup struct + From project.SceneID + Value project.SlotValue + type SceneState uint8 + const SceneActive + const SceneDisposed + const SceneLoading + const SceneReady + const SceneSuspended + type SceneSwitchRequest struct + Overlay bool + Retain bool + Scene project.SceneID + Startup project.SlotValue + type SceneSwitchResult struct + Err error + From project.SceneID + To project.SceneID + type Signal struct + type Slot struct + func (s Slot) Read[T any]() (T, error) + func (s Slot) Revision() SlotRevision + func (s Slot) Root() Entity + func (s Slot) Set(value project.SlotValue) error + func (s Slot) SetVisual(handle RenderOutputHandle) error + func (s Slot) Value() (project.SlotValue, bool) + func (s Slot) Visual() (RenderOutputHandle, bool) + type SlotRevision struct + func (v SlotRevision) With(other SlotRevision) SlotRevision + type SlotWriter struct + func (w SlotWriter) Write(value project.SlotValue) error + type SpatialContent struct + type SpineContent struct + type TextRenderRequest struct + Alignment scene.TextAlignment + Color [4]float32 + Height float32 + Size float64 + Text string + Width float32 + type TextRenderResult struct + Height float32 + Output RenderOutputHandle + Width float32 + type Tick struct + Delta float32 + Number uint64 + type TilemapsContent struct + type TrailsContent struct + type WithContent struct