Closed funmaker closed 1 year ago
Turns out what you're trying to do isn't yet supported. At the moment you have to do scatterplot.set({ aspectRatio: 1.337 })
@flekschas this also doesn't work, aspectRatio is missing from Settable type, which scatterplot.set()
expects. In fact, there is no mention of aspectRatio
anywhere in types.d.ts
TS2345: Argument of type { aspectRatio: number; } is not assignable to parameter of type Partial<Settable>
Object literal may only specify known properties, and aspectRatio does not exist in type Partial<Settable>
Another discrepancy in types is that opacity
parameter doesn't accept number[]
, even though it does work and is used in an example in readme.
I know that the type isn't defined. What I was trying to say is that technically and irrespectively of type hints, createScatterplot({ aspectRatio: 1.377 });
is not implemented yet.
This PR should fix all three issues: https://github.com/flekschas/regl-scatterplot/pull/147. Let me know if it looks good and I'll merge it and release a new version
LGTM 👍 Thanks
regl-scatterplot
.Hi.
aspectRatio
is missing fromtypes.d.ts
, trying to specify it increateScatterplot
orscatterplot.set
throws typescript errors.Reproduction:
Error:
Also there is a typo in README.md: