Record Class CameraKeyframe
java.lang.Object
java.lang.Record
net.ixdarklord.coolcatcanvas.api.cutscene.CameraKeyframe
- Record Components:
time- when the camera is here, in ticks from the cutscene's start (fractions allowed)position- where, in the cutscene's own space (seeCutsceneAnchor)yaw- Minecraft's degrees (0 looks south, 90 west). The camera always turns the short way round between two keyframes; a full spin takes keyframes less than half a turn apartpitch- degrees down from the horizonroll- degrees of tilt around the line of sightfov- the vertical field of view in degrees, or 0 for the player's own settingeasing- how the move into this keyframe is paced; its name must be known toEasingsfor the cutscene to be saved or sentinterpolation- the shape of the move into this keyframe
public record CameraKeyframe(float time, net.minecraft.world.phys.Vec3 position, float yaw, float pitch, float roll, float fov, Easing easing, Interpolation interpolation)
extends Record
One pose a
Cutscene's camera passes through, and how it gets there from the keyframe before.-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCameraKeyframe(float time, net.minecraft.world.phys.Vec3 position, float yaw, float pitch) A keyframe reached smoothly at an even pace, with no roll and the player's own field of view.CameraKeyframe(float time, net.minecraft.world.phys.Vec3 position, float yaw, float pitch, float roll, float fov, Easing easing, Interpolation interpolation) Creates an instance of aCameraKeyframerecord class. -
Method Summary
Modifier and TypeMethodDescriptioneasing()Returns the value of theeasingrecord component.final booleanIndicates whether some other object is "equal to" this one.floatfov()Returns the value of thefovrecord component.final inthashCode()Returns a hash code value for this object.Returns the value of theinterpolationrecord component.floatpitch()Returns the value of thepitchrecord component.net.minecraft.world.phys.Vec3position()Returns the value of thepositionrecord component.floatroll()Returns the value of therollrecord component.floattime()Returns the value of thetimerecord component.final StringtoString()Returns a string representation of this record class.withEasing(Easing easing) withFov(float fov) withInterpolation(Interpolation interpolation) withRoll(float roll) withTime(float time) floatyaw()Returns the value of theyawrecord component.
-
Field Details
-
CODEC
-
-
Constructor Details
-
CameraKeyframe
public CameraKeyframe(float time, net.minecraft.world.phys.Vec3 position, float yaw, float pitch, float roll, float fov, Easing easing, Interpolation interpolation) Creates an instance of aCameraKeyframerecord class.- Parameters:
time- the value for thetimerecord componentposition- the value for thepositionrecord componentyaw- the value for theyawrecord componentpitch- the value for thepitchrecord componentroll- the value for therollrecord componentfov- the value for thefovrecord componenteasing- the value for theeasingrecord componentinterpolation- the value for theinterpolationrecord component
-
CameraKeyframe
public CameraKeyframe(float time, net.minecraft.world.phys.Vec3 position, float yaw, float pitch) A keyframe reached smoothly at an even pace, with no roll and the player's own field of view.
-
-
Method Details
-
withTime
-
withRoll
-
withFov
-
withEasing
-
withInterpolation
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
time
-
position
-
yaw
-
pitch
-
roll
-
fov
-
easing
-
interpolation
Returns the value of theinterpolationrecord component.- Returns:
- the value of the
interpolationrecord component
-