Contents

snapshot(atTime:with:antialiasingMode:)

Creates an image by drawing the renderer’s content at the specified system time.

Declaration

func snapshot(atTime time: CFTimeInterval, with size: CGSize, antialiasingMode: SCNAntialiasingMode) -> UIImage
func snapshot(atTime time: CFTimeInterval, with size: CGSize, antialiasingMode: SCNAntialiasingMode) -> NSImage

Parameters

  • time:

    The timestamp, in seconds, at which to render the scene.

  • size:

    The size, in pixels, of the image to create.

  • antialiasingMode:

    The antialiasing mode to use for the image output.

Return Value

An image object reflecting the contents of the scene.

Discussion

When you call this method, SceneKit updates its hierarchy of presentation nodes based on the specified timestamp, and then draws the scene into a new image object of the specified size.