Skip to content

Commit 988f311

Browse files
Fix color is number[] instead of [number, number, number] TS error
1 parent 53586f5 commit 988f311

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/primitives/arrow.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import { getBasicMaterial } from '../shader.js';
2323
* for the high-level description of what is being rendered.
2424
* @type {import('./index.js').PrimitiveFunction}
2525
*/
26-
export default function ({ color = [0, 0, 0], coords, opacity = 1 }, uniforms, extent) {
26+
export default function ({ color = /** @type {[number, number, number]} */([0, 0, 0]), coords, opacity = 1 }, uniforms, extent) {
2727
const material = getBasicMaterial(color, opacity);
2828

2929
const group = new Group();

src/primitives/line.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import { getBasicMaterial } from '../shader.js';
2020
*
2121
* @type {import('./index.js').PrimitiveFunction}
2222
*/
23-
export default function ({ color = [0, 0, 0], coords, dashed = false, gapSize = 10, opacity = 1 }, uniforms, extent, container) {
23+
export default function ({ color = /** @type {[number, number, number]} */([0, 0, 0]), coords, dashed = false, gapSize = 10, opacity = 1 }, uniforms, extent, container) {
2424
return new Line(
2525
new BufferGeometry().setAttribute(
2626
'position',

0 commit comments

Comments
 (0)