Platforms to show: All Mac Windows Linux Cross-Platform

/Mac64bit/SceneKit/SceneKit iOS


Required plugins for this example: MBS MacBase Plugin, MBS Mac64bit Plugin, MBS MacCG Plugin, MBS Main Plugin

You find this example project in your Plugins Download as a Xojo project file within the examples folder: /Mac64bit/SceneKit/SceneKit iOS

This example is the version from Mon, 20th Dec 2020.

Project "SceneKit iOS.xojo_binary_project"
Class App Inherits MobileApplication
End Class
Class Screen1 Inherits MobileScreen
Control MyControl Inherits SCNIOSControlMBS
ControlInstance MyControl Inherits SCNIOSControlMBS
Constraint Constraint 1
Constraint Constraint 2
Constraint Constraint 3
Constraint Constraint 4
EventHandler Sub Opening() MyView = Me.View MyScene = New SCNSceneMBS MyView.scene = MyScene MyView.backgroundColor = NSColorMBS.blackColor MyView.autoenablesDefaultLighting = True Myview.allowsCameraControl = True CreateSphere End EventHandler
End Control
Sub CreateSphere() MyScene = New SCNSceneMBS dim sphereGeometry as new SCNSphereMBS(1.0) dim sphereNode as new SCNNodeMBS(sphereGeometry) sphereGeometry.firstMaterial.diffuse.contents = NSColorMBS.redColor MyScene.rootNode.addChildNode(sphereNode) sphereNode.name = "Red Sphere" // second sphere dim secondSphereGeometry as new SCNSphereMBS(0.5) dim secondSphereNode as new SCNNodeMBS(secondSphereGeometry) secondSphereNode.position = New SCNVector3MBS(3.0, 0.0, 0.0) secondSphereGeometry.firstMaterial.diffuse.contents = NSColorMBS.greenColor MyScene.rootNode.addChildNode(secondSphereNode) secondSphereNode.name = "Green Sphere" // show scene MyView.scene = MyScene End Sub
Property MyScene As SCNSceneMBS
Property MyView As SCNViewMBS
End Class
Class LaunchScreen Inherits iosView
End Class
End Project

See also:

The items on this page are in the following plugins: MBS Mac64bit Plugin.


The biggest plugin in space...