Commit Graph

79 Commits

Author SHA1 Message Date
Keavon Chambers da45ab2f87
Add a checkered background to transparent artboards and the infinite canvas (#4022)
* Add checkered transparency rendering to infinite canvas and artboards

* Enable artboard clipping by default

* Make new infinite canvas documents begin with a white background layer

* Remove the export dialog's transparency option now that it's redundant

* Make exporting transparent JPGs use white not black

* Code review
2026-04-10 03:21:21 -07:00
Timon 661e8bc569
Remove surface and window from ApplicationIo (#3941)
* Remove surface and window from ApplicationIo

* Seperate Wasm and Native ApplicationIo

* Fix warnings

* Fix tests

* Remove redundant PlatformApplicationIo::new_offscreen

* Fixup

* Remove unused From implementaitions for ApplicationIo
2026-04-09 20:12:53 +00:00
Keavon Chambers 4360359d60
Finalize and unify the design of the 'Morph' and 'Blend' nodes (#3974)
* Fix Morph node transform interpolation and preservation in the table

* Fix click target positions for Morph's nested layers by pre-compensating upstream_data transforms

* Redesign Morph node (v3) with control path input and uniformly spaced progression, and fix Stroke::lerp interpolation weights

* Add migration from Morph node v2 to v3

* Redesign the 'Blend Shapes' node behavior and subgraph definition

* Add the Layer > Blend menu entry to easily set up a blend

* Optimize the Morph node

* Refactor the Morph node to remove the roundtrip through BezPath

* Fine-tune Morph node Bezier order promotion and handle interpolation

* Add the Layer > Morph menu bar entry

* Fix NaN and guard against other potential NaN bugs breaking the editor

* Add InterpolationDistribution parameter to Morph with weighted progression, swap parameter orders, and rename shear to skew

* Add the Reverse parameter to the Morph node

* Update the order of the inputs to Blend Shapes for consistency with Morph

* Make Layer > Morph create the Morph Path control layer

* Fix migrations

* Move 10 to a constant

* Avoid division by 0 in the Blend Shapes node internals

* Rename nodes 'Blend' -> 'Mix' and 'Blend Shapes' to 'Blend'

* Fix a crash encountered while testing

* Final code review

* Make domain push dupe checks debug-only and use push_unchecked in the Morph node

* Pre-allocate for pushes to the vector domains

* Add fast path at t=0

* Inline reserve()

* Set up the control path layer above not below, and starting collapsed

* Review fixes

---------

Co-authored-by: Timon <me@timon.zip>
2026-04-03 20:45:58 -07:00
Keavon Chambers 662691f32a New node: 'Offset Points' 2026-04-01 23:02:59 -07:00
Keavon Chambers 1543d974ac
Fix 'Jitter Points' and 'Sample Polylines' working incorrectly with X or Y scale of 0 content (#3984)
* Fix NaN points produced by Sample Polylines on 0-scaled input

* Fix Jitter Points inverse transform for zero-scale axes and stop resetting stroke transform

* Remove a couple confusing Debug nodes

* Fix edge case

* Update demo art

* Fix order change in Jitter Points causing different results from earlier

* Fix bug in bisect tool

* Break out functionality into helper functions
2026-04-01 22:51:48 -07:00
Keavon Chambers 211b9113a1
Add the "Along Normals" parameter to the 'Jitter Points' node (#3983)
* Add the "Along Normals" parameter to the 'Jitter Points' node

* Fix the edge case of a self-loops
2026-04-01 05:18:56 -07:00
Keavon Chambers a3ea6ab0af
Refactor transform decomposition API with skew support, add 'Decompose Skew' node, and fix stroke transform interpolation (#3973)
* Refactor transform decomposition API with skew support, add Decompose Skew node, and fix stroke transform interpolation

* Fix bug in master with skew changing Area node calculated value

* Code review simplification

* More code review fixes

* Rename cases where "shear" terminology was used in place of "skew"
2026-03-28 20:47:32 -07:00
Keavon Chambers e2a142333f
Fix the Auto-Tangents node for linear polylines, and track colinear handles in manipulator data (#3972)
* Fix the Auto-Tangents node for linear polylines, and track colinear handles in manipulator data

* Simplify
2026-03-28 18:26:08 -07:00
Keavon Chambers 71ff4c937f
Update 'Solidify Stroke' to preserve the original fill (#3971)
* Update 'Solidify Stroke' to preserve the original fill

* Efficiency improvements
2026-03-28 18:11:26 -07:00
Keavon Chambers 50a618ad12
New node: Path is Closed (#3970)
Add the 'Path is Closed' node
2026-03-28 17:37:50 -07:00
Keavon Chambers 17da9ec099
New nodes: 'Decimate' and 'Simplify' (#3851)
* New node: Decimate

* Use preallocated stack to reduce number of allocations and fix double endpoints on closed paths

* Use Kurbo implementation of path-to-polyline sampling

* Add the 'Simplify' node
2026-03-21 17:08:18 -07:00
Keavon Chambers d5d10fe548
Rename /frontend/wasm -> /frontend/wrapper (#3927) 2026-03-21 03:46:47 -07:00
Timon a18b7ff79d
Desktop: Add an 'Enable V-Sync' preference on Mac (#3887)
* add vsync pref

* account for physical scale in pixel preview passthru check

* change allow to expect attr

* Update user-facing v-sync text

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2026-03-11 21:32:37 +00:00
Dennis Kobert 116a4106c4
Add texture pool to render cache node (#3804)
* Add texture pool to render cache node

* Use direct texture copy instead of bitter and fix graphene_cli

* Remove warnings

* Fix wgpu import path

* Code review fixes
2026-03-11 09:44:21 +00:00
Dennis Kobert 90533e656f
Remove the path-bool library (#3882) 2026-03-11 08:55:03 +01:00
jneem 58aae4f87b
Replace the Boolean Operations node's algorithm with the Linesweeper library (#2670)
* Attempt one-shot n-ary ops

* Make it not crash

* Try to remove more path_bool

* Add quantization

* Update to latest

* Nits

* Code review

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2026-03-10 22:00:49 -07:00
Timon 095c2a6d47
Add the Pixel Preview render mode (#3881)
* Add pixel preview render mode

* Fix fmt

* Remove unused sampler

* Remove unnecessary mutex

* Code review

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2026-03-11 02:44:00 +00:00
Keavon Chambers 9f9dd71e91
Fix vector drawing tool transform space handling (#3872)
* Fix vector drawing tool transform space handling

* Review fixes

* Fix test
2026-03-10 00:58:51 -07:00
Dennis Kobert f06983d072
Fix texture cache region size and broken rendering when tilting the viewport (#3867)
* Fix rotation for render cache

* Simplify code and fix zoom not invalidating cache

* Add constant for quantization amount

* fix region size

* print error when splitting oversized region fails

---------

Co-authored-by: Timon <me@timon.zip>
2026-03-09 23:42:38 +00:00
Keavon Chambers 52d2b38a82 Refactor the TypeScript data flow for full type safety and auto-generation of Rust types (#3865)
* Migrate Specta to Tsify to auto-generate messages.ts, working except colors and widgets

* Adopt the generated FillColor/Color/GradientStops

* Fix widget typing

* Separate WidgetGroup enum variants into wrapper structs

* Small rename

* Simplify widgets further

* Clean up message type references

* Switch type imports to the auto-generated file

* Remove lowercase serde rename

* Fix FillChoice deserialization

* Fix small regression from #3837

* Improve type safety

* Make WidgetSpan type-safe

* More cleanup and type safety

* More type safety

* More type safety

* Get the rest to type-check without errors; improve widget builder macro to have optional icons; improve Svelte 5 configs

* Cargo fmt

* Fix imports

* Update outdated readme info

* Fix lint command rename references

* Fix typos

* One more typos fix

* Remove unnecessary dep: prefix from the edited Cargo.toml files

* Remove excess parts from Cargo.toml

* Fix compiling on desktop

* Revert "Remove excess parts from Cargo.toml"

This reverts commit 6b711117b3a5d5d8a3ee20f36a43bc74930b7c82.

* Update dev docs with simpler, more accurate instructions
2026-03-09 16:35:04 -07:00
Timon 5d22292072
Replace `npm` build script with new `cargo run` tool (#3832)
* move nix flake to root

* cargo run tool

* use thiserror in third-party-licenses tool

* prefere panic over exit

* Add automatic dependency check to cargo run tool

* Skip dependecies that are not needed for the current task

* Fixup

* Fixup

* fix windows

* Fixup

* improve usage text

* Fix linux bundle

* add graphen-cli

* fix build profile

* fix

* release profile should not include debug infos

* Review

* remove profiling profile

was redundent with release

* rename to cargo-run tool

* improve consistency

* rename deps to requirements

* fix

* return success when showing usage
2026-03-07 13:26:19 +00:00
Keavon Chambers 7cc3097acd
Make the Outline render mode draw with consistent stroke thickness at any viewport zoom (#3848)
* Remove dead code for now-retired SVG implementation

* Implement viewport zoom compensation for thickness
2026-03-02 20:13:05 -08:00
Keavon Chambers 9ecbfb7110
New nodes: RGBA to Color, HSVA to Color, Hex to Color, and Read Gradient (#3838)
* New nodes: RGBA to Color, HSVA to Color, Hex to Color, and Read Gradient

* Simplify
2026-02-26 18:22:04 -08:00
Keavon Chambers f1cbc4b396
Make the node graph use Table<GradientStops> instead of GradientStops (#3837)
* Switch from GradientStops to Table<GradientStops> in all nodes

* Remove TaggedValue::ColorNotInTable

* Fix bug

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

* Add migrations

* Fix default gradient on empty table

* Update demo artwork

---------

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
2026-02-26 14:07:31 -08:00
Keavon Chambers 81c73d11ff
Clean up duplicated code used for recursively flattening graphic types (#3836)
* Reduce recusive flattening algorithm duplication

* Generalize further

* Avoid code duplication in the 'Flatten Path' node

* Avoid cloning

* Include intermediate levels of alpha blending composition
2026-02-26 05:36:23 -08:00
Keavon Chambers cde7d5f951
New nodes: Colors to Gradient, Flatten Color, and Flatten Gradient (#3835)
* New nodes: Colors to Gradient, Flatten Color, and Flatten Gradient

* Fix Data panel not showing GradientStops

* Fix wrong category
2026-02-26 03:44:12 -08:00
Timon da7437c023
Reimplement notice file generation for third-party licenses through Rust, now with CEF credits (#3808) 2026-02-26 11:12:28 +00:00
Keavon Chambers 4090f6c980 Tweak short-term roadmap details 2026-02-25 21:40:36 -08:00
Dennis Kobert 7250b091d5
Fix the UI scaling factor invalidating the render cache (#3818)
* Fix ui scaling messing up render cache

* Review

---------

Co-authored-by: Timon <me@timon.zip>
2026-02-24 12:41:42 +00:00
Keavon Chambers 691d965bcf
Add support for gradients with midpoints and add draggable diamonds to the color picker dialog (#3813)
* Refactor GradientStops to use struct-of-arrays and include midpoint

* Implement interaction and rendering

* Make color picker saturation-value color picking snap to original position and show both axis lines

Make color picker saturation-value color picking snap to original position and show both axis lines

* Add graphite:midpoint attribute to SVG exports

* Add graphite:midpoint parsing to SVG importer
2026-02-23 19:21:51 -08:00
Dennis Kobert 0531769c41
Cache Vello render output as stitchable textures (#3722)
* WIP render caching

* Hook up render cache to render pipeline

* Fixed offsets

* Initial cleanup

* Integrate cache with context invalidation

* Cleanup

* Improve rounding and reduce tile size to fix vello not rendering

* Include pointer position in cache key

* Avoid unwraps and zero sized textures

* Destroy textures after blitting to surface

* Fix context dependencies

* Exclude footprint from render params

* Batch animation frame messages

* Add vello max render size to preference dialogue

* Remove unused import

* Reorder vello preference

* Clean up preferences dialog

* Apply review suggestions

* Cap max render region size

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2026-02-22 10:12:50 +00:00
Keavon Chambers 7ca6470656
Rename the repeat nodes to replace "Instance" terminology with "Repeat" (#3794)
* WIP

* Move the Mirror node from the module 'vector' to 'graphic'

* Update demo art

* Fix failing tests

Fix tests
2026-02-20 22:10:59 -08:00
Keavon Chambers 5a1503fc98 New node: Flatten Raster 2026-02-20 13:35:12 -08:00
Dennis Kobert ba177c4c5d
Generalize the 'Map Vector' node as 'Map' with support for all graphical types (#3793)
* Rename Map Vector to Map

* Fix compilation errors

* Move to the Graphic module and add Read {Graphic, Raster, Color} nodes

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2026-02-20 21:33:02 +00:00
Keavon Chambers bd1c54907d
Rename nodes from "Instance ___" -> "Read ___" and "Instance Map" -> "Map Vector" (#3792)
* Rename nodes from "Instance ___" -> "Read ___" and "Instance Map" -> "Map Vector"

* Update leftover references and demo artwork

* Simplify logic

* Fix test
2026-02-20 08:52:36 +00:00
Keavon Chambers da278e0264 New node: Map Points
Also resolves #3217
2026-02-19 14:37:35 -08:00
Keavon Chambers 258748ec51
Swap the default placement order of Fill and Stroke nodes in layers (#3789) 2026-02-19 13:15:11 -08:00
Oliver Davies 20e12edd45
New node: Pack Strips (#3246)
* Added basic pack by bounds node

Apply suggestion from @Keavon

Co-authored-by: Keavon Chambers <keavon@keavon.com>

* Add support for choosing rows/columns strip direction

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2026-02-16 09:07:03 +00:00
MotherBoardMage 87739ff877
Fix solidify stroke node ignoring transforms applied before stroke node (#3683)
* fix: solidify_stroke node now applies transformations before calculating the stroke

* Check for non-invertible transform

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-02-15 20:32:22 +00:00
Kulcode 84f91eb795
Fix Text node/tool max width/height bounding box calculation (#3628)
* Fix: correctly apply max width/height in text bounding box

* bug fix

* Code cleanup

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2026-02-14 21:27:29 +00:00
Keavon Chambers 8738e59c21
Improve the QR Code node (#3765) 2026-02-14 20:53:29 +00:00
Sahil Gupta 6c10364c8c
Introduce QR Code node (#3565)
Co-authored-by: Timon <me@timon.zip>
2026-02-14 17:50:43 +00:00
Dennis Kobert 3f97ae4c57
Add JSON get node (#3708)
* Add JSON get node

* Return "" on error and print to console
2026-02-03 22:07:46 +00:00
Vishnu Tejas 7e436f48f9
Expose the secondary input for Logical And and Or nodes (#3711) 2026-02-03 14:19:23 +00:00
Dennis Kobert 8e8428a572
Add headers input to http nodes (#3709) 2026-02-03 11:47:53 +00:00
Timon 910fb54c15
Add quantize time nodes (#3703)
add quantize time nodes
2026-02-02 12:55:53 +00:00
Keavon Chambers 390004897b
Add "Loop Level" to the Position context reader node (#3679)
* Add "Loop Level" to the Position context reader node

* Remove InjectPosition
2026-01-28 10:52:39 +00:00
Keavon Chambers 19e9af3d43
Fix 'Apply Transform' node applying only to anchors but not also handles (#3687) 2026-01-26 12:32:17 -08:00
Timon b4e9d7b9eb
Desktop: Fix bitmap file export not preserving alpha (#3673)
Fix Export not preserving alpha
2026-01-26 13:51:48 +00:00
Keavon Chambers a88342b8da
Add the "Rate" multiplier parameter to the Animation Time node (#3685) 2026-01-26 00:37:15 -08:00