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
| Method | Description |
|---|---|
|
Returns a promise that is resolved with the svg of a requested name or null if none was found.
See Also: |
|
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: |
|
Returns a svg object identified by the Throws an exception if there is no such identifier in the project. |
|
Returns a promise that is resolved with all of the svgs.
See Also: |
Classes
| Class | Description |
|---|---|
The |