entity

package
v0.7.39 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2026 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	InfoTypeMap1     = stingray.ThinHash{Value: 0xcefdb0f8}
	InfoTypeMap2     = stingray.ThinHash{Value: 0x8fd0d44d}
	InfoTypeIntFloat = stingray.ThinHash{Value: 0x0c31fb41}
	InfoTypeMatrix   = stingray.ThinHash{Value: 0x69e14b13}
	InfoTypeString   = stingray.ThinHash{Value: 0x297611d5}
)

Functions

This section is empty.

Types

type Component

type Component struct {
	*ComponentHeader
	*ComponentData
	UnkInt    *uint32
	UnkFloat  *float32
	Rotation  *mgl32.Mat3
	Position  *mgl32.Vec3
	Scale     *mgl32.Vec3
	UnkInts   []int32
	UnkString string
}

func (Component) MarshalBinary added in v0.7.36

func (c Component) MarshalBinary() ([]byte, error)

type ComponentData

type ComponentData struct {
	SettingNames []stingray.ThinHash
	Settings     []SettingData
}

type ComponentHeader

type ComponentHeader struct {
	CategoryNames []stingray.ThinHash
}

type Entity

type Entity struct {
	Header
	UnknownInts []int32
	Infos       []Info
}

func (Entity) MarshalBinary added in v0.7.36

func (e Entity) MarshalBinary() ([]byte, error)
type Header struct {
	Magic [6]byte

	UnkInt0         uint32
	UnkInt1         uint32
	UnkHash         stingray.Hash
	SignedIntsCount uint32
	EntityDataCount uint32
	// contains filtered or unexported fields
}

type Info

type Info struct {
	InfoType            stingray.ThinHash
	ComponentPadding    []uint32 // only observed zeroes so far but may have a more significant meaning
	ComponentThinHashes []stingray.ThinHash
	Components          []Component
}

type SettingData

type SettingData struct {
	Type        SettingType
	ShaderName  stingray.ThinHash
	ShaderIndex uint32
	Data        any // May be a uint32, float32, string, or []float32
}

type SettingType

type SettingType uint64
const (
	SettingType_Unknown SettingType = iota
	SettingType_U32
	SettingType_F32
	SettingType_String
	SettingType_Vector
)

func (SettingType) MarshalText

func (p SettingType) MarshalText() ([]byte, error)

func (SettingType) String

func (i SettingType) String() string

func (*SettingType) UnmarshalText added in v0.7.36

func (p *SettingType) UnmarshalText(text []byte) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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