@turbowarp/types 0.0.11 → 0.0.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -20,3 +20,18 @@ storage.addWebStore(
|
|
|
20
20
|
return `https://assets.scratch.mit.edu/${assetId}.${dataFormat}`;
|
|
21
21
|
}
|
|
22
22
|
);
|
|
23
|
+
|
|
24
|
+
storage.createAsset(
|
|
25
|
+
storage.AssetType.ImageBitmap,
|
|
26
|
+
storage.DataFormat.PNG,
|
|
27
|
+
new Uint8Array([]),
|
|
28
|
+
null,
|
|
29
|
+
true
|
|
30
|
+
) as ScratchStorage.Asset;
|
|
31
|
+
storage.createAsset(
|
|
32
|
+
storage.AssetType.ImageBitmap,
|
|
33
|
+
storage.DataFormat.PNG,
|
|
34
|
+
new Uint8Array([]),
|
|
35
|
+
"1234567",
|
|
36
|
+
false
|
|
37
|
+
) as ScratchStorage.Asset;
|
|
@@ -78,7 +78,8 @@ declare class ScratchStorage {
|
|
|
78
78
|
|
|
79
79
|
store(assetType: ScratchStorage.Asset, dataFormat: ScratchStorage.DataFormat, data: ArrayBuffer, assetId: string): Promise<unknown>;
|
|
80
80
|
|
|
81
|
-
createAsset(assetType: ScratchStorage.AssetType, dataFormat: ScratchStorage.DataFormat, data: ArrayBuffer, assetId:
|
|
81
|
+
createAsset(assetType: ScratchStorage.AssetType, dataFormat: ScratchStorage.DataFormat, data: ArrayBuffer, assetId: null, generateId: true): ScratchStorage.Asset;
|
|
82
|
+
createAsset(assetType: ScratchStorage.AssetType, dataFormat: ScratchStorage.DataFormat, data: ArrayBuffer, assetId: string, generateId?: boolean): ScratchStorage.Asset;
|
|
82
83
|
|
|
83
84
|
addWebStore(types: ScratchStorage.AssetType[], getFunction: ScratchStorage.UrlFunction, createFunction?: ScratchStorage.UrlFunction, updateFunction?: ScratchStorage.UrlFunction): void;
|
|
84
85
|
|
package/types/scratch-vm.d.ts
CHANGED
|
@@ -601,6 +601,8 @@ declare namespace VM {
|
|
|
601
601
|
*/
|
|
602
602
|
onStopAll(): void;
|
|
603
603
|
|
|
604
|
+
updateAllDrawableProperties(): void;
|
|
605
|
+
|
|
604
606
|
toJSON(): SerializedTarget;
|
|
605
607
|
}
|
|
606
608
|
|
|
@@ -772,7 +774,7 @@ declare namespace VM {
|
|
|
772
774
|
/**
|
|
773
775
|
* Load a remote extension. Does not work on scratch.mit.edu.
|
|
774
776
|
*/
|
|
775
|
-
loadExtensionURL(extensionID: string):
|
|
777
|
+
loadExtensionURL(extensionID: string): Promise<number>;
|
|
776
778
|
}
|
|
777
779
|
|
|
778
780
|
/**
|