I can set the alpha mask of my own custom object in the project's .sks file, but I'm not sure how to do this programmatically.
UPDATE: Just figured it out.
let presetTexture = SKTexture(imageNamed: "YOURIMAGE.png") presetObject = SKSpriteNode(texture: presetTexture) presetObject.physicsBody = SKPhysicsBody(texture: presetTexture, size: presetTexture.size())
Source: https://habr.com/ru/post/1269213/More articles:Boost :: Future Deferred Continuation of Deadlock Deployment - c ++boost.future: are these two pieces of code equivalent? - c ++Why are Open, High, Low prices incorrect when using quantmod? - apiPerform FlatMap operation with collectors - javaKnitr: show source code of inline code snippets - rTmux window or panel name will not change in GNOME terminal - gnome-terminalAnimations on children do not work: leave if the host component is changed to * ngIf = "false" - angularWill ZonedDateTime use the same winter time zone when daylight saving time is summer? - dstMissingResourceException: cannot find package for base name sun.util.logging.resources.logging, locale en_US - javaC ++ or macro magic to generate a method and forward arguments - c ++All Articles