Script API - v26.60
    Preparing search index...

    Interface EaseOptions

    Contains options associated with easing between positions and/or rotations.

    import { CameraSetLocationOptions, EaseOptions, EasingType, Player, Vector3, system } from "@minecraft/server";

    // Run `/scriptevent example:cameraeasing` in chat to preview eased camera movement.
    system.afterEvents.scriptEventReceive.subscribe(({ id, sourceEntity }) => {
    if (id !== "example:cameraeasing" || !(sourceEntity instanceof Player)) return;

    const camera = sourceEntity.camera;
    const startLocation = sourceEntity.location;
    const easeOptions: EaseOptions = {
    easeTime: 2.0,
    easeType: EasingType.InOutSine,
    };

    const targetLocation: Vector3 = {
    x: startLocation.x + 8,
    y: startLocation.y + 4,
    z: startLocation.z + 8,
    };

    const locationOptions: CameraSetLocationOptions = {
    location: targetLocation,
    easeOptions,
    };

    camera.setCamera("minecraft:free", locationOptions);
    sourceEntity.sendMessage("Moving camera with InOutSine easing.");

    system.runTimeout(() => {
    camera.clear();
    sourceEntity.sendMessage("Camera reset.");
    }, 60);
    });
    interface EaseOptions {
        easeTime?: number;
        easeType?: EasingType;
    }
    Index
    easeTime?: number

    Time for the ease operation.

    easeType?: EasingType

    Type of ease operation to use.