-
Notifications
You must be signed in to change notification settings - Fork 182
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ISSUE-19] feature: allow configuring maxMarkers #86
base: main
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
src/index.js
Outdated
@@ -170,7 +171,7 @@ export default (canvas, opts) => { | |||
} | |||
} | |||
if (state[OPT_MARKERS] !== undefined) { | |||
uniforms[GLSLX_NAME_MARKERS].value = mapMarkers(state[OPT_MARKERS]) | |||
uniforms[GLSLX_NAME_MARKERS].value = mapMarkers(state[OPT_MARKERS], opts[OPT_MAX_MARKERS] || 64) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that 64
should be extracted into a const.
Co-authored-by: Shlomi Sela <[email protected]>
Co-authored-by: Shlomi Sela <[email protected]>
@shuding wdyt? |
I think if we really want to render a lot more markers by sacrificing the performance (4-5x slower), we can just change 64 to 300 without an extra config. I'm ok with that with a warning in dev. The reason that there's this limitation is you should not really do that, or this library itself needs significant improvements (I mentioned in other comments). |
#19
We increase the baked in maximum to 300.
Then through options we allow overriding (0-300), with 64 being the default if not provided.