@rig-c/core 2.69.0 → 2.71.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 +29 -9
- package/bin/rigc.cjs +2 -2
- package/docs/AUTHORING.md +279 -9
- package/package.json +5 -2
- package/skills/rigc/SKILL.md +1 -1
- package/skills/rigc-face/SKILL.md +1 -1
- package/skills/rigc-ingest/SKILL.md +1 -1
- package/skills/rigc-motion/SKILL.md +1 -1
- package/skills/rigc-rigging/SKILL.md +1 -1
- package/src/assertions/report.ts +1 -1
- package/src/atlas.ts +6 -1
- package/src/cli/core_commands.ts +68 -6
- package/src/cli/shared.ts +30 -2
- package/src/cli/write_whole.ts +1 -1
- package/src/compile.ts +48 -0
- package/src/core/animation.ts +56 -24
- package/src/core/index.ts +62 -1
- package/src/core/raw.ts +38 -12
- package/src/core/tracks.ts +23 -8
- package/src/core/vertices.ts +182 -44
- package/src/deformgen.ts +23 -7
- package/src/depth.ts +17 -4
- package/src/motion.ts +4 -4
- package/src/render_shared.ts +19 -0
- package/src/runtime/curves.ts +106 -0
- package/src/runtime/index.ts +80 -0
- package/src/runtime/model.ts +719 -0
- package/src/runtime/pose.ts +1014 -0
- package/src/seam.ts +6 -2
- package/src/sheet.ts +920 -0
- package/src/trackgen.ts +27 -4
package/src/seam.ts
CHANGED
|
@@ -290,7 +290,7 @@ function weightsIn(triangles: readonly number[], xy: ArrayLike<number>, t: numbe
|
|
|
290
290
|
* the triangle the point is least outside of (the largest smallest weight, the
|
|
291
291
|
* lowest index on a tie). `null` when every triangle has collapsed in `from`.
|
|
292
292
|
*/
|
|
293
|
-
function carry(triangles: readonly number[], from: ArrayLike<number>, to: ArrayLike<number>, id: number, qx: number, qy: number): [number, number] | null {
|
|
293
|
+
export function carry(triangles: readonly number[], from: ArrayLike<number>, to: ArrayLike<number>, id: number, qx: number, qy: number): [number, number] | null {
|
|
294
294
|
let best = id;
|
|
295
295
|
let w = id >= 0 ? weightsIn(triangles, from, id, qx, qy) : null;
|
|
296
296
|
if (w === null) {
|
|
@@ -309,7 +309,11 @@ function carry(triangles: readonly number[], from: ArrayLike<number>, to: ArrayL
|
|
|
309
309
|
}
|
|
310
310
|
if (w === null || best < 0) return null;
|
|
311
311
|
const [a, b, c] = [triangles[3 * best], triangles[3 * best + 1], triangles[3 * best + 2]];
|
|
312
|
-
|
|
312
|
+
// #1568: stationary and translated pieces must carry without barycentric round-trip drift.
|
|
313
|
+
const dxa = to[2 * a] - from[2 * a], dya = to[2 * a + 1] - from[2 * a + 1];
|
|
314
|
+
const dxb = to[2 * b] - from[2 * b], dyb = to[2 * b + 1] - from[2 * b + 1];
|
|
315
|
+
const dxc = to[2 * c] - from[2 * c], dyc = to[2 * c + 1] - from[2 * c + 1];
|
|
316
|
+
return [qx + dxc + w[0] * (dxa - dxc) + w[1] * (dxb - dxc), qy + dyc + w[0] * (dya - dyc) + w[1] * (dyb - dyc)];
|
|
313
317
|
}
|
|
314
318
|
|
|
315
319
|
/** The convex hull of `points`, counter-clockwise, collinear points dropped (Andrew's monotone chain). */
|