@algorisys/tinyfly 0.91.0 → 0.93.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/README.md +7 -6
- package/bin/tinyfly.mjs +34 -1
- package/docs/2d-animation-roadmap.md +191 -0
- package/docs/3d-rotations.md +164 -0
- package/docs/3d-support-plan.md +628 -0
- package/docs/DEPLOYMENT.md +414 -0
- package/docs/acting.md +466 -0
- package/docs/api-reference.md +2353 -0
- package/docs/camera.md +94 -0
- package/docs/cartoon-hands.md +96 -0
- package/docs/character-system-m1.md +218 -0
- package/docs/character-system-plan.md +384 -0
- package/docs/dance.md +315 -0
- package/docs/editor-guide.md +1249 -0
- package/docs/examples.md +765 -0
- package/docs/extending.md +168 -0
- package/docs/file-format.md +690 -0
- package/docs/getting-started.md +314 -0
- package/docs/grid-and-snapping.md +64 -0
- package/docs/gsap-compat.md +1241 -0
- package/docs/llm-guide.md +123 -0
- package/docs/maps.md +116 -0
- package/docs/onion-skinning.md +41 -0
- package/docs/pen-tool.md +65 -0
- package/docs/polygon-star.md +44 -0
- package/docs/scene-3d.md +299 -0
- package/docs/scroll-animation.md +314 -0
- package/docs/shape-morph.md +61 -0
- package/docs/sprite-sheet-export.md +54 -0
- package/docs/symbols-and-library.md +137 -0
- package/docs/teaching.md +348 -0
- package/docs/video-rendering.md +728 -0
- package/lib/addons/adapters.js +22 -18
- package/lib/addons/characters.js +2785 -1794
- package/lib/addons/target-properties-BtN9skb-.js +142 -0
- package/lib/browser/tinyfly.iife.js +9 -4
- package/lib/browser/tinyfly.js +6575 -5454
- package/lib/browser/tinyfly.umd.js +9 -4
- package/lib/engine/tinyfly-engine.js +286 -258
- package/lib/engine/tinyfly-engine.umd.cjs +2 -2
- package/lib/types/adapters/canvas/canvas-adapter.d.ts +6 -0
- package/lib/types/adapters/canvas/index.d.ts +1 -0
- package/lib/types/adapters/canvas/target-properties.d.ts +68 -0
- package/lib/types/characters/acting/beat-check.d.ts +95 -0
- package/lib/types/characters/acting/hand-path.d.ts +32 -0
- package/lib/types/characters/acting/index.d.ts +2 -0
- package/lib/types/characters/acting/script.d.ts +66 -7
- package/lib/types/characters/capabilities.d.ts +50 -0
- package/lib/types/characters/code-panel.d.ts +201 -0
- package/lib/types/characters/figure-actions.d.ts +11 -0
- package/lib/types/characters/figure-props.d.ts +87 -0
- package/lib/types/characters/gaits.d.ts +8 -0
- package/lib/types/characters/index.d.ts +4 -0
- package/lib/types/characters/species/human-motion.d.ts +45 -0
- package/lib/types/characters/species/human.d.ts +2 -0
- package/lib/types/characters/stick-figure.d.ts +2 -0
- package/lib/types/engine/authoring/did-you-mean.d.ts +14 -0
- package/lib/types/engine/authoring/index.d.ts +1 -0
- package/llms-full.txt +12548 -0
- package/llms.txt +57 -0
- package/package.json +6 -2
- package/skills/tinyfly/SKILL.md +64 -0
- package/lib/addons/camera-C7bZOWMB.js +0 -33
package/lib/addons/adapters.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { h as
|
|
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
|
|
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),
|
|
223
|
-
const s =
|
|
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
|
-
|
|
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 =
|
|
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),
|
|
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(
|
|
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
|
|
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
|
|
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
|
-
|
|
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
|
-
|
|
1095
|
-
|
|
1096
|
+
Oe as applyCamera,
|
|
1097
|
+
Ne as boilFrame,
|
|
1096
1098
|
C as boxBlur,
|
|
1097
1099
|
re as brightPass,
|
|
1098
1100
|
se as buildFlipTracks,
|
|
1099
|
-
|
|
1100
|
-
|
|
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
|
-
|
|
1112
|
+
Ue as pathLength,
|
|
1109
1113
|
x as pathOutline,
|
|
1110
|
-
|
|
1114
|
+
We as pointAlong,
|
|
1111
1115
|
ke as quadMatrix,
|
|
1112
1116
|
ye as quadMatrix3d,
|
|
1113
1117
|
oe as recordFlipState,
|