Conversation
…ral to `private static readonly` object property for readability chore(GraphDataProvider): Drop trailing `,`
|
Hi @JakeSmarter! Thank you for your pull request and welcome to our community. Action RequiredIn order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you. ProcessIn order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA. Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks! |
|
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks! |
Motivation
This is just a precursor to finally fixing the annoying “Image Zoom 🐛”.
Have you read the Contributing Guidelines?
Sure, otherwise I would not be here. 😉
Contribution
This PR vectorizes (thus also optimizes a bit) the fragment shader where applicable. No new functionality has been added.
https://github.com/JakeSmarter/mapillary-js/blob/vectorize_shaders/src/api/provider/GraphDataProvider.ts#L41
The
DEFAULT_ENDPOINTcould also be aconstin the global scope, if that is something you would rather like.Should non‑texture fragments be
https://github.com/JakeSmarter/mapillary-js/blob/main/src/shader/chunk/map_color_fragment.glsl.ts#L11
transparent black or
https://github.com/JakeSmarter/mapillary-js/blob/vectorize_shaders/src/shader/chunk/map_color_fragment.glsl.ts#L9
rather opaque black?
Btw, I am not a huge fan of hard coding shader sources in the application source code and spreading them over multiple foreign programming language source files, although I do understand that there are some advantages to this approach. However, the biggest downside to this are the lack of overview, proper file management, and correct syntax highlighting. Better use
shaderSource(),attachShader(),linkProgram(), and friends. Or, build a single string out of pure shader source files. Just something to think about.Test Plan
No unit test for shaders. Just run it to see if it works for you. This PR is nothing more than a functional equivalent.