跳到主要内容

@openclothes/core

open clothes's core package holds the core library for parametric design of sewing patterns.

It is published on NPM as @openclothes/core .
The source code for this package is available in our monorepo on Codeberg under packages/core .

提示

Refer to the core API reference documentation for in-depth info on how to use this package.

注意

This package does not provide a default export.

Installation

npm install --save @openclothes/core

Named Exports

Attributes

The constructor method for Attributes.

import { Attributes } from '@openclothes/core'

beamIntersectsCircle

The beamIntersectsCircle function.

import { beamIntersectsCircle } from '@openclothes/core'

beamIntersectsCurve

The beamIntersectsCurve function.

import { beamIntersectsCurve } from '@openclothes/core'

beamIntersectsX

The beamIntersectsX function.

import { beamIntersectsX } from '@openclothes/core'

beamIntersectsY

The beamIntersectsY function.

import { beamIntersectsY } from '@openclothes/core'

beamsIntersect

The beamsIntersect function.

import { beamsIntersect } from '@openclothes/core'

Bezier

A copy of the BezierJs library.

import { Bezier } from '@openclothes/core'

capitalize

The capitalize function.

import { capitalize } from '@openclothes/core'

cbqc

The cbqc number, which is the ideal value to approximate a quarter circle with a cubic Bezier curve.

提示

cbqc stands for Cubic Bezier Quarter Circle

import { capitalize } from '@openclothes/core'

circlesIntersect

The circlesIntersect function.

import { circlesIntersect } from '@openclothes/core'

curveEdge

The curveEdge function.

import { curveEdge } from '@openclothes/core'

curveIntersectsX

The curveIntersectsX function.

import { curveIntersectsX } from '@openclothes/core'

curveIntersectsY

The curveIntersectsY function.

import { curveIntersectsY } from '@openclothes/core'

curvesIntersect

The curvesIntersect function.

import { curvesIntersect } from '@openclothes/core'

deg2rad

The deg2rad function.

import { deg2rad } from '@openclothes/core'

Design

The constructor method for Design.

import { Design } from '@openclothes/core'

generateStackTransform

The generateStackTransform function.

import { generateStackTransform } from '@openclothes/core'

getTransformedBounds

The getTransformedBounds function.

import { getTransformedBounds } from '@openclothes/core'

goldenRatio

The goldenRatio number, which is the ideal value to approximate a quarter circle with a cubic Bezier curve.

hidePresets

The hidePresets object holds presets for hiding parts in a open clothes design.

import { hidePresets } from '@openclothes/core'

lineIntersectsCircle

The lineIntersectsCircle function.

import { lineIntersectsCircle } from '@openclothes/core'

lineIntersectsCurve

The lineIntersectsCurve function.

import { lineIntersectsCurve } from '@openclothes/core'

linesIntersect

The linesIntersect function.

import { linesIntersect } from '@openclothes/core'

mergeI18n

The mergeI18n function.

import { mergeI18n } from '@openclothes/core'

mergeOptions

The mergeOptions function.

import { mergeOptions } from '@openclothes/core'

Part

The constructor method for Part.

import { Part } from '@openclothes/core'

Path

The constructor method for Path.

import { Path } from '@openclothes/core'

Pattern

The constructor method for Pattern.

import { Pattern } from '@openclothes/core'

pctBasedOn

The pctBasedOn function.

import { pctBasedOn } from '@openclothes/core'

Point

The constructor method for Point.

import { Point } from '@openclothes/core'

pointOnBeam

The pointOnBeam function.

import { pointOnBeam } from '@openclothes/core'

pointOnCurve

The pointOnCurve function.

import { pointOnCurve } from '@openclothes/core'

pointOnLine

The pointOnLine function.

import { pointOnLine } from '@openclothes/core'

rad2deg

The rad2deg function.

import { rad2deg } from '@openclothes/core'

round

The round function.

import { round } from '@openclothes/core'

Snippet

The constructor method for Snippet.

import { Snippet } from '@openclothes/core'

splitCurve

The splitCurve function.

import { splitCurve } from '@openclothes/core'

Store

The constructor method for Store.

import { Store } from '@openclothes/core'

stretchToScale

The stretchToScale function.

import { stretchToScale } from '@openclothes/core'

units

The units function.

import { units } from '@openclothes/core'

version

The version of the open clothes core library.

import { version } from '@openclothes/core'