For instance a width attribute of the graphics can be passed as the width parameter of tessellate Polyline() method. In the following code snippets we focus on the polyline case, but the other cases are analogous.Īttributes from the graphic can be used to drive the values of the other parameters of the tessellate*()method of choice. The geometry type determines which tessellate*() method is called to create the mesh. When done, all the meshes are saved to the meshes member variable and the entire layer view is marked as dirty by setting needs Update to true, meaning the collection of meshes has changed but they have not been uploaded to the GPU for rendering.Įach graphic is converted to a mesh by a call to process Graphic(). In the attach() method of the custom layer view a listener is set up that will fire for any change to the graphic collection when a change is detected all the graphics are reprocessed using the custom method this.process Graphic() each call to this.process Graphic() creates a promise that resolves when the mesh for that graphic has been created. Every time that the graphics change, the layerview will reprocess all the graphics and recreate all the meshes. The custom layer is a subclass of GraphicsLayer. The update Positions() method in the original sample has been modified to convert the geometry of any graphic into triangle meshes these meshes have special per-vertex attributes that the shader program uses to render any geometry type. These helpers methods allow the developer to create triangle meshes for any geometry type, including polylines and polygons. This sample instead uses the new tessellate*() methods implemented by BaseLayerViewGL2D. It is similar to the Custom WebGL layer view sample, which triangulates points into quads. This description assumes familiarity with WebGL and custom WebGL layer views. It can be used as the starting point for complex visualizations where the developer has full control of the rendering process. This sample demonstrates how to render graphics using a custom WebGL layer view. This sample targets expert developers familiar with WebGL and hardware-accelerated rendering.This sample shows experimental functionality, please read the documentation carefully before using it in a product.Navigation Menu Tessellation helpers for custom WebGL layer views Build a custom layer view using deck.gl.Masking effect using a custom layer view.Tiling support for custom Web GL layer views.Tessellation helpers for custom Web GL layer views.Custom Elevation Layer - Thematic data as elevation.Custom Elevation Layer - Exaggerating elevation.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |