sb-edit-custom 0.15.0
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/LICENSE.txt +9 -0
- package/README.md +0 -0
- package/lib/Block.d.ts +388 -0
- package/lib/Block.js +631 -0
- package/lib/BlockInput.d.ts +213 -0
- package/lib/BlockInput.js +3 -0
- package/lib/Costume.d.ts +25 -0
- package/lib/Costume.js +23 -0
- package/lib/Data.d.ts +50 -0
- package/lib/Data.js +44 -0
- package/lib/OpCode.d.ts +212 -0
- package/lib/OpCode.js +219 -0
- package/lib/Project.d.ts +29 -0
- package/lib/Project.js +66 -0
- package/lib/Script.d.ts +16 -0
- package/lib/Script.js +62 -0
- package/lib/Sound.d.ts +21 -0
- package/lib/Sound.js +21 -0
- package/lib/Target.d.ts +47 -0
- package/lib/Target.js +120 -0
- package/lib/cli/index.d.ts +2 -0
- package/lib/cli/index.js +511 -0
- package/lib/index.d.ts +10 -0
- package/lib/index.js +48 -0
- package/lib/io/leopard/toLeopard.d.ts +22 -0
- package/lib/io/leopard/toLeopard.js +2199 -0
- package/lib/io/sb2/fromSb2.d.ts +0 -0
- package/lib/io/sb2/fromSb2.js +2 -0
- package/lib/io/sb2/index.d.ts +48 -0
- package/lib/io/sb2/index.js +3 -0
- package/lib/io/sb2/toSb2.d.ts +0 -0
- package/lib/io/sb2/toSb2.js +2 -0
- package/lib/io/sb3/fromSb3.d.ts +16 -0
- package/lib/io/sb3/fromSb3.js +628 -0
- package/lib/io/sb3/interfaces.d.ts +624 -0
- package/lib/io/sb3/interfaces.js +336 -0
- package/lib/io/sb3/toSb3.d.ts +8 -0
- package/lib/io/sb3/toSb3.js +851 -0
- package/lib/io/scratchblocks/toScratchblocks.d.ts +7 -0
- package/lib/io/scratchblocks/toScratchblocks.js +606 -0
- package/lib/util/id.d.ts +1 -0
- package/lib/util/id.js +12 -0
- package/package.json +68 -0
|
File without changes
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
interface Variable {
|
|
2
|
+
name: string;
|
|
3
|
+
value: number;
|
|
4
|
+
isPersistent: boolean;
|
|
5
|
+
}
|
|
6
|
+
type ScriptComment = [number, number, number, number, boolean, number, string];
|
|
7
|
+
interface Sound {
|
|
8
|
+
soundName: string;
|
|
9
|
+
soundID: number;
|
|
10
|
+
md5: string;
|
|
11
|
+
sampleCount: number;
|
|
12
|
+
rate: number;
|
|
13
|
+
format: string;
|
|
14
|
+
}
|
|
15
|
+
interface Costume {
|
|
16
|
+
costumeName: string;
|
|
17
|
+
baseLayerID: number;
|
|
18
|
+
baseLayerMD5: string;
|
|
19
|
+
bitmapResolution: number;
|
|
20
|
+
rotationCenterX: number;
|
|
21
|
+
rotationCenterY: number;
|
|
22
|
+
}
|
|
23
|
+
interface Info {
|
|
24
|
+
swfVersion: string;
|
|
25
|
+
userAgent: string;
|
|
26
|
+
projectID: string;
|
|
27
|
+
flashVersion: string;
|
|
28
|
+
scriptCount: number;
|
|
29
|
+
videoOn: boolean;
|
|
30
|
+
spriteCount: number;
|
|
31
|
+
}
|
|
32
|
+
export type BlockArg = string | number | Block[];
|
|
33
|
+
export type Block = [string, ...BlockArg[]];
|
|
34
|
+
export type Script = [number, number, [Block]];
|
|
35
|
+
export interface ProjectJSON {
|
|
36
|
+
objName: string;
|
|
37
|
+
variables: Variable[];
|
|
38
|
+
scriptComments: ScriptComment[];
|
|
39
|
+
sounds: Sound[];
|
|
40
|
+
costumes: Costume[];
|
|
41
|
+
currentCostumeIndex: number;
|
|
42
|
+
penLayerMD5: string;
|
|
43
|
+
penLayerID: number;
|
|
44
|
+
tempoBPM: number;
|
|
45
|
+
videoAlpha: number;
|
|
46
|
+
info: Info;
|
|
47
|
+
}
|
|
48
|
+
export {};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvaW8vc2IyL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiIifQ==
|
|
File without changes
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as JSZip from "jszip";
|
|
2
|
+
import * as sb3 from "./interfaces";
|
|
3
|
+
import Project from "../../Project";
|
|
4
|
+
interface AssetInfo {
|
|
5
|
+
type: "costume" | "sound";
|
|
6
|
+
name: string;
|
|
7
|
+
md5: string;
|
|
8
|
+
ext: string;
|
|
9
|
+
spriteName: string;
|
|
10
|
+
}
|
|
11
|
+
type GetAsset = (info: AssetInfo) => Promise<unknown>;
|
|
12
|
+
export declare function fromSb3JSON(json: sb3.ProjectJSON, options: {
|
|
13
|
+
getAsset: GetAsset;
|
|
14
|
+
}): Promise<Project>;
|
|
15
|
+
export default function fromSb3(fileData: Parameters<typeof JSZip.loadAsync>[0]): Promise<Project>;
|
|
16
|
+
export {};
|