@minecraft
    正在准备搜索索引...

    类 Camera

    Contains methods relating to the active camera for the specified player.

    索引

    属性

    isValid: boolean

    Returns whether the Camera is valid to access and use. A Camera is considered valid when the owning Player of the Camera is loaded and valid itself.

    方法

    • 世界修改

      返回 void

      Clears the active camera for the specified player. Causes the specified players to end any in-progress camera perspectives, including any eased camera motions, and return to their normal perspective.

      This function can throw errors.

    • 世界修改

      参数

      • 可选fadeCameraOptions: CameraFadeOptions

        Additional options around camera fade operations.

      返回 void

      Begins a camera fade transition. A fade transition is a full-screen color that fades-in, holds, and then fades-out.

      This function can throw errors.

    • 预览版 世界修改

      参数

      • cameraPreset: string

        Identifier of a camera preset file defined within JSON.

      • 可选easeOptions: EaseOptions

        Options to ease the camera back to its original position and rotation.

      返回 void

      Sets the current active camera for the specified player and resets the position and rotation to the values defined in the JSON.

      This function can throw errors.