Add Boolean Operations as WASM Modules to Two.js
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 8.7k
- Forks
- 463
- Avg merge
- 2d 1h
- Merged PRs (30d)
- 8
Description
Is your feature request related to a problem? Please describe.
Boolean operations are a common, but computationally expensive and mathematically complicated operations in vector drawing suites.
Describe the solution you'd like
For the types of projects Two.js aspires to help make possible, it's important to have these features:
- Union: Combine two paths into one.
- Subtraction: Remove one path's form from another's.
- Intersection: Get the overlapping area of two paths as a new path.
- Exclusion: Get the non-overlapping area of two paths as a new path.
Essentially these (taken from Adobe Illustrator):

Additional context
Paper.js has great examples of these running in JavaScript: http://paperjs.org/examples/boolean-operations/ • It would be prudent to port these to Rust as a separate library and compile them to WASM into Two.js as extras.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names no files or tests. Start with the referenced Paper.js boolean-operations examples and evaluate the proposed Rust library compiled to WASM for Two.js; done means Union, Subtraction, Intersection, and Exclusion are available for Two.js paths.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, rust, wasm
- Domain
- computer-graphics, web-dev
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100