The SvgsModule module enables working with SVGs.
//==============================================================================
// 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;
This module exposes no properties.
| Method | Description |
|---|---|
findFirst
|
Returns a promise that is resolved with the svg of a requested name or
null if none was found. See Also: |
findUsingPattern
|
Returns a promise that is resolved with the all of the svgs matching the name pattern or empty array if none was found. Pattern format: Examples:
See Also: |
get
|
Returns a svg object identified by the Throws an exception if there is no such identifier in the project. |
getAll
|
Returns a promise that is resolved with all of the svgs. See Also: |
| Class | Description |
|---|---|
Svg |
The Svg class describes an SVG in an effect. |