async renderFrame(callback) {
    const { timeline, gl } = this;
    const frameData = timeline.getFrameData();

    if (timeline.isOver()) {
      callback && callback(null);
      return null;
    }

    const { type, progress, sceneStart, sceneOver, isLast, scenesIndex } = frameData;
    const creator = this.getCreator();
    let scene, data;

    // Various scene states
    // scene frameData start event
    if (sceneStart) {
      const cindex = frameData.getLastSceneIndex();
      scene = this.getSceneByIndex(cindex);
      creator.addDisplayChild(scene);
      scene.start();
    }

    // scene frame end event
    if (sceneOver && !isLast) {
      const pindex = frameData.getPrevSceneIndex();
      scene = this.getSceneByIndex(pindex);
      creator.removeDisplayChild(scene);
    }

    FFLogger.info({ pos: 'renderFrame', msg: `current frame - ${timeline.frame}` });
    timeline.nextFrame();

    // Rendering logic part
    if (type === 'normal') {
      data = this.snapshotToBuffer();
    } else {
      const currScene = this.getSceneByIndex(scenesIndex[0]);
      const nextScene = this.getSceneByIndex(scenesIndex[1]);
      creator.addOnlyDisplayChild(currScene);
      const fromBuff = this.snapshotToBuffer();
      creator.addOnlyDisplayChild(nextScene);
      const toBuff = this.snapshotToBuffer();

      const { transition } = currScene;
      const conf = this.rootConf();
      const width = conf.getVal('width');
      const height = conf.getVal('height');
      const quality = conf.getVal('cacheQuality');
      const cacheFormat = conf.getVal('cacheFormat');

      await transition.render({ type: cacheFormat, fromBuff, toBuff, progress });
      data = GLUtil.getPixelsByteArray({ gl, width, height });

      if (cacheFormat !== 'raw') {
        const canvas = CanvasUtil.draw({ width, height, data });
        data = CanvasUtil.toBuffer({ type: cacheFormat, canvas, quality });
      }
    }

    callback && callback(data);
    return data;
  }
Render a single frame, They are normal clips and transition animation clips.
@private