NaKeR's Bedrock Camera Lib 图标

NaKeR's Bedrock Camera Lib

作者:rebot | 分类:模组

价格:0 墨喵币 下载量:0 点赞:0 版本 1.0.0
本资源为搬运资源,原资源地址: https://modrinth.com/mod/bedrockcameralib
资源信息

Minecraft 版本: 1.20.1

平台: fabric

标签: library

资源介绍

NaKeR's Bedrock Camera Lib is a library for Minecraft Java (Fabric), which replicates Minecraft Bedrock's Script API Camera APIs

This mod is a library. It does not add/do anything on it's own.

This library adds similar camera APIs to the ones in bedrock!
Currently, supports setCamera and fade.

This library was written in Kotlin, so FLK is a dependency.
The library contains a bunch of easings for you to make transitions!

Installation (for developers)

Add JitPack to your repositories:

maven { url 'https://jitpack.io' }

And add Bedrock Camera Lib to your dependencies:

modImplementation 'com.github.NaKeRNarolino:BECamera:<LIB_VERSION>-<MINECRAFT_VERSION>r'

Examples in both languages(Java and Kotlin).

Java

CameraManager.INSTANCE.setCamera(
    new CameraData(
            new Vec3d(30, 30, 30), // Camera location
            new Vec3d(15, 15, 15), // The position the camera will be looking at
            new EaseOptions(
                    Easings.INSTANCE::easeInOutBack, // Easing function for the transition
                    2500 // duration in ms
            )
        )
); // Setting a custom camera

CameraManager.INSTANCE.fade(new CameraFadeOptions(
    Colors.WHITE, // Color (ARGB)
    1500, // Fade in time, ms
    2000, // Hold time, ms
    1500 // Fade out time, ms
)); // Fading the camera

Kotlin

CameraManager.setCamera(
    CameraData(
        location = Vec3d(30.0, 30.0, 30.0),
        targetLocation = Vec3d(15.0, 15.0, 15.0),
        easeOptions = EaseOptions(
            easing = Easings::easeInOutBack,
            duration = 2500
        )
    )
) // Setting a custom camera

CameraManager.fade(
    CameraFadeOptions(
        fadeColor = Colors.WHITE,
        fadeInTime = 1500,
        holdTime = 2000,
        fadeOutTime = 1500
    )
) // Fading the camera

You can also use CameraManager.clear() or CameraManager.INSTANCE.clear() to bring back player's camera state to the default one. Note that this does not affect fades.

Here's a video showcasing setCamera and fade.

下载太慢?试试 墨喵加速站,支持 Modrinth 和外网直链高速下载! 用的人越多,下载的越快!
下载与版本
评论(0)
登录 后发表评论。

暂无评论,抢个沙发吧~

举报此资源

请登录后举报

🔥 相关推荐
ShulkerRRT

价格:0 墨喵币
下载量:0

查看详情
divine workshop

价格:0 墨喵币
下载量:0

查看详情
Goat's Tool Trims

价格:0 墨喵币
下载量:0

查看详情
Danny Pack: Letalis: Vista

价格:0 墨喵币
下载量:0

查看详情