Skip to content
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

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

arno-fukuda
Copy link

#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.

Copy link

vercel bot commented Apr 15, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
cobe ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 24, 2024 2:57pm

src/index.d.ts Outdated Show resolved Hide resolved
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)

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]>
src/index.js Outdated Show resolved Hide resolved
Co-authored-by: Shlomi Sela <[email protected]>
@KrenTrox
Copy link

@shuding wdyt?

@shuding
Copy link
Owner

shuding commented Dec 25, 2024

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants