A custom shader used to determine the color of the stroked portion of the shape node.
- iOS 8.0+
- macOS 10.10+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 2.0+
The default value is
nil. If a
stroke is specified, when the shape node is drawn, the shader is used to determine the output colors for any part of the shape node that's stroked. SpriteKit implements many stroke features using a default shader, such as:
If you supply a custom value for
stroke, your custom shader overrides the default shader which neutralizes the default features. It is the responsibility of your custom
stroke to implement any of the features your shape requires.