
A: addEventListener and animate ankle arm attach B: bands blend C: chaotic chest Child D: dress E: elbow everybody F: foot forearm H: head I: index K: knee L: latex leg lockTo M: Man middle O: or P: pinky pointAt position postureString posture R: random regular ring S: setAnimationLoop shin slice T: target thigh thumb time torso V: velour W: waist Woman wrist X: x Y: y Z: z
Disfigure classes are used to define figures.
Class. Creates a man figure. The Optional parameter defines figure height in meters. Default height 1.80.
Class. Creates a woman figure. The optional parameter defines figure height in meters. Default height 1.70.
Class. Creates a child figure. The optional parameter defines figure height in meters. Default height 1.35.
Disfigure figures have the same structure independent on their appearance.
Vector3 property. Gets or sets the position of a figure in 3D space.
Numeric properties. Get or set the x, y or z coordinate of a figure in 3D space.
Object property. Gets or sets the posture of a figure. The posture is a JavaScript object with specific structure.
String read-only property. Gets the posture of a figure as string.
Method. Sets the posture of a figure to be a lerp blend of postureA and postureB based on coefficient k∈[0,1].
Method. Defines the dressing of a figure. The description of the clothing is an array of range and material functions: [ defaultMaterial, slice_1, material_1, … slice_N, material_N]. Slices are function that select portion of the figure and materials are clothing materials.
Body part properties. The bodypart is the name of a body part, one of these:
Each body part has the same set of properties, although some are deactivated. For example, a knee can rotate around X axis and partly around Z axis.
Numeric property. Gets or sets the rotation angle in degrees around the X “shoulder” axis.
Numeric property. Gets or sets the rotation angle in degrees around the Y “head” axis.
Numeric property. Gets or sets the rotation angle in degrees around the Z “chest” axis.
Method. Attaches 3D object to a body part. Object’s position and orientation are relative to the body part.
Method. Calculates the global coordinate of point with local point ( localX, localY, localZ ) on a body part.
Method. Moves a figure so that local point (localX, localY, localZ) on a body part is at global point (globalX, globalY, globalZ). If the local point is not provided, then the body part origin (0,0,0) is used instead.
Function. Sets animation function called once every frame. The callback function receives the time in miliseconds.
Function. Generates uniformly distributed random number in interval [min,max). By default the optional parameters are min=-1 and max=1.
Function. Generates an oscilating sine sequence of numbers in interval [min,max]. By default the optional parameters are offset=0, min=-1 and max=1. Parameter offset shifts the oscillation forward or backward in time.
Function. Generates a chaotic oscilating sequence of numbers in interval [min,max]. By default the optional parameters are offset=0, min=-1 and max=1. Internally uses a simplex noise function. Parameter offset shifts the sequence across the time, i.e. two generators with different offsets produce different sequences.
Global animate event. Triggered once on every frame.
Local animate event. Triggered once on every frame for each figure.
Animate event property. Time in miliseconds in global and local animate events.
Animate event property. Figure for which a local animate event is triggered.
Global array. Contains all created figures. Usually used to traverse them and do some operation on all figures.
Clothing function. Defines velour (matte) clothing material using Three.js color.
Clothing function. Defines latex (shiny) clothing material using Three.js color.
Clothing function. Makes a composite material of alternating horizontal bands of material_1 and material_2. The width of each band is defined in meters. The optional options parameter provides additional properties for the band.
Clothing function. Defines a slice of a figure to be dressed in given material. Parameters from and to define the start and the end of the slice, measured in meters. The optional options parameter provides additional properties for the slice.
Additionally, slices could be curved as a wave when a non-zero wave option is provided.
Clothing chained method. Combines slices into more complex shapes by intersecting them. The result slice contains points common for both slide_1 and slide_2.
Clothing chained method. Combines slices into more complex shapes by uniting them. The result slice contains points from any of the slides.