Warning: file_put_contents(/www/wwwroot/nmbt.106988770/cache/modrinth_versions_OG9bmqj4.json): Failed to open stream: Permission denied in /www/wwwroot/nmbt.106988770/resource_detail.php on line 53
NaKeR's Bedrock Camera Lib - 墨喵 Minecraft 资源
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.

YouTube视频封面
下载与版本
评论(0)
请 登录 后发表评论。

暂无评论,抢个沙发吧~

举报此资源

请登录后举报

赞助作者

请 登录 后赞助作者。

🔥 相关推荐
Aero-Together-SMP

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

查看详情
Dum's Silly Cat Hearts

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

查看详情
Demon Craft 2

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

查看详情
Better Indicators

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

查看详情