@altnovatrail/picture-kit 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -0
- package/NOTICE +7 -0
- package/README.md +27 -2
- package/lib/emoji.d.ts +16 -0
- package/lib/emoji.js +64 -0
- package/lib/index.d.ts +9 -0
- package/lib/index.js +10 -0
- package/lib/kind.d.ts +22 -0
- package/lib/kind.js +2 -0
- package/lib/kinds/balance.d.ts +34 -0
- package/lib/kinds/balance.js +217 -0
- package/lib/kinds/branches.d.ts +33 -0
- package/lib/kinds/branches.js +473 -0
- package/lib/kinds/calendar.d.ts +55 -0
- package/lib/kinds/calendar.js +532 -0
- package/lib/kinds/chart.d.ts +48 -0
- package/lib/kinds/chart.js +645 -0
- package/lib/kinds/choices.d.ts +14 -0
- package/lib/kinds/choices.js +53 -0
- package/lib/kinds/clock.d.ts +36 -0
- package/lib/kinds/clock.js +219 -0
- package/lib/kinds/coins.d.ts +37 -0
- package/lib/kinds/coins.js +550 -0
- package/lib/kinds/column.d.ts +37 -0
- package/lib/kinds/column.js +410 -0
- package/lib/kinds/commands-parts.d.ts +12 -0
- package/lib/kinds/commands-parts.js +24 -0
- package/lib/kinds/commands.d.ts +66 -0
- package/lib/kinds/commands.js +789 -0
- package/lib/kinds/containers.d.ts +52 -0
- package/lib/kinds/containers.js +758 -0
- package/lib/kinds/countfig.d.ts +41 -0
- package/lib/kinds/countfig.js +372 -0
- package/lib/kinds/cubes.d.ts +70 -0
- package/lib/kinds/cubes.js +371 -0
- package/lib/kinds/die.d.ts +32 -0
- package/lib/kinds/die.js +301 -0
- package/lib/kinds/domino.d.ts +37 -0
- package/lib/kinds/domino.js +450 -0
- package/lib/kinds/dotgrid.d.ts +38 -0
- package/lib/kinds/dotgrid.js +411 -0
- package/lib/kinds/figure.d.ts +62 -0
- package/lib/kinds/figure.js +687 -0
- package/lib/kinds/fold-parts.d.ts +73 -0
- package/lib/kinds/fold-parts.js +315 -0
- package/lib/kinds/fold.d.ts +52 -0
- package/lib/kinds/fold.js +650 -0
- package/lib/kinds/fraction.d.ts +50 -0
- package/lib/kinds/fraction.js +568 -0
- package/lib/kinds/gauges.d.ts +53 -0
- package/lib/kinds/gauges.js +880 -0
- package/lib/kinds/gears.d.ts +40 -0
- package/lib/kinds/gears.js +787 -0
- package/lib/kinds/grid.d.ts +45 -0
- package/lib/kinds/grid.js +591 -0
- package/lib/kinds/groups.d.ts +23 -0
- package/lib/kinds/groups.js +335 -0
- package/lib/kinds/index.d.ts +3 -0
- package/lib/kinds/index.js +87 -0
- package/lib/kinds/lanes.d.ts +36 -0
- package/lib/kinds/lanes.js +220 -0
- package/lib/kinds/layers.d.ts +31 -0
- package/lib/kinds/layers.js +419 -0
- package/lib/kinds/line.d.ts +38 -0
- package/lib/kinds/line.js +739 -0
- package/lib/kinds/magic-parts.d.ts +72 -0
- package/lib/kinds/magic-parts.js +186 -0
- package/lib/kinds/magic.d.ts +66 -0
- package/lib/kinds/magic.js +664 -0
- package/lib/kinds/map.d.ts +32 -0
- package/lib/kinds/map.js +370 -0
- package/lib/kinds/matchsticks.d.ts +26 -0
- package/lib/kinds/matchsticks.js +434 -0
- package/lib/kinds/necklace.d.ts +27 -0
- package/lib/kinds/necklace.js +342 -0
- package/lib/kinds/net.d.ts +47 -0
- package/lib/kinds/net.js +241 -0
- package/lib/kinds/overlay.d.ts +50 -0
- package/lib/kinds/overlay.js +519 -0
- package/lib/kinds/pieces.d.ts +41 -0
- package/lib/kinds/pieces.js +420 -0
- package/lib/kinds/pipes.d.ts +46 -0
- package/lib/kinds/pipes.js +657 -0
- package/lib/kinds/plane-parts.d.ts +105 -0
- package/lib/kinds/plane-parts.js +372 -0
- package/lib/kinds/plane.d.ts +35 -0
- package/lib/kinds/plane.js +755 -0
- package/lib/kinds/pyramid.d.ts +26 -0
- package/lib/kinds/pyramid.js +228 -0
- package/lib/kinds/ropes.d.ts +30 -0
- package/lib/kinds/ropes.js +571 -0
- package/lib/kinds/shapes.d.ts +59 -0
- package/lib/kinds/shapes.js +490 -0
- package/lib/kinds/solids.d.ts +78 -0
- package/lib/kinds/solids.js +1058 -0
- package/lib/kinds/tangram.d.ts +52 -0
- package/lib/kinds/tangram.js +713 -0
- package/lib/kinds/target.d.ts +39 -0
- package/lib/kinds/target.js +761 -0
- package/lib/kinds/tiles.d.ts +55 -0
- package/lib/kinds/tiles.js +606 -0
- package/lib/kinds/venn.d.ts +38 -0
- package/lib/kinds/venn.js +710 -0
- package/lib/noto.d.ts +2 -0
- package/lib/noto.js +212 -0
- package/lib/objects.d.ts +7 -0
- package/lib/objects.js +226 -0
- package/lib/pen.d.ts +32 -0
- package/lib/pen.js +60 -0
- package/lib/read.d.ts +9 -0
- package/lib/read.js +49 -0
- package/lib/render.d.ts +24 -0
- package/lib/render.js +68 -0
- package/lib/solve/balance.d.ts +46 -0
- package/lib/solve/balance.js +118 -0
- package/lib/style.d.ts +70 -0
- package/lib/style.js +39 -0
- package/lib/svg.d.ts +22 -0
- package/lib/svg.js +48 -0
- package/lib/things.d.ts +40 -0
- package/lib/things.js +269 -0
- package/package.json +28 -4
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import type { Kind } from "../kind.ts";
|
|
2
|
+
import { type ColorName } from "../style.ts";
|
|
3
|
+
/**
|
|
4
|
+
* Tangram: a figure laid from the pieces of a tangram — two large triangles,
|
|
5
|
+
* a medium one, two small ones, a square and a parallelogram, all cut from one
|
|
6
|
+
* square — or from a free set of such pieces and of rectangles and
|
|
7
|
+
* trapezoids; and pieces apart, in a row below it, such as the options of a
|
|
8
|
+
* question. The unit is the side of the square piece: a small triangle has
|
|
9
|
+
* legs of 1, a medium one legs of √2 (1.414), a large one legs of 2; the
|
|
10
|
+
* parallelogram has sides of 1 and √2, a rectangle is 2 by 1, a trapezoid has
|
|
11
|
+
* sides of 1 and 3 and is 1 high.
|
|
12
|
+
*
|
|
13
|
+
* A piece has a pose: turn, clockwise in steps of 45 degrees, after flip, a
|
|
14
|
+
* mirror image from left to right; and, in the figure, at: the top-left corner
|
|
15
|
+
* of the box round it, in units. Upright, a triangle has its right angle at
|
|
16
|
+
* the bottom left, the parallelogram its sides of 1 at the top and the bottom
|
|
17
|
+
* and leans to the right, a trapezoid its long side at the bottom. A piece of
|
|
18
|
+
* the figure may be missing: its place is left empty with a "?". The figure
|
|
19
|
+
* is drawn piece by piece, or as a silhouette in one colour, its pieces not
|
|
20
|
+
* shown. The check proves that the pieces of the figure hold together and
|
|
21
|
+
* nowhere overlap.
|
|
22
|
+
*/
|
|
23
|
+
export declare const pieceNames: readonly ["large triangle", "medium triangle", "small triangle", "square", "parallelogram", "rectangle", "trapezoid"];
|
|
24
|
+
export type PieceName = (typeof pieceNames)[number];
|
|
25
|
+
export declare const sets: readonly ["tangram", "free"];
|
|
26
|
+
export declare const looks: readonly ["pieces", "silhouette"];
|
|
27
|
+
export declare const turns: readonly [0, 45, 90, 135, 180, 225, 270, 315];
|
|
28
|
+
export type Placed = {
|
|
29
|
+
piece: PieceName;
|
|
30
|
+
at: [number, number];
|
|
31
|
+
turn?: number;
|
|
32
|
+
flip?: boolean;
|
|
33
|
+
color?: ColorName;
|
|
34
|
+
missing?: boolean;
|
|
35
|
+
};
|
|
36
|
+
export type Apart = {
|
|
37
|
+
piece: PieceName;
|
|
38
|
+
turn?: number;
|
|
39
|
+
flip?: boolean;
|
|
40
|
+
color?: ColorName;
|
|
41
|
+
label?: string;
|
|
42
|
+
};
|
|
43
|
+
export type TangramScene = {
|
|
44
|
+
kind: "tangram";
|
|
45
|
+
set?: (typeof sets)[number];
|
|
46
|
+
pieces?: Placed[];
|
|
47
|
+
apart?: Apart[];
|
|
48
|
+
look?: (typeof looks)[number];
|
|
49
|
+
color?: ColorName;
|
|
50
|
+
name?: string;
|
|
51
|
+
};
|
|
52
|
+
export declare const tangram: Kind;
|