Client API. The Codename One framework your app is built on: this runs on the device, not in a backend.

public static final class GltfScene.Channel

  1. Object
  2. GltfScene.Channel
Keyframes for one property of one node.

Fields

public static final int TRANSLATION = 0The channel animates a node’s translation.
public static final int ROTATION = 1The channel animates a node’s rotation.
public static final int SCALE = 2The channel animates a node’s scale.

Methods

public int getNode()The animated node.
public int getPath()TRANSLATION, ROTATION or SCALE.
public float[] getTimes()Keyframe times in seconds, ascending.
public float[] getValues()The keyframe values: 3 floats per key, 4 for a rotation.
public boolean isStep()True for STEP interpolation, false for LINEAR.
public void sample(float time, float[] dst)Samples the channel at time (clamped to the keys) into dst.

Inherited methods

Field details

TRANSLATION

public static final int TRANSLATION = 0
The channel animates a node’s translation.

ROTATION

public static final int ROTATION = 1
The channel animates a node’s rotation.

SCALE

public static final int SCALE = 2
The channel animates a node’s scale.

Method details

getNode

public int getNode()
The animated node.

getPath

public int getPath()
TRANSLATION, ROTATION or SCALE.

getTimes

public float[] getTimes()
Keyframe times in seconds, ascending.

getValues

public float[] getValues()
The keyframe values: 3 floats per key, 4 for a rotation.

isStep

public boolean isStep()
True for STEP interpolation, false for LINEAR.

sample

public void sample(float time, float[] dst)
Samples the channel at time (clamped to the keys) into dst.