applyFrameState(frameState) {
    const size = frameState.size;
    const rotation = frameState.viewState.rotation;

    const offsetScaleMatrix = resetTransform(this.offsetScaleMatrix_);
    scaleTransform(offsetScaleMatrix, 2 / size[0], 2 / size[1]);

    const offsetRotateMatrix = resetTransform(this.offsetRotateMatrix_);
    if (rotation !== 0) {
      rotateTransform(offsetRotateMatrix, -rotation);
    }

    this.setUniformMatrixValue(
      DefaultUniform.OFFSET_SCALE_MATRIX,
      fromTransform(this.tmpMat4_, offsetScaleMatrix)
    );
    this.setUniformMatrixValue(
      DefaultUniform.OFFSET_ROTATION_MATRIX,
      fromTransform(this.tmpMat4_, offsetRotateMatrix)
    );

    this.setUniformFloatValue(
      DefaultUniform.TIME,
      (Date.now() - this.startTime_) * 0.001
    );
    this.setUniformFloatValue(DefaultUniform.ZOOM, frameState.viewState.zoom);
    this.setUniformFloatValue(
      DefaultUniform.RESOLUTION,
      frameState.viewState.resolution
    );
  }
/**
   * Sets the default matrix uniforms for a given frame state. This is called internally in `prepareDraw`.
   * @param {import("../PluggableMap.js").FrameState} frameState Frame state.
   * @private
   */
Sets the default matrix uniforms for a given frame state. This is called internally in `prepareDraw`.
Sets the default matrix uniforms for a given frame state . This is called internally in ` prepareDraw ` .
applyFrameState(frameState) {
    const size = frameState.size;
    const rotation = frameState.viewState.rotation;
    const offsetScaleMatrix = resetTransform(this.offsetScaleMatrix_);
    scaleTransform(offsetScaleMatrix, 2 / size[0], 2 / size[1]);
    const offsetRotateMatrix = resetTransform(this.offsetRotateMatrix_);
    if (rotation !== 0) {
      rotateTransform(offsetRotateMatrix, -rotation);
    }
    this.setUniformMatrixValue(
      DefaultUniform.OFFSET_SCALE_MATRIX,
      fromTransform(this.tmpMat4_, offsetScaleMatrix)
    );
    this.setUniformMatrixValue(
      DefaultUniform.OFFSET_ROTATION_MATRIX,
      fromTransform(this.tmpMat4_, offsetRotateMatrix)
    );
    this.setUniformFloatValue(
      DefaultUniform.TIME,
      (Date.now() - this.startTime_) * 0.001
    );
    this.setUniformFloatValue(DefaultUniform.ZOOM, frameState.viewState.zoom);
    this.setUniformFloatValue(
      DefaultUniform.RESOLUTION,
      frameState.viewState.resolution
    );
  }
applyFrameState ( frameState ) { const size = frameState . size ; const rotation = frameState . viewState . rotation ; const offsetScaleMatrix = resetTransform ( this . offsetScaleMatrix_ ) ; scaleTransform ( offsetScaleMatrix , 2 / size [ 0 ] , 2 / size [ 1 ] ) ; const offsetRotateMatrix = resetTransform ( this . offsetRotateMatrix_ ) ; if ( rotation !== 0 ) { rotateTransform ( offsetRotateMatrix , - rotation ) ; } this . setUniformMatrixValue ( DefaultUniform . OFFSET_SCALE_MATRIX , fromTransform ( this . tmpMat4_ , offsetScaleMatrix ) ) ; this . setUniformMatrixValue ( DefaultUniform . OFFSET_ROTATION_MATRIX , fromTransform ( this . tmpMat4_ , offsetRotateMatrix ) ) ; this . setUniformFloatValue ( DefaultUniform . TIME , ( Date . now ( ) - this . startTime_ ) * 0.001 ) ; this . setUniformFloatValue ( DefaultUniform . ZOOM , frameState . viewState . zoom ) ; this . setUniformFloatValue ( DefaultUniform . RESOLUTION , frameState . viewState . resolution ) ; }
Sets the default matrix uniforms for a given frame state.
Sets the default matrix uniforms for a given frame state .