Exporting work from bea
This commit is contained in:
parent
d80287c8f8
commit
145272c546
17 changed files with 232 additions and 1952 deletions
13
.editorconfig
Normal file
13
.editorconfig
Normal file
|
@ -0,0 +1,13 @@
|
|||
# editorconfig.org
|
||||
root = true
|
||||
|
||||
[*]
|
||||
indent_size = 2
|
||||
indent_style = space
|
||||
end_of_line = lf
|
||||
charset = utf-8
|
||||
trim_trailing_whitespace = true
|
||||
insert_final_newline = true
|
||||
|
||||
[*.md]
|
||||
trim_trailing_whitespace = false
|
1
.npmignore
Normal file
1
.npmignore
Normal file
|
@ -0,0 +1 @@
|
|||
lib/
|
18
dist/config/config.d.ts
vendored
Normal file
18
dist/config/config.d.ts
vendored
Normal file
|
@ -0,0 +1,18 @@
|
|||
declare const config: {
|
||||
"parts": string[];
|
||||
"measurements": string[];
|
||||
"options": ({
|
||||
"id": string;
|
||||
"min": number;
|
||||
"max": number;
|
||||
"std": number;
|
||||
"type"?: undefined;
|
||||
} | {
|
||||
"id": string;
|
||||
"type": string;
|
||||
"min": number;
|
||||
"max": number;
|
||||
"std": number;
|
||||
})[];
|
||||
};
|
||||
export default config;
|
75
dist/config/config.js
vendored
Normal file
75
dist/config/config.js
vendored
Normal file
|
@ -0,0 +1,75 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
var config = {
|
||||
"parts": [
|
||||
"backBlock",
|
||||
"frontBlock",
|
||||
"sleeveBlock"
|
||||
],
|
||||
"measurements": [
|
||||
"bicepsCircumference",
|
||||
"centerBackNeckToWaist",
|
||||
"chestCircumference",
|
||||
"naturalWaistToHip",
|
||||
"neckCircumference",
|
||||
"shoulderSlope",
|
||||
"shoulderToShoulder",
|
||||
"hipsCircumference",
|
||||
"shoulderToWrist",
|
||||
"wristCircumference"
|
||||
],
|
||||
"options": [
|
||||
{
|
||||
"id": "chestEase",
|
||||
"min": -40,
|
||||
"max": 160,
|
||||
"std": 30
|
||||
},
|
||||
{
|
||||
"id": "bicepsEase",
|
||||
"min": 30,
|
||||
"max": 80,
|
||||
"std": 50
|
||||
},
|
||||
{
|
||||
"id": "cuffEase",
|
||||
"min": 0,
|
||||
"max": 100,
|
||||
"std": 45
|
||||
},
|
||||
{
|
||||
"id": "lengthBonus",
|
||||
"min": -40,
|
||||
"max": 120,
|
||||
"std": 0
|
||||
},
|
||||
{
|
||||
"id": "sleeveLengthBonus",
|
||||
"min": -40,
|
||||
"max": 80,
|
||||
"std": 0
|
||||
},
|
||||
{
|
||||
"id": "armholeDepthFactor",
|
||||
"type": "percentage",
|
||||
"min": 50,
|
||||
"max": 65,
|
||||
"std": 50
|
||||
},
|
||||
{
|
||||
"id": "sleevecapHeightFactor",
|
||||
"type": "percentage",
|
||||
"min": 35,
|
||||
"max": 75,
|
||||
"std": 55
|
||||
},
|
||||
{
|
||||
"id": "acrossBackFactor",
|
||||
"type": "percentage",
|
||||
"min": 93,
|
||||
"max": 99,
|
||||
"std": 96
|
||||
}
|
||||
]
|
||||
};
|
||||
exports.default = config;
|
2
dist/index.d.ts
vendored
2
dist/index.d.ts
vendored
|
@ -1,6 +1,8 @@
|
|||
import pattern from './lib/pattern';
|
||||
import bezier from 'bezier-js';
|
||||
declare var Freesewing: {
|
||||
version: string;
|
||||
pattern: typeof pattern;
|
||||
bezier: typeof bezier;
|
||||
};
|
||||
export default Freesewing;
|
||||
|
|
3
dist/index.js
vendored
3
dist/index.js
vendored
|
@ -3,10 +3,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
var pattern_1 = __importDefault(require("./lib/pattern"));
|
||||
var bezier_js_1 = __importDefault(require("bezier-js"));
|
||||
console.log('start');
|
||||
var Freesewing = {
|
||||
version: '0.0.1',
|
||||
pattern: pattern_1.default,
|
||||
bezier: bezier_js_1.default
|
||||
};
|
||||
exports.default = Freesewing;
|
||||
|
|
5
dist/lib/pattern.d.ts
vendored
Normal file
5
dist/lib/pattern.d.ts
vendored
Normal file
|
@ -0,0 +1,5 @@
|
|||
import { PatternConfig } from './types';
|
||||
export default class Pattern {
|
||||
config: PatternConfig;
|
||||
constructor(config: PatternConfig);
|
||||
}
|
10
dist/lib/pattern.js
vendored
Normal file
10
dist/lib/pattern.js
vendored
Normal file
|
@ -0,0 +1,10 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
var Pattern = /** @class */ (function () {
|
||||
function Pattern(config) {
|
||||
this.config = config;
|
||||
return this;
|
||||
}
|
||||
return Pattern;
|
||||
}());
|
||||
exports.default = Pattern;
|
24
dist/lib/types.d.ts
vendored
Normal file
24
dist/lib/types.d.ts
vendored
Normal file
|
@ -0,0 +1,24 @@
|
|||
export interface PatternOption {
|
||||
type?: "measure" | "percentage" | "angle" | "choice";
|
||||
onlyIf?: {
|
||||
option: string;
|
||||
oneOf: number[];
|
||||
};
|
||||
min?: number;
|
||||
max?: number;
|
||||
std: number;
|
||||
options?: {
|
||||
[index: number]: string;
|
||||
};
|
||||
}
|
||||
export interface PatternConfig {
|
||||
parts: string[];
|
||||
measurements: string[];
|
||||
options: PatternOption[];
|
||||
[propName: string]: any;
|
||||
}
|
||||
export declare type Pattern = {
|
||||
parts: string[];
|
||||
measurements: string[];
|
||||
config: PatternConfig;
|
||||
};
|
2
dist/lib/types.js
vendored
Normal file
2
dist/lib/types.js
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
32
dist/types.d.ts
vendored
Normal file
32
dist/types.d.ts
vendored
Normal file
|
@ -0,0 +1,32 @@
|
|||
export interface StringArray {
|
||||
[index: number]: string;
|
||||
}
|
||||
export interface PatternOptionDependency {
|
||||
option: string;
|
||||
oneOf: number[];
|
||||
}
|
||||
export declare type PatternOptionType = "measure" | "percentage" | "angle" | "choice";
|
||||
export interface PatternOption {
|
||||
type?: PatternOptionType;
|
||||
onlyIf?: PatternOptionDependency;
|
||||
}
|
||||
export interface PatternOptionNumeric extends PatternOption {
|
||||
min: number;
|
||||
max: number;
|
||||
std: number;
|
||||
}
|
||||
export interface PatternOptionChoice extends PatternOption {
|
||||
type: "choice";
|
||||
options: {
|
||||
[index: number]: string;
|
||||
};
|
||||
}
|
||||
export interface PatternOptionArray {
|
||||
[index: string]: PatternOptionNumeric | PatternOptionChoice;
|
||||
}
|
||||
export interface PatternConfig {
|
||||
parts: StringArray;
|
||||
measurements: StringArray;
|
||||
options: PatternOptionArray;
|
||||
[propName: string]: any;
|
||||
}
|
2
dist/types.js
vendored
Normal file
2
dist/types.js
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
4
index.ts
4
index.ts
|
@ -1,9 +1,9 @@
|
|||
import pattern from './lib/pattern'
|
||||
import bezier from 'bezier-js'
|
||||
|
||||
console.log('start');
|
||||
|
||||
var Freesewing = {
|
||||
version: '0.0.1',
|
||||
pattern,
|
||||
bezier
|
||||
}
|
||||
|
||||
|
|
11
lib/pattern.ts
Normal file
11
lib/pattern.ts
Normal file
|
@ -0,0 +1,11 @@
|
|||
import { PatternConfig } from './types'
|
||||
|
||||
export default class Pattern {
|
||||
config: PatternConfig;
|
||||
|
||||
constructor(config: PatternConfig) {
|
||||
this.config = config;
|
||||
|
||||
return this;
|
||||
}
|
||||
}
|
26
lib/types.ts
Normal file
26
lib/types.ts
Normal file
|
@ -0,0 +1,26 @@
|
|||
export interface PatternOption {
|
||||
type?: "measure" | "percentage" | "angle" | "choice";
|
||||
onlyIf?: {
|
||||
option: string;
|
||||
oneOf: number[];
|
||||
}
|
||||
min?: number;
|
||||
max?: number;
|
||||
std: number;
|
||||
options?: {
|
||||
[index: number]: string;
|
||||
}
|
||||
}
|
||||
|
||||
export interface PatternConfig {
|
||||
parts: string[];
|
||||
measurements: string[];
|
||||
options: PatternOption[];
|
||||
[propName: string]: any;
|
||||
}
|
||||
|
||||
export type Pattern = {
|
||||
parts: string[];
|
||||
measurements: string[];
|
||||
config: PatternConfig;
|
||||
}
|
1947
package-lock.json
generated
1947
package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
@ -22,12 +22,11 @@
|
|||
},
|
||||
"homepage": "https://github.com/joostdecock/freesewing#readme",
|
||||
"dependencies": {
|
||||
"bezier-js": "^2.2.13",
|
||||
"@types/bezier-js": "0.0.7",
|
||||
"@types/node": "^10.5.2"
|
||||
"bezier-js": "^2.2.13"
|
||||
},
|
||||
"devDependencies": {
|
||||
"nodemon": "^1.17.5",
|
||||
"typescript": "^2.9.2"
|
||||
"typescript": "^2.9.2",
|
||||
"@types/bezier-js": "0.0.7",
|
||||
"@types/node": "^10.5.2"
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue