@algorisys/tinyfly 0.92.0 → 0.94.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.
Files changed (64) hide show
  1. package/README.md +7 -6
  2. package/bin/tinyfly.mjs +34 -1
  3. package/docs/2d-animation-roadmap.md +191 -0
  4. package/docs/3d-rotations.md +164 -0
  5. package/docs/3d-support-plan.md +628 -0
  6. package/docs/DEPLOYMENT.md +414 -0
  7. package/docs/acting.md +529 -0
  8. package/docs/api-reference.md +2353 -0
  9. package/docs/camera.md +94 -0
  10. package/docs/cartoon-hands.md +96 -0
  11. package/docs/character-system-m1.md +218 -0
  12. package/docs/character-system-plan.md +384 -0
  13. package/docs/dance.md +315 -0
  14. package/docs/editor-guide.md +1249 -0
  15. package/docs/examples.md +765 -0
  16. package/docs/extending.md +168 -0
  17. package/docs/file-format.md +690 -0
  18. package/docs/getting-started.md +314 -0
  19. package/docs/grid-and-snapping.md +64 -0
  20. package/docs/gsap-compat.md +1241 -0
  21. package/docs/llm-guide.md +131 -0
  22. package/docs/maps.md +116 -0
  23. package/docs/onion-skinning.md +41 -0
  24. package/docs/pen-tool.md +65 -0
  25. package/docs/polygon-star.md +44 -0
  26. package/docs/scene-3d.md +299 -0
  27. package/docs/scroll-animation.md +314 -0
  28. package/docs/shape-morph.md +61 -0
  29. package/docs/sprite-sheet-export.md +54 -0
  30. package/docs/symbols-and-library.md +137 -0
  31. package/docs/teaching.md +348 -0
  32. package/docs/video-rendering.md +728 -0
  33. package/lib/addons/adapters.js +22 -18
  34. package/lib/addons/characters.js +3045 -2024
  35. package/lib/addons/target-properties-BtN9skb-.js +142 -0
  36. package/lib/browser/tinyfly.iife.js +9 -4
  37. package/lib/browser/tinyfly.js +6968 -5817
  38. package/lib/browser/tinyfly.umd.js +9 -4
  39. package/lib/engine/tinyfly-engine.js +286 -258
  40. package/lib/engine/tinyfly-engine.umd.cjs +2 -2
  41. package/lib/types/adapters/canvas/canvas-adapter.d.ts +6 -0
  42. package/lib/types/adapters/canvas/index.d.ts +1 -0
  43. package/lib/types/adapters/canvas/target-properties.d.ts +68 -0
  44. package/lib/types/characters/acting/beat-check.d.ts +102 -0
  45. package/lib/types/characters/acting/custom.d.ts +66 -0
  46. package/lib/types/characters/acting/gags.d.ts +10 -0
  47. package/lib/types/characters/acting/hand-path.d.ts +35 -0
  48. package/lib/types/characters/acting/index.d.ts +4 -0
  49. package/lib/types/characters/acting/persona.d.ts +93 -0
  50. package/lib/types/characters/acting/script.d.ts +75 -11
  51. package/lib/types/characters/capabilities.d.ts +61 -0
  52. package/lib/types/characters/code-panel.d.ts +201 -0
  53. package/lib/types/characters/figure-actions.d.ts +12 -0
  54. package/lib/types/characters/figure-props.d.ts +87 -0
  55. package/lib/types/characters/gaits.d.ts +8 -0
  56. package/lib/types/characters/index.d.ts +3 -0
  57. package/lib/types/characters/stick-figure.d.ts +9 -2
  58. package/lib/types/engine/authoring/did-you-mean.d.ts +14 -0
  59. package/lib/types/engine/authoring/index.d.ts +1 -0
  60. package/llms-full.txt +12631 -0
  61. package/llms.txt +57 -0
  62. package/package.json +6 -2
  63. package/skills/tinyfly/SKILL.md +67 -0
  64. package/lib/addons/camera-C7bZOWMB.js +0 -33
