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

API to draw points on top of VTS earth environment #193

Open
shrikant-panchal opened this issue Jun 25, 2020 · 2 comments
Open

API to draw points on top of VTS earth environment #193

shrikant-panchal opened this issue Jun 25, 2020 · 2 comments

Comments

@shrikant-panchal
Copy link

The APIs to draw line, circle or image are exposed and available for use.
Do we have any API for drawing a point? If No, is there any example available that demonstrates how to draw points?

Any help would be appreciated!

@davidmtech
Copy link
Member

There is no API for drawing point. But you can use renderer.drawImage to draw points. Small image is almost as good as point. In case you need to draw many points like point cloud, you can modify rendere.drawMesh function to support points as rendering primitive:

Just add option to this function:

RendererInterface.prototype.drawMesh = function(options) {

Pass that option into this function:

GpuMesh.prototype.draw = function(program, attrVertex, attrUV, attrUV2, attrBarycenteric, skipDraw) {

and replace gl.TRIANGLES with gl.POINTS

@skazemi
Copy link
Contributor

skazemi commented Aug 6, 2020

The APIs to draw line, circle or image are exposed and available for use.
Do we have any API for drawing a point? If No, is there any example available that demonstrates how to draw points?

Any help would be appreciated!

You can do it using renderer.drawLineString() and passing an array with a single point in it.

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

No branches or pull requests

3 participants