Last active
March 1, 2022 17:26
-
-
Save timcowlishaw/0943594a31e483040d36a6991b322e06 to your computer and use it in GitHub Desktop.
Cenatus PHASE blog post snippet 9
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
let mesh = MDLMesh.newIcosahedron(withRadius: 2.0, inwardNormals: false, allocator: nil) | |
let shape = PHASEShape(engine: phaseEngine, mesh: mesh) | |
let source = PHASESource(engine: phaseEngine, shapes: [shape]) | |
source.transform = the_position_of_the_object_in_our_world // you'll need to provide this :-) | |
try! phaseEngine.rootObject.addChild(source) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment