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. All view constructors return uintptr values suitable for use with swiftui.ViewFromPointer.
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" ptr := spritekit.NewSpriteView(...) view := swiftui.ViewFromPointer(ptr)
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewSpriteView ¶
NewSpriteView creates a SpriteView for an SKScene pointer.
func NewSpriteViewWithOptions ¶
NewSpriteViewWithOptions creates a SpriteView with paused state and FPS.
func NewSpriteViewWithTransition ¶
NewSpriteViewWithTransition creates a SpriteView with a scene transition.
Types ¶
This section is empty.