VoxelFX
使用关键帧、缓动函数等,为客户端方块与物品显示实体添加动画!
制作酷炫的视觉效果,例如:
功能特性
方块与物品显示实体动画
单独或同时为方块和物品显示实体添加动画。
查看演示
关键帧与缓动函数
结合关键帧与缓动函数,为你想要的任何运动创建极其平滑的动画。参考 easings.net 来可视化缓动效果,或者在游戏中进行测试。
查看演示
叠加层(Overlays)
为任意方块(包括讲台等奇怪形状的方块)着上任意颜色。强度控制着颜色的不透明度,叠加层也支持像其他属性一样使用关键帧。
不支持物品。
查看演示
动画队列与继承
将动画排入队列以依次播放,或立即覆盖当前动画。动画可以继承前一个动画的属性,从而减少样板代码。
查看演示
循环与回调
将动画固定次数或无限次循环。通过挂钩回调,在动画生命周期的任何时刻触发逻辑。
查看演示
逐帧修饰器
在基于关键帧的值之上应用自定义的逐帧修饰器,以实现如晃动、摇摆或脉冲等难以仅用关键帧表达的效果。
注意:这些修饰器应根据上下文的 interpolatedTicks 进行缩放,以确保与任何帧率保持一致。
查看演示
实体绑定
将动画绑定到跟随实体的对象上,并可选地设置偏移量。可以在全局空间或局部空间中运行。
在上述 Nova Bomb 视频中展示。
构建器 API
一个流畅的构建器,允许你以声明式方式构造动画,通过链式调用平移、缩放、旋转、叠加层以及方块/物品通道,以最小的样板代码完成工作。
限制
NeoForge 26.1.2+
此模组仅针对客户端,这意味着所有效果都必须通过你自己的代码触发。例如,从服务器向客户端发送数据包,告知客户端播放该动画。
动画设计为纯视觉效果——请勿尝试使用它们来改变游戏状态。
此外,由于该模组仅为客户端性质,显示实体原生不支持保存到世界/持久化动画。你必须自行编写系统来实现这一点。
常规用法:
VoxelFX 包含一些可以通过 /voxelfx 运行的命令。其中最值得注意的是,demo 命令可用于运行内置的演示动画。
同样重要的是——clear 命令将清除实体缓存,移除所有视觉效果实体,以防出现任何问题。
你还可以暂停、恢复、停止或设置所有视觉效果实体的播放速度。
这不是全局状态——它仅适用于执行命令时存在的实体。
文档
请参阅 GitHub Wiki。
VoxelFX
Animate client-side block & item display entities with keyframes, easing functions, and much more!
Make cool VFX like this:
Features
Animated Block & Item Displays
Animate block and item displays separately or together.
View Demo
Keyframes & Easings
Use keyframes with easings to make super smooth animations for any movement you want. Reference easings.net to visualize easings, or test them out in game.
View Demo
Overlays
Tint any block (including weird shapes like lecterns) any color. Intensity controls how opaque the tint is, and overlays support keyframes just like every other property.
Does not support items.
View Demo
Animation Queueing & Inheritance
Queue animations to play one after another, or override the current animation immediately. Animations can inherit properties from whichever animation played before them to reduce boilerplate.
View Demo
Looping & Callbacks
Loop animations a fixed number of times or infinitely. Hook into callbacks to trigger logic at any point in an animation's lifecycle.
View Demo
Per-Frame Modifiers
Apply custom per-frame modifiers on top of the keyframed values, for effects like wobble, sway, or pulsing that aren't easily expressed as keyframes alone.
Note: These should be scaled by the context's interpolatedTicks so everything stays consistent with any framerate.
View Demo
Entity Binding
Bind animations to follow entities with an optional offset. Can operate in either global or local space.
Showcased in above Nova Bomb video.
Builder API
A fluent builder that lets you construct animations declaratively, chaining translation, scale, rotation, overlay, and block/item channels with minimal boilerplate.
Limitations
NeoForge 26.1.2+
This mod is client-only, meaning all effects will have to be triggered with your own code. For instance, sending a packet from server -> client, telling the client to play that animation.
Animations are designed to be purely visual - do not try to alter the game state using them.
Also, due to the clent-only nature of the mod, display entities do not natively support being saved to the world/persisting animations. You'd have to write your own system for that.
General Use:
VoxelFX has some commands that can be run with /voxelfx. Most notably, the demo command can be used to run built-in demo animations.
Also important - the clear command will clear out the entity cache, removing all VFX entities in case anything breaks.
You can also pause, resume, stop, or set the play speed of all VFX entities.
This is not a global state - it applies only to the entities that exist when the command is run.
Documentation
See the GitHub wiki.
评论 0
登录后参与评分
还没有评论,来抢沙发吧