read method

KeyFrame read (
  1. StreamReader reader,
  2. ActorComponent component
)
override

Implementation

static KeyFrame read(StreamReader reader, ActorComponent component) {
  KeyFrameImageVertices frame = KeyFrameImageVertices();
  if (!KeyFrameWithInterpolation.read(reader, frame)) {
    return null;
  }

  ActorImage imageNode = component as ActorImage;
  frame._vertices =
      reader.readFloat32Array(imageNode.vertexCount * 2, "value");

  imageNode.doesAnimationVertexDeform = true;

  return frame;
}