public final class FakeGltfEntity extends FakeEntity


Test-only implementation of GltfEntity

Summary

Public constructors

Public methods

int

Returns the current animation state of the glTF entity.

void
setMaterialOverride(
    @NonNull MaterialResource material,
    @NonNull String meshName
)

Sets a material override for a mesh in the glTF model.

void
startAnimation(boolean loop, String animationName)

Starts the animation with the given name.

void

Stops the animation of the glTF entity.

Public constructors

FakeGltfEntity

Added in 1.0.0-alpha04
public FakeGltfEntity()

Public methods

getAnimationState

Added in 1.0.0-alpha04
public int getAnimationState()

Returns the current animation state of the glTF entity.

setMaterialOverride

Added in 1.0.0-alpha04
public void setMaterialOverride(
    @NonNull MaterialResource material,
    @NonNull String meshName
)

Sets a material override for a mesh in the glTF model.

Parameters
@NonNull MaterialResource material

The material to use for the mesh.

@NonNull String meshName

The name of the mesh to use the material for.

startAnimation

Added in 1.0.0-alpha04
public void startAnimation(boolean loop, String animationName)

Starts the animation with the given name.

Parameters
boolean loop

Whether the animation should loop.

String animationName

The name of the animation to start. If null is supplied, will play the first animation found in the glTF.

stopAnimation

Added in 1.0.0-alpha04
public void stopAnimation()

Stops the animation of the glTF entity.