@@ -1,9 +1,9 @@
1
- import { h as U, e as _, i as O, a as W, b as N, p as H, t as V, g as z, c as B, q, F as j, s as Z, d as J } from "./dom-adapter-Cphr2HZn.js";
1
+ import { h as N, e as Y, i as O, a as U, b as W, p as H, t as V, g as z, c as B, q, F as j, s as Z, d as J } from "./dom-adapter-Cphr2HZn.js";
2
2
  import { D as Xe } from "./dom-adapter-Cphr2HZn.js";
3
+ import { C as _e, I as $e, a as Ye, b as Oe, c as Be, d as Le, e as Fe, f as De } from "./target-properties-BtN9skb-.js";
3
4
  import { createTrack as Q, parsePath as L, ribbon as K, ribbonHeadCap as ee, mat4 as b } from "@algorisys/tinyfly";
4
5
  import { p as te, s as ie } from "./sketch-CYPUbk3Q.js";
5
- import { c as $e, a as Ye, b as _e } from "./sketch-CYPUbk3Q.js";
6
- import { I as Be, a as Le, c as Fe, b as De } from "./camera-C7bZOWMB.js";
6
+ import { c as Ne, a as Ue, b as We } from "./sketch-CYPUbk3Q.js";
7
7
  function oe(n) {
8
8
  const e = /* @__PURE__ */ new Map();
9
9
  for (const { name: t, element: i } of n)
@@ -219,13 +219,13 @@ class R {
219
219
  * Render a single target.
220
220
  */
221
221
  renderTarget(e, t, i) {
222
- if (e.save(), t.opacity !== void 0 && (e.globalAlpha = t.opacity), U(t)) {
223
- const s = _(t, i, { x: this.getPivotX(t), y: this.getPivotY(t) });
222
+ if (e.save(), t.opacity !== void 0 && (e.globalAlpha = t.opacity), N(t)) {
223
+ const s = Y(t, i, { x: this.getPivotX(t), y: this.getPivotY(t) });
224
224
  if (t.backfaceVisibility === "hidden" && O(s)) {
225
225
  e.restore();
226
226
  return;
227
227
  }
228
- W(s) ? (e.transform(...N(s)), this.drawContent(e, t)) : this.drawInPerspective(e, t, s), e.restore();
228
+ U(s) ? (e.transform(...W(s)), this.drawContent(e, t)) : this.drawInPerspective(e, t, s), e.restore();
229
229
  return;
230
230
  }
231
231
  if ((i.x !== 0 || i.y !== 0) && e.translate(i.x, i.y), t.rotate !== void 0 || t.rotateX !== void 0 || t.rotateY !== void 0 || t.scale !== void 0 || t.scaleX !== void 0 || t.scaleY !== void 0 || t.skewX !== void 0 || t.skewY !== void 0) {
@@ -947,7 +947,7 @@ class ge {
947
947
  texture: e.getUniformLocation(this.program, "u_texture"),
948
948
  useTexture: e.getUniformLocation(this.program, "u_useTexture"),
949
949
  opacity: e.getUniformLocation(this.program, "u_opacity")
950
- }, this.positionBuffer = $(e, [0, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 1]), this.texCoordBuffer = $(e, [0, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 1]);
950
+ }, this.positionBuffer = _(e, [0, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 1]), this.texCoordBuffer = _(e, [0, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 1]);
951
951
  }
952
952
  registerTarget(e, t) {
953
953
  this.targets.set(e, t), this.basePositions.set(e, { x: t.x, y: t.y });
@@ -997,7 +997,7 @@ class ge {
997
997
  /** Draw every registered target. */
998
998
  render() {
999
999
  const e = this.gl, { width: t, height: i } = e.canvas;
1000
- e.viewport(0, 0, t, i), e.clearColor(0, 0, 0, 0), e.clear(e.COLOR_BUFFER_BIT), e.enable(e.BLEND), e.blendFunc(e.SRC_ALPHA, e.ONE_MINUS_SRC_ALPHA), e.useProgram(this.program), Y(e, this.positionBuffer, this.locations.position), Y(e, this.texCoordBuffer, this.locations.texCoord);
1000
+ e.viewport(0, 0, t, i), e.clearColor(0, 0, 0, 0), e.clear(e.COLOR_BUFFER_BIT), e.enable(e.BLEND), e.blendFunc(e.SRC_ALPHA, e.ONE_MINUS_SRC_ALPHA), e.useProgram(this.program), $(e, this.positionBuffer, this.locations.position), $(e, this.texCoordBuffer, this.locations.texCoord);
1001
1001
  for (const [o, s] of this.targets)
1002
1002
  this.drawTarget(o, s, t, i);
1003
1003
  }
@@ -1044,7 +1044,7 @@ function G(n) {
1044
1044
  b.translation([n.x, n.y, 0]),
1045
1045
  b.multiply(b.scaling([n.width, n.height, 1]), b.translation([-e, -t, 0]))
1046
1046
  );
1047
- return b.multiply(_(n, { x: 0, y: 0 }, i), o);
1047
+ return b.multiply(Y(n, { x: 0, y: 0 }, i), o);
1048
1048
  }
1049
1049
  function ye(n, e, t) {
1050
1050
  const i = [2 / e, 0, 0, 0, 0, -2 / t, 0, 0, 0, 0, 0, 0, -1, 1, 0, 1];
@@ -1076,38 +1076,42 @@ function I(n, e, t) {
1076
1076
  throw new Error(`WebGLAdapter: shader compile failed — ${n.getShaderInfoLog(i)}`);
1077
1077
  return i;
1078
1078
  }
1079
- function $(n, e) {
1079
+ function _(n, e) {
1080
1080
  const t = n.createBuffer();
1081
1081
  if (!t) throw new Error("WebGLAdapter: could not create a buffer");
1082
1082
  return n.bindBuffer(n.ARRAY_BUFFER, t), n.bufferData(n.ARRAY_BUFFER, new Float32Array(e), n.STATIC_DRAW), t;
1083
1083
  }
1084
- function Y(n, e, t) {
1084
+ function $(n, e, t) {
1085
1085
  t < 0 || (n.bindBuffer(n.ARRAY_BUFFER, e), n.enableVertexAttribArray(t), n.vertexAttribPointer(t, 2, n.FLOAT, !1, 0, 0));
1086
1086
  }
1087
1087
  export {
1088
+ _e as CANVAS_PROPERTIES,
1088
1089
  R as CanvasAdapter,
1089
1090
  Xe as DOMAdapter,
1090
- Be as IDENTITY_CAMERA,
1091
+ $e as IDENTITY_CAMERA,
1091
1092
  Ae as SVGAdapter,
1092
1093
  ge as WebGLAdapter,
1094
+ Ye as animatableProperties,
1093
1095
  xe as applyBloom,
1094
- Le as applyCamera,
1095
- $e as boilFrame,
1096
+ Oe as applyCamera,
1097
+ Ne as boilFrame,
1096
1098
  C as boxBlur,
1097
1099
  re as brightPass,
1098
1100
  se as buildFlipTracks,
1099
- Fe as cameraFromValues,
1100
- De as cameraPoint,
1101
+ Be as cameraFromValues,
1102
+ Le as cameraPoint,
1101
1103
  g as canvasLike,
1104
+ Fe as checkTracks,
1105
+ De as describeTarget,
1102
1106
  M as drawOutline,
1103
1107
  Re as drawTrail,
1104
1108
  Me as flip,
1105
1109
  Se as isGradient,
1106
1110
  we as parseColor,
1107
1111
  te as partialPath,
1108
- Ye as pathLength,
1112
+ Ue as pathLength,
1109
1113
  x as pathOutline,
1110
- _e as pointAlong,
1114
+ We as pointAlong,
1111
1115
  ke as quadMatrix,
1112
1116
  ye as quadMatrix3d,
1113
1117
  oe as recordFlipState,