tree

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: 12 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddObjectFromTemplate

func AddObjectFromTemplate(objectTemplate *ObjectTemplate, updateDB bool) (umid.UMID, error)

func AddWorldFromTemplate

func AddWorldFromTemplate(worldTemplate *WorldTemplate, updateDB bool) (umid.UMID, error)

This func wraps create world function with add activity

func CalcObjectSpawnPosition

func CalcObjectSpawnPosition(parentID, userID umid.UMID, src *cmath.Transform) (*cmath.Transform, error)

CalcOjbectSpawnPosition calculate the initial transform for a new object. src is an optional Transform to use for default values.

func RemoveObjectFromParent

func RemoveObjectFromParent(parent, object universe.Object, updateDB bool) (bool, error)

Types

type ObjectTemplate

type ObjectTemplate struct {
	ObjectID         *umid.UMID           `json:"object_id"`
	ObjectName       *string              `json:"object_name"`
	ObjectTypeID     umid.UMID            `json:"object_type_id"`
	ParentID         umid.UMID            `json:"parent_id"`
	OwnerID          *umid.UMID           `json:"owner_id"`
	Asset2dID        *umid.UMID           `json:"asset_2d_id"`
	Asset3dID        *umid.UMID           `json:"asset_3d_id"`
	Options          *entry.ObjectOptions `json:"options"`
	Transform        *cmath.Transform     `json:"transform"`
	Label            *string              `json:"label"`
	ObjectAttributes []*entry.Attribute   `json:"object_attributes"`
	Objects          []*ObjectTemplate    `json:"objects"`
	RandomObjects    []*ObjectTemplate    `json:"random_objects"`
}

type WorldTemplate

type WorldTemplate struct {
	ObjectTemplate
}

Jump to

Keyboard shortcuts

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