|
@@ -1,19 +1,19 @@
|
|
module BABYLON {
|
|
module BABYLON {
|
|
export class Lines2DRenderCache extends ModelRenderCache {
|
|
export class Lines2DRenderCache extends ModelRenderCache {
|
|
- effectsReady: boolean = false;
|
|
|
|
- fillVB: WebGLBuffer = null;
|
|
|
|
- fillIB: WebGLBuffer = null;
|
|
|
|
- fillIndicesCount: number = 0;
|
|
|
|
|
|
+ effectsReady: boolean = false;
|
|
|
|
+ fillVB: WebGLBuffer = null;
|
|
|
|
+ fillIB: WebGLBuffer = null;
|
|
|
|
+ fillIndicesCount: number = 0;
|
|
instancingFillAttributes: InstancingAttributeInfo[] = null;
|
|
instancingFillAttributes: InstancingAttributeInfo[] = null;
|
|
- effectFill: Effect = null;
|
|
|
|
- effectFillInstanced: Effect = null;
|
|
|
|
|
|
+ effectFill: Effect = null;
|
|
|
|
+ effectFillInstanced: Effect = null;
|
|
|
|
|
|
- borderVB: WebGLBuffer = null;
|
|
|
|
- borderIB: WebGLBuffer = null;
|
|
|
|
- borderIndicesCount: number = 0;
|
|
|
|
|
|
+ borderVB: WebGLBuffer = null;
|
|
|
|
+ borderIB: WebGLBuffer = null;
|
|
|
|
+ borderIndicesCount: number = 0;
|
|
instancingBorderAttributes: InstancingAttributeInfo[] = null;
|
|
instancingBorderAttributes: InstancingAttributeInfo[] = null;
|
|
- effectBorder: Effect = null;
|
|
|
|
- effectBorderInstanced: Effect = null;
|
|
|
|
|
|
+ effectBorder: Effect = null;
|
|
|
|
+ effectBorderInstanced: Effect = null;
|
|
|
|
|
|
constructor(engine: Engine, modelKey: string) {
|
|
constructor(engine: Engine, modelKey: string) {
|
|
super(engine, modelKey);
|
|
super(engine, modelKey);
|
|
@@ -42,7 +42,7 @@
|
|
if (this.effectFill) {
|
|
if (this.effectFill) {
|
|
let partIndex = instanceInfo.partIndexFromId.get(Shape2D.SHAPE2D_FILLPARTID.toString());
|
|
let partIndex = instanceInfo.partIndexFromId.get(Shape2D.SHAPE2D_FILLPARTID.toString());
|
|
let pid = context.groupInfoPartData[partIndex];
|
|
let pid = context.groupInfoPartData[partIndex];
|
|
-
|
|
|
|
|
|
+
|
|
if (context.renderMode !== Render2DContext.RenderModeOpaque) {
|
|
if (context.renderMode !== Render2DContext.RenderModeOpaque) {
|
|
engine.setAlphaMode(Engine.ALPHA_COMBINE);
|
|
engine.setAlphaMode(Engine.ALPHA_COMBINE);
|
|
}
|
|
}
|
|
@@ -50,7 +50,7 @@
|
|
let effect = context.useInstancing ? this.effectFillInstanced : this.effectFill;
|
|
let effect = context.useInstancing ? this.effectFillInstanced : this.effectFill;
|
|
|
|
|
|
engine.enableEffect(effect);
|
|
engine.enableEffect(effect);
|
|
- engine.bindBuffersDirectly(this.fillVB, this.fillIB, [2], 2*4, effect);
|
|
|
|
|
|
+ engine.bindBuffersDirectly(this.fillVB, this.fillIB, [2], 2 * 4, effect);
|
|
if (context.useInstancing) {
|
|
if (context.useInstancing) {
|
|
if (!this.instancingFillAttributes) {
|
|
if (!this.instancingFillAttributes) {
|
|
this.instancingFillAttributes = this.loadInstancingAttributes(Shape2D.SHAPE2D_FILLPARTID, effect);
|
|
this.instancingFillAttributes = this.loadInstancingAttributes(Shape2D.SHAPE2D_FILLPARTID, effect);
|
|
@@ -62,7 +62,7 @@
|
|
} else {
|
|
} else {
|
|
for (let i = context.partDataStartIndex; i < context.partDataEndIndex; i++) {
|
|
for (let i = context.partDataStartIndex; i < context.partDataEndIndex; i++) {
|
|
this.setupUniforms(effect, partIndex, pid._partData, i);
|
|
this.setupUniforms(effect, partIndex, pid._partData, i);
|
|
- engine.draw(true, 0, this.fillIndicesCount);
|
|
|
|
|
|
+ engine.draw(true, 0, this.fillIndicesCount);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -170,13 +170,13 @@
|
|
|
|
|
|
@className("Lines2D")
|
|
@className("Lines2D")
|
|
export class Lines2D extends Shape2D {
|
|
export class Lines2D extends Shape2D {
|
|
- static get NoCap () { return Lines2D._noCap; }
|
|
|
|
- static get RoundCap () { return Lines2D._roundCap; }
|
|
|
|
- static get TriangleCap () { return Lines2D._triangleCap; }
|
|
|
|
- static get SquareAnchorCap () { return Lines2D._squareAnchorCap; }
|
|
|
|
- static get RoundAnchorCap () { return Lines2D._roundAnchorCap; }
|
|
|
|
- static get DiamondAnchorCap () { return Lines2D._diamondAnchorCap; }
|
|
|
|
- static get ArrowCap () { return Lines2D._arrowCap; }
|
|
|
|
|
|
+ static get NoCap() { return Lines2D._noCap; }
|
|
|
|
+ static get RoundCap() { return Lines2D._roundCap; }
|
|
|
|
+ static get TriangleCap() { return Lines2D._triangleCap; }
|
|
|
|
+ static get SquareAnchorCap() { return Lines2D._squareAnchorCap; }
|
|
|
|
+ static get RoundAnchorCap() { return Lines2D._roundAnchorCap; }
|
|
|
|
+ static get DiamondAnchorCap() { return Lines2D._diamondAnchorCap; }
|
|
|
|
+ static get ArrowCap() { return Lines2D._arrowCap; }
|
|
|
|
|
|
public static pointsProperty: Prim2DPropInfo;
|
|
public static pointsProperty: Prim2DPropInfo;
|
|
public static fillThicknessProperty: Prim2DPropInfo;
|
|
public static fillThicknessProperty: Prim2DPropInfo;
|
|
@@ -374,7 +374,7 @@
|
|
let pos = options.position || new Vector2(options.x || 0, options.y || 0);
|
|
let pos = options.position || new Vector2(options.x || 0, options.y || 0);
|
|
|
|
|
|
lines.setupLines2D
|
|
lines.setupLines2D
|
|
- (
|
|
|
|
|
|
+ (
|
|
parent.owner,
|
|
parent.owner,
|
|
parent,
|
|
parent,
|
|
options.id || null,
|
|
options.id || null,
|
|
@@ -394,7 +394,7 @@
|
|
options.marginRight || null,
|
|
options.marginRight || null,
|
|
options.marginBottom || null,
|
|
options.marginBottom || null,
|
|
options.vAlignment || null,
|
|
options.vAlignment || null,
|
|
- options.hAlignment || null);
|
|
|
|
|
|
+ options.hAlignment || null);
|
|
}
|
|
}
|
|
|
|
|
|
return lines;
|
|
return lines;
|
|
@@ -458,8 +458,8 @@
|
|
}
|
|
}
|
|
this._boundingMin.x = Math.min(this._boundingMin.x, array[offset]);
|
|
this._boundingMin.x = Math.min(this._boundingMin.x, array[offset]);
|
|
this._boundingMax.x = Math.max(this._boundingMax.x, array[offset]);
|
|
this._boundingMax.x = Math.max(this._boundingMax.x, array[offset]);
|
|
- this._boundingMin.y = Math.min(this._boundingMin.y, array[offset+1]);
|
|
|
|
- this._boundingMax.y = Math.max(this._boundingMax.y, array[offset+1]);
|
|
|
|
|
|
+ this._boundingMin.y = Math.min(this._boundingMin.y, array[offset + 1]);
|
|
|
|
+ this._boundingMax.y = Math.max(this._boundingMax.y, array[offset + 1]);
|
|
}
|
|
}
|
|
|
|
|
|
let store = (array: Float32Array, contour: Vector2[], index: number, max: number, p: Vector2, n: Vector2, halfThickness: number, borderThickness: number, detectFlip?: number) => {
|
|
let store = (array: Float32Array, contour: Vector2[], index: number, max: number, p: Vector2, n: Vector2, halfThickness: number, borderThickness: number, detectFlip?: number) => {
|
|
@@ -542,7 +542,7 @@
|
|
case Lines2D.RoundCap:
|
|
case Lines2D.RoundCap:
|
|
if (border) {
|
|
if (border) {
|
|
vbsize = sd;
|
|
vbsize = sd;
|
|
- ibsize = (sd-2) * 3;
|
|
|
|
|
|
+ ibsize = (sd - 2) * 3;
|
|
} else {
|
|
} else {
|
|
vbsize = (sd / 2) + 1;
|
|
vbsize = (sd / 2) + 1;
|
|
ibsize = (sd / 2) * 3;
|
|
ibsize = (sd / 2) * 3;
|
|
@@ -586,7 +586,7 @@
|
|
break;
|
|
break;
|
|
case Lines2D.RoundAnchorCap:
|
|
case Lines2D.RoundAnchorCap:
|
|
if (border) {
|
|
if (border) {
|
|
- vbsize = sd*2;
|
|
|
|
|
|
+ vbsize = sd * 2;
|
|
ibsize = (sd - 1) * 6;
|
|
ibsize = (sd - 1) * 6;
|
|
} else {
|
|
} else {
|
|
vbsize = sd + 1;
|
|
vbsize = sd + 1;
|
|
@@ -595,7 +595,7 @@
|
|
break;
|
|
break;
|
|
}
|
|
}
|
|
|
|
|
|
- return { vbsize: vbsize*2, ibsize: ibsize };
|
|
|
|
|
|
+ return { vbsize: vbsize * 2, ibsize: ibsize };
|
|
}
|
|
}
|
|
|
|
|
|
let v = Vector2.Zero();
|
|
let v = Vector2.Zero();
|
|
@@ -604,8 +604,8 @@
|
|
let s = Math.sin(rotation);
|
|
let s = Math.sin(rotation);
|
|
|
|
|
|
v.x = (c * vertex.x) + (-s * vertex.y) + basePos.x;
|
|
v.x = (c * vertex.x) + (-s * vertex.y) + basePos.x;
|
|
- v.y = (s * vertex.x) + ( c * vertex.y) + basePos.y;
|
|
|
|
- let offset = baseOffset + (index*2);
|
|
|
|
|
|
+ v.y = (s * vertex.x) + (c * vertex.y) + basePos.y;
|
|
|
|
+ let offset = baseOffset + (index * 2);
|
|
vb[offset + 0] = v.x;
|
|
vb[offset + 0] = v.x;
|
|
vb[offset + 1] = v.y;
|
|
vb[offset + 1] = v.y;
|
|
|
|
|
|
@@ -615,7 +615,7 @@
|
|
}
|
|
}
|
|
|
|
|
|
updateMinMax(vb, offset);
|
|
updateMinMax(vb, offset);
|
|
- return (baseOffset + index*2) / 2;
|
|
|
|
|
|
+ return (baseOffset + index * 2) / 2;
|
|
}
|
|
}
|
|
|
|
|
|
let storeIndex = (ib: Float32Array, baseOffset: number, index: number, vertexIndex: number) => {
|
|
let storeIndex = (ib: Float32Array, baseOffset: number, index: number, vertexIndex: number) => {
|
|
@@ -649,213 +649,213 @@
|
|
case Lines2D.ArrowCap:
|
|
case Lines2D.ArrowCap:
|
|
ht *= 2;
|
|
ht *= 2;
|
|
case Lines2D.TriangleCap:
|
|
case Lines2D.TriangleCap:
|
|
- {
|
|
|
|
- if (borderMode) {
|
|
|
|
- let f = type===Lines2D.TriangleCap ? bt : Math.sqrt(bt * bt * 2);
|
|
|
|
- let v1 = storeVertex(vb, vbi, 0, pos, angle, new Vector2(0, ht), null);
|
|
|
|
- let v2 = storeVertex(vb, vbi, 1, pos, angle, new Vector2(ht, 0), null);
|
|
|
|
- let v3 = storeVertex(vb, vbi, 2, pos, angle, new Vector2(0, -ht), null);
|
|
|
|
- let v4 = storeVertex(vb, vbi, 3, pos, angle, new Vector2(0, ht + f), contour);
|
|
|
|
- let v5 = storeVertex(vb, vbi, 4, pos, angle, new Vector2(ht + f, 0), contour);
|
|
|
|
- let v6 = storeVertex(vb, vbi, 5, pos, angle, new Vector2(0, -(ht + f)), contour);
|
|
|
|
-
|
|
|
|
- let ii = 0;
|
|
|
|
- storeIndex(ib, ibi, ii++, v1); storeIndex(ib, ibi, ii++, v4); storeIndex(ib, ibi, ii++, v5);
|
|
|
|
- storeIndex(ib, ibi, ii++, v1); storeIndex(ib, ibi, ii++, v5); storeIndex(ib, ibi, ii++, v2);
|
|
|
|
- storeIndex(ib, ibi, ii++, v6); storeIndex(ib, ibi, ii++, v3); storeIndex(ib, ibi, ii++, v2);
|
|
|
|
- storeIndex(ib, ibi, ii++, v6); storeIndex(ib, ibi, ii++, v2); storeIndex(ib, ibi, ii++, v5);
|
|
|
|
-
|
|
|
|
- if (type === Lines2D.ArrowCap) {
|
|
|
|
- let rht = thickness / 2;
|
|
|
|
- let v10 = storeVertex(vb, vbi, 9, pos, angle, new Vector2(0, -(rht + bt)), null);
|
|
|
|
- let v12 = storeVertex(vb, vbi, 11, pos, angle, new Vector2(-bt, -(ht + f)), contour);
|
|
|
|
- let v11 = storeVertex(vb, vbi, 10, pos, angle, new Vector2(-bt, -(rht + bt)), contour);
|
|
|
|
-
|
|
|
|
- let v7 = storeVertex(vb, vbi, 6, pos, angle, new Vector2(0, rht + bt), null);
|
|
|
|
- let v8 = storeVertex(vb, vbi, 7, pos, angle, new Vector2(-bt, rht + bt), contour);
|
|
|
|
- let v9 = storeVertex(vb, vbi, 8, pos, angle, new Vector2(-bt, ht + f), contour);
|
|
|
|
-
|
|
|
|
-
|
|
|
|
- storeIndex(ib, ibi, ii++, v7); storeIndex(ib, ibi, ii++, v8); storeIndex(ib, ibi, ii++, v9);
|
|
|
|
- storeIndex(ib, ibi, ii++, v7); storeIndex(ib, ibi, ii++, v9); storeIndex(ib, ibi, ii++, v4);
|
|
|
|
- storeIndex(ib, ibi, ii++, v10); storeIndex(ib, ibi, ii++, v12); storeIndex(ib, ibi, ii++, v11);
|
|
|
|
- storeIndex(ib, ibi, ii++, v10); storeIndex(ib, ibi, ii++, v6); storeIndex(ib, ibi, ii++, v12);
|
|
|
|
|
|
+ {
|
|
|
|
+ if (borderMode) {
|
|
|
|
+ let f = type === Lines2D.TriangleCap ? bt : Math.sqrt(bt * bt * 2);
|
|
|
|
+ let v1 = storeVertex(vb, vbi, 0, pos, angle, new Vector2(0, ht), null);
|
|
|
|
+ let v2 = storeVertex(vb, vbi, 1, pos, angle, new Vector2(ht, 0), null);
|
|
|
|
+ let v3 = storeVertex(vb, vbi, 2, pos, angle, new Vector2(0, -ht), null);
|
|
|
|
+ let v4 = storeVertex(vb, vbi, 3, pos, angle, new Vector2(0, ht + f), contour);
|
|
|
|
+ let v5 = storeVertex(vb, vbi, 4, pos, angle, new Vector2(ht + f, 0), contour);
|
|
|
|
+ let v6 = storeVertex(vb, vbi, 5, pos, angle, new Vector2(0, -(ht + f)), contour);
|
|
|
|
+
|
|
|
|
+ let ii = 0;
|
|
|
|
+ storeIndex(ib, ibi, ii++, v1); storeIndex(ib, ibi, ii++, v4); storeIndex(ib, ibi, ii++, v5);
|
|
|
|
+ storeIndex(ib, ibi, ii++, v1); storeIndex(ib, ibi, ii++, v5); storeIndex(ib, ibi, ii++, v2);
|
|
|
|
+ storeIndex(ib, ibi, ii++, v6); storeIndex(ib, ibi, ii++, v3); storeIndex(ib, ibi, ii++, v2);
|
|
|
|
+ storeIndex(ib, ibi, ii++, v6); storeIndex(ib, ibi, ii++, v2); storeIndex(ib, ibi, ii++, v5);
|
|
|
|
+
|
|
|
|
+ if (type === Lines2D.ArrowCap) {
|
|
|
|
+ let rht = thickness / 2;
|
|
|
|
+ let v10 = storeVertex(vb, vbi, 9, pos, angle, new Vector2(0, -(rht + bt)), null);
|
|
|
|
+ let v12 = storeVertex(vb, vbi, 11, pos, angle, new Vector2(-bt, -(ht + f)), contour);
|
|
|
|
+ let v11 = storeVertex(vb, vbi, 10, pos, angle, new Vector2(-bt, -(rht + bt)), contour);
|
|
|
|
+
|
|
|
|
+ let v7 = storeVertex(vb, vbi, 6, pos, angle, new Vector2(0, rht + bt), null);
|
|
|
|
+ let v8 = storeVertex(vb, vbi, 7, pos, angle, new Vector2(-bt, rht + bt), contour);
|
|
|
|
+ let v9 = storeVertex(vb, vbi, 8, pos, angle, new Vector2(-bt, ht + f), contour);
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ storeIndex(ib, ibi, ii++, v7); storeIndex(ib, ibi, ii++, v8); storeIndex(ib, ibi, ii++, v9);
|
|
|
|
+ storeIndex(ib, ibi, ii++, v7); storeIndex(ib, ibi, ii++, v9); storeIndex(ib, ibi, ii++, v4);
|
|
|
|
+ storeIndex(ib, ibi, ii++, v10); storeIndex(ib, ibi, ii++, v12); storeIndex(ib, ibi, ii++, v11);
|
|
|
|
+ storeIndex(ib, ibi, ii++, v10); storeIndex(ib, ibi, ii++, v6); storeIndex(ib, ibi, ii++, v12);
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ let v1 = storeVertex(vb, vbi, 0, pos, angle, new Vector2(0, ht), contour);
|
|
|
|
+ let v2 = storeVertex(vb, vbi, 1, pos, angle, new Vector2(ht, 0), contour);
|
|
|
|
+ let v3 = storeVertex(vb, vbi, 2, pos, angle, new Vector2(0, -ht), contour);
|
|
|
|
+
|
|
|
|
+ storeIndex(ib, ibi, 0, v1);
|
|
|
|
+ storeIndex(ib, ibi, 1, v2);
|
|
|
|
+ storeIndex(ib, ibi, 2, v3);
|
|
}
|
|
}
|
|
- } else {
|
|
|
|
- let v1 = storeVertex(vb, vbi, 0, pos, angle, new Vector2(0, ht), contour);
|
|
|
|
- let v2 = storeVertex(vb, vbi, 1, pos, angle, new Vector2(ht, 0), contour);
|
|
|
|
- let v3 = storeVertex(vb, vbi, 2, pos, angle, new Vector2(0, -ht), contour);
|
|
|
|
-
|
|
|
|
- storeIndex(ib, ibi, 0, v1);
|
|
|
|
- storeIndex(ib, ibi, 1, v2);
|
|
|
|
- storeIndex(ib, ibi, 2, v3);
|
|
|
|
|
|
+ break;
|
|
}
|
|
}
|
|
- break;
|
|
|
|
- }
|
|
|
|
case Lines2D.RoundCap:
|
|
case Lines2D.RoundCap:
|
|
- {
|
|
|
|
- if (borderMode) {
|
|
|
|
- let curA = -Math.PI / 2;
|
|
|
|
- let incA = Math.PI / (sd / 2 - 1);
|
|
|
|
- let ii = 0;
|
|
|
|
-
|
|
|
|
- for (let i = 0; i < (sd / 2); i++) {
|
|
|
|
- let v1 = storeVertex(vb, vbi, i*2 + 0, pos, angle, new Vector2(Math.cos(curA) * ht, Math.sin(curA) * ht), null);
|
|
|
|
- let v2 = storeVertex(vb, vbi, i * 2 + 1, pos, angle, new Vector2(Math.cos(curA) * (ht + bt), Math.sin(curA) * (ht + bt)), contour);
|
|
|
|
|
|
+ {
|
|
|
|
+ if (borderMode) {
|
|
|
|
+ let curA = -Math.PI / 2;
|
|
|
|
+ let incA = Math.PI / (sd / 2 - 1);
|
|
|
|
+ let ii = 0;
|
|
|
|
+
|
|
|
|
+ for (let i = 0; i < (sd / 2); i++) {
|
|
|
|
+ let v1 = storeVertex(vb, vbi, i * 2 + 0, pos, angle, new Vector2(Math.cos(curA) * ht, Math.sin(curA) * ht), null);
|
|
|
|
+ let v2 = storeVertex(vb, vbi, i * 2 + 1, pos, angle, new Vector2(Math.cos(curA) * (ht + bt), Math.sin(curA) * (ht + bt)), contour);
|
|
|
|
+
|
|
|
|
+ if (i > 0) {
|
|
|
|
+ storeIndex(ib, ibi, ii++, v1 - 2);
|
|
|
|
+ storeIndex(ib, ibi, ii++, v2 - 2);
|
|
|
|
+ storeIndex(ib, ibi, ii++, v2);
|
|
|
|
+
|
|
|
|
+ storeIndex(ib, ibi, ii++, v1 - 2);
|
|
|
|
+ storeIndex(ib, ibi, ii++, v2);
|
|
|
|
+ storeIndex(ib, ibi, ii++, v1);
|
|
|
|
+ }
|
|
|
|
+ curA += incA;
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ let c = storeVertex(vb, vbi, 0, pos, angle, new Vector2(0, 0), null);
|
|
|
|
+ let curA = -Math.PI / 2;
|
|
|
|
+ let incA = Math.PI / (sd / 2 - 1);
|
|
|
|
|
|
- if (i > 0) {
|
|
|
|
- storeIndex(ib, ibi, ii++, v1 - 2);
|
|
|
|
- storeIndex(ib, ibi, ii++, v2 - 2);
|
|
|
|
- storeIndex(ib, ibi, ii++, v2);
|
|
|
|
|
|
+ storeVertex(vb, vbi, 1, pos, angle, new Vector2(Math.cos(curA) * ht, Math.sin(curA) * ht), null);
|
|
|
|
+ curA += incA;
|
|
|
|
+ for (let i = 1; i < (sd / 2); i++) {
|
|
|
|
+ let v2 = storeVertex(vb, vbi, i + 1, pos, angle, new Vector2(Math.cos(curA) * ht, Math.sin(curA) * ht), contour);
|
|
|
|
|
|
- storeIndex(ib, ibi, ii++, v1 - 2);
|
|
|
|
- storeIndex(ib, ibi, ii++, v2);
|
|
|
|
- storeIndex(ib, ibi, ii++, v1);
|
|
|
|
|
|
+ storeIndex(ib, ibi, i * 3 + 0, c);
|
|
|
|
+ storeIndex(ib, ibi, i * 3 + 1, v2 - 1);
|
|
|
|
+ storeIndex(ib, ibi, i * 3 + 2, v2);
|
|
|
|
+ curA += incA;
|
|
}
|
|
}
|
|
- curA += incA;
|
|
|
|
- }
|
|
|
|
- } else {
|
|
|
|
- let c = storeVertex(vb, vbi, 0, pos, angle, new Vector2(0, 0), null);
|
|
|
|
- let curA = -Math.PI / 2;
|
|
|
|
- let incA = Math.PI / (sd / 2 - 1);
|
|
|
|
-
|
|
|
|
- storeVertex(vb, vbi, 1, pos, angle, new Vector2(Math.cos(curA) * ht, Math.sin(curA) * ht), null);
|
|
|
|
- curA += incA;
|
|
|
|
- for (let i = 1; i < (sd / 2); i++) {
|
|
|
|
- let v2 = storeVertex(vb, vbi, i + 1, pos, angle, new Vector2(Math.cos(curA) * ht, Math.sin(curA) * ht), contour);
|
|
|
|
-
|
|
|
|
- storeIndex(ib, ibi, i * 3 + 0, c);
|
|
|
|
- storeIndex(ib, ibi, i * 3 + 1, v2 - 1);
|
|
|
|
- storeIndex(ib, ibi, i * 3 + 2, v2);
|
|
|
|
- curA += incA;
|
|
|
|
}
|
|
}
|
|
|
|
+ break;
|
|
}
|
|
}
|
|
- break;
|
|
|
|
- }
|
|
|
|
case Lines2D.SquareAnchorCap:
|
|
case Lines2D.SquareAnchorCap:
|
|
- {
|
|
|
|
- let vi = 0;
|
|
|
|
- let c = borderMode ? null : contour;
|
|
|
|
- let v1 = storeVertex(vb, vbi, vi++, pos, angle, new Vector2(0, t), c);
|
|
|
|
- let v2 = storeVertex(vb, vbi, vi++, pos, angle, new Vector2(t * 2, t), c);
|
|
|
|
- let v3 = storeVertex(vb, vbi, vi++, pos, angle, new Vector2(t * 2, -t), c);
|
|
|
|
- let v4 = storeVertex(vb, vbi, vi++, pos, angle, new Vector2(0, -t), c);
|
|
|
|
-
|
|
|
|
- if (borderMode) {
|
|
|
|
- let v5 = storeVertex(vb, vbi, vi++, pos, angle, new Vector2(0, ht+bt), null);
|
|
|
|
- let v6 = storeVertex(vb, vbi, vi++, pos, angle, new Vector2(-bt, ht+bt), contour);
|
|
|
|
- let v7 = storeVertex(vb, vbi, vi++, pos, angle, new Vector2(-bt, t + bt), contour);
|
|
|
|
- let v8 = storeVertex(vb, vbi, vi++, pos, angle, new Vector2(t * 2 + bt, t + bt), contour);
|
|
|
|
-
|
|
|
|
- let v9 = storeVertex(vb, vbi, vi++, pos, angle, new Vector2(t * 2 + bt, -(t + bt)), contour);
|
|
|
|
- let v10 = storeVertex(vb, vbi, vi++, pos, angle, new Vector2(-bt, -(t + bt)), contour);
|
|
|
|
- let v11 = storeVertex(vb, vbi, vi++, pos, angle, new Vector2(-bt, -(ht + bt)), contour);
|
|
|
|
- let v12 = storeVertex(vb, vbi, vi++, pos, angle, new Vector2(0, -(ht+bt)), null);
|
|
|
|
-
|
|
|
|
- let ii = 0;
|
|
|
|
- storeIndex(ib, ibi, ii++, v6); storeIndex(ib, ibi, ii++, v1); storeIndex(ib, ibi, ii++, v5);
|
|
|
|
- storeIndex(ib, ibi, ii++, v6); storeIndex(ib, ibi, ii++, v7); storeIndex(ib, ibi, ii++, v1);
|
|
|
|
- storeIndex(ib, ibi, ii++, v1); storeIndex(ib, ibi, ii++, v7); storeIndex(ib, ibi, ii++, v8);
|
|
|
|
- storeIndex(ib, ibi, ii++, v1); storeIndex(ib, ibi, ii++, v8); storeIndex(ib, ibi, ii++, v2);
|
|
|
|
- storeIndex(ib, ibi, ii++, v2); storeIndex(ib, ibi, ii++, v8); storeIndex(ib, ibi, ii++, v9);
|
|
|
|
- storeIndex(ib, ibi, ii++, v2); storeIndex(ib, ibi, ii++, v9); storeIndex(ib, ibi, ii++, v3);
|
|
|
|
- storeIndex(ib, ibi, ii++, v3); storeIndex(ib, ibi, ii++, v9); storeIndex(ib, ibi, ii++, v10);
|
|
|
|
- storeIndex(ib, ibi, ii++, v3); storeIndex(ib, ibi, ii++, v10); storeIndex(ib, ibi, ii++, v4);
|
|
|
|
- storeIndex(ib, ibi, ii++, v10); storeIndex(ib, ibi, ii++, v11); storeIndex(ib, ibi, ii++, v4);
|
|
|
|
- storeIndex(ib, ibi, ii++, v11); storeIndex(ib, ibi, ii++, v12); storeIndex(ib, ibi, ii++, v4);
|
|
|
|
-
|
|
|
|
- } else {
|
|
|
|
- storeIndex(ib, ibi, 0, v1);
|
|
|
|
- storeIndex(ib, ibi, 1, v2);
|
|
|
|
- storeIndex(ib, ibi, 2, v3);
|
|
|
|
-
|
|
|
|
- storeIndex(ib, ibi, 3, v1);
|
|
|
|
- storeIndex(ib, ibi, 4, v3);
|
|
|
|
- storeIndex(ib, ibi, 5, v4);
|
|
|
|
|
|
+ {
|
|
|
|
+ let vi = 0;
|
|
|
|
+ let c = borderMode ? null : contour;
|
|
|
|
+ let v1 = storeVertex(vb, vbi, vi++, pos, angle, new Vector2(0, t), c);
|
|
|
|
+ let v2 = storeVertex(vb, vbi, vi++, pos, angle, new Vector2(t * 2, t), c);
|
|
|
|
+ let v3 = storeVertex(vb, vbi, vi++, pos, angle, new Vector2(t * 2, -t), c);
|
|
|
|
+ let v4 = storeVertex(vb, vbi, vi++, pos, angle, new Vector2(0, -t), c);
|
|
|
|
+
|
|
|
|
+ if (borderMode) {
|
|
|
|
+ let v5 = storeVertex(vb, vbi, vi++, pos, angle, new Vector2(0, ht + bt), null);
|
|
|
|
+ let v6 = storeVertex(vb, vbi, vi++, pos, angle, new Vector2(-bt, ht + bt), contour);
|
|
|
|
+ let v7 = storeVertex(vb, vbi, vi++, pos, angle, new Vector2(-bt, t + bt), contour);
|
|
|
|
+ let v8 = storeVertex(vb, vbi, vi++, pos, angle, new Vector2(t * 2 + bt, t + bt), contour);
|
|
|
|
+
|
|
|
|
+ let v9 = storeVertex(vb, vbi, vi++, pos, angle, new Vector2(t * 2 + bt, -(t + bt)), contour);
|
|
|
|
+ let v10 = storeVertex(vb, vbi, vi++, pos, angle, new Vector2(-bt, -(t + bt)), contour);
|
|
|
|
+ let v11 = storeVertex(vb, vbi, vi++, pos, angle, new Vector2(-bt, -(ht + bt)), contour);
|
|
|
|
+ let v12 = storeVertex(vb, vbi, vi++, pos, angle, new Vector2(0, -(ht + bt)), null);
|
|
|
|
+
|
|
|
|
+ let ii = 0;
|
|
|
|
+ storeIndex(ib, ibi, ii++, v6); storeIndex(ib, ibi, ii++, v1); storeIndex(ib, ibi, ii++, v5);
|
|
|
|
+ storeIndex(ib, ibi, ii++, v6); storeIndex(ib, ibi, ii++, v7); storeIndex(ib, ibi, ii++, v1);
|
|
|
|
+ storeIndex(ib, ibi, ii++, v1); storeIndex(ib, ibi, ii++, v7); storeIndex(ib, ibi, ii++, v8);
|
|
|
|
+ storeIndex(ib, ibi, ii++, v1); storeIndex(ib, ibi, ii++, v8); storeIndex(ib, ibi, ii++, v2);
|
|
|
|
+ storeIndex(ib, ibi, ii++, v2); storeIndex(ib, ibi, ii++, v8); storeIndex(ib, ibi, ii++, v9);
|
|
|
|
+ storeIndex(ib, ibi, ii++, v2); storeIndex(ib, ibi, ii++, v9); storeIndex(ib, ibi, ii++, v3);
|
|
|
|
+ storeIndex(ib, ibi, ii++, v3); storeIndex(ib, ibi, ii++, v9); storeIndex(ib, ibi, ii++, v10);
|
|
|
|
+ storeIndex(ib, ibi, ii++, v3); storeIndex(ib, ibi, ii++, v10); storeIndex(ib, ibi, ii++, v4);
|
|
|
|
+ storeIndex(ib, ibi, ii++, v10); storeIndex(ib, ibi, ii++, v11); storeIndex(ib, ibi, ii++, v4);
|
|
|
|
+ storeIndex(ib, ibi, ii++, v11); storeIndex(ib, ibi, ii++, v12); storeIndex(ib, ibi, ii++, v4);
|
|
|
|
+
|
|
|
|
+ } else {
|
|
|
|
+ storeIndex(ib, ibi, 0, v1);
|
|
|
|
+ storeIndex(ib, ibi, 1, v2);
|
|
|
|
+ storeIndex(ib, ibi, 2, v3);
|
|
|
|
+
|
|
|
|
+ storeIndex(ib, ibi, 3, v1);
|
|
|
|
+ storeIndex(ib, ibi, 4, v3);
|
|
|
|
+ storeIndex(ib, ibi, 5, v4);
|
|
|
|
+ }
|
|
|
|
+ break;
|
|
}
|
|
}
|
|
- break;
|
|
|
|
- }
|
|
|
|
case Lines2D.RoundAnchorCap:
|
|
case Lines2D.RoundAnchorCap:
|
|
- {
|
|
|
|
- let cpos = Math.sqrt(t * t - ht * ht);
|
|
|
|
- let center = new Vector2(cpos, 0);
|
|
|
|
- let curA = Tools.ToRadians(-150);
|
|
|
|
- let incA = Tools.ToRadians(300) / (sd - 1);
|
|
|
|
-
|
|
|
|
- if (borderMode) {
|
|
|
|
- let ii = 0;
|
|
|
|
-
|
|
|
|
- for (let i = 0; i < sd; i++) {
|
|
|
|
- let v1 = storeVertex(vb, vbi, i * 2 + 0, pos, angle, new Vector2(cpos + Math.cos(curA) * t, Math.sin(curA) * t), null);
|
|
|
|
- let v2 = storeVertex(vb, vbi, i * 2 + 1, pos, angle, new Vector2(cpos + Math.cos(curA) * (t + bt), Math.sin(curA) * (t + bt)), contour);
|
|
|
|
-
|
|
|
|
- if (i > 0) {
|
|
|
|
- storeIndex(ib, ibi, ii++, v1 - 2);
|
|
|
|
- storeIndex(ib, ibi, ii++, v2 - 2);
|
|
|
|
- storeIndex(ib, ibi, ii++, v2);
|
|
|
|
-
|
|
|
|
- storeIndex(ib, ibi, ii++, v1 - 2);
|
|
|
|
- storeIndex(ib, ibi, ii++, v2);
|
|
|
|
- storeIndex(ib, ibi, ii++, v1);
|
|
|
|
|
|
+ {
|
|
|
|
+ let cpos = Math.sqrt(t * t - ht * ht);
|
|
|
|
+ let center = new Vector2(cpos, 0);
|
|
|
|
+ let curA = Tools.ToRadians(-150);
|
|
|
|
+ let incA = Tools.ToRadians(300) / (sd - 1);
|
|
|
|
+
|
|
|
|
+ if (borderMode) {
|
|
|
|
+ let ii = 0;
|
|
|
|
+
|
|
|
|
+ for (let i = 0; i < sd; i++) {
|
|
|
|
+ let v1 = storeVertex(vb, vbi, i * 2 + 0, pos, angle, new Vector2(cpos + Math.cos(curA) * t, Math.sin(curA) * t), null);
|
|
|
|
+ let v2 = storeVertex(vb, vbi, i * 2 + 1, pos, angle, new Vector2(cpos + Math.cos(curA) * (t + bt), Math.sin(curA) * (t + bt)), contour);
|
|
|
|
+
|
|
|
|
+ if (i > 0) {
|
|
|
|
+ storeIndex(ib, ibi, ii++, v1 - 2);
|
|
|
|
+ storeIndex(ib, ibi, ii++, v2 - 2);
|
|
|
|
+ storeIndex(ib, ibi, ii++, v2);
|
|
|
|
+
|
|
|
|
+ storeIndex(ib, ibi, ii++, v1 - 2);
|
|
|
|
+ storeIndex(ib, ibi, ii++, v2);
|
|
|
|
+ storeIndex(ib, ibi, ii++, v1);
|
|
|
|
+ }
|
|
|
|
+ curA += incA;
|
|
}
|
|
}
|
|
|
|
+ } else {
|
|
|
|
+ let c = storeVertex(vb, vbi, 0, pos, angle, center, null);
|
|
|
|
+ storeVertex(vb, vbi, 1, pos, angle, new Vector2(cpos + Math.cos(curA) * t, Math.sin(curA) * t), null); // contour maybe TODO
|
|
curA += incA;
|
|
curA += incA;
|
|
|
|
+ for (let i = 1; i < sd; i++) {
|
|
|
|
+ let v2 = storeVertex(vb, vbi, i + 1, pos, angle, new Vector2(cpos + Math.cos(curA) * t, Math.sin(curA) * t), contour);
|
|
|
|
+
|
|
|
|
+ storeIndex(ib, ibi, i * 3 + 0, c);
|
|
|
|
+ storeIndex(ib, ibi, i * 3 + 1, v2 - 1);
|
|
|
|
+ storeIndex(ib, ibi, i * 3 + 2, v2);
|
|
|
|
+ curA += incA;
|
|
|
|
+ }
|
|
|
|
+ storeIndex(ib, ibi, sd * 3 + 0, c);
|
|
|
|
+ storeIndex(ib, ibi, sd * 3 + 1, c + 1);
|
|
|
|
+ storeIndex(ib, ibi, sd * 3 + 2, c + sd);
|
|
}
|
|
}
|
|
- } else {
|
|
|
|
- let c = storeVertex(vb, vbi, 0, pos, angle, center, null);
|
|
|
|
- storeVertex(vb, vbi, 1, pos, angle, new Vector2(cpos + Math.cos(curA) * t, Math.sin(curA) * t), null); // contour maybe TODO
|
|
|
|
- curA += incA;
|
|
|
|
- for (let i = 1; i < sd; i++) {
|
|
|
|
- let v2 = storeVertex(vb, vbi, i + 1, pos, angle, new Vector2(cpos + Math.cos(curA) * t, Math.sin(curA) * t), contour);
|
|
|
|
-
|
|
|
|
- storeIndex(ib, ibi, i * 3 + 0, c);
|
|
|
|
- storeIndex(ib, ibi, i * 3 + 1, v2 - 1);
|
|
|
|
- storeIndex(ib, ibi, i * 3 + 2, v2);
|
|
|
|
- curA += incA;
|
|
|
|
- }
|
|
|
|
- storeIndex(ib, ibi, sd * 3 + 0, c);
|
|
|
|
- storeIndex(ib, ibi, sd * 3 + 1, c + 1);
|
|
|
|
- storeIndex(ib, ibi, sd * 3 + 2, c + sd);
|
|
|
|
|
|
+ break;
|
|
}
|
|
}
|
|
- break;
|
|
|
|
- }
|
|
|
|
case Lines2D.DiamondAnchorCap:
|
|
case Lines2D.DiamondAnchorCap:
|
|
- {
|
|
|
|
- let vi = 0;
|
|
|
|
- let c = borderMode ? null : contour;
|
|
|
|
- let v1 = storeVertex(vb, vbi, vi++, pos, angle, new Vector2(0, ht), c);
|
|
|
|
- let v2 = storeVertex(vb, vbi, vi++, pos, angle, new Vector2(ht, t), c);
|
|
|
|
- let v3 = storeVertex(vb, vbi, vi++, pos, angle, new Vector2(ht * 3, 0), c);
|
|
|
|
- let v4 = storeVertex(vb, vbi, vi++, pos, angle, new Vector2(ht, -t), c);
|
|
|
|
- let v5 = storeVertex(vb, vbi, vi++, pos, angle, new Vector2(0, -ht), c);
|
|
|
|
-
|
|
|
|
- if (borderMode) {
|
|
|
|
- let f = Math.sqrt(bt * bt * 2);
|
|
|
|
- let v6 = storeVertex(vb, vbi, vi++, pos, angle, new Vector2(-f, ht), contour);
|
|
|
|
- let v7 = storeVertex(vb, vbi, vi++, pos, angle, new Vector2(ht, t + f), contour);
|
|
|
|
- let v8 = storeVertex(vb, vbi, vi++, pos, angle, new Vector2(ht * 3 + f, 0), contour);
|
|
|
|
- let v9 = storeVertex(vb, vbi, vi++, pos, angle, new Vector2(ht, -(t + f)), contour);
|
|
|
|
- let v10 = storeVertex(vb, vbi, vi++, pos, angle, new Vector2(-f, -ht), contour);
|
|
|
|
-
|
|
|
|
- let ii = 0;
|
|
|
|
- storeIndex(ib, ibi, ii++, v6); storeIndex(ib, ibi, ii++, v7); storeIndex(ib, ibi, ii++, v1);
|
|
|
|
- storeIndex(ib, ibi, ii++, v1); storeIndex(ib, ibi, ii++, v7); storeIndex(ib, ibi, ii++, v2);
|
|
|
|
-
|
|
|
|
- storeIndex(ib, ibi, ii++, v2); storeIndex(ib, ibi, ii++, v7); storeIndex(ib, ibi, ii++, v8);
|
|
|
|
- storeIndex(ib, ibi, ii++, v2); storeIndex(ib, ibi, ii++, v8); storeIndex(ib, ibi, ii++, v3);
|
|
|
|
-
|
|
|
|
- storeIndex(ib, ibi, ii++, v3); storeIndex(ib, ibi, ii++, v8); storeIndex(ib, ibi, ii++, v9);
|
|
|
|
- storeIndex(ib, ibi, ii++, v3); storeIndex(ib, ibi, ii++, v9); storeIndex(ib, ibi, ii++, v4);
|
|
|
|
-
|
|
|
|
- storeIndex(ib, ibi, ii++, v4); storeIndex(ib, ibi, ii++, v9); storeIndex(ib, ibi, ii++, v10);
|
|
|
|
- storeIndex(ib, ibi, ii++, v4); storeIndex(ib, ibi, ii++, v10); storeIndex(ib, ibi, ii++, v5);
|
|
|
|
-
|
|
|
|
- } else {
|
|
|
|
- storeIndex(ib, ibi, 0, v1); storeIndex(ib, ibi, 1, v2); storeIndex(ib, ibi, 2, v3);
|
|
|
|
- storeIndex(ib, ibi, 3, v1); storeIndex(ib, ibi, 4, v3); storeIndex(ib, ibi, 5, v5);
|
|
|
|
- storeIndex(ib, ibi, 6, v5); storeIndex(ib, ibi, 7, v3); storeIndex(ib, ibi, 8, v4);
|
|
|
|
|
|
+ {
|
|
|
|
+ let vi = 0;
|
|
|
|
+ let c = borderMode ? null : contour;
|
|
|
|
+ let v1 = storeVertex(vb, vbi, vi++, pos, angle, new Vector2(0, ht), c);
|
|
|
|
+ let v2 = storeVertex(vb, vbi, vi++, pos, angle, new Vector2(ht, t), c);
|
|
|
|
+ let v3 = storeVertex(vb, vbi, vi++, pos, angle, new Vector2(ht * 3, 0), c);
|
|
|
|
+ let v4 = storeVertex(vb, vbi, vi++, pos, angle, new Vector2(ht, -t), c);
|
|
|
|
+ let v5 = storeVertex(vb, vbi, vi++, pos, angle, new Vector2(0, -ht), c);
|
|
|
|
+
|
|
|
|
+ if (borderMode) {
|
|
|
|
+ let f = Math.sqrt(bt * bt * 2);
|
|
|
|
+ let v6 = storeVertex(vb, vbi, vi++, pos, angle, new Vector2(-f, ht), contour);
|
|
|
|
+ let v7 = storeVertex(vb, vbi, vi++, pos, angle, new Vector2(ht, t + f), contour);
|
|
|
|
+ let v8 = storeVertex(vb, vbi, vi++, pos, angle, new Vector2(ht * 3 + f, 0), contour);
|
|
|
|
+ let v9 = storeVertex(vb, vbi, vi++, pos, angle, new Vector2(ht, -(t + f)), contour);
|
|
|
|
+ let v10 = storeVertex(vb, vbi, vi++, pos, angle, new Vector2(-f, -ht), contour);
|
|
|
|
+
|
|
|
|
+ let ii = 0;
|
|
|
|
+ storeIndex(ib, ibi, ii++, v6); storeIndex(ib, ibi, ii++, v7); storeIndex(ib, ibi, ii++, v1);
|
|
|
|
+ storeIndex(ib, ibi, ii++, v1); storeIndex(ib, ibi, ii++, v7); storeIndex(ib, ibi, ii++, v2);
|
|
|
|
+
|
|
|
|
+ storeIndex(ib, ibi, ii++, v2); storeIndex(ib, ibi, ii++, v7); storeIndex(ib, ibi, ii++, v8);
|
|
|
|
+ storeIndex(ib, ibi, ii++, v2); storeIndex(ib, ibi, ii++, v8); storeIndex(ib, ibi, ii++, v3);
|
|
|
|
+
|
|
|
|
+ storeIndex(ib, ibi, ii++, v3); storeIndex(ib, ibi, ii++, v8); storeIndex(ib, ibi, ii++, v9);
|
|
|
|
+ storeIndex(ib, ibi, ii++, v3); storeIndex(ib, ibi, ii++, v9); storeIndex(ib, ibi, ii++, v4);
|
|
|
|
+
|
|
|
|
+ storeIndex(ib, ibi, ii++, v4); storeIndex(ib, ibi, ii++, v9); storeIndex(ib, ibi, ii++, v10);
|
|
|
|
+ storeIndex(ib, ibi, ii++, v4); storeIndex(ib, ibi, ii++, v10); storeIndex(ib, ibi, ii++, v5);
|
|
|
|
+
|
|
|
|
+ } else {
|
|
|
|
+ storeIndex(ib, ibi, 0, v1); storeIndex(ib, ibi, 1, v2); storeIndex(ib, ibi, 2, v3);
|
|
|
|
+ storeIndex(ib, ibi, 3, v1); storeIndex(ib, ibi, 4, v3); storeIndex(ib, ibi, 5, v5);
|
|
|
|
+ storeIndex(ib, ibi, 6, v5); storeIndex(ib, ibi, 7, v3); storeIndex(ib, ibi, 8, v4);
|
|
|
|
+ }
|
|
|
|
+ break;
|
|
}
|
|
}
|
|
- break;
|
|
|
|
- }
|
|
|
|
}
|
|
}
|
|
|
|
|
|
return null;
|
|
return null;
|
|
@@ -895,7 +895,7 @@
|
|
direction(next, cur, lineB);
|
|
direction(next, cur, lineB);
|
|
|
|
|
|
var miterLen = computeMiter(tangent, miter, lineA, lineB);
|
|
var miterLen = computeMiter(tangent, miter, lineA, lineB);
|
|
- store(vb, contour, i, total, this.points[i], miter, miterLen*ht, miterLen*bt, i - 1);
|
|
|
|
|
|
+ store(vb, contour, i, total, this.points[i], miter, miterLen * ht, miterLen * bt, i - 1);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -946,7 +946,7 @@
|
|
let max = total * 2;
|
|
let max = total * 2;
|
|
let triCount = (count - (this.closed ? 0 : 1)) * 2;
|
|
let triCount = (count - (this.closed ? 0 : 1)) * 2;
|
|
let ib = new Float32Array(triCount * 3 + startCapInfo.ibsize + endCapInfo.ibsize);
|
|
let ib = new Float32Array(triCount * 3 + startCapInfo.ibsize + endCapInfo.ibsize);
|
|
- for (let i = 0; i < triCount; i+=2) {
|
|
|
|
|
|
+ for (let i = 0; i < triCount; i += 2) {
|
|
ib[i * 3 + 0] = i + 0;
|
|
ib[i * 3 + 0] = i + 0;
|
|
ib[i * 3 + 1] = i + 1;
|
|
ib[i * 3 + 1] = i + 1;
|
|
ib[i * 3 + 2] = (i + 2) % max;
|
|
ib[i * 3 + 2] = (i + 2) % max;
|
|
@@ -1072,13 +1072,13 @@
|
|
return true;
|
|
return true;
|
|
}
|
|
}
|
|
|
|
|
|
- private static _noCap = 0;
|
|
|
|
- private static _roundCap = 1;
|
|
|
|
- private static _triangleCap = 2;
|
|
|
|
- private static _squareAnchorCap = 3;
|
|
|
|
- private static _roundAnchorCap = 4;
|
|
|
|
|
|
+ private static _noCap = 0;
|
|
|
|
+ private static _roundCap = 1;
|
|
|
|
+ private static _triangleCap = 2;
|
|
|
|
+ private static _squareAnchorCap = 3;
|
|
|
|
+ private static _roundAnchorCap = 4;
|
|
private static _diamondAnchorCap = 5;
|
|
private static _diamondAnchorCap = 5;
|
|
- private static _arrowCap = 6;
|
|
|
|
|
|
+ private static _arrowCap = 6;
|
|
|
|
|
|
private static _roundCapSubDiv = 36;
|
|
private static _roundCapSubDiv = 36;
|
|
|
|
|