Clarify constants and calculations in SDF rendering
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 12.4k
- Forks
- 2.4k
- PR merge metrics
- No merged PRs in 30d
Description
There are several constants and calculations in `draw_symbol.js` and the `symbol_sdf` shaders that are difficult to interpret / understand. I'm pretty much with @lucaswoj when [he says](https://github.com/mapbox/mapbox-gl-js/pull/4226#discussion_r99930722):
> I prefer a very clear constant name (ideally googleable) to a magic number, and a magic number to a cryptic constant name.
(though I'd say a _semi_-clear constant name with a one-line comment to explain it still beats a magic number in my book)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the constants and calculations in draw_symbol.js and the symbol_sdf shaders, using the referenced pull-request discussion for context. Done means the constants are understandable through clear names or concise explanatory comments, and the rendering behavior remains unchanged.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- computer-graphics
- Issue type
- Refactor
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100