mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-15 22:28:10 +08:00
Replaces the WIP node crate, which depended on a convex_hull crate that only existed outside the repository, with a self-contained implementation: - The curved hull algorithm lives in vector-types' algorithms module. It splits curves at inflections and cusps into curvature-monotone arcs, discovers the boundary structure from a sampled polygonal hull, refines every transition to an exact tangency with closed-form quartic tangent-through-point solves, then emits the boundary as cuts of the original segments joined by straight bridge lines. - The node moves into vector-nodes alongside the other 'Vector: Modifier' nodes, ported to the List/attributes model. It accepts Graphic[] or Vector[], wraps every subpath (open or closed) and free-floating anchor point across all items, and outputs a single world-space hull path. - The boolean-union pre-pass is dropped as unnecessary: the hull of all segments equals the hull of their union, and the polyline connector it relied on lost floating points and mishandled open paths.
89 lines
2.3 KiB
TOML
89 lines
2.3 KiB
TOML
[package]
|
|
name = "graphene-std"
|
|
version = "0.1.0"
|
|
edition = "2024"
|
|
description = "Graphene standard library"
|
|
authors = ["Graphite Authors <contact@graphite.art>"]
|
|
license = "MIT OR Apache-2.0"
|
|
|
|
[features]
|
|
default = ["wgpu"]
|
|
gpu = []
|
|
wgpu = ["gpu", "graph-craft/wgpu", "graphene-application-io/wgpu", "graphene-canvas-utils?/wgpu"]
|
|
wasm = [
|
|
"wasm-bindgen",
|
|
"wasm-bindgen-futures",
|
|
"web-sys",
|
|
"graphene-application-io/wasm",
|
|
"image/png",
|
|
"core-types/wasm",
|
|
"vector-types/wasm",
|
|
"graphic-types/wasm",
|
|
"text-nodes/wasm",
|
|
"raster-nodes/wasm",
|
|
"vector-nodes/wasm",
|
|
"graphene-core/wasm",
|
|
"graph-craft/wasm",
|
|
"dep:graphene-canvas-utils"
|
|
]
|
|
image-compare = []
|
|
vello = ["gpu"]
|
|
resvg = []
|
|
shader-nodes = ["raster-nodes/shader-nodes"]
|
|
|
|
[dependencies]
|
|
# Local dependencies
|
|
dyn-any = { workspace = true }
|
|
graph-craft = { workspace = true }
|
|
wgpu-executor = { workspace = true }
|
|
core-types = { workspace = true }
|
|
vector-types = { workspace = true }
|
|
graphic-types = { workspace = true }
|
|
blending-nodes = { workspace = true }
|
|
text-nodes = { workspace = true }
|
|
transform-nodes = { workspace = true }
|
|
vector-nodes = { workspace = true }
|
|
path-bool-nodes = { workspace = true }
|
|
math-nodes = { workspace = true }
|
|
rendering = { workspace = true }
|
|
graphene-application-io = { workspace = true }
|
|
raster-nodes = { workspace = true }
|
|
brush-nodes = { workspace = true }
|
|
graphene-core = { workspace = true }
|
|
graphic-nodes = { workspace = true }
|
|
repeat-nodes = { workspace = true }
|
|
|
|
# Workspace dependencies
|
|
log = { workspace = true }
|
|
glam = { workspace = true }
|
|
node-macro = { workspace = true }
|
|
reqwest = { workspace = true }
|
|
image = { workspace = true }
|
|
base64 = { workspace = true }
|
|
wgpu = { workspace = true }
|
|
bytemuck = { workspace = true }
|
|
|
|
# Optional local dependencies
|
|
graphene-canvas-utils = { workspace = true, optional = true }
|
|
|
|
# Optional workspace dependencies
|
|
wasm-bindgen = { workspace = true, optional = true }
|
|
wasm-bindgen-futures = { workspace = true, optional = true }
|
|
tokio = { workspace = true, optional = true }
|
|
vello = { workspace = true }
|
|
vello_encoding = { workspace = true }
|
|
web-sys = { workspace = true, optional = true, features = [
|
|
"Window",
|
|
"CanvasRenderingContext2d",
|
|
"ImageData",
|
|
"Document",
|
|
"Navigator",
|
|
"Gpu",
|
|
"HtmlCanvasElement",
|
|
"HtmlImageElement",
|
|
"ImageBitmapRenderingContext",
|
|
] }
|
|
|
|
[dev-dependencies]
|
|
tokio = { workspace = true }
|