Documentation
¶
Index ¶
Constants ¶
View Source
const ( EasingTypeLinear = iota EasingTypeSpring EasingTypeInQuad EasingTypeOutQuad EasingTypeInOutQuad EasingTypeInCubic EasingTypeOutCubic EasingTypeInOutCubic EasingTypeInQuart EasingTypeOutQuart EasingTypeInOutQuart EasingTypeInQuint EasingTypeOutQuint EasingTypeInOutQuint EasingTypeInSine EasingTypeOutSine EasingTypeInOutSine EasingTypeInExpo EasingTypeOutExpo EasingTypeInOutExpo EasingTypeInCirc EasingTypeOutCirc EasingTypeInOutCirc EasingTypeInBounce EasingTypeOutBounce EasingTypeInOutBounce EasingTypeInBack EasingTypeOutBack EasingTypeInOutBack EasingTypeInElastic EasingTypeOutElastic EasingTypeInOutElastic )
View Source
const ( CameraShakeTypePositional uint8 = iota CameraShakeTypeRotational )
Variables ¶
View Source
var ( FreeCameraPreset = free FirstPersonCameraPreset = firstPerson ThirdPersonCameraPreset = thirdPerson ThirdPersonFrontCameraPreset = thirdPersonFront FollowOrbitCameraPreset = followOrbit FixedBoomCameraPreset = fixedBoom Presets = presets )
Functions ¶
This section is empty.
Types ¶
type CameraEase ¶
type CameraInstruction ¶
type ClearCameraInstruction ¶
type ClearCameraInstruction struct {
}
type FadeCameraInstruction ¶
type FadeCameraInstruction struct {
// FadeInDuration is the time for the screen to fully fade in.
FadeInDuration time.Duration
// WaitDuration is time to wait before fading out.
WaitDuration time.Duration
// FadeOutDuration is the time for the screen to fully fade out.
FadeOutDuration time.Duration
// Colour is the colour of the screen to fade to. This only uses the red, green and blue components.
Colour color.RGBA
}
type SetCameraInstruction ¶
type SetCameraInstruction struct {
// Preset is one of the pre-defined presets that you can find in the presets.go file.
Preset protocol.CameraPreset
// Ease represents the easing function that is used by the instruction.
Ease protocol.Optional[CameraEase]
// Position represents the position of the camera.
Position protocol.Optional[mgl32.Vec3]
// Rotation represents the rotation of the camera.
Rotation protocol.Optional[mgl32.Vec2]
// Facing is a vector that the camera will always face towards during the duration of the instruction.
Facing protocol.Optional[mgl32.Vec3]
// ViewOffset is an offset based on a pivot point to the player, causing the camera to be shifted in a
// certain direction.
ViewOffset protocol.Optional[mgl32.Vec2]
// EntityOffset is an offset from the entity that the camera should be rendered at.
EntityOffset protocol.Optional[mgl32.Vec3]
}
type ShakeInstruction ¶
type ShakeInstruction struct {
// Type is the type of shake, and is one of the constants listed above. The different type affects how
// the shake looks in game.
Type uint8
// Intensity is the intensity of the shaking. The client limits this value to 4, so anything higher may
// not work.
Intensity float32
// Duration is for how long the camera will shake for.
Duration time.Duration
}
type StopShakeInstruction ¶
type StopShakeInstruction struct {
}
type TargetCameraInstruction ¶
type TargetCameraInstruction struct {
// CenterOffset is the offset from the center of the entity that the camera should target.
CenterOffset *mgl32.Vec3
// EntityHandle is the entity handle that the camera should target.
EntityHandle *world.EntityHandle
}
Click to show internal directories.
Click to hide internal directories.