WebGLControl.renderMesh

Syntax

renderMesh(mesh_id: String || PP.Ui.WebGLMesh);

Parameters

mesh_id. Object or its identifier.

Description

The renderMesh method renders multifaceted object surface.

Example

To execute the example, the HTML page must contain the MapChart component named map (see Example of Creating the MapChart Component). Spherical map must be opened. Change direct light and encompassing light of the spherical map:

// Get control of spherical map
var control = map.getGLControl();
// Clear draw area
control.clear();
// Set new direct light
control.setDirectLight("#60A1FA");
// Set new encompassing light
control.setAmbientLight("#000000");
// Refresh the map surface
for (var i=0; i<327; i++) {
    control.renderMesh(control.getMesh(i));
}

As a result the map looks as follows:

See also:

WebGLControl