MeshShapeSampler

lumin.particles. MeshShapeSampler

new MeshShapeSampler(mesh)

Constructor

Parameters:
Name Type Description
mesh string

Mesh file (*.pkmm) to use for the sampler.

Classes

Channel

Methods

getAngularVelocity() → {vec3}

Inherited From:

Returns the angular velocity of the mesh.

Returns:

velocity

Type
vec3

getAnimation() → {string}

Returns the animation file name.

Returns:

animation file name

Type
string

getAnimLoopCount() → {number}

Returns the animation loop count.

Returns:

loop count

Type
number

getAnimTimeBegin() → {number}

Returns the animation loop start time.

Returns:

begin time

Type
number

getAnimTimeEnd() → {number}

Returns the animation loop end time.

Returns:

end time

Type
number

getAnimTimeStart() → {number}

Returns the initial start time of the animation.

Returns:

start time

Type
number

getChannels() → {number}

Returns the channels values being used for the mesh. Values are the Channel enum or'ed together.

Returns:

channels

Type
number

getLinearVelocity() → {vec3}

Inherited From:

Returns the linear velocity of the mesh.

Returns:

velocity

Type
vec3

getMesh() → {string}

Returns the mesh file name.

Returns:

mesh file name

Type
string

getScale() → {number}

Returns the scale for the shape.

Returns:

Scale

Type
number

getSubMeshIndex() → {number}

Returns the sub-mesh index to use.

Returns:

Sub-mesh index

Type
number

getType() → {lumin.particles.ShapeSampler.Type}

Inherited From:

Return the shape sampler type.

Returns:

the type

Type
lumin.particles.ShapeSampler.Type

setAngularVelocity(velocity)

Inherited From:

Sets the angular velocity to apply to the mesh.

Parameters:
Name Type Description
velocity vec3

Velocity

setAnimation(animation)

Sets the animation file (*.pksa) to use for the sampler.

Parameters:
Name Type Description
animation string

Animation file name

setAnimationTiming(beginTime, endTime, startTime, loopCount)

Sets custom params for controlling the timing of the animation. By default, the animation
will play starting at time 0, go to the natural end of the animation, and loop forever.

Parameters:
Name Type Description
beginTime number

The beginning of the animation loop.

endTime number

The end of the animation loop. Must be >= beginTime. <0 will go to the natural end
of the animation.

startTime number

Where the animation will start when first played. Must be >= beginTime and <= endTime.

loopCount number

How many times the animation will loop. If < 0, will loop infinitely.

setChannels(channels)

Sets which channels will be used for the mesh. Generally doesn't need to be called, as the
channels will be set up correctly for the sampler.

Parameters:
Name Type Description
channels number

Channel values or'ed together

setLinearVelocity(velocity)

Inherited From:

Sets the linear velocity to apply to the mesh.

Parameters:
Name Type Description
velocity vec3

Velocity

setMesh(mesh)

Sets the mesh file (*.pkmm) to use for the sampler.

Parameters:
Name Type Description
mesh string

Mesh file name

setScale(scale)

Sets the shape scale. The scale will be applied evenly to all axes.

Parameters:
Name Type Description
scale number

Scale

setSubMeshIndex(index)

Sets the sub-mesh index to use, if the mesh has multiple sub-meshes. If the mesh contains
both static and skinned sub-meshes, the index will start with the static meshes, and then
go to the skinned meshes.

Parameters:
Name Type Description
index number

Sub-mesh index.

lumin.particles. MeshShapeSampler

new MeshShapeSampler()

Default constructor

Classes

Channel

Methods

getAngularVelocity() → {vec3}

Inherited From:

Returns the angular velocity of the mesh.

Returns:

velocity

Type
vec3

getAnimation() → {string}

Returns the animation file name.

Returns:

animation file name

Type
string

getAnimLoopCount() → {number}

Returns the animation loop count.

Returns:

loop count

Type
number

getAnimTimeBegin() → {number}

Returns the animation loop start time.

Returns:

begin time

Type
number

getAnimTimeEnd() → {number}

Returns the animation loop end time.

Returns:

end time

Type
number

getAnimTimeStart() → {number}

Returns the initial start time of the animation.

Returns:

start time

Type
number

getChannels() → {number}

Returns the channels values being used for the mesh. Values are the Channel enum or'ed together.

Returns:

channels

Type
number

getLinearVelocity() → {vec3}

Inherited From:

Returns the linear velocity of the mesh.

Returns:

velocity

Type
vec3

getMesh() → {string}

Returns the mesh file name.

Returns:

mesh file name

Type
string

getScale() → {number}

Returns the scale for the shape.

Returns:

Scale

Type
number

getSubMeshIndex() → {number}

Returns the sub-mesh index to use.

Returns:

Sub-mesh index

Type
number

getType() → {lumin.particles.ShapeSampler.Type}

Inherited From:

Return the shape sampler type.

Returns:

the type

Type
lumin.particles.ShapeSampler.Type

setAngularVelocity(velocity)

Inherited From:

Sets the angular velocity to apply to the mesh.

Parameters:
Name Type Description
velocity vec3

Velocity

