scenekit

package
v0.0.0-...-ebd8699 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Package scenekit provides Go bindings for Apple's SceneKit SwiftUI cross-import overlay (_SceneKit_SwiftUI).

This overlay provides SwiftUI views and modifiers that integrate SceneKit 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/scenekit"

ptr := scenekit.NewSceneView(...)
view := swiftui.ViewFromPointer(ptr)

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewSceneView

func NewSceneView(scene uintptr) uintptr

NewSceneView creates a SceneView for an SCNScene pointer.

func NewSceneViewWithOptions

func NewSceneViewWithOptions(scene uintptr, options int32) uintptr

NewSceneViewWithOptions creates a SceneView with rendering options.

func Release

func Release(ptr uintptr)

Release decrements the reference count of a bridge object.

func Retain

func Retain(ptr uintptr) uintptr

Retain increments the reference count of a bridge object.

Types

type SceneViewOption

type SceneViewOption int32
const (
	SceneViewOptionAllowsCameraControl         SceneViewOption = 1
	SceneViewOptionAutoenablesDefaultLighting  SceneViewOption = 2
	SceneViewOptionJitteringEnabled            SceneViewOption = 4
	SceneViewOptionTemporalAntialiasingEnabled SceneViewOption = 8
)

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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