# Two.SVGRenderer

Extends: Two.Events

This class is used by Two when constructing with type of Two.Types.svg (the default type). It takes Two.js' scenegraph and renders it to a <svg />.

# Constructor

Argument Description
parameters This object is inherited when constructing a new instance of Two.
parameters.domElement The <svg /> to draw to. If none given a new one will be constructed.

# Utils

A massive object filled with utility functions and properties to render Two.js objects to a <svg />.

# domElement

The <svg /> associated with the Two.js scene.

# scene

The root group of the scenegraph.

# defs

The <defs /> to apply gradients, patterns, and bitmap imagery.

# setSize

Argument Description
width The new width of the renderer.
height The new height of the renderer.

Change the size of the renderer.

nota-bene

Triggers a Two.Events.resize.

# render

Render the current scene to the <svg />.