Onion Skin End

Returns a number describing the end frame of onion skinning.

Syntax

function getOnionEndIndex(state) {
  return Math.min(
    state.player.maxIndex, Math.max(
      0, Math.floor(state.player.index) + state.renderer.onionSkinFramesAfter
    )
  );
}