Skip to content
Nyan33Public

About

2D vector animation program with the spirit of Flash / Adobe Animate

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Latest commit

 

History

17 Commits

Folders and files

Repository files navigation

Vertexa

2D vector animation studio in the spirit of Flash / Adobe Animate, aimed at Friday Night Funkin' animators. Rewritten from scratch in C + sokol with its own GPU-drawn UI. What changed since the old Qt version: CHANGELOG.md.

Download

Every push to main is built for Windows x64 and published on the Releases page as the next version (Alpha 1, Alpha 2, ...). Unzip and run vertexa.exe; the build is not code-signed, so SmartScreen may ask (More info, Run anyway).

Build (Windows)

Needs MSYS2 UCRT64 GCC, CMake and Ninja.

export PATH="/c/msys64/ucrt64/bin:$PATH"
cmake -S . -B build -G Ninja -DCMAKE_C_COMPILER=gcc -DCMAKE_BUILD_TYPE=Release
cmake --build build
./build/vertexa.exe

Release is a pure GUI app; RelWithDebInfo / Debug keep a console with logs (Debug also turns on the sokol validation layer). Fonts and icons are embedded, so the result is a single vertexa.exe.

Automated checks

Flag What it does
--demo Opens with sample strokes, onion skin and a loop range
--selftest Drives the real input path: draws, adds a blank keyframe, erases, adds a layer
--selftest=menu, --selftest=layers Opens the File menu / the New layer menu
--selftest=edit Draws a #, trims the overshoots, bucket-fills, F8 symbol, save, reopen, Sparrow export
--selftest=fnf Four labelled frames, V-Slice + Psych + PNG sequence export, Free Transform drag, Trim hover
--selftest=select Sections between intersections, a cutting drag box, Free Transform with a moved pivot
--selftest=settings[-perf|-keys|-theme|-save] The Settings pages; rebinding a shortcut; saving a theme preset
--selftest=recovery Writes a recovery copy (removed again on a normal exit)
--selftest=tween, --selftest=timeline Shape tween between unlike drawings; layer / frame selection, drag and drop
--selftest=camera[-view], --selftest=audio-save, --selftest=curve Camera frame, sound in a .vxa, pressure curve points
--selftest=export-symbols, --selftest=export-window, --selftest=library Symbols exported as a V-Slice character; the Export Symbols window; Library multi-select
--selftest=tabs[-close] Three documents in tabs; closing an unsaved one asks, Don't Save closes it
--selftest=blend A test card: every blend mode, Alpha / Erase in a Layer group, a mask, blur / shadow / glow / inner glow / adjust colour, brightness, tint, a gradient, a see-through layer; PNG export and a .vxa round trip
--selftest=image A PNG imported into the Library and onto the stage, saved into a .vxa and read back
--cursor-sheet=out.png [--cursor-scale=1] Writes every cursor (at that display scale, 1.5 by default), enlarged, on light and dark grey, hotspots in red
--home, --splash The start screen / the splash (a launch without arguments shows both)
--bench=ZOOM Re-renders the demo at that zoom every frame and prints frame / stage times
--open=file (or a bare path) [--frame=N] Opens .vxa, imports .fla / .xfl, a .sut brush, a sound or an image
--capture=out.png [--capture-frame=N] Saves the window to PNG after N frames and quits

Exports of --selftest=fnf go to ../research/tmp/. Brush and theme presets live in %APPDATA%\Vertexa; point APPDATA at a scratch folder when running the self-tests.

Architecture

