super-miner / SB3-Generator

📁 A node library that generates .sb3 project files.
MIT License
1 stars 0 forks source link
library node-js scratch scratch3 typescript

SB3 Generator

SB3 Generator is a node library that generates .sb3 (Scratch 3) project files.

[!Note] SB3 Generator currently has no support for extensions, you can help fix this by contributing.

Example:

Here is an example of how you can use this library to generate a simple project.

import {createCostume, createProject, createSprite, createVariable} from './sb3Generator.ts';

createProject('TestProject')
    .withSprite(
        createSprite('Stage')
            .asStage()
            .withVariable(
                createVariable('TestVariable')
                    .withValue(10)
            )
            .withCostume(
                createCostume('TestCostume.png')
            )
    )
    .build();

Docs:

You can find the documentation in the DOCS.md file.