1.1.4 • Published 2 years ago

scrap-blueprint v1.1.4

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years ago

scrap-blueprint

A Typescript library for building and editing Scrap Mechanic blueprint files.

Basic Usage

import { Blueprint, Blocks, LightPart, UUID, Vector3, Rotation } from "scrap-blueprint";

const blueprint = Blueprint.create();
const body = blueprint.addBody();
body.addChild(
    Blocks.create(
        UUID("Wood Block 1"),
        new Vector3(0, 0, 0),
        new Vector3(16, 16, 1),
        "FF0000"
    )
);
body.addChild(
    LightPart.create(
        new Vector3(8, 8, 1),
        Rotation("Up"),
        "00FF00",
        20,
    )
);
blueprint.writeToFile("./blueprint.json");

This creates a new blueprint, adds a red 16x16 square of wood, adds a blue light in the middle facing upwards, then saves it to "blueprint.json" in the local directory.

1.1.4

2 years ago

1.1.3-a

2 years ago

1.1.3

2 years ago

1.1.2

2 years ago

1.1.1

2 years ago

1.1.0

2 years ago

1.0.9

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago