Commit Graph

68 Commits

Author SHA1 Message Date
Dennis Kobert
db761cf8ed Drop a duplicated wasm import 2026-08-25 11:19:22 +00:00
Dennis Kobert
34e03038df Cargo fmt 2026-08-25 11:17:17 +00:00
Dennis Kobert
ff99f3605c Drop unread index bounds from fold kernels and mark re-addressing nodes ModifyIndex 2026-08-25 11:05:38 +00:00
Dennis Kobert
9aef511891 Cargo fmt 2026-08-24 23:15:10 +02:00
Dennis Kobert
faa5c9d3db Install the resolved layout in the create_context test 2026-08-23 18:18:13 +00:00
Dennis Kobert
bedb0d4159 Turn the byte-list wires into plain shared slices 2026-08-23 17:46:04 +00:00
Dennis Kobert
46f048b07c Add the leveled render intermediate beside the legacy rows 2026-08-22 12:15:08 +00:00
Dennis Kobert
e4adf16eba Move the paint and merged-layer markers to graphic-types as optional references 2026-08-22 10:23:02 +00:00
Dennis Kobert
a8d257e7d6 Move the downstream-typed attribute markers to their value types' crates 2026-08-22 09:34:24 +00:00
Dennis Kobert
a5784c8f0b Port the create_context render test onto record wires 2026-08-12 13:11:48 +00:00
Dennis Kobert
9c7a633d5b Adopt tuple attribute io and the carrier lowering, deleting the bridge adapters for record-only wires 2026-08-06 18:48:16 +00:00
Dennis Kobert
c30054579f Adapt the cutover to the reviewed core-types API 2026-07-31 23:39:39 +02:00
Dennis Kobert
81a319430b Cut over to the graphene execution model 2026-07-31 23:19:42 +02:00
Timon
a040362d4a Change footprint to always be in physical instead of logical space (#4280)
* Fix footprint scale

* Footprint in physical pixels

* Move scale conversion to `create_context`

* Remove scale from render cache

* Review
2026-07-15 13:37:46 +00:00
Timon
7e29fe9a31 Fix lifetime of cached textures (#4333)
* Fix in-use textures being destroyed

* Remove ImageTexture refs

* Review
2026-07-14 14:51:33 -07:00
Keavon Chambers
f05a644bd9 Revamp the syntax to #[hard(a..b)] and #[soft(a..b)] bounds on node definitions (#4307)
* Revamp the syntax to #[hard(a..b)] and #[soft(a..b)] bounds on node definitions

* Address review feedback: error on empty bounds ranges and remove redundant count clamps

* Fix NaN transform from Repeat Array with a count of 1

* Remove redundant manual clamps already enforced by #[hard(...)] bounds
2026-07-03 18:48:58 -07:00
Timon
674b3a213f Extract pipelines from WgpuExecutor into scope-provided pipeline nodes (#4210)
* Implement generic pipeline caching

* Fix WIP

* Fix

* Fix

* Fix

* Fix bench

* Migrations

* Review
2026-06-19 21:20:25 +00:00
Jatin Bharti
5f100946f2 Add String[] as a graphic type for typography (#4141)
* feat: Render List<String> as raw paths in SVG and Vell mode

* chore: code review

* chore: change the hardcoded layout bounds to parley's

* chore: code review

* feat: Split text node to text_layer and text_to_vector node

* fix: CI fail because of difference in nature of Mac and github action

* chore: fix

* chore: replace FontStack as it got removed in parley 0.9

* chore: fmt

* chore: migrate the rendering as of new resource architechture

* chore: add text_layer node to text tool for testing

* code review

* Make boolean ops support the Text type

* chore: Move fallback_font_resource authority from editor to text node

* Fix 'Text Layer' node missing font dropdown

* Change node doc comments from Vec<T> to T[]

* Add migrations from the old Text node to Text -> Text to Vector

* Consolidate

* Rename the text attributes and reorder tilt to come before max_width/height

* Detect legacy Text nodes in the split migration by their trailing separate_glyphs input

* Code review

* Frame Text layer thumbnails by laying out their text for bounds

* Give Text layers click targets and selection outlines via collect_metadata

* Route Text tool through Text to Vector with fill, fixing editing-preview placement

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2026-06-19 19:39:52 +00:00
Keavon Chambers
cde8dd78e6 Remove stray float literal .0 suffixes in lieu of just ending with a point (#4233)
Remove the .0 suffix on floats in lieu of just ending with a point
2026-06-12 19:47:36 -07:00
Timon
cd8ea1f554 Migrate fonts to be stored as resources (#4165)
* Good start

* Impl

* allow responses.add(async { Message::NoOp });

* Fix

* Cache font blob in text node

* Refactor font handling to use Font struct direcly

* Fix fmt

* Embedd Font Resources by default

* Review

* Review

* Cache font info based on ResourceHash
2026-06-05 13:27:25 -04:00
Timon
bbbe04903f Define data types for ID-based resource handling (#4168)
* Add resource lib

* rename ResourceSource to ResourceInput

* Rename ResourceInput -> DataSource and improve API

* Review

---------

Co-authored-by: Dennis Kobert <dennis@kobert.dev>
2026-05-25 10:50:57 +00:00
Timon
2770df7567 Implement content-addressed resource storage for raster images (#4148)
* Implement content-addressed resource storage

* Implement OPFS resource storage

* Remove ResourceStorage::read

* Review
2026-05-21 19:31:07 +00:00
Timon
d5f0140f26 Upgrade WGPU and Linebender dependencies (#4154) 2026-05-17 15:36:59 +00:00
Keavon Chambers
a56746c6bf Deprecate all usages of the Color struct representing gamma space values, fixing round-trip precision bugs (#4149)
* Deprecate all usages of the Color struct representing gamma space values, fixing round-trip precision bugs

* Code review fixes
2026-05-14 22:48:33 -07:00
Keavon Chambers
a28b9437aa Rename the "Table" type to "List" everywhere (#4133)
* Rename the "Table" type to "List" everywhere

* Fix a few missed ones

* Re-save demo artwork
2026-05-09 01:33:39 -07:00
Keavon Chambers
6b3e4757de Rename the Table type's "rows" -> "items" and "columns" -> "attributes" everywhere (#4130)
* Rename TableRow -> Item

* Rename row -> item and column -> attribute throughout

* Fix a few missed ones

* Format
2026-05-08 23:11:33 -07:00
Keavon Chambers
9d876ab27d Add support for opening multiple selected files from disk (#4128) 2026-05-07 21:21:45 -07:00
Keavon Chambers
ebdb835890 Properly track the Text node's text frame via the attribute system to fix misalignment (#4097)
* Compensate for upstream row-0 transform absorption in viewport-space 'TransformSet'

* Add 'editor:text_frame' row attribute so the Text tool's drag cage tracks multi-row text

* "Separate Glyph Elements" -> "Separate Glyphs"

* Improve artboard migration robustness from older documents

* Code review

* Make the tools visualize the text frame based on attribute not upstream node
2026-05-02 21:04:30 -07:00
Keavon Chambers
a0d5f418d9 Replace Table<Table<Graphic>> with Table<Artboard> where Artboard is a type boundary newtype (#4093)
Replace Table<Table<Graphic>> with Table<Artboard> with Artboard as a type boundary newtype
2026-05-01 21:57:50 -07:00
Keavon Chambers
9943af5248 Fix SVG renderer not playing animation due to a regression from the tile cache discarding the context (#4092) 2026-05-01 20:32:53 -07:00
Timon
29f6e686ee Reimplement checkered background rendering (#4034)
* Reimplement background checkerboard rendering
2026-05-01 17:02:10 +00:00
Keavon Chambers
4b2430290c New nodes: 'Gradient Type' and 'Spread Method', and add Gradient tool support for controlling these nodes (#4084)
* Use 'Transform', 'Gradient Type', and 'Spread Method' nodes for table gradients

* Add gradient widget to the tool's control bar and update where the two swap buttons go

* Fix gradient rendering

* Format

* Code review
2026-04-29 19:27:44 -07:00
Keavon Chambers
ba63c26c62 Replace the Artboard struct with a Table<Table<Graphic>> shape (#4077)
* Replace the Artboard struct with a Table<Table<Graphic>> shape

* Remove the never-functional, seemingly unneeded migrate_type_descriptor_names due to typo

* Allow negative artboard sizes
2026-04-28 22:58:33 -07:00
Keavon Chambers
0847d7b0ab Centralize attribute strings in consts and rename "editor:layer" to "editor:layer_path" (#4076)
* Rename "editor:layer" to "editor:layer_path" and centralize it in a const

* Centralize "editor:merged_layers" in a const

* Centralize all other attributes in consts

* Rename consts with ATTR_ prefix

* Format
2026-04-28 21:53:30 -07:00
Keavon Chambers
b396d17211 Migrate remaining node graph data types from Vec to Table (#4067)
* Move Vec<String> to Table<String>

* Remove old VecDVec2

* Move Vec<u8> to Table<u8>

* Move Vec<f64> to Table<f64>

* Move [f64; 4] to Table<f64>

* Move Vec<NodeId> to Table<NodeId>

* Tidy up the TaggedValue variants

* Move Vec<BrushStroke> to Table<BrushStroke>

* Add missing type implementations

* Fix tests

---------
2026-04-28 13:44:25 -07:00
Keavon Chambers
afc2c9178e Move source_node_id to "editor:layer" and Vector<Upstream> to "editor:merged_layers", backed by a new 'Write Attribute' node (#4061)
* Fix click target propagation with the Rasterize node

* Add the 'Write Attribute' node

* Remove tag_layer in favor of the new Write Attribute node, prune redundant attribute writes

* Replace the Vector<Upstream> type argument with the "editor:merged_layers" attribute
2026-04-28 03:28:31 -07:00
Keavon Chambers
76938eb69a Implement dynamic table attributes to generalize the graphic-specific Table type (#4050)
* Feature-gate serde derives behind cfg_attr in all runtime node graph type crates

* Refactor Table to move its hard-coded fields into an attributes field

* Encapsulate TableRow/TableRowRef/TableRowMut attribute fields behind accessor methods

* Remove TaggedValue::GraphicUnused

* Refactor Table<T> to use dynamic attributes instead fixed names

* Fix code review soundness concerns

* Add todo work

* Replace row-oriented Table<T> API with column-oriented access

* Fix attribute propagation bugs

---------
2026-04-28 03:25:16 -07:00
Dennis Kobert
3d84e63ef9 Migrate usage of the Hash trait for cache invalidation to the dedicated CacheHash trait (#4051)
* WIP start migrating usages of hash for cache invalidadion to dedicated trait

* Finish migrating usages

* Code review

* Add comments clearifying the reasoning for using random ids in the VectorModification cach hash impl

* Fix some remaining hash violations

* Finish migration and fix compilation

* Fix import ordering

* Cleanup

* Fix code review stuff

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2026-04-27 05:18:47 +00:00
Keavon Chambers
a59fed9d1c Move the "Text" category nodes from gcore/src/logic.rs to text/src/lib.rs (#4042)
Move the String category nodes from gcore/src/logic.rs to text/src/lib.rs
2026-04-23 18:12:28 -07:00
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
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
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
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
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
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
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