animation

package
v0.0.32 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2024 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 added in v0.0.6

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 added in v0.0.6

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

Clear ....

func (*Ease) Play added in v0.0.6

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

Play ...

func (*Ease) Sync added in v0.0.23

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

type Fade added in v0.0.5

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 added in v0.0.5

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

Play ...

type NopAnimation added in v0.0.23

type NopAnimation struct{}

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

func (NopAnimation) Clear added in v0.0.23

func (NopAnimation) Play added in v0.0.23

type Smooth added in v0.0.6

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 added in v0.0.6

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

Clear ...

func (*Smooth) Play added in v0.0.6

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

Play ...

func (*Smooth) Sync added in v0.0.23

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