animation

package
v0.0.0-...-10637f8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 13, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Animation

type Animation interface {
	// Play starts the animation on the given connection using the new server's GameData.
	Play(conn *minecraft.Conn, serverGameData minecraft.GameData)
	// Clear stops the animation previously started on the connection using the new server's GameData.
	Clear(conn *minecraft.Conn, serverGameData minecraft.GameData)
}

Animation is an interface used by sessions to manage visual animations during server transfers.

type Dimension

type Dimension struct{}

Dimension displays the dimension change screen to the player.

func (*Dimension) Clear

func (animation *Dimension) Clear(conn *minecraft.Conn, serverGameData minecraft.GameData)

Clear ...

func (*Dimension) Play

func (animation *Dimension) Play(conn *minecraft.Conn, serverGameData minecraft.GameData)

Play ...

type Ease

type Ease struct {
	Flicker bool
	Colour  color.RGBA
	Timing  protocol.CameraFadeTimeData

	Position mgl32.Vec3
	Yaw      float32
	// contains filtered or unexported fields
}

Ease represents an easing camera animation that moves the player's camera upwards in five steps, each step moving 25 blocks and pausing for 300 milliseconds before the next movement. After the animation concludes, it smoothly returns the camera downward to the player's character.

func (*Ease) Clear

func (animation *Ease) Clear(conn *minecraft.Conn, serverGameData minecraft.GameData)

Clear ....

func (*Ease) Play

func (animation *Ease) Play(conn *minecraft.Conn, _ minecraft.GameData)

Play ...

func (*Ease) Sync

func (animation *Ease) Sync(conn *minecraft.Conn)

type Fade

type Fade struct {
	NopAnimation

	Colour color.RGBA
	Timing protocol.CameraFadeTimeData
}

Fade represents a static fade animation that gradually changes the screen to a specified color. The animation's timing values for fade-in, fade-out, and wait durations must be carefully chosen, as the animation does not dynamically adjust to changes in transfer time.

func (*Fade) Play

func (animation *Fade) Play(conn *minecraft.Conn, _ minecraft.GameData)

Play ...

type NopAnimation

type NopAnimation struct{}

NopAnimation is a no-operation implementation of the Animation interface.

func (NopAnimation) Clear

func (NopAnimation) Play

type Smooth

type Smooth struct {
	Colour color.RGBA
	Timing protocol.CameraFadeTimeData

	Position mgl32.Vec3
	Yaw      float32
	// contains filtered or unexported fields
}

Smooth represents a camera animation that smoothly moves the player's camera upwards towards the sky and returns it downward to the player's character when the animation concludes.

func (*Smooth) Clear

func (animation *Smooth) Clear(conn *minecraft.Conn, serverGameData minecraft.GameData)

Clear ...

func (*Smooth) Play

func (animation *Smooth) Play(conn *minecraft.Conn, _ minecraft.GameData)

Play ...

func (*Smooth) Sync

func (animation *Smooth) Sync(conn *minecraft.Conn)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL