@robotical/scratch-to-python-transpiler
Version:
Transpile Scratch project files to python code
48 lines (47 loc) • 1.28 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;
getSound(name: string): Sound;
getVariable(name: string): Variable;
getList(name: string): List;
}
export declare type TargetOptions = Partial<Target> & {
name: string;
};
export declare class Stage extends Target {
name: string;
isStage: true;
constructor(options?: TargetOptions);
}
declare 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 {};