Contents
Class CameraSequenceBuilder
java.lang.Object
com.hypixel.hytale.server.core.modules.camera.CameraSequenceBuilder
Fluent builder for a short, pre-authored camera sequence: an ordered track of eased keyframes
(world position, look, optional FOV and depth of field) and a set of
CameraSequenceFlags, applied with
addFlag(byte). build() snapshots it into a list-backed CameraSequenceSource, and
sendTo(PlayerRef) begins it on a player. A system that generates keyframes lazily implements
CameraSequenceSource directly rather than using this builder.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddFlag(byte flag) build()Snapshots the current keyframes into an immutableCameraSequenceSource.keyframe(CameraKeyframeBuilder keyframe) Adds a keyframe assembled with aCameraKeyframeBuilder, for the channels the positional overloads do not carry (FOV, depth of field, inherited position or look).keyframe(org.joml.Vector3d position, Rotation3f look, float duration, EasingType easing) Adds a keyframe the camera reaches overdurationseconds from the previous keyframe, looking in an explicit direction.keyframeLookingAt(org.joml.Vector3d position, org.joml.Vector3d lookAtPoint, float duration, EasingType easing) Adds a keyframe that looks toward a fixed world point rather than holding an explicit direction.onComplete(Consumer<PlayerRef> onComplete) void
-
Constructor Details
-
CameraSequenceBuilder
public CameraSequenceBuilder()
-
-
Method Details
-
addFlag
-
baseFov
-
onComplete
-
keyframe
public CameraSequenceBuilder keyframe(@Nonnull org.joml.Vector3d position, @Nonnull Rotation3f look, float duration, @Nonnull EasingType easing) Adds a keyframe the camera reaches overdurationseconds from the previous keyframe, looking in an explicit direction. -
keyframe
Adds a keyframe assembled with aCameraKeyframeBuilder, for the channels the positional overloads do not carry (FOV, depth of field, inherited position or look). -
keyframeLookingAt
public CameraSequenceBuilder keyframeLookingAt(@Nonnull org.joml.Vector3d position, @Nonnull org.joml.Vector3d lookAtPoint, float duration, @Nonnull EasingType easing) Adds a keyframe that looks toward a fixed world point rather than holding an explicit direction. -
build
Snapshots the current keyframes into an immutableCameraSequenceSource. Keyframes added to this builder after this call do not affect the returned source. -
sendTo
-