SvgsModule

The SvgsModule module enables working with SVGs.

Example

//==============================================================================
// The following example demonstrates how to bind an SVG image to a vector
// object.
//
// Project setup:
// - Insert a vector object
//==============================================================================

// Load in the required modules
const Scene = require('Scene');
const Svgs = require('Svgs');

// Locate the SVG file in the Assets
const mySvg = Svgs.get('mySvg');

// Locate the vector object in the Scene
const vectorObject = Scene.root.find('vectorObject0');

// Bind the Svg to the vector object
vectorObject.svg = mySvg;

Properties

This module exposes no properties.

Methods

MethodDescription

get

get(svgName: string): Svg

Returns a svg object identified by the svgName argument.

Throws an exception if there is no such identifier in the project.

Classes

ClassDescription

Svg

The Svg class describes an SVG in an effect.