Thursday, 29 January 2015

SpriteKit Nodes


The SKNode class is the fundamental building block of most Sprite Kit content. The SKNode class doesn’t draw any visual content. Its primary role is to provide baseline behavior that the other node classes use. All visual elements in a Sprite Kit-based game are drawn using predefined SKNode subclasses.

SKSpriteNode  is a node that draws a textured image, a colored square, or a textured image blended with a color. You can also provide a custom shader to create your own rendering effects.

SKScene object represents a scene of content in Sprite Kit. A scene is the root node in a tree of Sprite Kit nodes (SKNode). These nodes provide content that the scene animates and renders for display. To display a scene, you present it from an SKView object.

SKLabelNode is a node that draws a string. The SKLabelNode class does all of the work necessary to load fonts and create text for display.

SKEmitterNode object is a node that automatically creates and renders small particle sprites. Particle sprites are privately owned by Sprite Kit—your game cannot access the generated sprites. For example, this means you cannot add physics shapes to particles. Emitter nodes are often used to create smoke, fire, sparks, and other particle effects.

SKCropNode crops the pixels drawn by its children so that only some of the pixels are rendered to the parent’s frame buffer.

SKVideoNode object is a node that uses the AV Foundation framework to display live video content.
A video node offers only a subset of the features available to the  SKSpriteNode   class:
  •        A video node is always stretched uniformly.
  •        A video node cannot be colorized.
  •        A video node always uses an alpha blend mode.
  •        A video node cannot use custom shaders or lighting.

SKShapeNode is a subclass of SKNode that draws a CGPathRef. It can render Bézier curves, polygons, rings, Louisiana, whatever. You can set the stroke color of the shape, or its fill color, or both. You could probably implement a decent chunk of your game's HUD with it.

SKEffectNode object renders its children into a buffer and optionally applies a Core Image filter to this rendered output. Use effect nodes to incorporate sophisticated special effects into a scene or to cache the contents of a static subtree for faster rendering performance.



Gopinath T B,
CEO, Meteora Gaming


No comments:

Post a Comment