infinite-canvas-tutorial icon indicating copy to clipboard operation
infinite-canvas-tutorial copied to clipboard

Incorrect dasharray of sub paths in polyline

Open xiaoiver opened this issue 4 months ago • 0 comments

We can use [NaN, NaN] to split sub paths in a single polyline:

const polyline = new Polyline({
    points: [
        [50, 100],
        [50, 200],
        [100, 200],
        [NaN, NaN],
        [150, 200],
        [150, 100],
        [NaN, NaN],
        [250, 200],
        [250, 100],
    ],
    stroke: 'red',
    strokeWidth: 10,
    strokeDasharray: [5, 10],
    // wireframe: true,
});

But when dasharray applied, travel calculated was wrong:

[.WebGL-0x13800a76400] GL_INVALID_OPERATION: Vertex buffer is not big enough for the draw call.Understand this warningAI

xiaoiver avatar Jul 08 '25 10:07 xiaoiver