Members

Methods

### toExtrudedMeshBuffer (constant)

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

### toLineMeshBuffer (constant)

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

### toMeshBuffer (constant)

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.

### getPromiseResults(promises, [progressResolve], [progressReject])

Utility function that returns a promise that resolves after the given list of promises finishes its work.

Parameters

Return Value

A promise that is never rejected and resolves when all of the promises are each resolved or rejected. The result of the promise will be an object with three keys:<ul>

  • "successes" - contains a list of results from the promises that succeeded, in the order in which those promises were listed.
  • "failures" - contains a list of results from the promises that failed, in the order in which those promises were listed.
  • "results" - contains a list of boolean values for each promise, in the order in which the promises were listed. True means success, and false means failure.</ul> (Type: Promise) ### getPromiseResultsAll(promises, [progressResolve], [progressReject]) Utility function that returns a promise that resolves or is rejected after the given list of promises finishes its work. #### Parameters * `promises` (Type: Array.<Promise>)
    an array containing promise objects * `progressResolve` (Type: function) (optional)
    a function called as each individual promise is resolved; optional * `progressReject` (Type: function) (optional)
    a function called as each individual promise is rejected; optional #### Return Value A promise that is resolved when all of the promises are each resolved; the result will be an array of results from those promises, in the order in which those promises were listed. Will be rejected if any of the promises is rejected; the result will be an object as specified in getPromiseResults.</ul> (Type: Promise) ### getTimePosition(timer, timeInMs, intervalInMs) Gets the position of a time value within an interval. This is useful for doing animation cycles lasting a certain number of seconds, such as rotating a shape in a 5-second cycle. This method may be called any number of times each frame. #### Parameters * `timer` (Type: Object)
    An object that will hold two properties: