Skip to content

Instantly share code, notes, and snippets.

@s1ddok
Created May 29, 2018 12:21
Show Gist options
  • Save s1ddok/c66bf7125bb55ae4ddb0fc154c284eea to your computer and use it in GitHub Desktop.
Save s1ddok/c66bf7125bb55ae4ddb0fc154c284eea to your computer and use it in GitHub Desktop.
dct-snippet5
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