module:extras/pathtomesh

Back to documentation index.

### module:extras/pathtomesh()

The extras/pathtomesh.js module. To import all symbols in this module, either of the following can be used:

import * from "extras/pathtomesh.js";
// -- or --
import * as CustomModuleName from "extras/pathtomesh.js";

Methods

### (static) module:extras/pathtomesh.toExtrudedMeshBuffer(zStart, zEnd, [flatness], [closed])

Generates a mesh buffer consisting of “walls” that follow this graphics path approximately, and, optionally, a base and top.

Parameters

Return Value

The resulting mesh buffer. (Type: *)

### (static) module:extras/pathtomesh.toLineMeshBuffer([z], [flatness])

Generates a mesh buffer consisting of the approximate line segments that make up this graphics path.

Parameters

Return Value

The resulting mesh buffer. (Type: *)

### (static) module:extras/pathtomesh.toMeshBuffer([z], [flatness])

Decomposes this path into triangles and generates a mesh buffer with those triangles. Each triangle’s normal will point toward the z-axis, and each triangle vertex’s texture coordinates will be the same as that vertex’s position.

Parameters

Return Value

The resulting mesh buffer. (Type: *)

Back to documentation index.