@holtjs/craft 0.0.0-stage → 0.2.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/dist/hd3d.d.ts ADDED
@@ -0,0 +1,112 @@
1
+ import { C as RigDecorPropSpec, Dt as RigBodySpec, Et as RigBodyKey, Mt as RigClip, Nt as RigCosmeticSpec, m as RigLookColors, p as Rgb, r as RenderedRigCell, x as RigCustomBodySpec } from "./rig-render-DoPVKQAF.js";
2
+ import { TerrainTextureStyle } from "./tilemap.js";
3
+ export interface HdCameraOptions {
4
+ /** Camera elevation angle in degrees (`30` = true 2:1 isometric; `26` = 3/4 top-down). Default `30`. */
5
+ readonly elevDeg?: number;
6
+ /** Base yaw offset in degrees (`45` = true 2:1 isometric diamond orientation; `0` = cardinal). Default `45`. */
7
+ readonly baseYawDeg?: number;
8
+ /** Anti-aliasing supersample grid (`2` = 2x2, `3` = 3x3). Default `3`. */
9
+ readonly ss?: number;
10
+ /** Smooth dark ink silhouette & crease outline width in output pixels (`0` to disable). Default `1.75`. */
11
+ readonly outlineWidthPx?: number;
12
+ readonly outlineColor?: Rgb | string;
13
+ /** Render a soft elliptical ground ambient-occlusion shadow. Default `true`. */
14
+ readonly groundShadow?: boolean;
15
+ }
16
+ export interface HdBakeCharacterOptions extends HdCameraOptions {
17
+ /** Output cell width & height in pixels (default `96` — crisp HD sprite cell!). */
18
+ readonly cellSize?: number;
19
+ readonly dirs?: 4 | 8;
20
+ readonly rows?: ReadonlyArray<{
21
+ readonly clip: string | RigClip;
22
+ readonly name?: string;
23
+ }>;
24
+ readonly colors?: RigLookColors;
25
+ readonly cosmetics?: readonly RigCosmeticSpec[];
26
+ readonly bakeNormals?: boolean;
27
+ }
28
+ export interface HdBakedCharacterSheet {
29
+ readonly width: number;
30
+ readonly height: number;
31
+ readonly cellSize: number;
32
+ readonly columns: number;
33
+ readonly rowCount: number;
34
+ readonly rgba: Uint8ClampedArray;
35
+ readonly normalRgba?: Uint8ClampedArray;
36
+ }
37
+ export interface HdRenderedCell extends RenderedRigCell {
38
+ /** Exact supersampled 3D camera-space tangent normal map (`+X` right, `+Y` up, `+Z` out). */
39
+ readonly normalRgba: Uint8ClampedArray;
40
+ }
41
+ export interface HdPropRenderOptions extends HdCameraOptions {
42
+ /** Multiplier relative to `spec.frameW` / `spec.frameH` (`2` -> `64..96px`, `2.5` -> `80..120px`). Default `2.25`. */
43
+ readonly resolutionScale?: number;
44
+ }
45
+ export interface HdDualGridSpec {
46
+ readonly id: string;
47
+ readonly tileSize?: number;
48
+ readonly baseColor: string;
49
+ readonly accentColor?: string;
50
+ readonly style?: TerrainTextureStyle;
51
+ readonly outlineWidthPx?: number;
52
+ readonly seed?: number;
53
+ readonly bakeNormals?: boolean;
54
+ }
55
+ export interface HdBakedTileset {
56
+ readonly id: string;
57
+ readonly width: number;
58
+ readonly height: number;
59
+ readonly tileSize: number;
60
+ readonly columns: number;
61
+ readonly rows: number;
62
+ readonly tileCount: number;
63
+ readonly rgba: Uint8ClampedArray;
64
+ readonly normalRgba?: Uint8ClampedArray;
65
+ }
66
+ /**
67
+ * Render a single smooth high-resolution (`cellSize x cellSize`, default `96x96`) 2:1 isometric 3D character cell
68
+ * with 3x3 SSAA anti-aliasing, analytical surface normals, and smooth dark ink outlines.
69
+ */
70
+ export declare function renderHdCharacterCell(bodyOrCustom: RigBodyKey | RigBodySpec | RigCustomBodySpec, animOrClip: string | RigClip, frame?: number, yawRad?: number, opts?: HdBakeCharacterOptions): HdRenderedCell;
71
+ /**
72
+ * Bake a multi-direction 2:1 isometric (`45°, 135°, 225°, 315°` or 8-dir) smooth pre-rendered 3D character spritesheet!
73
+ */
74
+ export declare function bakeHdCharacterSheet(bodyOrCustom: RigBodyKey | RigBodySpec | RigCustomBodySpec, opts?: HdBakeCharacterOptions): HdBakedCharacterSheet;
75
+ /**
76
+ * Render a smooth high-resolution 2:1 isometric (`elev = 30°`, `yaw = 45° + dir4 * 90°`) pre-rendered 3D world prop
77
+ * (turrets, tombs, walls, chests, trees, rocks) with anti-aliased dark ink outlines and ground AO shadow.
78
+ */
79
+ export declare function renderHdPropSprite(spec: RigDecorPropSpec, dir4?: number, opts?: HdPropRenderOptions): HdRenderedCell;
80
+ /** Compile all `1` or `4` isometric directions of a prop into a horizontal smooth HD spritesheet. */
81
+ export declare function renderHdPropSheet(spec: RigDecorPropSpec, opts?: HdPropRenderOptions): {
82
+ readonly width: number;
83
+ readonly height: number;
84
+ readonly frameW: number;
85
+ readonly frameH: number;
86
+ readonly dirs: 1 | 4;
87
+ readonly rgba: Uint8ClampedArray;
88
+ readonly normalRgba: Uint8ClampedArray;
89
+ };
90
+ /**
91
+ * Bake a smooth, anti-aliased high-resolution (`64x64` default) 16-tile Dual-Grid terrain spritesheet
92
+ * with seamless procedural hand-painted gradients, soft sunlit lip bevels, and dark ink borders.
93
+ */
94
+ export declare function bakeHdDualGridSheet(spec: HdDualGridSpec): HdBakedTileset;
95
+ export declare const KRAFTEERS_PRESETS: {
96
+ readonly explorerBody: RigCustomBodySpec;
97
+ readonly tombMummyBody: RigCustomBodySpec;
98
+ readonly cosmetics: {
99
+ readonly goldenPickaxe: RigCosmeticSpec;
100
+ readonly expeditionTorch: RigCosmeticSpec;
101
+ };
102
+ readonly clips: {
103
+ readonly swing: RigClip;
104
+ readonly shamble: RigClip;
105
+ };
106
+ readonly props: {
107
+ readonly pharaohObelisk: RigDecorPropSpec;
108
+ readonly ballistaTurret: RigDecorPropSpec;
109
+ readonly fortressWall: RigDecorPropSpec;
110
+ readonly stylizedTree: RigDecorPropSpec;
111
+ };
112
+ };
package/dist/hd3d.js ADDED
@@ -0,0 +1 @@
1
+ export { t as KRAFTEERS_PRESETS, n as bakeHdCharacterSheet, r as bakeHdDualGridSheet, a as renderHdCharacterCell, o as renderHdPropSheet, s as renderHdPropSprite } from "./hd3d-BozZnINB.js";
@@ -0,0 +1,187 @@
1
+ import { HdBakeCharacterOptions, HdBakedCharacterSheet, HdBakedTileset, HdCameraOptions, HdDualGridSpec, HdPropRenderOptions, HdRenderedCell, KRAFTEERS_PRESETS, bakeHdCharacterSheet, bakeHdDualGridSheet, renderHdCharacterCell, renderHdPropSheet, renderHdPropSprite } from "./hd3d.js";
2
+ import { AsciiPixelGridSpec, CompilePixelGridOptions, PixelCanvas, PixelSpriteLike, Ramp4, Rgb, Rgba, compilePixelGrid, derivePaletteVariants, derivePixelRamp, encodePngRgba, mixRgb, parseHexRgb, rgbToHex } from "./pixel.js";
3
+ import { $ as Vec3, A as ProjectedSocket2D, At as RIG_PRIMITIVE_SHAPES, B as RIG_EYE_MODES, Bt as rigClipFrameCount, C as RigDecorPropSpec, Ct as RigBodyAttachment, D as Mat4, Dt as RigBodySpec, E as validateRigDecorProp, Et as RigBodyKey, F as RIG_CELL_SIZE, Ft as RigPixelSpriteSpec, G as RigBoneName, H as RIG_MODEL_SCALE, Ht as validateRigCosmetic, I as RIG_COSMETIC_SLOTS, It as RigPrimitiveShape, J as RigEaseMode, K as RigBoneTransform, L as RIG_COS_E, Lt as RigPrimitiveSpec, M as RIG_BONE_NAMES, Mt as RigClip, N as RIG_CAMERA_ELEV_DEG, Nt as RigCosmeticSpec, O as MutVec3, Ot as RigBodyTailStyle, P as RIG_CAMERA_GROUND_Y, Pt as RigKeyframe, Q as SocketDefinition, R as RIG_DUO_VIEW, Rt as RigPropInstance, S as RigDecorGroup, St as RigBodyAttachBone, T as validateRigCustomBody, Tt as RigBodyEyeStyle, U as RIG_SIN_E, Ut as validateRigPixelSprite, V as RIG_LIMITS, Vt as validateRigClip, W as RIG_SOCKET_NAMES, Wt as validateRigPrimitiveList, X as RigPoseState, Y as RigEyeMode, Z as RigSocketName, _ as RIG_BODY_CATEGORIES, _t as RIG_BODIES, a as renderBodyAnimStrip, at as mat4TransformDir, b as RigCustomBodyDefaultColors, bt as RIG_BODY_KEYS, c as renderDecorPropSheet, ct as projectSocket2D, d as renderRigPose, dt as quatFromEuler, et as createRigState, ft as quatFromUnitVectors, gt as updateRigMatrices, ht as reachArm, i as compositeSpriteRgba, it as mat4Mul, j as Quat, jt as RigBonePoseOverride, k as ProjectedPoint2D, kt as rigBodyKeyFromIndex, l as renderDecorPropSprite, lt as projectWorldPoint2D, m as RigLookColors, mt as quatMul, n as DEFAULT_RIG_COLORS, nt as mat4Compose, o as renderBodyRestPreview, ot as mat4TransformPoint, pt as quatIdentity, q as RigCosmeticSlot, r as RenderedRigCell, rt as mat4Invert, s as renderCosmeticSprite, st as projectAllSockets2D, t as CompiledRigStrip, tt as getBodySockets, u as renderRigClipStrip, ut as quatFromAxisAngle, v as RIG_DECOR_GROUPS, vt as RIG_BODY_ATTACH_BONES, w as compileCustomBodySpec, wt as RigBodyCustomColors, x as RigCustomBodySpec, xt as RIG_BODY_TAIL_STYLES, y as RigBodyCategory, yt as RIG_BODY_EYE_STYLES, z as RIG_EASE_MODES, zt as evaluateRigClip } from "./rig-render-DoPVKQAF.js";
4
+ import { a as GRAVEYARD_PRESETS, c as evaluateBuiltinPose, i as DirectionalSheetRowSpec, n as BakedCharacterSheet, o as bakeDirectionalCharacterSheet, r as CharacterFrameMeta, s as BUILTIN_ANIM_FRAMES, t as BakeCharacterSheetOptions } from "./rig3d-DeeG_PJj.js";
5
+ import { BLOB47_CANONICAL_MASKS, BakedPixelTileset, PixelBlob47Spec, PixelDualGridSpec, TerrainTextureStyle, bakeNormalMapRgba, bakePixelBlob47Sheet, bakePixelDualGridSheet, computeBlob47Index, computeDualGridMask } from "./tilemap.js";
6
+ import { AtlasInputItem, MinimalCanvas2D, PackAtlasOptions, PackedFrameRect, PackedSpriteAtlas, StageSceneTextureHost, packSpriteAtlas, registerAtlasOnStage, writeRgbaToCanvas } from "./atlas.js";
7
+ import { ContactSheetItem, ContactSheetOptions, ContactSheetResult, InspectMarker, renderContactSheet } from "./inspect.js";
8
+ export declare const Craft: {
9
+ mixRgb: (a: Rgb, b: Rgb, t: number) => Rgb;
10
+ parseHexRgb(hex: string): Rgb;
11
+ rgbToHex(rgb: Rgb): string;
12
+ derivePixelRamp(hexOrRgb: string | Rgb): Ramp4;
13
+ derivePaletteVariants(baseHex: string, count?: number): Ramp4[];
14
+ PixelCanvas: typeof PixelCanvas;
15
+ compilePixelGrid(spec: AsciiPixelGridSpec, opts?: CompilePixelGridOptions): PixelCanvas;
16
+ encodePngRgba(width: number, height: number, rgba: Uint8Array | Uint8ClampedArray): Uint8Array;
17
+ computeDualGridMask(tl: boolean, tr: boolean, bl: boolean, br: boolean): number;
18
+ BLOB47_CANONICAL_MASKS: readonly number[];
19
+ computeBlob47Index(n: boolean, ne: boolean, e: boolean, se: boolean, s: boolean, sw: boolean, w: boolean, nw: boolean): number;
20
+ bakeNormalMapRgba(rgba: Uint8Array | Uint8ClampedArray, width: number, height: number, opts?: {
21
+ strength?: number;
22
+ alphaWeight?: number;
23
+ }): Uint8ClampedArray;
24
+ bakePixelDualGridSheet(spec: PixelDualGridSpec): BakedPixelTileset;
25
+ bakePixelBlob47Sheet(spec: PixelBlob47Spec): BakedPixelTileset;
26
+ packSpriteAtlas(items: readonly AtlasInputItem[], opts?: PackAtlasOptions): PackedSpriteAtlas;
27
+ writeRgbaToCanvas(sprite: PixelSpriteLike, createCanvas: (w: number, h: number) => MinimalCanvas2D): MinimalCanvas2D;
28
+ registerAtlasOnStage(scene: StageSceneTextureHost, textureKey: string, atlas: PackedSpriteAtlas, createCanvas: (w: number, h: number) => MinimalCanvas2D): void;
29
+ RIG_BODY_KEYS: readonly ["0", "A", "B", "C", "Y", "K", "M", "G"];
30
+ RIG_BODY_EYE_STYLES: readonly ["otter", "big", "cat", "dot", "blue"];
31
+ RIG_BODY_TAIL_STYLES: readonly ["otter", "cat", "fluffy", "curled", "stub"];
32
+ RIG_BODY_ATTACH_BONES: readonly ["head", "chest", "hips", "tail0", "armL", "armR"];
33
+ RIG_BODIES: Readonly<Record<"0" | "A" | "B" | "C" | "G" | "K" | "M" | "Y", RigBodySpec>>;
34
+ rigBodyKeyFromIndex: typeof rigBodyKeyFromIndex;
35
+ RIG_BONE_NAMES: readonly ["root", "hips", "chest", "neck", "head", "armL", "armR", "legL", "legR", "tail0", "tail1", "tail2"];
36
+ RIG_SOCKET_NAMES: readonly ["headTop", "face", "earL", "earR", "neck", "back", "waist", "handL", "handR"];
37
+ RIG_COSMETIC_SLOTS: readonly ["hat", "face", "neck", "back", "hand", "other"];
38
+ RIG_EYE_MODES: readonly ["open", "happy", "shut", "squeeze"];
39
+ RIG_EASE_MODES: readonly ["linear", "easeInOut", "easeOut", "step"];
40
+ RIG_MODEL_SCALE: 0.93;
41
+ RIG_CELL_SIZE: 32;
42
+ RIG_CAMERA_ELEV_DEG: 13;
43
+ RIG_CAMERA_GROUND_Y: 29;
44
+ RIG_DUO_VIEW: 2;
45
+ RIG_COS_E: number;
46
+ RIG_SIN_E: number;
47
+ RIG_LIMITS: {
48
+ readonly maxCosmeticPrimitives: 16;
49
+ readonly maxCosmeticPixelSize: 24;
50
+ readonly maxCustomBodyExtras: 12;
51
+ readonly maxCustomBodyPrimitives: 24;
52
+ readonly maxDecorPrimitives: 24;
53
+ readonly maxDecorPixelSize: 48;
54
+ readonly maxClipKeyframes: 16;
55
+ readonly maxClipProps: 4;
56
+ readonly maxClipDurationMs: 12000;
57
+ readonly minClipDurationMs: 120;
58
+ readonly maxClipFps: 12;
59
+ readonly minClipFps: 2;
60
+ readonly maxClipNameLen: 48;
61
+ };
62
+ quatIdentity: typeof quatIdentity;
63
+ quatMul: typeof quatMul;
64
+ quatFromEuler: typeof quatFromEuler;
65
+ quatFromAxisAngle: typeof quatFromAxisAngle;
66
+ quatFromUnitVectors: typeof quatFromUnitVectors;
67
+ mat4Compose: typeof mat4Compose;
68
+ mat4Mul: typeof mat4Mul;
69
+ mat4Invert: typeof mat4Invert;
70
+ mat4TransformPoint: typeof mat4TransformPoint;
71
+ mat4TransformDir: typeof mat4TransformDir;
72
+ createRigState: typeof createRigState;
73
+ updateRigMatrices: typeof updateRigMatrices;
74
+ reachArm: typeof reachArm;
75
+ getBodySockets: typeof getBodySockets;
76
+ projectWorldPoint2D: typeof projectWorldPoint2D;
77
+ projectSocket2D: typeof projectSocket2D;
78
+ projectAllSockets2D: typeof projectAllSockets2D;
79
+ BUILTIN_ANIM_FRAMES: Readonly<Record<string, {
80
+ readonly frames: number;
81
+ readonly dirs: number;
82
+ }>>;
83
+ evaluateBuiltinPose(bodyOrKey: RigBodyKey | RigBodySpec, anim: string, frame?: number, dir16?: number): RigPoseState;
84
+ RIG_PRIMITIVE_SHAPES: readonly ["ellipsoid", "box", "cone", "capsule", "cylinder", "torus"];
85
+ validateRigCosmetic: typeof validateRigCosmetic;
86
+ validateRigClip: typeof validateRigClip;
87
+ validateRigPrimitiveList: typeof validateRigPrimitiveList;
88
+ validateRigPixelSprite: typeof validateRigPixelSprite;
89
+ evaluateRigClip: typeof evaluateRigClip;
90
+ rigClipFrameCount: typeof rigClipFrameCount;
91
+ RIG_BODY_CATEGORIES: readonly ["animal", "character"];
92
+ RIG_DECOR_GROUPS: readonly ["office", "pet", "nature", "decor", "game"];
93
+ validateRigCustomBody: typeof validateRigCustomBody;
94
+ compileCustomBodySpec: typeof compileCustomBodySpec;
95
+ validateRigDecorProp: typeof validateRigDecorProp;
96
+ DEFAULT_RIG_COLORS: RigLookColors;
97
+ renderRigPose(state: RigPoseState, opts?: {
98
+ colors?: RigLookColors;
99
+ cosmetics?: readonly RigCosmeticSpec[];
100
+ cellSize?: number;
101
+ ss?: number;
102
+ }): RenderedRigCell;
103
+ renderRigClipStrip(bodyOrKey: RigBodyKey | RigBodySpec, clip: RigClip, dir16?: number, opts?: {
104
+ colors?: RigLookColors;
105
+ cosmetics?: readonly RigCosmeticSpec[];
106
+ cellSize?: number;
107
+ ss?: number;
108
+ }): CompiledRigStrip;
109
+ renderBodyAnimStrip(bodyOrKey: RigBodyKey | RigBodySpec, anim: string, dir16?: number, opts?: {
110
+ colors?: RigLookColors;
111
+ cosmetics?: readonly RigCosmeticSpec[];
112
+ cellSize?: number;
113
+ ss?: number;
114
+ }): CompiledRigStrip;
115
+ renderCosmeticSprite(cosmetic: RigCosmeticSpec, dir16?: number, opts?: {
116
+ size?: number;
117
+ ss?: number;
118
+ }): RenderedRigCell;
119
+ compositeSpriteRgba(dst: Uint8ClampedArray, dstW: number, dstH: number, src: RenderedRigCell, cx: number, cy: number, behind?: boolean): void;
120
+ renderDecorPropSprite(spec: RigDecorPropSpec, dir4?: number, opts?: {
121
+ ss?: number;
122
+ }): RenderedRigCell;
123
+ renderDecorPropSheet(spec: RigDecorPropSpec, opts?: {
124
+ ss?: number;
125
+ }): {
126
+ readonly width: number;
127
+ readonly height: number;
128
+ readonly frameW: number;
129
+ readonly frameH: number;
130
+ readonly dirs: 1 | 4;
131
+ readonly rgba: Uint8ClampedArray;
132
+ };
133
+ renderBodyRestPreview(bodyOrKey: RigBodyKey | RigBodySpec, dir16?: number, colors?: RigLookColors): RenderedRigCell;
134
+ renderHdCharacterCell(bodyOrCustom: RigBodyKey | RigBodySpec | RigCustomBodySpec, animOrClip: string | RigClip, frame?: number, yawRad?: number, opts?: HdBakeCharacterOptions): HdRenderedCell;
135
+ bakeHdCharacterSheet(bodyOrCustom: RigBodyKey | RigBodySpec | RigCustomBodySpec, opts?: HdBakeCharacterOptions): HdBakedCharacterSheet;
136
+ renderHdPropSprite(spec: RigDecorPropSpec, dir4?: number, opts?: HdPropRenderOptions): HdRenderedCell;
137
+ renderHdPropSheet(spec: RigDecorPropSpec, opts?: HdPropRenderOptions): {
138
+ readonly width: number;
139
+ readonly height: number;
140
+ readonly frameW: number;
141
+ readonly frameH: number;
142
+ readonly dirs: 1 | 4;
143
+ readonly rgba: Uint8ClampedArray;
144
+ readonly normalRgba: Uint8ClampedArray;
145
+ };
146
+ bakeHdDualGridSheet(spec: HdDualGridSpec): HdBakedTileset;
147
+ KRAFTEERS_PRESETS: {
148
+ readonly explorerBody: RigCustomBodySpec;
149
+ readonly tombMummyBody: RigCustomBodySpec;
150
+ readonly cosmetics: {
151
+ readonly goldenPickaxe: RigCosmeticSpec;
152
+ readonly expeditionTorch: RigCosmeticSpec;
153
+ };
154
+ readonly clips: {
155
+ readonly swing: RigClip;
156
+ readonly shamble: RigClip;
157
+ };
158
+ readonly props: {
159
+ readonly pharaohObelisk: RigDecorPropSpec;
160
+ readonly ballistaTurret: RigDecorPropSpec;
161
+ readonly fortressWall: RigDecorPropSpec;
162
+ readonly stylizedTree: RigDecorPropSpec;
163
+ };
164
+ };
165
+ bakeDirectionalCharacterSheet(bodyOrCustom: RigBodyKey | RigBodySpec | RigCustomBodySpec, opts?: BakeCharacterSheetOptions): BakedCharacterSheet;
166
+ GRAVEYARD_PRESETS: {
167
+ readonly keeperBody: RigCustomBodySpec;
168
+ readonly zombieBody: RigCustomBodySpec;
169
+ readonly cosmetics: {
170
+ readonly ironAxe: RigCosmeticSpec;
171
+ readonly blazingTorch: RigCosmeticSpec;
172
+ };
173
+ readonly clips: {
174
+ readonly chop: RigClip;
175
+ readonly shamble: RigClip;
176
+ };
177
+ readonly props: {
178
+ readonly tombstone: RigDecorPropSpec;
179
+ readonly woodenChest: RigDecorPropSpec;
180
+ readonly stoneFurnace: RigDecorPropSpec;
181
+ readonly arrowTower: RigDecorPropSpec;
182
+ readonly ancientPine: RigDecorPropSpec;
183
+ };
184
+ };
185
+ renderContactSheet(items: readonly ContactSheetItem[], opts?: ContactSheetOptions): ContactSheetResult;
186
+ };
187
+ export { AsciiPixelGridSpec, AtlasInputItem, BLOB47_CANONICAL_MASKS, BUILTIN_ANIM_FRAMES, type BakeCharacterSheetOptions, type BakedCharacterSheet, BakedPixelTileset, type CharacterFrameMeta, CompilePixelGridOptions, type CompiledRigStrip, ContactSheetItem, ContactSheetOptions, ContactSheetResult, Craft as default, DEFAULT_RIG_COLORS, type DirectionalSheetRowSpec, GRAVEYARD_PRESETS, HdBakeCharacterOptions, HdBakedCharacterSheet, HdBakedTileset, HdCameraOptions, HdDualGridSpec, HdPropRenderOptions, HdRenderedCell, InspectMarker, KRAFTEERS_PRESETS, type Mat4, MinimalCanvas2D, type MutVec3, PackAtlasOptions, PackedFrameRect, PackedSpriteAtlas, PixelBlob47Spec, PixelCanvas, PixelDualGridSpec, PixelSpriteLike, type ProjectedPoint2D, type ProjectedSocket2D, type Quat, RIG_BODIES, RIG_BODY_ATTACH_BONES, RIG_BODY_CATEGORIES, RIG_BODY_EYE_STYLES, RIG_BODY_KEYS, RIG_BODY_TAIL_STYLES, RIG_BONE_NAMES, RIG_CAMERA_ELEV_DEG, RIG_CAMERA_GROUND_Y, RIG_CELL_SIZE, RIG_COSMETIC_SLOTS, RIG_COS_E, RIG_DECOR_GROUPS, RIG_DUO_VIEW, RIG_EASE_MODES, RIG_EYE_MODES, RIG_LIMITS, RIG_MODEL_SCALE, RIG_PRIMITIVE_SHAPES, RIG_SIN_E, RIG_SOCKET_NAMES, Ramp4, type RenderedRigCell, Rgb, Rgba, type RigBodyAttachBone, type RigBodyAttachment, type RigBodyCategory, type RigBodyCustomColors, type RigBodyEyeStyle, type RigBodyKey, type RigBodySpec, type RigBodyTailStyle, type RigBoneName, type RigBonePoseOverride, type RigBoneTransform, type RigClip, type RigCosmeticSlot, type RigCosmeticSpec, type RigCustomBodyDefaultColors, type RigCustomBodySpec, type RigDecorGroup, type RigDecorPropSpec, type RigEaseMode, type RigEyeMode, type RigKeyframe, type RigLookColors, type RigPixelSpriteSpec, type RigPoseState, type RigPrimitiveShape, type RigPrimitiveSpec, type RigPropInstance, type RigSocketName, type SocketDefinition, StageSceneTextureHost, TerrainTextureStyle, type Vec3, bakeDirectionalCharacterSheet, bakeHdCharacterSheet, bakeHdDualGridSheet, bakeNormalMapRgba, bakePixelBlob47Sheet, bakePixelDualGridSheet, compileCustomBodySpec, compilePixelGrid, compositeSpriteRgba, computeBlob47Index, computeDualGridMask, createRigState, derivePaletteVariants, derivePixelRamp, encodePngRgba, evaluateBuiltinPose, evaluateRigClip, getBodySockets, mat4Compose, mat4Invert, mat4Mul, mat4TransformDir, mat4TransformPoint, mixRgb, packSpriteAtlas, parseHexRgb, projectAllSockets2D, projectSocket2D, projectWorldPoint2D, quatFromAxisAngle, quatFromEuler, quatFromUnitVectors, quatIdentity, quatMul, reachArm, registerAtlasOnStage, renderBodyAnimStrip, renderBodyRestPreview, renderContactSheet, renderCosmeticSprite, renderDecorPropSheet, renderDecorPropSprite, renderHdCharacterCell, renderHdPropSheet, renderHdPropSprite, renderRigClipStrip, renderRigPose, rgbToHex, rigBodyKeyFromIndex, rigClipFrameCount, updateRigMatrices, validateRigClip, validateRigCosmetic, validateRigCustomBody, validateRigDecorProp, validateRigPixelSprite, validateRigPrimitiveList, writeRgbaToCanvas };
package/dist/index.js ADDED
@@ -0,0 +1,17 @@
1
+ import { a as renderHdCharacterCell, i as hd3d_exports, n as bakeHdCharacterSheet, o as renderHdPropSheet, r as bakeHdDualGridSheet, s as renderHdPropSprite, t as KRAFTEERS_PRESETS } from "./hd3d-BozZnINB.js";
2
+ import { $ as projectSocket2D, A as validateRigPixelSprite, B as RIG_EYE_MODES, C as validateRigCustomBody, D as rigClipFrameCount, E as evaluateRigClip, F as RIG_CELL_SIZE, G as createRigState, H as RIG_MODEL_SCALE, I as RIG_COSMETIC_SLOTS, J as mat4Invert, K as getBodySockets, L as RIG_COS_E, M as RIG_BONE_NAMES, N as RIG_CAMERA_ELEV_DEG, O as validateRigClip, P as RIG_CAMERA_GROUND_Y, Q as projectAllSockets2D, R as RIG_DUO_VIEW, S as compileCustomBodySpec, T as RIG_PRIMITIVE_SHAPES, U as RIG_SIN_E, V as RIG_LIMITS, W as RIG_SOCKET_NAMES, X as mat4TransformDir, Y as mat4Mul, Z as mat4TransformPoint, a as renderCosmeticSprite, at as quatMul, b as RIG_BODY_CATEGORIES, c as renderRigClipStrip, ct as RIG_BODIES, dt as RIG_BODY_KEYS, et as projectWorldPoint2D, ft as RIG_BODY_TAIL_STYLES, i as renderBodyRestPreview, it as quatIdentity, j as validateRigPrimitiveList, k as validateRigCosmetic, l as renderRigPose, lt as RIG_BODY_ATTACH_BONES, n as compositeSpriteRgba, nt as quatFromEuler, o as renderDecorPropSheet, ot as reachArm, pt as rigBodyKeyFromIndex, q as mat4Compose, r as renderBodyAnimStrip, rt as quatFromUnitVectors, s as renderDecorPropSprite, st as updateRigMatrices, t as DEFAULT_RIG_COLORS, tt as quatFromAxisAngle, ut as RIG_BODY_EYE_STYLES, v as BUILTIN_ANIM_FRAMES, w as validateRigDecorProp, x as RIG_DECOR_GROUPS, y as evaluateBuiltinPose, z as RIG_EASE_MODES } from "./rig-render-DZBV9u2H.js";
3
+ import { a as encodePngRgba, c as pixel_exports, i as derivePixelRamp, l as rgbToHex, n as compilePixelGrid, o as mixRgb, r as derivePaletteVariants, s as parseHexRgb, t as PixelCanvas } from "./pixel-D3jgByB5.js";
4
+ import { n as bakeDirectionalCharacterSheet, r as rig3d_exports, t as GRAVEYARD_PRESETS } from "./rig3d-CPw8F6V2.js";
5
+ import { a as computeBlob47Index, i as bakePixelDualGridSheet, n as bakeNormalMapRgba, o as computeDualGridMask, r as bakePixelBlob47Sheet, s as tilemap_exports, t as BLOB47_CANONICAL_MASKS } from "./tilemap-BFH4_JLe.js";
6
+ import { i as writeRgbaToCanvas, n as packSpriteAtlas, r as registerAtlasOnStage, t as atlas_exports } from "./atlas-Pc12eQsg.js";
7
+ import { n as renderContactSheet, t as inspect_exports } from "./inspect-NzY8Ac1j.js";
8
+ // src/index.ts
9
+ const Craft = {
10
+ ...hd3d_exports,
11
+ ...rig3d_exports,
12
+ ...pixel_exports,
13
+ ...tilemap_exports,
14
+ ...atlas_exports,
15
+ ...inspect_exports
16
+ };
17
+ export { BLOB47_CANONICAL_MASKS, BUILTIN_ANIM_FRAMES, Craft, Craft as default, DEFAULT_RIG_COLORS, GRAVEYARD_PRESETS, KRAFTEERS_PRESETS, PixelCanvas, RIG_BODIES, RIG_BODY_ATTACH_BONES, RIG_BODY_CATEGORIES, RIG_BODY_EYE_STYLES, RIG_BODY_KEYS, RIG_BODY_TAIL_STYLES, RIG_BONE_NAMES, RIG_CAMERA_ELEV_DEG, RIG_CAMERA_GROUND_Y, RIG_CELL_SIZE, RIG_COSMETIC_SLOTS, RIG_COS_E, RIG_DECOR_GROUPS, RIG_DUO_VIEW, RIG_EASE_MODES, RIG_EYE_MODES, RIG_LIMITS, RIG_MODEL_SCALE, RIG_PRIMITIVE_SHAPES, RIG_SIN_E, RIG_SOCKET_NAMES, bakeDirectionalCharacterSheet, bakeHdCharacterSheet, bakeHdDualGridSheet, bakeNormalMapRgba, bakePixelBlob47Sheet, bakePixelDualGridSheet, compileCustomBodySpec, compilePixelGrid, compositeSpriteRgba, computeBlob47Index, computeDualGridMask, createRigState, derivePaletteVariants, derivePixelRamp, encodePngRgba, evaluateBuiltinPose, evaluateRigClip, getBodySockets, mat4Compose, mat4Invert, mat4Mul, mat4TransformDir, mat4TransformPoint, mixRgb, packSpriteAtlas, parseHexRgb, projectAllSockets2D, projectSocket2D, projectWorldPoint2D, quatFromAxisAngle, quatFromEuler, quatFromUnitVectors, quatIdentity, quatMul, reachArm, registerAtlasOnStage, renderBodyAnimStrip, renderBodyRestPreview, renderContactSheet, renderCosmeticSprite, renderDecorPropSheet, renderDecorPropSprite, renderHdCharacterCell, renderHdPropSheet, renderHdPropSprite, renderRigClipStrip, renderRigPose, rgbToHex, rigBodyKeyFromIndex, rigClipFrameCount, updateRigMatrices, validateRigClip, validateRigCosmetic, validateRigCustomBody, validateRigDecorProp, validateRigPixelSprite, validateRigPrimitiveList, writeRgbaToCanvas };