@holtjs/craft 0.1.0 → 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.
@@ -463,12 +463,6 @@ declare function validateRigDecorProp(raw: unknown): {
463
463
  code: string;
464
464
  message: string;
465
465
  };
466
- declare const BUILTIN_ANIM_FRAMES: Readonly<Record<string, {
467
- readonly frames: number;
468
- readonly dirs: number;
469
- }>>;
470
- /** Evaluate any built-in Deck animation at `(bodyOrKey, anim, frame, dir16)` to get exact 3D bone transforms & sockets. */
471
- declare function evaluateBuiltinPose(bodyOrKey: RigBodyKey | RigBodySpec, anim: string, frame?: number, dir16?: number): RigPoseState;
472
466
  type Rgb = readonly [number, number, number];
473
467
  type Ramp4 = readonly [Rgb, Rgb, Rgb, Rgb];
474
468
  interface RigLookColors {
@@ -540,66 +534,4 @@ declare function renderDecorPropSheet(spec: RigDecorPropSpec, opts?: {
540
534
  };
541
535
  /** Helper for debugging/verification: evaluate rest pose of a built-in or custom body at dir16. */
542
536
  declare function renderBodyRestPreview(bodyOrKey: RigBodyKey | RigBodySpec, dir16?: number, colors?: RigLookColors): RenderedRigCell;
543
- interface DirectionalSheetRowSpec {
544
- /** Clip name (`'idle'`, `'walk'`, `'run'`, etc.) or a custom declarative `RigClip`. */
545
- readonly clip: string | RigClip;
546
- /** Row identifier in output metadata (defaults to clip string or `clip.id`). */
547
- readonly name?: string;
548
- }
549
- interface BakeCharacterSheetOptions {
550
- readonly cellSize?: number;
551
- readonly ss?: number;
552
- /** Directions to bake: `4` = `[S(0), E(4), N(8), W(12)]`, `8` = `0,2,4,6,8,10,12,14`. Default `4`. */
553
- readonly dirs?: 4 | 8;
554
- readonly rows?: readonly DirectionalSheetRowSpec[];
555
- readonly colors?: RigLookColors;
556
- readonly cosmetics?: readonly RigCosmeticSpec[];
557
- readonly bakeNormals?: boolean;
558
- }
559
- interface CharacterFrameMeta {
560
- readonly key: string;
561
- readonly clip: string;
562
- readonly dirIndex: number;
563
- readonly dir16: number;
564
- readonly frame: number;
565
- readonly x: number;
566
- readonly y: number;
567
- readonly w: number;
568
- readonly h: number;
569
- readonly sockets: Readonly<Record<RigSocketName, ProjectedSocket2D>>;
570
- }
571
- interface BakedCharacterSheet {
572
- readonly width: number;
573
- readonly height: number;
574
- readonly cellSize: number;
575
- readonly columns: number;
576
- readonly rowCount: number;
577
- readonly rgba: Uint8ClampedArray;
578
- readonly normalRgba?: Uint8ClampedArray;
579
- readonly frames: readonly CharacterFrameMeta[];
580
- }
581
- /**
582
- * Bake a complete multi-direction (`4-dir` S/E/N/W or `8-dir`) × multi-animation pixel-art character spritesheet
583
- * with per-frame projected 2D socket coordinates (`handR`, `handL`, `headTop`, `back`, ...) and optional Sobel normal map.
584
- */
585
- declare function bakeDirectionalCharacterSheet(bodyOrCustom: RigBodyKey | RigBodySpec | RigCustomBodySpec, opts?: BakeCharacterSheetOptions): BakedCharacterSheet;
586
- declare const GRAVEYARD_PRESETS: {
587
- readonly keeperBody: RigCustomBodySpec;
588
- readonly zombieBody: RigCustomBodySpec;
589
- readonly cosmetics: {
590
- readonly ironAxe: RigCosmeticSpec;
591
- readonly blazingTorch: RigCosmeticSpec;
592
- };
593
- readonly clips: {
594
- readonly chop: RigClip;
595
- readonly shamble: RigClip;
596
- };
597
- readonly props: {
598
- readonly tombstone: RigDecorPropSpec;
599
- readonly woodenChest: RigDecorPropSpec;
600
- readonly stoneFurnace: RigDecorPropSpec;
601
- readonly arrowTower: RigDecorPropSpec;
602
- readonly ancientPine: RigDecorPropSpec;
603
- };
604
- };
605
- export { RigBoneName as $, RigDecorGroup as A, RigBodyAttachBone as At, RIG_BONE_NAMES as B, RigClip as Bt, BUILTIN_ANIM_FRAMES as C, reachArm as Ct, RigBodyCategory as D, RIG_BODY_EYE_STYLES as Dt, RIG_DECOR_GROUPS as E, RIG_BODY_ATTACH_BONES as Et, Mat4 as F, RigBodySpec as Ft, RIG_COS_E as G, RigPrimitiveSpec as Gt, RIG_CAMERA_GROUND_Y as H, RigKeyframe as Ht, MutVec3 as I, RigBodyTailStyle as It, RIG_EYE_MODES as J, rigClipFrameCount as Jt, RIG_DUO_VIEW as K, RigPropInstance as Kt, ProjectedPoint2D as L, rigBodyKeyFromIndex as Lt, compileCustomBodySpec as M, RigBodyCustomColors as Mt, validateRigCustomBody as N, RigBodyEyeStyle as Nt, RigCustomBodyDefaultColors as O, RIG_BODY_KEYS as Ot, validateRigDecorProp as P, RigBodyKey as Pt, RIG_SOCKET_NAMES as Q, validateRigPrimitiveList as Qt, ProjectedSocket2D as R, RIG_PRIMITIVE_SHAPES as Rt, parseHexRgb as S, quatMul as St, RIG_BODY_CATEGORIES as T, RIG_BODIES as Tt, RIG_CELL_SIZE as U, RigPixelSpriteSpec as Ut, RIG_CAMERA_ELEV_DEG as V, RigCosmeticSpec as Vt, RIG_COSMETIC_SLOTS as W, RigPrimitiveShape as Wt, RIG_MODEL_SCALE as X, validateRigCosmetic as Xt, RIG_LIMITS as Y, validateRigClip as Yt, RIG_SIN_E as Z, validateRigPixelSprite as Zt, renderRigPose as _, projectWorldPoint2D as _t, GRAVEYARD_PRESETS as a, RigSocketName as at, RigLookColors as b, quatFromUnitVectors as bt, DEFAULT_RIG_COLORS as c, createRigState as ct, renderBodyAnimStrip as d, mat4Invert as dt, RigBoneTransform as et, renderBodyRestPreview as f, mat4Mul as ft, renderRigClipStrip as g, projectSocket2D as gt, renderDecorPropSprite as h, projectAllSockets2D as ht, DirectionalSheetRowSpec as i, RigPoseState as it, RigDecorPropSpec as j, RigBodyAttachment as jt, RigCustomBodySpec as k, RIG_BODY_TAIL_STYLES as kt, RenderedRigCell as l, getBodySockets as lt, renderDecorPropSheet as m, mat4TransformPoint as mt, BakedCharacterSheet as n, RigEaseMode as nt, bakeDirectionalCharacterSheet as o, SocketDefinition as ot, renderCosmeticSprite as p, mat4TransformDir as pt, RIG_EASE_MODES as q, evaluateRigClip as qt, CharacterFrameMeta as r, RigEyeMode as rt, CompiledRigStrip as s, Vec3 as st, BakeCharacterSheetOptions as t, RigCosmeticSlot as tt, compositeSpriteRgba as u, mat4Compose as ut, Ramp4 as v, quatFromAxisAngle as vt, evaluateBuiltinPose as w, updateRigMatrices as wt, derivePixelRamp as x, quatIdentity as xt, Rgb as y, quatFromEuler as yt, Quat as z, RigBonePoseOverride as zt };
537
+ export { Vec3 as $, ProjectedSocket2D as A, RIG_PRIMITIVE_SHAPES as At, RIG_EYE_MODES as B, rigClipFrameCount as Bt, RigDecorPropSpec as C, RigBodyAttachment as Ct, Mat4 as D, RigBodySpec as Dt, validateRigDecorProp as E, RigBodyKey as Et, RIG_CELL_SIZE as F, RigPixelSpriteSpec as Ft, RigBoneName as G, RIG_MODEL_SCALE as H, validateRigCosmetic as Ht, RIG_COSMETIC_SLOTS as I, RigPrimitiveShape as It, RigEaseMode as J, RigBoneTransform as K, RIG_COS_E as L, RigPrimitiveSpec as Lt, RIG_BONE_NAMES as M, RigClip as Mt, RIG_CAMERA_ELEV_DEG as N, RigCosmeticSpec as Nt, MutVec3 as O, RigBodyTailStyle as Ot, RIG_CAMERA_GROUND_Y as P, RigKeyframe as Pt, SocketDefinition as Q, RIG_DUO_VIEW as R, RigPropInstance as Rt, RigDecorGroup as S, RigBodyAttachBone as St, validateRigCustomBody as T, RigBodyEyeStyle as Tt, RIG_SIN_E as U, validateRigPixelSprite as Ut, RIG_LIMITS as V, validateRigClip as Vt, RIG_SOCKET_NAMES as W, validateRigPrimitiveList as Wt, RigPoseState as X, RigEyeMode as Y, RigSocketName as Z, RIG_BODY_CATEGORIES as _, RIG_BODIES as _t, renderBodyAnimStrip as a, mat4TransformDir as at, RigCustomBodyDefaultColors as b, RIG_BODY_KEYS as bt, renderDecorPropSheet as c, projectSocket2D as ct, renderRigPose as d, quatFromEuler as dt, createRigState as et, Ramp4 as f, quatFromUnitVectors as ft, parseHexRgb as g, updateRigMatrices as gt, derivePixelRamp as h, reachArm as ht, compositeSpriteRgba as i, mat4Mul as it, Quat as j, RigBonePoseOverride as jt, ProjectedPoint2D as k, rigBodyKeyFromIndex as kt, renderDecorPropSprite as l, projectWorldPoint2D as lt, RigLookColors as m, quatMul as mt, DEFAULT_RIG_COLORS as n, mat4Compose as nt, renderBodyRestPreview as o, mat4TransformPoint as ot, Rgb as p, quatIdentity as pt, RigCosmeticSlot as q, RenderedRigCell as r, mat4Invert as rt, renderCosmeticSprite as s, projectAllSockets2D as st, CompiledRigStrip as t, getBodySockets as tt, renderRigClipStrip as u, quatFromAxisAngle as ut, RIG_DECOR_GROUPS as v, RIG_BODY_ATTACH_BONES as vt, compileCustomBodySpec as w, RigBodyCustomColors as wt, RigCustomBodySpec as x, RIG_BODY_TAIL_STYLES as xt, RigBodyCategory as y, RIG_BODY_EYE_STYLES as yt, RIG_EASE_MODES as z, evaluateRigClip as zt };