infinite-canvas-tutorial
infinite-canvas-tutorial copied to clipboard
Incorrect dasharray of sub paths in polyline
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