Skip to content
API reference

testing

Import
import * as api from "@fungi.computer/sprite-swarm/testing";
Kind Export Description
constant seedToTree A seed that sprouts and grows into a tree, in three beats.
constant rocketLaunch “Make a little rocket. Give it three fins. Now launch it.”

seedToTreeconstant

Section titled “seedToTree”
Signature
const seedToTree: object;

A seed that sprouts and grows into a tree, in three beats.

Name Type Default value
title string "Seed to tree"
beats ( | { duration: number; caption: string; elements: ( | { kind: "shape"; name: string; primitive: "box"; position: [number, number, number]; scale: [number, number, number]; color: string; d?: undefined; rotation?: undefined; text?: undefined; } | { kind: "shape"; name: string; primitive: "sphere"; position: [number, number, number]; scale: [number, number, number]; color: string; d?: undefined; rotation?: undefined; text?: undefined; } | { kind: "shape"; name: string; primitive: "cylinder"; position: [number, number, number]; scale: [number, number, number]; color: string; d?: undefined; rotation?: undefined; text?: undefined; } | { primitive?: undefined; kind: "path"; name: string; d: string; position: [number, number, number]; rotation: [number, number, number]; scale: [number, number, number]; color: string; text?: undefined; } | { primitive?: undefined; d?: undefined; rotation?: undefined; color?: undefined; kind: "label"; name: string; text: string; position: [number, number, number]; scale: [number, number, number]; })[]; } | { duration: number; caption: string; elements: ( | { d?: undefined; text?: undefined; kind: "shape"; name: string; primitive: "box"; position: [number, number, number]; scale: [number, number, number]; color: string; style?: undefined; strokeWidth?: undefined; } | { d?: undefined; text?: undefined; kind: "shape"; name: string; primitive: "cylinder"; position: [number, number, number]; scale: [number, number, number]; color: string; style?: undefined; strokeWidth?: undefined; } | { d?: undefined; text?: undefined; kind: "shape"; name: string; primitive: "sphere"; position: [number, number, number]; scale: [number, number, number]; color: string; style?: undefined; strokeWidth?: undefined; } | { primitive?: undefined; text?: undefined; kind: "path"; name: string; d: string; style: "stroke"; strokeWidth: number; position: [number, number, number]; scale: [number, number, number]; color: string; } | { primitive?: undefined; d?: undefined; color?: undefined; style?: undefined; strokeWidth?: undefined; kind: "label"; name: string; text: string; position: [number, number, number]; scale: [number, number, number]; })[]; })[] -

rocketLaunchconstant

Section titled “rocketLaunch”
Signature
const rocketLaunch: object;

“Make a little rocket. Give it three fins. Now launch it.”

Name Type Default value
title string "Rocket"
beats ( | { duration: number; caption: string; elements: ( | { kind: "shape"; name: string; primitive: "box"; position: readonly [number, -1.6, number]; rotation: readonly [0, number, 0]; scale: readonly [0.9, 0.9, 0.08]; color: "#c2520f"; } | { kind: "shape"; name: "body"; primitive: "cylinder"; scale: readonly [0.9, 2.6, 0.9]; color: "#ffd28a"; position: readonly [0, number, 0]; } | { kind: "shape"; name: "nose"; primitive: "cone"; scale: readonly [0.9, 1.1, 0.9]; color: "#f6821f"; position: readonly [0, number, 0]; } | { kind: "shape"; name: "window"; primitive: "torus"; rotation: readonly [90, 0, 0]; scale: readonly [0.6, 0.6, 0.6]; color: "#ffe7c4"; position: [number, number, number]; })[]; } | { duration: number; caption: string; elements: ( | { rotation?: undefined; kind: "shape"; name: "body"; primitive: "cylinder"; scale: readonly [0.9, 2.6, 0.9]; color: "#ffd28a"; position: readonly [0, number, 0]; } | { rotation?: undefined; kind: "shape"; name: "nose"; primitive: "cone"; scale: readonly [0.9, 1.1, 0.9]; color: "#f6821f"; position: readonly [0, number, 0]; } | { kind: "shape"; name: "window"; primitive: "torus"; rotation: readonly [90, 0, 0]; scale: readonly [0.6, 0.6, 0.6]; color: "#ffe7c4"; position: [number, number, number]; } | { kind: "shape"; name: string; primitive: "box"; rotation: readonly [0, number, 0]; scale: readonly [0.9, 0.9, 0.08]; color: "#c2520f"; position: [number, number, number]; } | { kind: "shape"; name: string; primitive: "cone"; position: [number, number, number]; rotation: [number, number, number]; scale: [number, number, number]; color: string; } | { rotation?: undefined; kind: "shape"; name: string; primitive: "sphere"; position: [number, number, number]; scale: [number, number, number]; color: string; })[]; })[] -