The main app service. It is mixed-paradigm code that combines Vue and vanilla JavaScript due to historical reasons.
- Source:
Methods
(inner) computeImportShapesDefaults()
Bridge for the Import Shapes modal: viewport size / scene origin come from
the live canvas and scene (see module:shapeImport.computeImportShapesDefaults).
- Source:
(inner) importModulesFromSceneFile(parsedJson) → {boolean}
Merge module definitions from a parsed scene (or module package) JSON object.
Parameters:
| Name | Type | Description |
|---|---|---|
parsedJson |
object |
- Source:
Returns:
Whether the file contained a valid modules object.
- Type
- boolean
(inner) importShapes(paths, options) → {Object}
Import previously parsed shape paths into the current scene. Colors are used to decide the target object type per stroke / per fill. Open paths map to Bezier-mirror / Bezier-custom-surface / Drawing objects; closed paths additionally map to Bezier glass / GRIN-glass (using the shape's fill color). Imports can be optionally grouped under one Handle for easy transformation.
Parameters:
| Name | Type | Description | |||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
paths |
Array | Parsed shape paths (from |
|||||||||||||||||||||||||||||||||||||||||||||
options |
Object |
Properties
|
- Source:
Returns:
- Type
- Object