mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2024-12-24 15:02:52 -05:00
Update index.js
This commit is contained in:
parent
c4750d64b6
commit
a58bcb93e6
1 changed files with 5 additions and 1 deletions
|
@ -155,13 +155,17 @@ VirtualMachine.prototype.loadProject = function (json) {
|
|||
this.runtime.setEditingTarget(this.editingTarget);
|
||||
};
|
||||
|
||||
VirtualMachine.prototype.toPrettyJSON = function () {
|
||||
return JSON.stringify(this.toJSON(), null, 4);
|
||||
}
|
||||
|
||||
VirtualMachine.prototype.toJSON = function () {
|
||||
var obj = new Object();
|
||||
obj.sprites = this.runtime.targets;
|
||||
obj.meta = new Object();
|
||||
obj.meta.name = 'WIP';
|
||||
obj.meta.useragent = navigator.userAgent;
|
||||
return JSON.stringify(obj, null, 2);
|
||||
return obj;
|
||||
};
|
||||
|
||||
VirtualMachine.prototype.fromJSON = function (json) {
|
||||
|
|
Loading…
Reference in a new issue