@3dnest/wall-material-ajk
Advanced tools
Comparing version 0.0.6 to 0.0.7
{ | ||
"name": "@3dnest/wall-material-ajk", | ||
"version": "0.0.6", | ||
"version": "0.0.7", | ||
"description": "> TODO: description", | ||
@@ -33,3 +33,3 @@ "author": "zhangsen <zhangsen@3dnest.cn>", | ||
}, | ||
"gitHead": "4b300929d3dbbf89490c25bd59abc31087a99426" | ||
"gitHead": "c7b9dee303e03021c72e447caa7f422c124f70b0" | ||
} |
@@ -7,3 +7,3 @@ export { BasicWindow } from './BasicWindow.js'; | ||
export { ArcWindow } from './ArcWindow.js'; | ||
export { LBoilerWindow } from './LBoilerWindow.js'; | ||
export { LBoilerWindow, LPathBoilerWindow } from './LBoilerWindow.js'; | ||
export { UBoilerWindow } from './UBoilerWindow.js'; |
import { LINE_WIDTH } from '../constant.js'; | ||
import { getColors } from '../utils.js'; | ||
import { getColors, getOutline } from '../utils.js'; | ||
@@ -49,2 +49,25 @@ export const LBoilerWindow = (graphics, context) => { | ||
return graphics; | ||
}; | ||
export const LPathBoilerWindow = (graphics, context) => { | ||
const { scale, main, cross } = context; | ||
const lineWidth = LINE_WIDTH / scale; | ||
const color = getColors(context); | ||
const outline = getOutline(main, cross); | ||
const smallCross = cross.map(c => c / 3); | ||
const smallOutline = getOutline(main, smallCross); | ||
graphics | ||
.lineStyle(lineWidth, color.line) | ||
.beginFill(color.fill) | ||
.drawPolygon(outline.flat()) | ||
.drawPolygon(smallOutline.flat()) | ||
.endFill(); | ||
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
23673
555