setAnimation(animation)

Sets the animation file (*.pksa) to use for the sampler.

Parameters:
Name Type Description
animation string

Animation file name

setAnimationTiming(beginTime, endTime, startTime, loopCount)

Sets custom params for controlling the timing of the animation. By default, the animation
will play starting at time 0, go to the natural end of the animation, and loop forever.

Parameters:
Name Type Description
beginTime number

The beginning of the animation loop.

endTime number

The end of the animation loop. Must be >= beginTime. <0 will go to the natural end
of the animation.

startTime number

Where the animation will start when first played. Must be >= beginTime and <= endTime.

loopCount number

How many times the animation will loop. If < 0, will loop infinitely.

setChannels(channels)

Sets which channels will be used for the mesh. Generally doesn't need to be called, as the
channels will be set up correctly for the sampler.

Parameters:
Name Type Description
channels number

Channel values or'ed together

setLinearVelocity(velocity)

Inherited From:

Sets the linear velocity to apply to the mesh.

Parameters:
Name Type Description
velocity vec3

Velocity

setMesh(mesh)

Sets the mesh file (*.pkmm) to use for the sampler.

Parameters:
Name Type Description
mesh string

Mesh file name

setScale(scale)

Sets the shape scale. The scale will be applied evenly to all axes.

Parameters:
Name Type Description
scale number

Scale

setSubMeshIndex(index)

Sets the sub-mesh index to use, if the mesh has multiple sub-meshes. If the mesh contains
both static and skinned sub-meshes, the index will start with the static meshes, and then
go to the skinned meshes.

Parameters:
Name Type Description
index number

Sub-mesh index.

lumin.particles. MeshShapeSampler

new MeshShapeSampler(mesh, animation)

Constructor

Parameters:
Name Type Description
mesh string

Mesh file (*.pkmm) to use for the sampler.

animation string

Animation file (*.pksa) to use for the sampler.

Extends

Classes

Channel

Methods

getAngularVelocity() → {vec3}

Inherited From:

Returns the angular velocity of the mesh.

Returns:

velocity

Type
vec3

getAnimation() → {string}

Returns the animation file name.

Returns:

animation file name

Type
string

getAnimLoopCount() → {number}

Returns the animation loop count.

Returns:

loop count

Type
number

getAnimTimeBegin() → {number}

Returns the animation loop start time.

Returns:

begin time

Type
number

getAnimTimeEnd() → {number}

Returns the animation loop end time.

Returns:

end time

Type
number

getAnimTimeStart() → {number}

Returns the initial start time of the animation.

Returns:

start time

Type
number

getChannels() → {number}

Returns the channels values being used for the mesh. Values are the Channel enum or'ed together.

Returns:

channels

Type
number

getLinearVelocity() → {vec3}

Inherited From:

Returns the linear velocity of the mesh.

Returns:

velocity

Type
vec3

getMesh() → {string}

Returns the mesh file name.

Returns:

mesh file name

Type
string

getScale() → {number}

Returns the scale for the shape.

Returns:

Scale

Type
number

getSubMeshIndex() → {number}

Returns the sub-mesh index to use.

Returns:

Sub-mesh index

Type
number

getType() → {lumin.particles.ShapeSampler.Type}

Inherited From:

Return the shape sampler type.

Returns:

the type

Type
lumin.particles.ShapeSampler.Type

setAngularVelocity(velocity)

Inherited From:

Sets the angular velocity to apply to the mesh.

Parameters:
Name Type Description
velocity vec3

Velocity

setAnimation(animation)

Sets the animation file (*.pksa) to use for the sampler.

Parameters:
Name Type Description
animation string

Animation file name

setAnimationTiming(beginTime, endTime, startTime, loopCount)

Sets custom params for controlling the timing of the animation. By default, the animation
will play starting at time 0, go to the natural end of the animation, and loop forever.

Parameters:
Name Type Description
beginTime number

The beginning of the animation loop.

endTime number

The end of the animation loop. Must be >= beginTime. <0 will go to the natural end
of the animation.

startTime number

Where the animation will start when first played. Must be >= beginTime and <= endTime.

loopCount number

How many times the animation will loop. If < 0, will loop infinitely.

setChannels(channels)

Sets which channels will be used for the mesh. Generally doesn't need to be called, as the
channels will be set up correctly for the sampler.

Parameters:
Name Type Description
channels number

Channel values or'ed together

setLinearVelocity(velocity)

Inherited From:

Sets the linear velocity to apply to the mesh.

Parameters:
Name Type Description
velocity vec3

Velocity

setMesh(mesh)

Sets the mesh file (*.pkmm) to use for the sampler.

Parameters:
Name Type Description
mesh string

Mesh file name

setScale(scale)

Sets the shape scale. The scale will be applied evenly to all axes.

Parameters:
Name Type Description
scale number

Scale

setSubMeshIndex(index)

Sets the sub-mesh index to use, if the mesh has multiple sub-meshes. If the mesh contains
both static and skinned sub-meshes, the index will start with the static meshes, and then
go to the skinned meshes.

Parameters:
Name Type Description
index number

Sub-mesh index.