ParametricBufferGeometry Class

Module: Animation

Parametric bufffer geometry are constructed from javascript code describing a parametric surface.

A parametric function receives a (u, v) coordinate value and returns a Vector3 with the surface point for those values.

(u, v) values are normalized and might need readjusting to match the parametric function generator domain.

Constructor

ParametricBufferGeometry

(
  • code
  • slices
  • stacks
)

Parameters:

  • code String

    Javascript code that receive (u: number, v: number, target?: Vector3) as parameters, the target paramter might be undefined.

  • slices Number

    The count of slices to use for the parametric function.

  • stacks Number

    The count of stacks to use for the parametric function.

Item Index

Methods

Methods

compile

() Function

Compile the generator code and generate a function to be passed to the geometry generator.

Returns:

Function:

Compiled function to calculate the position of the vertex from (U, V) coordinates.