1
0
Fork 0
Commit graph

26 commits

Author SHA1 Message Date
Joost De Cock
3671f44e90 chore: Move core files to .mjs 2022-08-26 18:51:02 +02:00
Joost De Cock
eccdd23ded Merge branch 'proposal-parts' into v3-phase1 2022-08-26 12:38:39 +02:00
joostdecock
62fae66d25 wip(core): Added support for (part-level) optionGroups
This needs some work when merging deeply nested options, but it's a
start
2022-08-15 16:01:42 +02:00
Enoch Riese
4a0f3f65a6 documenting code 2022-08-14 16:50:16 -05:00
joostdecock
2b254c721d wip: Recursive resolving of (non-injected) dependencies
We started out with following dependencies that are injected
(from) and now added dependencies that are merely required to
be drafted first (after).

This also adds further support for part-level configuration.
2022-08-14 16:59:51 +02:00
joostdecock
4cf9c3bd47 wip: Added part-level dependencies
Restructured code a bit to handle all part-level config in one call.

Removed check in shorthand for debug as it's no longer used.
Updated tests to not fall over on different error message format in
newer NodeJS versions
2022-08-13 18:33:06 +02:00
joostdecock
689f908f68 wip: Allow runtime adding of parts
Just call `pattern.addPart()` and pass it either:
 - a part object with all it entails
 - a draft method as first and name as second parameter

This will overwrite any existing parts without any warning
2022-08-13 15:11:33 +02:00
Enoch Riese
1a65a16e56 separate print layout from draft layout. add better buttons 2022-08-09 16:17:17 -05:00
joostdecock
70bd946bdc wip(core/brian/aaron): Support for 2022 style part inheritance
This is very rough around the edges, but it's kinda working, so
I'm committing this now.

What this enabled is the ability to extend a part by importing
only that part and then just saying you want a part `from` the
imported one.

The imported part comes with all options, it does not currently
come with all measurements.

This also *follows* dependencies. For example in Brian, we never
explicitly add the base and sleevecap parts, they are simply
added automatically because other parts are buily *from* them.

Best to look at the source code of designs/brian and designs/aaron
to understand what's going on and how it is different.
2022-08-09 20:17:35 +02:00
joostdecock
785c03d013 chore(core): Working on test coverage 2022-07-23 17:00:48 +02:00
Joost De Cock
7a33cf1783 chore(core): Make generatePartTransform a named export 2022-07-02 20:05:31 +02:00
joostdecock
1d3a4acd60 chore: Linter run 2021-10-08 17:32:12 +02:00
joostdecock
025cf9b88e feat(core): Snapping of percentage options
This commit implements the snapping of percentage options as
outlined in this proposal:

https://github.com/freesewing/freesewing/discussions/1331

Please refer to the link above for all details
2021-09-15 20:20:59 +02:00
Joost De Cock
ef3bd03e2c chore: Linter run 2021-08-30 11:40:16 +02:00
joostdecock
36dec88c51 fix(core): Remove lingering debug statement 2021-07-14 18:06:07 +02:00
joostdecock
3b9309d995 fix(core): Edge case in utils.beamsIntersect()
See #1206 for details

Closes #1206
Closes #1211
2021-07-14 18:01:04 +02:00
Joost De Cock
f191151ee4 chore: Linter changes 2021-04-24 10:16:31 +02:00
Joost De Cock
12692e1a64 chore: Changes required for ES6 version of bezier-js 2020-11-04 20:06:19 +01:00
Joost De Cock
75afc2d9c3 fix(core): Fixed edge-case in utils.pointOnCurve
If we were trying to find a point that lied on a part of a curve
that was a perfect horizontal line, no intersection would be found.
This fixes that.

 - Fixes https://github.com/freesewing/freesewing.org/issues/898
 - Fixes https://github.com/freesewing/freesewing.org/issues/899
 - Fixes https://github.com/freesewing/freesewing.org/issues/913
2020-08-09 09:50:49 +02:00
Joost De Cock
03da84b824 feat(core): Added new debug event type and debug system 2020-07-18 16:48:29 +02:00
Joost De Cock
d2bf45e63c fix(core): Properly escape quotes in units. Fixes #437 2020-07-12 15:10:18 +02:00
Joost De Cock
673743faae feat(core): Add support for injecting sample styles
This allows you to override the (path) styles when we
sample the pattern by setting `settings.sample.styles`.

This closes #380
2020-05-30 14:02:37 +02:00
Joost De Cock
224c9525e1 feat(core): Expose Bezier-js via utils
Since the bezier-js library is bundled with @freesewing/core, we
now expose it via utils. This way, people who want to use this
in their plugins or other code are not forced to import it again.
2020-04-18 11:38:08 +02:00
Joost De Cock
6710d76b08 🎨 Updated prettier config 2019-08-03 15:03:33 +02:00
Joost De Cock
54be0b691e Added utils.rad2deg to core 2019-07-11 16:49:02 +02:00
Joost De Cock
476f4b8088 📦 Renamed freesewing pkg to @freesewing/core 2019-04-19 10:09:50 +02:00
Renamed from packages/freesewing/src/utils.js (Browse further)