@3dnest/wall-material-ajk
Advanced tools
Comparing version 0.0.9 to 0.0.10
{ | ||
"name": "@3dnest/wall-material-ajk", | ||
"version": "0.0.9", | ||
"version": "0.0.10", | ||
"description": "> TODO: description", | ||
@@ -33,3 +33,3 @@ "author": "zhangsen <zhangsen@3dnest.cn>", | ||
}, | ||
"gitHead": "33a493eb5eca7a4611e2f358ee5cfa4ba0e71588" | ||
"gitHead": "822aa474a0f9e909a3d62bd376502b9db3c99535" | ||
} |
@@ -8,2 +8,2 @@ export { BasicWindow } from './BasicWindow.js'; | ||
export { LBoilerWindow, LPathBoilerWindow } from './LBoilerWindow.js'; | ||
export { UBoilerWindow } from './UBoilerWindow.js'; | ||
export { UBoilerWindow, UPathBoilerWindow } from './UBoilerWindow.js'; |
import { LINE_WIDTH } from '../constant.js'; | ||
import { getColors } from '../utils.js'; | ||
import { getColors, getOutline } from '../utils.js'; | ||
@@ -54,2 +54,37 @@ export const UBoilerWindow = (graphics, context) => { | ||
return graphics; | ||
}; | ||
export const UPathBoilerWindow = (graphics, context) => { | ||
const { scale, main, cross } = context; | ||
const lineWidth = LINE_WIDTH / scale; | ||
const color = getColors(context); | ||
const outline = getOutline(main, cross); | ||
graphics.lineStyle(lineWidth, color.line); | ||
graphics.moveTo(...outline[0]); | ||
for (let i = 1; i < outline.length / 2; i++) { | ||
graphics.lineTo(...outline[i]); | ||
} | ||
graphics.moveTo(...outline[outline.length / 2]); | ||
for (let i = outline.length / 2; i < outline.length; i++) { | ||
graphics.lineTo(...outline[i]); | ||
} | ||
graphics.lineStyle(lineWidth * 2, color.middleLine); | ||
graphics.moveTo(...main[0]); | ||
for (let i = 1; i < main.length; i++) { | ||
graphics.lineTo(...main[i]); | ||
} | ||
graphics.pivot.x = 0; | ||
graphics.pivot.y = 0; | ||
return graphics; | ||
}; |
@@ -39,24 +39,34 @@ import { LINE_WIDTH } from '../constant.js'; | ||
export const UPathWindow = (graphics, context) => { | ||
// const { scale, main, cross } = context; | ||
const { scale, main, cross } = context; | ||
// const lineWidth = LINE_WIDTH / scale; | ||
// const color = getColors(context); | ||
// const outline = getOutline(main, cross); | ||
const lineWidth = LINE_WIDTH / scale; | ||
const color = getColors(context); | ||
const outline = getOutline(main, cross); | ||
// graphics | ||
// .lineStyle(lineWidth, color.line) | ||
// .beginFill(color.fill) | ||
// .drawPolygon(outline.flat()) | ||
// .endFill(); | ||
graphics.lineStyle(lineWidth, color.line); | ||
// graphics.moveTo(...main[0]); | ||
graphics.moveTo(...outline[0]); | ||
// for (let i = 1; i < main.length; i++) { | ||
// graphics.lineTo(...main[i]); | ||
// } | ||
for (let i = 1; i < outline.length / 2; i++) { | ||
graphics.lineTo(...outline[i]); | ||
} | ||
// graphics.pivot.x = 0; | ||
// graphics.pivot.y = 0; | ||
graphics.moveTo(...outline[outline.length / 2]); | ||
for (let i = outline.length / 2; i < outline.length; i++) { | ||
graphics.lineTo(...outline[i]); | ||
} | ||
graphics.lineStyle(lineWidth * 2, color.middleLine); | ||
graphics.moveTo(...main[0]); | ||
for (let i = 1; i < main.length; i++) { | ||
graphics.lineTo(...main[i]); | ||
} | ||
graphics.pivot.x = 0; | ||
graphics.pivot.y = 0; | ||
return graphics; | ||
}; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
27327
663