Commit Graph
29 Commits
Author SHA1 Message Date
FredAppsandDylan M. Taylor 4a75c49e3b refactor(svg): read SVG text and path data through craft-svg (#386)
* refactor(svg): read SVG text and path data through craft-svg

SVG import now decodes its bytes with craft-svg (SVGZ, UTF-16 and Latin-1,
within the shared size limit) and refuses entity bombs, very wide elements
and deep nesting with craft-svg's guards before anicraft_xml builds a tree.

Path data (SVG import, the path.d and motion path commands, the interface
icons) is read by craft_svg::path_data. anicraft-geom keeps only the
elliptical-arc-to-cubic geometry; its own tokenizer is removed.

craft-svg is pinned to craft-libs main 57288eda.

Refs storytold/craft-libs#778, storytold/craft-libs#789

* refactor(svg): pin craft-svg to #1848 and parse colours through it

craft-svg is now at craft-libs main b836a718 (#1848), with default features
off, so the lock no longer pulls vectorcraft or the image codecs. Colours
go through parse_color_alpha; transparent stays in the app because the
shared parser rejects it. Percentage rgb channels follow the shared
parser's 8-bit rounding (50% is 128/255).

* fix(svg): clip out-of-range rgb() and bound decoded text

parse_color_alpha rejects rgb(300,0,0); CSS clips that to red, and so
did the previous local parser. If the shared parser fails, clip rgb()
channels and try once more. Also refuse text that grows past the 64 MiB
limit after Latin-1 or UTF-16 decoding, which svgz::text does not count.

* refactor(svg): pin craft-svg to #1878

craft-svg is now at craft-libs main c7a872e2 (#1878), which bounds the
entity-declaration scan and resets smooth-control history after Z.
default-features stays false. The other craft-libs pins are unchanged.

* fix(svg): bound rgb() components and emit integer channels

clipped_rgb now stops at a fifth component instead of collecting an
unbounded comma list, and number-form channels are retried as integers
so a value such as 127.5 is accepted by the shared parser.

* fix(svg): finish parser routing and reject missing moveto

Route the newer Continue Path entry point through the shared adapter. Require an initial moveto and assert precise preflight refusal variants. Focused geom/SVG tests: 137 + 31 passed. Quadratic gradient parity remains a separate merge blocker.

---------

Co-authored-by: Dylan M. Taylor <dylan@dylanmtaylor.com>
2026-11-18 15:14:56 -05:00
Tanish Manku 0a5547b6b1 feat(shell): user themes from a folder, checked for contrast, with two-tone icons and accent bars (M8) 2026-11-18 06:26:30 -07:00
Tanish Manku ce8315ddda feat(shell): the timeline's parenting view: a parent column with draggable dots, a parent menu, the arm sample (M7) 2026-11-18 02:30:59 -07:00
Tanish Manku e744af57b0 feat(ui): movable tools, tabbed floating windows dragged back into docks, docks collapsed to icons, workspace rename and delete (M8) 2026-11-13 14:00:34 -07:00
Tanish Manku 406007566c chore: merge main (Swatches panel) into Asset Warp (M7) 2026-11-12 20:50:48 -07:00
Tanish Manku 3aeea1f3d9 feat(ui): the Asset Warp tool: pins, live bending, Properties and a sample (M7) 2026-11-12 19:52:31 -07:00
Tanish Manku f526570e79 feat(ui): Swatches panel, document swatches in the pickers, and an icon layer footer (M1) 2026-11-12 19:34:44 -07:00
Tanish Manku 120458c89f feat(ui): Colour panel gradients and the Gradient Transform tool (M1)
Properties gains a Colour section for the selected fill or the fill swatch:
type (solid, linear, radial, bitmap), a stop bar (click to add, drag to move,
drag off to remove; arrow keys and Delete on a focused stop), stop colour with
opacity and hex, overflow, Linear RGB and the focal point. The Gradient
Transform tool (F) draws Animate's handles on linear, radial and bitmap fills;
each drag is one paint.transform_fill step. Lock Fill for the Paint Bucket and
Brush. Screenshot states: gradient, gradientbucket.
2026-11-12 14:21:35 -07:00
Tanish Manku af73653bad fix(stage): draw on the pasteboard, with View › Clip Content Outside the Stage (M1) 2026-11-12 12:37:48 -07:00
Tanish Manku 4a4065ffea fix(ui): icons for the timeline's Frame, Keyframe and Blank buttons (M1) 2026-11-12 12:33:37 -07:00
Tanish Manku 430ebb04ec feat(ui): bones inside shapes with the Bone tool, and the Bind tool (M7) 2026-11-12 00:41:58 -07:00
Tanish Manku f20369e626 feat(shell): Brush Library window, Paint Brush tool, pressure curve editor and velocity (M7) 2026-11-11 20:22:51 -07:00
Tanish Manku 0bc3569c0c feat(timeline): onion column, colour chip, layer height, Layer Properties, frame view (M1) 2026-11-11 16:43:21 -07:00
Tanish Manku c62d327ce1 feat(timeline): onion skin markers, tint, fade, outlines, keyframes only, and Edit Multiple Frames (M1) 2026-11-10 18:54:35 -07:00
Tanish Manku 70f1305bb6 feat(doc): armature layers, joint-angle poses and CCD inverse kinematics (M7)
An armature layer holds symbol instances joined by bones (a joint on the
parent instance, the child turning about it). Keyframes store poses as
joint angles, tweened with the span's easing and applied by forward
kinematics in evaluate_layer_elements, so every export, the GPU stage and
the player see them. bone.add/remove/set_limits/pin/pose/solve/info
commands; IK by cyclic coordinate descent with joint limits and pins.
2026-11-10 15:10:36 -07:00
Tanish MankuandClaude 17d766536d feat(ui): Subselection shows and moves connected raw points and handles; Snap to Objects magnet (M1)
* Subselection on merged drawings: a click shows the anchors of every
  connected raw shape (hollow squares, selected ones solid) and the
  handles of the selected anchors and the clicked edge; Shift adds or
  removes; dragging an anchor moves it with the other selected ones and
  every shape on them (snapping); dragging a handle bends the edge in
  every shape that has it; dragging a line or fill moves everything
  connected; the marquee takes whole shapes on the active layer and
  selects the anchors inside; arrow keys nudge (1 / 10 screen px).
* Snap to Objects: View > Snapping, a magnet under the tools, and a
  checkbox in the Selection, Subselection and Free Transform options.
* rawsub screenshot setup, in the accessibility audit.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-11-10 14:30:31 -07:00
Tanish Manku de38e47aa3 feat(audio): sound effect envelopes, layer volume and mute, sounds inside symbols (M5)
Frame sounds get Animate's Effect presets and Custom envelopes (up to 16
points per channel, seconds from the sound's start), shaped over the time
the sound is heard. Layers get a volume and Mute, multiplied down through
symbols. Graphic symbols play their sounds on their own frames mapped to
the parent's time (streams join mid-way), movie clips on a loop from when
the instance appeared; the interactive player reports entered sounds so
Test Movie plays them, following the audio clock. The mixer applies
per-channel envelopes and start offsets sample-exactly. HTML canvas
export carries envelopes, volumes and graphic sounds. Edit Envelope
window, timeline mute toggle, waveform shaped by the envelope.
2026-11-10 00:02:17 -07:00
Tanish Manku 3862732928 feat(shell): Eraser (E) with erase modes, Faucet and Erase Everything, and Eyedropper (I) (M7)
The Eraser sweeps the brush tip with a live preview in the stage colour, [ and ] size it, and a double-click on its tool button (or Erase Everything in its options) clears the stage at this frame after asking. The Eyedropper picks a fill (solid, gradient, bitmap) or a line into the tool style, applies it to selected shapes, then becomes the Paint Bucket or the Ink Bottle; Shift-click picks into the other swatch. New original icons; --open eraser|erasing|eyedropper for screenshots.
2026-11-09 22:18:41 -07:00
Tanish Manku 478c70feb8 feat(shell): Brush tool (B) with tool options, pen pressure, live preview and [ ] sizes (M7) 2026-11-09 21:20:59 -07:00
Tanish Manku 5b431ec1d3 feat(app): Camera tool, camera frame on the stage, Preview Through Camera and the camera toggle (M7)
The stage draws the camera frame in the camera layer's colour; the Camera tool
(C) pans, turns (round handle) and zooms (wheel), one undo step per drag;
View > Preview Through Camera renders stage tiles through the camera; the
timeline header toggles the camera; Properties gets a Camera section and a
layer Depth row. GPU parity and the accessibility audit cover camera scenes.
2026-11-09 12:50:31 -07:00
Tanish Manku 6b8e3cb26f chore: merge main (audio, plug-ins, motion tweens) into variable-width strokes; ADR renumbered to 0018; plug-ins may edit stroke widths (M7) 2026-11-09 04:00:33 -07:00
Tanish Manku 75eabe8527 feat(audio): play sounds in sync, waveforms on the timeline, Sound properties and library sounds (M5)
Stage playback plays the movie's sounds through cpal (optional default
feature sound-output) and the playhead follows the audio clock; a moved
playhead plays a one-frame snippet of stream sounds (scrubbing). The device
opens on first need, never in screenshot runs or tests, and a failure falls
back to silent wall-clock playback.

Timeline rows draw each keyframe's waveform over its span, repeats
included. Frame Properties gain Sound, Sync and Repeat/Loop. The Library
lists sounds with Preview, Place on timeline and Delete. Import to Stage
and Import to Library take WAV, OGG and MP3; Export Audio writes the
soundtrack.
2026-11-09 03:43:09 -07:00
Tanish Manku 74a7bbe73a feat(render): variable-width strokes with width profiles and a Width tool (M7)
Strokes carry an optional width profile (width points: position by arc
length, left/right factors of the nominal width; monotone cubic between
points). The CPU oracle outlines them as positive trapezoids, outer-side
round joins and cross-section caps; SVG and Lottie write the same polygons
as filled outlines. stroke.* commands, a profile picker in Properties and
the tools' options, the Width tool (U) on stage, shape tweens blend
profiles. Also fixes Rect::transformed leaving flat rects untransformed
(horizontal lines missed bounds checks).
2026-11-09 02:02:05 -07:00
Tanish Manku c00164b5d2 feat(text): Text tool and text blocks laid out into stored outlines (ADR 0012) 2026-11-06 22:53:46 -07:00
Tanish Manku 40559ea23f feat(library): list imported images in the Library and place them from it 2026-11-06 21:33:37 -07:00
Tanish Manku fa113e182e feat(timeline): motion guides: guided layers follow the guide path by arc length, orient to path, guide artwork never renders; draw.path reads full SVG path data 2026-11-06 20:15:06 -07:00
Tanish Manku 386638c364 feat(timeline): layer folders: nesting through Layer.parent, hide/lock cascade, open/close, block moves, delete with contents, XFL folders 2026-11-06 19:59:21 -07:00
Tanish Manku 16ab577d12 fix(lint): as_chunks instead of constant-size chunks_exact (clippy 1.99, fails CI on main too) 2026-11-06 19:34:32 -07:00
Tanish Manku e3913afa36 Initial commit v0.1.0 early alpha
AniCraft 0.1.0 (early alpha): milestones M0 and M1. Contributors are credited in AUTHORS.md.
2026-11-05 23:58:25 -07:00