src/
  main.c              sokol_app callbacks, input collection, frame order (UI -> upload -> stage/export passes -> swapchain)
  gfx/render.c        draw lists + one uber-shader: solid, glyphs, images, SDF rounded rects, shadows,
                      hue ring, SV square, AA capsules, gradient ramps; stencil-then-cover pipelines for
                      vector fills; blend pipelines, a blend shader (reads a backdrop copy), a filter shader
  gfx/cursors.c       the cursor set (V arrow, hands, tools) drawn at the display scale: distance fields, and SVG
                      path outlines for the hands
  gfx/font.c          Inter + JetBrains Mono + Phosphor icons packed into one atlas (stb_truetype)
  gfx/icons.h         generated by tools/gen_icons.py
  gfx/logo.c          the Vertexa logo (assets/brand): title bar image and window icon
  ui/ui.c             immediate-mode UI: ids, hot/active, popups, tooltips, text fields, widgets
  ui/theme.h          design tokens: the runtime color palette (theme roles) and fixed metrics
  doc/doc.c           document model: items (strokes, fills, symbol instances), layers (vector/raster/camera/
                      audio/folder/mask/guide/reference), keyframes, symbols, edit-in-place, undo snapshots
  doc/io.c            .vxa binary format (atomic save, bounds-checked load); format 4 adds bitmaps, blend
                      modes, filters, colour effects, gradients and see-through layers
  doc/bitmap.c        bitmap bank (premultiplied pixels + the image file kept for saving)
  brush/brush.c       vector brush: stabilizer, pressure curve, tapers, Douglas-Peucker snap on release,
                      exact swept area of round / oval / square tips rendered through the stencil
  geom/geom.c         segment intersection, path projection, hit tests, simplification, mask contour tracing
  render/scene.c      timeline -> passes: a stack of group surfaces (layer opacity / blending, symbol blend
                      modes, masks, filters), colour effects down the symbol tree, bitmaps, gradient and
                      bitmap fills, classic + shape tweens
  app/stage.c         view (zoom / pan), offscreen MSAA x8 render, onion skin, drawing input, tool dispatch
  app/trim.c          Trim Edge: removes a stroke segment up to the nearest intersections (click or drag across)
  app/select.c        Selection (strokes or sections between intersections, hatch highlight), Subselection
                      (nodes), Free Transform with a movable pivot, Lasso, clipboard, F8 symbols, break apart
  app/shapes.c        line / rectangle / oval, paint bucket with gap closing
  app/export.c        offscreen export: PNG sequence, clips -> Sparrow atlas with one shared frame box, FNF JSON
  app/exporter.c      the Export Symbols window: format, character, per-animation name / prefix / fps / loop /
                      offsets, a preview placed the way V-Slice places characters
  app/timeline.c      pixel-grid timeline: zones, seconds, loop range, onion range, end handle, selection
  app/panels.c        tool options, color wheel, brushes (previews, curve editor, imported presets), library, properties
  app/app.c           layout, custom title bar + menus, tools, shortcuts, playback, toasts, help, brush presets
  app/settings.c      Settings: General (auto-save, recovery, undo, interface size, pen), Performance (GPU
                      choice, GPU mode, anti-aliasing, stage resolution, overlay), Keyboard, Theme
  app/keys.c          every shortcut as an action with two rebindable keys (%APPDATA%/Vertexa/keys.txt)
  app/home.c          splash and start screen: recent animations with thumbnails, new animation sizes
  audio/audio.c       sound bank, decoding (dr_wav, dr_mp3, stb_vorbis), playback through sokol_audio
  io/fla.c            Flash import: binary .fla (CFB + MFC archive) and XFL (zip or folder): shapes, symbols,
                      bitmaps (bin/*.dat: JPEG, 32-bit and 8-bit lossless), gradients, blend modes, filters,
                      colour effects, masks, see-through layers
  io/sut.c            Clip Studio Paint .sut brushes (SQLite via the system winsqlite3.dll)
  platform/win32.c    frameless window, WM_POINTER pen input, UTF-8 file dialogs and file paths
  platform/capture_win32.c  back buffer / render target -> CPU

The stage only re-renders when something changed (document version, frame, view, live stroke); the UI is cheap and redrawn every frame.

Status

Working:

  • brush / pencil / eraser (vector, pressure, tilt, tapers, round / oval / square tips), presets;
  • Trim Edge (C): click a segment or drag across several; strokes are cut at their intersections;
  • selection the Umoupen way: the vectors themselves are picked and hatched; whole strokes or sections between intersections; drag box / lasso take what they touch or cut strokes at their edge; lines / fills filter; Free Transform with a draggable transformation point; Subselection drags stroke nodes; symbols (F8), edit in place, break apart;
  • line, rectangle, oval, paint bucket (closes small gaps);
  • layers (types, folders, hide / lock / rename / opacity / blending), timeline (keyframes, blank keyframes, frames, classic and shape tweens, labels, loop range, onion skin, playback);
  • documents in tabs (drag to reorder, middle-click / Ctrl+W closes, unsaved ones ask; the logo opens the start screen); the window title is name* - Vertexa;
  • Animate's 14 blend modes on layers, symbols and bitmaps; masks (layer menu > Mask); filters (blur, glow, drop shadow, adjust color) and color effects (brightness, tint, advanced) in Properties; see-through layers (Shift-click the eye; editing only, as in Animate);
  • bitmaps: File > Import Image (Ctrl+R) or drop a file on the stage; in the Library with thumbnails, drag onto the stage, smoothing per image; imported from FLA files too;
  • save / open .vxa; import .fla / .xfl with transparency; import Clip Studio .sut brushes (size, pressure curve, thickness / angle, in / out tapers; textured tips are drawn as a solid vector tip);
  • Export Symbols (File, Library, Ctrl+Shift+E): every picked symbol is one animation (without symbols, the scene's frame labels are); Sparrow, FNF V-Slice or Psych Engine; character ID, game scale, position; per animation the engine name, XML prefix, frame rate, loop and offsets with a live preview (origin cross, idle reference, arrow nudges); the settings are saved in the .vxa. PNG sequence of the scene;
  • Settings (Edit > Settings, Ctrl+,): auto-save and recovery copies, undo steps, interface size, pen eraser; graphics card choice, GPU mode, stage anti-aliasing and resolution, performance overlay; rebindable shortcuts; every UI color with theme presets and reset to the original.
  • Stroke geometry is only built for what is on screen (no slowdown when zoomed in).
  • Shape tweens between any two drawings; a camera layer with a frame on the stage (move, zoom, turn, classic tween), export through it; audio layers (WAV / MP3 / OGG) with waveforms, embedded in .vxa, playback on the sound's clock; timeline: Ctrl / Shift selection of frames and layers, dragging frames, layers into folders, scroll bars; splash and start screen with recent animations.

Not yet: pen and text tools, bones, editing gradients (FLA gradients are drawn), bevel and gradient filters, bitmaps of binary (pre-CS5) FLA files, texture brushes, audio scrubbing.

License

Vertexa is free software under the GNU General Public License v3.0.

Third-party

sokol (zlib), stb (MIT / public domain), Inter and JetBrains Mono (OFL), Phosphor Icons (MIT). The hand cursors are drawn from the Android Open Source Project's vector pointer icons (Apache License 2.0, assets/cursors/LICENSE-Apache-2.0.txt).

About

2D vector animation program with the spirit of Flash / Adobe Animate

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages