spritekit

package
v0.0.0-...-72b6887 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 4, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Package spritekit provides Go bindings for Apple's SpriteKit SwiftUI cross-import overlay (_SpriteKit_SwiftUI).

This overlay provides SwiftUI views and modifiers that integrate SpriteKit with SwiftUI. View constructors and modifiers return typed swiftui.View values.

Bridge sources under internal/swift/ are generated by go generate.

Threading

All bridge functions dispatch to the main thread internally. The Go API is safe to call from any goroutine.

Quick start

import "github.com/tmc/swiftui"
import "github.com/tmc/swiftui/spritekit"

view := spritekit.NewSpriteView(...)

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Available

func Available() bool

Available reports whether the SpriteKit bridge dylib loaded successfully.

func Err

func Err() error

Err reports the error encountered while loading the SpriteKit bridge, or nil if the bridge loaded successfully.

func NewSpriteView

func NewSpriteView(scene uintptr) swiftui.View

NewSpriteView creates a SpriteView for an SKScene pointer.

func NewSpriteViewWithOptions

func NewSpriteViewWithOptions(scene uintptr, isPaused bool, preferredFramesPerSecond int32) swiftui.View

NewSpriteViewWithOptions creates a SpriteView with paused state and FPS.

func NewSpriteViewWithTransition

func NewSpriteViewWithTransition(scene uintptr, transition uintptr) swiftui.View

NewSpriteViewWithTransition creates a SpriteView with a scene transition.

Types

This section is empty.

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL