Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@3dnest/wall-material-e100

Package Overview
Dependencies
Maintainers
3
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@3dnest/wall-material-e100 - npm Package Compare versions

Comparing version 0.0.2 to 0.0.3

6

dist/e100.min.js
/*!
* @3dnest/wall-material-e100 v0.0.1
* (c) 2021-2022 3dnest
* @3dnest/wall-material-e100 v0.0.2
* (c) 2022-2022 3dnest
* Released under the MIT License.
*/
!function(e,i){"object"==typeof exports&&"undefined"!=typeof module?i(exports):"function"==typeof define&&define.amd?define(["exports"],i):i((e="undefined"!=typeof globalThis?globalThis:e||self)["@3dnest/wall-material-e100"]={})}(this,(function(e){"use strict";const i=Math.PI,l=15,n={stateless:{line:0,arcLine:14145753,fill:16777215,windowFill:13421772},hover:{line:8053503,arcLine:15464441,fill:16777215,windowFill:13421772},select:{line:4096759,arcLine:15068665,fill:16777215,windowFill:13421772},virtual:{line:16711680,arcLine:16711680,fill:16777215,windowFill:16777215}},o=e=>{const{hover:i,focus:l,select:o,virtual:t}=e;return o||l?n.select:i?n.hover:t?n.virtual:n.stateless},t=3/7,T=3/17,r=10;var c=Object.freeze({__proto__:null,SingleDoor:(e,n)=>{const{width:t,height:T,fliped:r,scale:c}=n,s=r?1:0,d=l/c,h=60/c,a=o(n);return e.lineStyle(d,a.line).arc(t*s,T/2,t,-i/2*s-i/2,-i*s/2).lineTo(t*s,T/2).lineTo(0,T/2-t+s*t).drawRect((t-h)*s,T/2-t,h,t),e.pivot.x=t/2,e.pivot.y=T/2,e},DoubleDoor:(e,n)=>{const{width:t,height:T,scale:r}=n,c=l/r,s=60/r,d=o(n);return e.lineStyle(c,d.line).arc(0,T/2,t/2,-i/2,0).lineTo(0,T/2).lineTo(0,(T-t)/2).moveTo(t/2,T/2).arc(t,T/2,t/2,i,-i/2).lineTo(t,T/2).lineTo(t/2,T/2).drawRect(0,T/2-t/2,s,t/2).drawRect(t-s,T/2-t/2,s,t/2),e.pivot.x=t/2,e.pivot.y=T/2,e},SlidingDoor:(e,i)=>{const{width:n,height:t,scale:T,fliped:r}=i,c=r?1:0,s=l/T,d=o(i);return e.lineStyle(s,d.line).drawRect(0,t/2*c,n/2,t/2).drawRect(n/2,t/2-t/2*c,n/2,t/2).lineStyle(1.8*s,d.line).moveTo(n/2,0).lineTo(n/2,t),e.pivot.x=n/2,e.pivot.y=t/2,e},ParentDoor:(e,n)=>{const{width:T,height:r,fliped:c,scale:s}=n,d=c?1:4/3,h=l/s,a=60/s,v=o(n);return e.lineStyle(h,v.line).arc(0,r/2,T*t*d,-i/2,0).lineTo(0,r/2).lineTo(0,r/2-T*t*d).moveTo(T*t*d,r/2).arc(T,r/2,T-T*t*d,i,-i/2).lineTo(T,r/2).lineTo(T*t*d,r/2).drawRect(0,r/2-T*t*d,a,T*t*d).drawRect(T-a,r/2-(T-T*t*d),a,T-T*t*d),e.pivot.x=T/2,e.pivot.y=r/2,e},Bealock:(e,i)=>{const{width:n,height:t,scale:T}=i,r=l/T,c=o(i);return e.lineStyle(r,c.line).drawRect(0,0,5,t).drawRect(n-5,0,5,t).lineStyle(2*r,c.line).moveTo(5,0).lineTo(5,t).moveTo(n-5,0).lineTo(n-5,t),e.pivot.x=n/2,e.pivot.y=t/2,e},LiftDoor:(e,i)=>{const{width:n,height:t,scale:r}=i,c=l/r,s=o(i);return e.lineStyle(c,s.line).drawRect(0,0,n,t).lineStyle(2*c,s.line).moveTo(n*T,t/2).lineTo(n*(1-T),t/2).lineStyle(2*c,s.line).moveTo(n*T,0).lineTo(n*T,t).moveTo(n/2,0).lineTo(n/2,t).moveTo(n*(1-T),0).lineTo(n*(1-T),t),e.pivot.x=n/2,e.pivot.y=t/2,e},FoldingDoor:(e,i)=>{const{width:n,height:t,scale:T}=i,c=l/T,s=o(i),d=Math.round(n/30)>1?Math.round(n/30):1;e.lineStyle(c,s.line).drawRect(0,0,r,t).drawRect(n-r,0,r,t).moveTo(r,t);for(let i=1;i<=d;i++)e.lineTo(r+(n-20)/d/2*(2*i-1),0).lineTo(r+(n-20)/d/2*(2*i),t);return e.pivot.x=n/2,e.pivot.y=t/2,e}});const s=7/17;var d=Object.freeze({__proto__:null,BasicWindow:(e,i)=>{const{width:n,height:t,scale:T}=i,r=l/T,c=o(i);return e.lineStyle(r,c.line).drawRect(0,0,n,t).lineStyle(3*r,c.line).moveTo(0,t/2).lineTo(n,t/2).lineStyle(1.5*r,c.line).moveTo(n/2,0).lineTo(n/2,t),e.pivot.x=n/2,e.pivot.y=t/2,e},BoilerWindow:(e,i)=>{const{width:n,scale:t,sillThickness:T=500/t,height:r}=i,c=l/t,s=r,d=o(i);return e.lineStyle(c,d.line).drawRect(0,-(T+s-r),n,T+s).drawRect(s,-(T-r),n-2*s,T).lineStyle(2*c,d.line).moveTo(n/2,-(T+s-r)).lineTo(n/2,-(T-r)).lineStyle(3*c,d.line).moveTo(s/2,r).lineTo(s/2,-(T+s/2-r)).lineTo(n-s/2,-(T+s/2-r)).lineTo(n-s/2,r),e.pivot.x=n/2,e.pivot.y=r/2,e},FloorWindow:(e,i)=>{const{width:n,height:t,scale:T}=i,r=l/T,c=o(i);return e.lineStyle(r,c.line).drawRect(0,0,n,t).lineStyle(2*r,c.line).moveTo(0,t/2).lineTo(n,t/2),e.pivot.x=n/2,e.pivot.y=t/2,e},LWindow:(e,i)=>{const{leftWidth:n,rightWidth:t,leftWallThickness:T,rightWallThickness:r,scale:c}=i,s=l/c,d=o(i);return e.lineStyle(s,d.line).beginFill(d.fill).moveTo(0,0).lineTo(t,0).lineTo(t,r).lineTo(T,r).lineTo(T,n).lineTo(0,n).lineTo(0,0).endFill().moveTo(T/2,n).lineTo(T/2,r/2).lineTo(t,r/2),e.pivot.x=t/2,e.pivot.y=r/2,e},UWindow:(e,i)=>{const{leftWidth:n,centerWidtn:t,leftWallThickness:T,centerWallThickness:r,rightWallThickness:c,scale:s}=i,d=l/s,h=o(i);return e.lineStyle(d,h.line).beginFill(h.fill,0).moveTo(0,0).lineTo(0,-n).lineTo(t,-n).lineTo(t,0).lineTo(t-c,0).lineTo(t-c,-(n-r)).lineTo(T,-(n-r)).lineTo(T,0).lineTo(0,0).endFill().moveTo(T/2,0).lineTo(T/2,-(n-r/2)).lineTo(t-c/2,-(n-r/2)).lineTo(t-c/2,0),e.pivot.x=t/2,e.pivot.y=r/2,e},LBoilerWindow:(e,i)=>{const{leftWidth:n,rightWidth:t,leftWindowThickness:T,rightWindowThickness:r,leftWallThickness:c,rightWallThickness:s,scale:d}=i,h=l/d,a=o(i);return e.lineStyle(h,a.line).beginFill(a.windowFill).moveTo(c,s).lineTo(t,s).lineTo(t,s-r).lineTo(c-T,s-r).lineTo(c-T,n).lineTo(c,n).lineTo(c,s).endFill().beginFill(a.fill).moveTo(c-T,s-r).lineTo(t,s-r).lineTo(t,0).lineTo(t+s,0).lineTo(t+s,-r).lineTo(-T,-r).lineTo(-T,n+c).lineTo(0,n+c).lineTo(0,n).lineTo(c-T,n).lineTo(c-T,s-r).endFill().moveTo(0,n+c/2).lineTo(c/2-T,n+c/2).lineTo(c/2-T,s/2-r).lineTo(t+s/2,s/2-r).lineTo(t+s/2,0),e.pivot.x=t/2,e.pivot.y=s/2,e},UBoilerWindow:(e,i)=>{const{leftWidth:n,centerWidtn:t,rightWidth:T,leftWindowThinkness:r,centerWindowThinkness:c,rightWindowThinkness:s,leftWallThickness:d,centerWallThickness:h,rightWallThickness:a,scale:v}=i,w=l/v,y=o(i);return e.lineStyle(w,y.line).beginFill(y.windowFill).moveTo(d,h).lineTo(t-a,h).lineTo(t-a,T).lineTo(t-a+s,T).lineTo(t-a+s,h-c).lineTo(d-r,h-c).lineTo(d-r,n).lineTo(d,n).lineTo(d,h).endFill().beginFill(y.fill).moveTo(d-r,h-c).lineTo(t+s-a,h-c).lineTo(t+s-a,T).lineTo(t,T).lineTo(t,T+a).lineTo(t+s,T+a).lineTo(t+s,-c).lineTo(-r,-c).lineTo(-r,n+d).lineTo(0,n+d).lineTo(0,n).lineTo(d-r,n).lineTo(d-r,h-c).endFill().moveTo(0,n+d/2).lineTo(d/2-r,n+d/2).lineTo(d/2-r,h/2-c).lineTo(t+s-a/2,h/2-c).lineTo(t+s-a/2,T+a/2).lineTo(t,T+a/2),e.pivot.x=t/2,e.pivot.y=h/2,e},DoorWindow:(e,n)=>{const{width:t,height:T,fliped:r,scale:c}=n,d=r?1:0,h=l/c,a=60/c,v=o(n);return e.lineStyle(h,v.line).arc(t*d,T/2,t*s,-i/2*d-i/2,-i*d/2).lineTo(t*d,T/2).lineTo(.5882352941176471*t*d,t*s*d-t*s+T/2).drawRect((t-a)*d,T/2-t*s,a,t*s).drawRect(t*s-t*s*d,0,.5882352941176471*t,T).lineStyle(2*h,v.line).moveTo(t*s-t*s*d,T/2).lineTo(t*s-t*s*d+.5882352941176471*t,T/2).lineStyle(1.5*h,v.line).moveTo(t*s-t*s*d+.5882352941176471*t/2,0).lineTo(t*s-t*s*d+.5882352941176471*t/2,T),e.pivot.x=t/2,e.pivot.y=T/2,e}});e.Door=c,e.Window=d,Object.defineProperty(e,"__esModule",{value:!0})}));
!function(e,l){"object"==typeof exports&&"undefined"!=typeof module?l(exports):"function"==typeof define&&define.amd?define(["exports"],l):l((e="undefined"!=typeof globalThis?globalThis:e||self)["@3dnest/wall-material-e100"]={})}(this,(function(e){"use strict";const l=Math.PI,i=15,n=.01,o={stateless:{line:0,arcLine:14145753,fill:16777215,windowFill:13421772},hover:{line:8053503,arcLine:15464441,fill:16777215,windowFill:13421772},select:{line:4096759,arcLine:15068665,fill:16777215,windowFill:13421772},virtual:{line:16711680,arcLine:16711680,fill:16777215,windowFill:16777215}},t=e=>{const{hover:l,focus:i,select:n,virtual:t}=e;return n||i?o.select:l?o.hover:t?o.virtual:o.stateless},T=3/7,r=3/17,d=10;var c=Object.freeze({__proto__:null,SingleDoor:(e,o)=>{const{width:T,height:r,fliped:d,scale:c}=o,s=d?1:0,a=i/c,h=60/c,v=t(o);return e.beginFill(v.fill,n).lineStyle(a,v.line).arc(T*s,r/2,T,-l/2*s-l/2,-l*s/2).lineTo(T*s,r/2).lineTo(0,r/2-T+s*T).drawRect((T-h)*s,r/2-T,h,T).endFill(),e.pivot.x=T/2,e.pivot.y=r/2,e},DoubleDoor:(e,o)=>{const{width:T,height:r,scale:d}=o,c=i/d,s=60/d,a=t(o);return e.beginFill(a.fill,n).lineStyle(c,a.line).arc(0,r/2,T/2,-l/2,0).lineTo(0,r/2).lineTo(0,(r-T)/2).moveTo(T/2,r/2).arc(T,r/2,T/2,l,-l/2).lineTo(T,r/2).lineTo(T/2,r/2).endFill().drawRect(0,r/2-T/2,s,T/2).drawRect(T-s,r/2-T/2,s,T/2),e.pivot.x=T/2,e.pivot.y=r/2,e},SlidingDoor:(e,l)=>{const{width:o,height:T,scale:r,fliped:d}=l,c=d?1:0,s=i/r,a=t(l);return e.beginFill(a.fill,n).drawRect(0,0,o,T).endFill().lineStyle(s,a.line).drawRect(0,T/2*c,o/2,T/2).drawRect(o/2,T/2-T/2*c,o/2,T/2).lineStyle(1.8*s,a.line).moveTo(o/2,0).lineTo(o/2,T),e.pivot.x=o/2,e.pivot.y=T/2,e},ParentDoor:(e,o)=>{const{width:r,height:d,fliped:c,scale:s}=o,a=c?1:4/3,h=i/s,v=60/s,w=t(o);return e.beginFill(w.fill,n).lineStyle(h,w.line).arc(0,d/2,r*T*a,-l/2,0).lineTo(0,d/2).lineTo(0,d/2-r*T*a).moveTo(r*T*a,d/2).arc(r,d/2,r-r*T*a,l,-l/2).lineTo(r,d/2).lineTo(r*T*a,d/2).endFill().drawRect(0,d/2-r*T*a,v,r*T*a).drawRect(r-v,d/2-(r-r*T*a),v,r-r*T*a),e.pivot.x=r/2,e.pivot.y=d/2,e},Bealock:(e,l)=>{const{width:o,height:T,scale:r}=l,d=i/r,c=t(l);return e.beginFill(c.fill,n).drawRect(0,0,o,T).endFill().lineStyle(d,c.line).drawRect(0,0,5,T).drawRect(o-5,0,5,T).lineStyle(2*d,c.line).moveTo(5,0).lineTo(5,T).moveTo(o-5,0).lineTo(o-5,T),e.pivot.x=o/2,e.pivot.y=T/2,e},LiftDoor:(e,l)=>{const{width:o,height:T,scale:d}=l,c=i/d,s=t(l);return e.beginFill(s.fill,n).lineStyle(c,s.line).drawRect(0,0,o,T).lineStyle(2*c,s.line).moveTo(o*r,T/2).lineTo(o*(1-r),T/2).lineStyle(2*c,s.line).moveTo(o*r,0).lineTo(o*r,T).moveTo(o/2,0).lineTo(o/2,T).moveTo(o*(1-r),0).lineTo(o*(1-r),T).endFill(),e.pivot.x=o/2,e.pivot.y=T/2,e},FoldingDoor:(e,l)=>{const{width:o,height:T,scale:r}=l,c=i/r,s=t(l),a=Math.round(o/30)>1?Math.round(o/30):1;e.beginFill(s.fill,n).drawRect(0,0,o,T).endFill().lineStyle(c,s.line).drawRect(0,0,d,T).drawRect(o-d,0,d,T).moveTo(d,T);for(let l=1;l<=a;l++)e.lineTo(d+(o-20)/a/2*(2*l-1),0).lineTo(d+(o-20)/a/2*(2*l),T);return e.pivot.x=o/2,e.pivot.y=T/2,e}});const s=7/17;var a=Object.freeze({__proto__:null,BasicWindow:(e,l)=>{const{width:o,height:T,scale:r}=l,d=i/r,c=t(l);return e.beginFill(c.fill,n).lineStyle(d,c.line).drawRect(0,0,o,T).endFill().lineStyle(3*d,c.line).moveTo(0,T/2).lineTo(o,T/2).lineStyle(1.5*d,c.line).moveTo(o/2,0).lineTo(o/2,T),e.pivot.x=o/2,e.pivot.y=T/2,e},BoilerWindow:(e,l)=>{const{width:o,scale:T,sillThickness:r=500/T,height:d}=l,c=i/T,s=d,a=t(l);return e.beginFill(a.fill,n).lineStyle(c,a.line).drawRect(0,-(r+s-d),o,r+s).drawRect(s,-(r-d),o-2*s,r).endFill().lineStyle(2*c,a.line).moveTo(o/2,-(r+s-d)).lineTo(o/2,-(r-d)).lineStyle(3*c,a.line).moveTo(s/2,d).lineTo(s/2,-(r+s/2-d)).lineTo(o-s/2,-(r+s/2-d)).lineTo(o-s/2,d),e.pivot.x=o/2,e.pivot.y=d/2,e},FloorWindow:(e,l)=>{const{width:o,height:T,scale:r}=l,d=i/r,c=t(l);return e.beginFill(c.fill,n).lineStyle(d,c.line).drawRect(0,0,o,T).endFill().lineStyle(2*d,c.line).moveTo(0,T/2).lineTo(o,T/2),e.pivot.x=o/2,e.pivot.y=T/2,e},LWindow:(e,l)=>{const{leftWidth:n,rightWidth:o,leftWallThickness:T,rightWallThickness:r,scale:d}=l,c=i/d,s=t(l);return e.lineStyle(c,s.line).beginFill(s.fill).moveTo(0,0).lineTo(o,0).lineTo(o,r).lineTo(T,r).lineTo(T,n).lineTo(0,n).lineTo(0,0).endFill().moveTo(T/2,n).lineTo(T/2,r/2).lineTo(o,r/2),e.pivot.x=o/2,e.pivot.y=r/2,e},UWindow:(e,l)=>{const{leftWidth:o,centerWidtn:T,leftWallThickness:r,centerWallThickness:d,rightWallThickness:c,scale:s}=l,a=i/s,h=t(l);return e.lineStyle(a,h.line).beginFill(h.fill,n).moveTo(0,0).lineTo(0,-o).lineTo(T,-o).lineTo(T,0).lineTo(T-c,0).lineTo(T-c,-(o-d)).lineTo(r,-(o-d)).lineTo(r,0).lineTo(0,0).endFill().moveTo(r/2,0).lineTo(r/2,-(o-d/2)).lineTo(T-c/2,-(o-d/2)).lineTo(T-c/2,0),e.pivot.x=T/2,e.pivot.y=d/2,e},LBoilerWindow:(e,l)=>{const{leftWidth:n,rightWidth:o,leftWindowThickness:T,rightWindowThickness:r,leftWallThickness:d,rightWallThickness:c,scale:s}=l,a=i/s,h=t(l);return e.lineStyle(a,h.line).beginFill(h.windowFill).moveTo(d,c).lineTo(o,c).lineTo(o,c-r).lineTo(d-T,c-r).lineTo(d-T,n).lineTo(d,n).lineTo(d,c).endFill().beginFill(h.fill).moveTo(d-T,c-r).lineTo(o,c-r).lineTo(o,0).lineTo(o+c,0).lineTo(o+c,-r).lineTo(-T,-r).lineTo(-T,n+d).lineTo(0,n+d).lineTo(0,n).lineTo(d-T,n).lineTo(d-T,c-r).endFill().moveTo(0,n+d/2).lineTo(d/2-T,n+d/2).lineTo(d/2-T,c/2-r).lineTo(o+c/2,c/2-r).lineTo(o+c/2,0),e.pivot.x=o/2,e.pivot.y=c/2,e},UBoilerWindow:(e,l)=>{const{leftWidth:n,centerWidtn:o,rightWidth:T,leftWindowThinkness:r,centerWindowThinkness:d,rightWindowThinkness:c,leftWallThickness:s,centerWallThickness:a,rightWallThickness:h,scale:v}=l,w=i/v,f=t(l);return e.lineStyle(w,f.line).beginFill(f.windowFill).moveTo(s,a).lineTo(o-h,a).lineTo(o-h,T).lineTo(o-h+c,T).lineTo(o-h+c,a-d).lineTo(s-r,a-d).lineTo(s-r,n).lineTo(s,n).lineTo(s,a).endFill().beginFill(f.fill).moveTo(s-r,a-d).lineTo(o+c-h,a-d).lineTo(o+c-h,T).lineTo(o,T).lineTo(o,T+h).lineTo(o+c,T+h).lineTo(o+c,-d).lineTo(-r,-d).lineTo(-r,n+s).lineTo(0,n+s).lineTo(0,n).lineTo(s-r,n).lineTo(s-r,a-d).endFill().moveTo(0,n+s/2).lineTo(s/2-r,n+s/2).lineTo(s/2-r,a/2-d).lineTo(o+c-h/2,a/2-d).lineTo(o+c-h/2,T+h/2).lineTo(o,T+h/2),e.pivot.x=o/2,e.pivot.y=a/2,e},DoorWindow:(e,o)=>{const{width:T,height:r,fliped:d,scale:c}=o,a=d?1:0,h=i/c,v=60/c,w=t(o);return e.beginFill(w.fill,n).lineStyle(h,w.line).arc(T*a,r/2,T*s,-l/2*a-l/2,-l*a/2).lineTo(T*a,r/2).lineTo(.5882352941176471*T*a,T*s*a-T*s+r/2).drawRect((T-v)*a,r/2-T*s,v,T*s).drawRect(T*s-T*s*a,0,.5882352941176471*T,r).endFill().lineStyle(2*h,w.line).moveTo(T*s-T*s*a,r/2).lineTo(T*s-T*s*a+.5882352941176471*T,r/2).lineStyle(1.5*h,w.line).moveTo(T*s-T*s*a+.5882352941176471*T/2,0).lineTo(T*s-T*s*a+.5882352941176471*T/2,r),e.pivot.x=T/2,e.pivot.y=r/2,e}});e.Door=c,e.Window=a,Object.defineProperty(e,"__esModule",{value:!0})}));
{
"name": "@3dnest/wall-material-e100",
"version": "0.0.2",
"version": "0.0.3",
"description": "> TODO: description",

@@ -30,3 +30,3 @@ "author": "zhangsen <zhangsen@3dnest.cn>",

},
"gitHead": "438cadc6382da706cf8cc1d797b93fa567e987ac"
"gitHead": "41ce8bb36100d6511ce01e53da3cad1319b1fed2"
}
import { LINE_WIDTH, ALPHA } from '../constant.js';
import { getColors } from '../utils.js';
const RECT_WIDTH = 5;

@@ -9,2 +8,3 @@ export const Bealock = (graphics, context) => {

const lineWidth = LINE_WIDTH / scale;
const rectWidth = 50 / scale;
const color = getColors(context);

@@ -17,9 +17,9 @@

.lineStyle(lineWidth, color.line)
.drawRect(0, 0, RECT_WIDTH, height)
.drawRect(width - RECT_WIDTH, 0, RECT_WIDTH, height)
.drawRect(0, 0, rectWidth, height)
.drawRect(width - rectWidth, 0, rectWidth, height)
.lineStyle(lineWidth * 2, color.line)
.moveTo(RECT_WIDTH, 0)
.lineTo(RECT_WIDTH, height)
.moveTo(width - RECT_WIDTH, 0)
.lineTo(width - RECT_WIDTH, height);
.moveTo(rectWidth, 0)
.lineTo(rectWidth, height)
.moveTo(width - rectWidth, 0)
.lineTo(width - rectWidth, height);

@@ -26,0 +26,0 @@ graphics.pivot.x = width / 2;

import { LINE_WIDTH, ALPHA } from '../constant.js';
import { getColors } from '../utils.js';
const RECT_WIDTH = 10;
export const FoldingDoor = (graphics, context) => {
const { width, height, scale } = context;
const rectWidth = 100 / scale;
const lineWidth = LINE_WIDTH / scale;

@@ -17,9 +16,9 @@ const color = getColors(context);

.lineStyle(lineWidth, color.line)
.drawRect(0, 0, RECT_WIDTH, height)
.drawRect(width - RECT_WIDTH, 0, RECT_WIDTH, height)
.moveTo(RECT_WIDTH, height);
.drawRect(0, 0, rectWidth, height)
.drawRect(width - rectWidth, 0, rectWidth, height)
.moveTo(rectWidth, height);
for (let i = 1; i <= point; i++) {
graphics
.lineTo(RECT_WIDTH + ((width - RECT_WIDTH * 2) / point / 2) * (i * 2 - 1), 0)
.lineTo(RECT_WIDTH + ((width - RECT_WIDTH * 2) / point / 2) * (i * 2), height);
.lineTo(rectWidth + ((width - rectWidth * 2) / point / 2) * (i * 2 - 1), 0)
.lineTo(rectWidth + ((width - rectWidth * 2) / point / 2) * (i * 2), height);
}

@@ -26,0 +25,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc