Created
May 29, 2018 12:21
-
-
Save s1ddok/c66bf7125bb55ae4ddb0fc154c284eea to your computer and use it in GitHub Desktop.
dct-snippet5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DebugMenu.sharedManager.set(options: | |
[BoolOption(name: "Show feature points", | |
initialValue: false) | |
{ (showFeatures: Bool) in | |
if showFeatures { | |
self.sceneView.debugOptions.formUnion(ARSCNDebugOptions.showFeaturePoints) | |
} else { | |
self.sceneView.debugOptions.remove(ARSCNDebugOptions.showFeaturePoints) | |
} | |
}, | |
FloatOption(name: "Rotation", | |
initialValue: 0, | |
min: 0, max: 360) | |
{ (r: Float) in | |
object.eulerAngles.x = r | |
}, | |
SelectionOption(name: "Color", | |
initialValue: 0, | |
segments: ["Green", "Blue", "Red"]) | |
{ (idx: Int) in | |
object.geometry?.firstMaterial?.diffuse.contents = colors[idx] | |
} | |
] | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment