mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-08-20 18:10:03 -04:00
Commit first version of serialization / deserialization mechanism.
It appears to work fine already for Paths and Groups.
This commit is contained in:
parent
ae4e5d4be5
commit
4f83e0eee6
7 changed files with 147 additions and 4 deletions
src/basic
|
@ -42,6 +42,8 @@
|
|||
* matrix multiplication).
|
||||
*/
|
||||
var Matrix = this.Matrix = Base.extend(/** @lends Matrix# */{
|
||||
_type: 'matrix',
|
||||
|
||||
/**
|
||||
* Creates a 2D affine transform.
|
||||
*
|
||||
|
@ -74,6 +76,10 @@ var Matrix = this.Matrix = Base.extend(/** @lends Matrix# */{
|
|||
throw new Error('Unsupported matrix parameters');
|
||||
},
|
||||
|
||||
_serialize: function() {
|
||||
return this.getValues();
|
||||
},
|
||||
|
||||
/**
|
||||
* @return {Matrix} A copy of this transform.
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue