Skip to content

atl/sm/effect

import "atl/sm/effect"

Effects (sm.effect).

func Play(name string, position sm.Vec3, o PlayOptions)

Plays a one-shot effect at a position.

func Create(name string) sm.Effect

Creates an effect you control (see sm.Effect).

func CreateOn(name string, host atl.Wrapper, bone string) sm.Effect

Creates an effect attached to a host, optionally to a bone.

func Create2D(name string) sm.Effect
func CreateFirstPerson(name string) sm.Effect
func CreateSky(name string) sm.Effect

[client] Creates a screen-space, first-person or sky effect.

func EstimateSize(name string, parameters atl.Value) float64

[client] The radius of influence of name with these parameters (nil: none).

func PlayHosted(name string, host atl.Wrapper, o HostedOptions)

[client] A fire-and-forget effect that follows host (Shape, Interactable, Character or Harvestable).

type PlayOptions struct {
Velocity *sm.Vec3
Rotation *sm.Quat
Scale *sm.Vec3
Parameters atl.Value
}

Options for effect.Play.

type HostedOptions struct {
Bone string
Parameters atl.Value
Axis *int
StartTime *float64
OffsetPosition *sm.Vec3
OffsetRotation *sm.Quat
Scale *sm.Vec3
}

Options for effect.PlayHosted.