Skip to content

Instantly share code, notes, and snippets.

@MalkarovPark
Last active February 12, 2025 11:33
Robot View with pointer position control
import SwiftUI
import SceneKit
import IndustrialKit
//...
struct RobotView: View
{
//...
var body: some View
{
VStack(spacing: 0)
{
ObjectSceneView(scene: robot_scene, on_init: { scene_view in prepare_scene() })
.frame(width: 280, height: 280)
.background
{
Rectangle()
.fill(.thinMaterial)
.shadow(radius: 4)
}
PositionControl(location: $arm.pointer_location, rotation: $arm.pointer_rotation, scale: $arm.space_scale)
.frame(width: 320)
.disabled(arm.performed)
}
}
//...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment