world

package
v0.5.6 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2023 License: AGPL-3.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const MaxPosUpdateInterval = 60 * 5

MaxPosUpdateInterval : send user position at least ones per 5 min, even if user is not moving

View Source
const PosUpdateInterval = 500 * time.Millisecond

Variables

This section is empty.

Functions

This section is empty.

Types

type CorePluginInstance

type CorePluginInstance struct {
	PluginInterface mplugin.PluginInterface
}

func (CorePluginInstance) Destroy

func (instance CorePluginInstance) Destroy() error

func (CorePluginInstance) Init

func (instance CorePluginInstance) Init() error

func (CorePluginInstance) Run

func (instance CorePluginInstance) Run() error

type DecorationMetadata

type DecorationMetadata struct {
	AssetID  umid.UMID  `json:"asset_id" db:"asset_id"`
	Position cmath.Vec3 `json:"position" db:"position"`
	// contains filtered or unexported fields
}

type Metadata

type Metadata struct {
	LOD              []uint32             `json:"lod" db:"lod"`
	Decorations      []DecorationMetadata `json:"decorations,omitempty" db:"decorations,omitempty"`
	AvatarController umid.UMID            `json:"avatar_controller" db:"avatar_controller"`
	SkyboxController umid.UMID            `json:"skybox_controller" db:"skybox_controller"`
}

type World

type World struct {
	*object.Object
	// contains filtered or unexported fields
}

func NewWorld

func NewWorld(id umid.UMID, db database.DB, media *media.Media) *World

func (*World) AddObjectToAllObjects added in v0.4.0

func (w *World) AddObjectToAllObjects(object universe.Object) error

func (*World) AddUser

func (w *World) AddUser(user universe.User, updateDB bool) error

func (*World) FilterAllObjects added in v0.4.0

func (w *World) FilterAllObjects(predicateFn universe.ObjectsFilterPredicateFn) map[umid.UMID]universe.Object

func (*World) GetAllObjects added in v0.4.0

func (w *World) GetAllObjects() map[umid.UMID]universe.Object

func (*World) GetCalendar

func (w *World) GetCalendar() universe.Calendar

func (*World) GetObjectFromAllObjects added in v0.4.0

func (w *World) GetObjectFromAllObjects(objectID umid.UMID) (universe.Object, bool)

func (*World) GetSettings

func (w *World) GetSettings() *universe.WorldSettings

func (*World) GetTotalStake added in v0.4.0

func (w *World) GetTotalStake() uint8

func (*World) GetUser

func (w *World) GetUser(userID umid.UMID, recursive bool) (universe.User, bool)

func (*World) GetUserSpawnPosition

func (w *World) GetUserSpawnPosition(userID umid.UMID) cmath.Vec3

func (*World) GetUsers

func (w *World) GetUsers(recursive bool) map[umid.UMID]universe.User
func (w *World) GetWebsiteLink() string

func (*World) GetWorldAvatar added in v0.4.0

func (w *World) GetWorldAvatar() string

func (*World) Initialize

func (w *World) Initialize(ctx types.NodeContext) error

func (*World) Load

func (w *World) Load() error

func (*World) LockUIObject added in v0.4.0

func (w *World) LockUIObject(user universe.User, state uint32) bool

func (*World) RemoveObjectFromAllObjects added in v0.4.0

func (w *World) RemoveObjectFromAllObjects(object universe.Object) (bool, error)

func (*World) RemoveUser

func (w *World) RemoveUser(user universe.User, updateDB bool) (bool, error)

func (*World) Run

func (w *World) Run() error

func (*World) Save

func (w *World) Save() error

func (*World) Send

func (w *World) Send(msg *websocket.PreparedMessage, recursive bool) error

func (*World) SendUsersSpawnMessage added in v0.4.0

func (w *World) SendUsersSpawnMessage(receiver universe.User)

Send posbus.AddUsers containing all current users in the world (excluding themself).

Similar to Object.SendSpawnMessage, but not prepared like objects (stored on world). This changes more often and would require some fine-grained hooks into the add/remove user logic. (Also it just changed, since this new user was added)

func (*World) SetParent

func (w *World) SetParent(parent universe.Object, updateDB bool) error

func (*World) Stop

func (w *World) Stop() error

func (*World) TempGetSkybox added in v0.2.0

func (w *World) TempGetSkybox() *websocket.PreparedMessage

func (*World) TempSetSkybox added in v0.2.0

func (w *World) TempSetSkybox(msg *websocket.PreparedMessage)

func (*World) ToObject added in v0.4.0

func (w *World) ToObject() universe.Object

func (*World) Update

func (w *World) Update(recursive bool) error

func (*World) UpdateWorldMetadata

func (w *World) UpdateWorldMetadata() error

func (*World) UpdateWorldSettings

func (w *World) UpdateWorldSettings() error

func (*World) WriteInfluxPoint

func (w *World) WriteInfluxPoint(point *influx_write.Point) error

Jump to

Keyboard shortcuts

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