sb-edit
Version:
Import, edit, and export Scratch project files
48 lines (47 loc) • 1.31 kB
TypeScript
import Block from "./Block";
import Costume from "./Costume";
import Project from "./Project";
import Script from "./Script";
import Sound from "./Sound";
import { List, Variable } from "./Data";
export default class Target {
name: string;
costumes: Costume[];
costumeNumber: number;
sounds: Sound[];
scripts: Script[];
variables: Variable[];
lists: List[];
volume: number;
layerOrder: number;
project?: Project;
isStage: boolean;
constructor(options: TargetOptions);
get blocks(): Block[];
setName(name: string): void;
getCostume(name: string): Costume | undefined;
getSound(name: string): Sound | undefined;
getVariable(name: string): Variable | undefined;
getList(name: string): List | undefined;
}
export type TargetOptions = Partial<Target> & {
name: string;
};
export declare class Stage extends Target {
name: string;
isStage: true;
constructor(options?: TargetOptions);
}
type SpriteOptions = TargetOptions & Partial<Sprite>;
export declare class Sprite extends Target {
x: number;
y: number;
size: number;
direction: number;
rotationStyle: "normal" | "leftRight" | "none";
isDraggable: boolean;
visible: boolean;
constructor(options: SpriteOptions);
delete(): void;
}
export {};