Help us shape the future of Go! Take the 2026 Go Developer Survey

studio

package
v0.1.64 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2026 License: MIT Imports: 24 Imported by: 0

Documentation

Overview

Package studio serves Modlock Studio: one web page, built with the Modlock library, whose first workspace browses and draws the game's own assets from the player's install. Nothing of the game ships with Modlock; the page reads every asset through the local server from the files on disk.

Index

Constants

This section is empty.

Variables

View Source
var (
	Light_Kind_name = map[int32]string{
		0: "KIND_SUN",
		1: "KIND_POINT",
		2: "KIND_SPOT",
	}
	Light_Kind_value = map[string]int32{
		"KIND_SUN":   0,
		"KIND_POINT": 1,
		"KIND_SPOT":  2,
	}
)

Enum value maps for Light_Kind.

Functions

func Handler

func Handler(page string, assets *Assets) http.Handler

Handler returns the page in the directory page and the API of every workspace. Without assets, the page still serves and says why it has no archive to show.

Types

type Assets

type Assets struct {
	// contains filtered or unexported fields
}

Assets serves the game's own files from the player's install, read where they lie: it never copies, converts or caches them on disk. The page decodes vertex and index buffers and uploads textures in their stored GPU formats, so the server does no pixel or vertex work.

func OpenAssets

func OpenAssets(game string) *Assets

OpenAssets opens the game's archives in game, the install's game/citadel directory: pak01_dir.vpk and every map's archive in maps/. When pak01 cannot be opened, every asset route answers why, so the page can say it; a map archive that cannot be opened is left out.

func Unavailable

func Unavailable(err error) *Assets

Unavailable returns Assets whose routes all answer err, for a player whose install could not be found.

func (*Assets) Err

func (a *Assets) Err() error

Err returns why the archive could not be opened, or nil.

type Buffer

type Buffer struct {

	// Count is the number of vertices or indices.
	Count uint32 `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"`
	// Stride is the size of one vertex or index in bytes.
	Stride uint32 `protobuf:"varint,2,opt,name=stride,proto3" json:"stride,omitempty"`
	// Meshopt reports that the bytes are meshopt-encoded.
	Meshopt bool `protobuf:"varint,3,opt,name=meshopt,proto3" json:"meshopt,omitempty"`
	// Fields are a vertex buffer's attributes; an index buffer has none.
	Fields []*Field `protobuf:"bytes,4,rep,name=fields,proto3" json:"fields,omitempty"`
	// contains filtered or unexported fields
}

Buffer describes one vertex or index buffer. The buffer route answers its bytes, meshopt-encoded when meshopt is set.

func (*Buffer) CloneMessageVT

func (m *Buffer) CloneMessageVT() protobuf_go_lite.CloneMessage

func (*Buffer) CloneVT

func (m *Buffer) CloneVT() *Buffer

func (*Buffer) EqualMessageVT

func (this *Buffer) EqualMessageVT(thatMsg any) bool

func (*Buffer) EqualVT

func (this *Buffer) EqualVT(that *Buffer) bool

func (*Buffer) GetCount

func (x *Buffer) GetCount() uint32

func (*Buffer) GetFields

func (x *Buffer) GetFields() []*Field

func (*Buffer) GetMeshopt

func (x *Buffer) GetMeshopt() bool

func (*Buffer) GetStride

func (x *Buffer) GetStride() uint32

func (*Buffer) MarshalJSON

func (x *Buffer) MarshalJSON() ([]byte, error)

MarshalJSON marshals the Buffer to JSON.

func (*Buffer) MarshalProtoJSON

func (x *Buffer) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the Buffer message to JSON.

func (*Buffer) MarshalProtoText

func (x *Buffer) MarshalProtoText() string

func (*Buffer) MarshalToSizedBufferVT

func (m *Buffer) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*Buffer) MarshalToVT

func (m *Buffer) MarshalToVT(dAtA []byte) (int, error)

func (*Buffer) MarshalVT

func (m *Buffer) MarshalVT() (dAtA []byte, err error)

func (*Buffer) ProtoMessage

func (*Buffer) ProtoMessage()

func (*Buffer) Reset

func (x *Buffer) Reset()

func (*Buffer) SizeVT

func (m *Buffer) SizeVT() (n int)

func (*Buffer) String

func (x *Buffer) String() string

func (*Buffer) UnmarshalJSON

func (x *Buffer) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the Buffer from JSON.

func (*Buffer) UnmarshalProtoJSON

func (x *Buffer) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the Buffer message from JSON.

func (*Buffer) UnmarshalVT

func (m *Buffer) UnmarshalVT(dAtA []byte) error

type Collision added in v0.1.34

type Collision struct {

	// Positions holds each vertex as three little-endian 32-bit floats.
	Positions []byte `protobuf:"bytes,1,opt,name=positions,proto3" json:"positions,omitempty"`
	// Indices holds each triangle's three vertices as little-endian 32-bit
	// indexes into positions.
	Indices []byte `protobuf:"bytes,2,opt,name=indices,proto3" json:"indices,omitempty"`
	// Shapes counts the spheres, capsules, hulls and meshes drawn.
	Shapes uint32 `protobuf:"varint,3,opt,name=shapes,proto3" json:"shapes,omitempty"`
	// contains filtered or unexported fields
}

Collision is every collision shape of a model as one triangle mesh in the model's space: hulls and meshes as stored, spheres and capsules tessellated.

func (*Collision) CloneMessageVT added in v0.1.34

func (m *Collision) CloneMessageVT() protobuf_go_lite.CloneMessage

func (*Collision) CloneVT added in v0.1.34

func (m *Collision) CloneVT() *Collision

func (*Collision) EqualMessageVT added in v0.1.34

func (this *Collision) EqualMessageVT(thatMsg any) bool

func (*Collision) EqualVT added in v0.1.34

func (this *Collision) EqualVT(that *Collision) bool

func (*Collision) GetIndices added in v0.1.34

func (x *Collision) GetIndices() []byte

func (*Collision) GetPositions added in v0.1.34

func (x *Collision) GetPositions() []byte

func (*Collision) GetShapes added in v0.1.34

func (x *Collision) GetShapes() uint32

func (*Collision) MarshalJSON added in v0.1.34

func (x *Collision) MarshalJSON() ([]byte, error)

MarshalJSON marshals the Collision to JSON.

func (*Collision) MarshalProtoJSON added in v0.1.34

func (x *Collision) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the Collision message to JSON.

func (*Collision) MarshalProtoText added in v0.1.34

func (x *Collision) MarshalProtoText() string

func (*Collision) MarshalToSizedBufferVT added in v0.1.34

func (m *Collision) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*Collision) MarshalToVT added in v0.1.34

func (m *Collision) MarshalToVT(dAtA []byte) (int, error)

func (*Collision) MarshalVT added in v0.1.34

func (m *Collision) MarshalVT() (dAtA []byte, err error)

func (*Collision) ProtoMessage added in v0.1.34

func (*Collision) ProtoMessage()

func (*Collision) Reset added in v0.1.34

func (x *Collision) Reset()

func (*Collision) SizeVT added in v0.1.34

func (m *Collision) SizeVT() (n int)

func (*Collision) String added in v0.1.34

func (x *Collision) String() string

func (*Collision) UnmarshalJSON added in v0.1.34

func (x *Collision) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the Collision from JSON.

func (*Collision) UnmarshalProtoJSON added in v0.1.34

func (x *Collision) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the Collision message from JSON.

func (*Collision) UnmarshalVT added in v0.1.34

func (m *Collision) UnmarshalVT(dAtA []byte) error

type DrawCall

type DrawCall struct {

	// Material is the material's resource name, without the _c suffix.
	Material string `protobuf:"bytes,1,opt,name=material,proto3" json:"material,omitempty"`
	// VertexBuffers are the indexes in Mesh.vertex_buffers of the streams the
	// call reads its vertices from; each stream holds some of the attributes.
	VertexBuffers []uint32 `protobuf:"varint,2,rep,packed,name=vertex_buffers,json=vertexBuffers,proto3" json:"vertexBuffers,omitempty"`
	// IndexBuffer is the index buffer's index in Mesh.index_buffers.
	IndexBuffer uint32 `protobuf:"varint,3,opt,name=index_buffer,json=indexBuffer,proto3" json:"indexBuffer,omitempty"`
	// StartIndex is the first index the call draws.
	StartIndex uint32 `protobuf:"varint,4,opt,name=start_index,json=startIndex,proto3" json:"startIndex,omitempty"`
	// IndexCount is how many indices the call draws.
	IndexCount uint32 `protobuf:"varint,5,opt,name=index_count,json=indexCount,proto3" json:"indexCount,omitempty"`
	// BaseVertex is added to every index.
	BaseVertex int32 `protobuf:"varint,6,opt,name=base_vertex,json=baseVertex,proto3" json:"baseVertex,omitempty"`
	// contains filtered or unexported fields
}

DrawCall is one draw of a mesh: a range of one index buffer over one vertex buffer, with one material.

func (*DrawCall) CloneMessageVT

func (m *DrawCall) CloneMessageVT() protobuf_go_lite.CloneMessage

func (*DrawCall) CloneVT

func (m *DrawCall) CloneVT() *DrawCall

func (*DrawCall) EqualMessageVT

func (this *DrawCall) EqualMessageVT(thatMsg any) bool

func (*DrawCall) EqualVT

func (this *DrawCall) EqualVT(that *DrawCall) bool

func (*DrawCall) GetBaseVertex

func (x *DrawCall) GetBaseVertex() int32

func (*DrawCall) GetIndexBuffer

func (x *DrawCall) GetIndexBuffer() uint32

func (*DrawCall) GetIndexCount

func (x *DrawCall) GetIndexCount() uint32

func (*DrawCall) GetMaterial

func (x *DrawCall) GetMaterial() string

func (*DrawCall) GetStartIndex

func (x *DrawCall) GetStartIndex() uint32

func (*DrawCall) GetVertexBuffers added in v0.1.29

func (x *DrawCall) GetVertexBuffers() []uint32

func (*DrawCall) MarshalJSON

func (x *DrawCall) MarshalJSON() ([]byte, error)

MarshalJSON marshals the DrawCall to JSON.

func (*DrawCall) MarshalProtoJSON

func (x *DrawCall) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the DrawCall message to JSON.

func (*DrawCall) MarshalProtoText

func (x *DrawCall) MarshalProtoText() string

func (*DrawCall) MarshalToSizedBufferVT

func (m *DrawCall) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*DrawCall) MarshalToVT

func (m *DrawCall) MarshalToVT(dAtA []byte) (int, error)

func (*DrawCall) MarshalVT

func (m *DrawCall) MarshalVT() (dAtA []byte, err error)

func (*DrawCall) ProtoMessage

func (*DrawCall) ProtoMessage()

func (*DrawCall) Reset

func (x *DrawCall) Reset()

func (*DrawCall) SizeVT

func (m *DrawCall) SizeVT() (n int)

func (*DrawCall) String

func (x *DrawCall) String() string

func (*DrawCall) UnmarshalJSON

func (x *DrawCall) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the DrawCall from JSON.

func (*DrawCall) UnmarshalProtoJSON

func (x *DrawCall) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the DrawCall message from JSON.

func (*DrawCall) UnmarshalVT

func (m *DrawCall) UnmarshalVT(dAtA []byte) error

type Field

type Field struct {

	// Semantic is the attribute's semantic in upper case, such as "POSITION".
	Semantic string `protobuf:"bytes,1,opt,name=semantic,proto3" json:"semantic,omitempty"`
	// Index tells apart attributes of one semantic, such as two TEXCOORDs.
	Index uint32 `protobuf:"varint,2,opt,name=index,proto3" json:"index,omitempty"`
	// Format is the attribute's DXGI format.
	Format uint32 `protobuf:"varint,3,opt,name=format,proto3" json:"format,omitempty"`
	// Offset is the attribute's byte offset within a vertex.
	Offset uint32 `protobuf:"varint,4,opt,name=offset,proto3" json:"offset,omitempty"`
	// contains filtered or unexported fields
}

Field is one vertex attribute.

func (*Field) CloneMessageVT

func (m *Field) CloneMessageVT() protobuf_go_lite.CloneMessage

func (*Field) CloneVT

func (m *Field) CloneVT() *Field

func (*Field) EqualMessageVT

func (this *Field) EqualMessageVT(thatMsg any) bool

func (*Field) EqualVT

func (this *Field) EqualVT(that *Field) bool

func (*Field) GetFormat

func (x *Field) GetFormat() uint32

func (*Field) GetIndex

func (x *Field) GetIndex() uint32

func (*Field) GetOffset

func (x *Field) GetOffset() uint32

func (*Field) GetSemantic

func (x *Field) GetSemantic() string

func (*Field) MarshalJSON

func (x *Field) MarshalJSON() ([]byte, error)

MarshalJSON marshals the Field to JSON.

func (*Field) MarshalProtoJSON

func (x *Field) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the Field message to JSON.

func (*Field) MarshalProtoText

func (x *Field) MarshalProtoText() string

func (*Field) MarshalToSizedBufferVT

func (m *Field) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*Field) MarshalToVT

func (m *Field) MarshalToVT(dAtA []byte) (int, error)

func (*Field) MarshalVT

func (m *Field) MarshalVT() (dAtA []byte, err error)

func (*Field) ProtoMessage

func (*Field) ProtoMessage()

func (*Field) Reset

func (x *Field) Reset()

func (*Field) SizeVT

func (m *Field) SizeVT() (n int)

func (*Field) String

func (x *Field) String() string

func (*Field) UnmarshalJSON

func (x *Field) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the Field from JSON.

func (*Field) UnmarshalProtoJSON

func (x *Field) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the Field message from JSON.

func (*Field) UnmarshalVT

func (m *Field) UnmarshalVT(dAtA []byte) error

type File

type File struct {

	// Dir is the file's directory, by its position in Listing.dirs.
	Dir uint32 `protobuf:"varint,1,opt,name=dir,proto3" json:"dir,omitempty"`
	// Name is the file's name within its directory, such as "archer.vmdl_c".
	Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	// Size is the file's size in bytes.
	Size uint64 `protobuf:"varint,3,opt,name=size,proto3" json:"size,omitempty"`
	// contains filtered or unexported fields
}

File is one file of the archive.

func (*File) CloneMessageVT

func (m *File) CloneMessageVT() protobuf_go_lite.CloneMessage

func (*File) CloneVT

func (m *File) CloneVT() *File

func (*File) EqualMessageVT

func (this *File) EqualMessageVT(thatMsg any) bool

func (*File) EqualVT

func (this *File) EqualVT(that *File) bool

func (*File) GetDir

func (x *File) GetDir() uint32

func (*File) GetName

func (x *File) GetName() string

func (*File) GetSize

func (x *File) GetSize() uint64

func (*File) MarshalJSON

func (x *File) MarshalJSON() ([]byte, error)

MarshalJSON marshals the File to JSON.

func (*File) MarshalProtoJSON

func (x *File) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the File message to JSON.

func (*File) MarshalProtoText

func (x *File) MarshalProtoText() string

func (*File) MarshalToSizedBufferVT

func (m *File) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*File) MarshalToVT

func (m *File) MarshalToVT(dAtA []byte) (int, error)

func (*File) MarshalVT

func (m *File) MarshalVT() (dAtA []byte, err error)

func (*File) ProtoMessage

func (*File) ProtoMessage()

func (*File) Reset

func (x *File) Reset()

func (*File) SizeVT

func (m *File) SizeVT() (n int)

func (*File) String

func (x *File) String() string

func (*File) UnmarshalJSON

func (x *File) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the File from JSON.

func (*File) UnmarshalProtoJSON

func (x *File) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the File message from JSON.

func (*File) UnmarshalVT

func (m *File) UnmarshalVT(dAtA []byte) error

type Fragment added in v0.1.29

type Fragment struct {

	// DrawCall is the draw call's index across the model's meshes.
	DrawCall uint32 `protobuf:"varint,1,opt,name=draw_call,json=drawCall,proto3" json:"drawCall,omitempty"`
	// Transform is the fragment's own 3x4 row-major transform into the world;
	// empty means the placement's.
	Transform []float32 `protobuf:"fixed32,2,rep,packed,name=transform,proto3" json:"transform,omitempty"`
	// Tint is the fragment's sRGB color tint; empty means the placement's.
	Tint []float32 `protobuf:"fixed32,3,rep,packed,name=tint,proto3" json:"tint,omitempty"`
	// contains filtered or unexported fields
}

Fragment is one draw call of an aggregate.

func (*Fragment) CloneMessageVT added in v0.1.29

func (m *Fragment) CloneMessageVT() protobuf_go_lite.CloneMessage

func (*Fragment) CloneVT added in v0.1.29

func (m *Fragment) CloneVT() *Fragment

func (*Fragment) EqualMessageVT added in v0.1.29

func (this *Fragment) EqualMessageVT(thatMsg any) bool

func (*Fragment) EqualVT added in v0.1.29

func (this *Fragment) EqualVT(that *Fragment) bool

func (*Fragment) GetDrawCall added in v0.1.29

func (x *Fragment) GetDrawCall() uint32

func (*Fragment) GetTint added in v0.1.29

func (x *Fragment) GetTint() []float32

func (*Fragment) GetTransform added in v0.1.29

func (x *Fragment) GetTransform() []float32

func (*Fragment) MarshalJSON added in v0.1.29

func (x *Fragment) MarshalJSON() ([]byte, error)

MarshalJSON marshals the Fragment to JSON.

func (*Fragment) MarshalProtoJSON added in v0.1.29

func (x *Fragment) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the Fragment message to JSON.

func (*Fragment) MarshalProtoText added in v0.1.29

func (x *Fragment) MarshalProtoText() string

func (*Fragment) MarshalToSizedBufferVT added in v0.1.29

func (m *Fragment) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*Fragment) MarshalToVT added in v0.1.29

func (m *Fragment) MarshalToVT(dAtA []byte) (int, error)

func (*Fragment) MarshalVT added in v0.1.29

func (m *Fragment) MarshalVT() (dAtA []byte, err error)

func (*Fragment) ProtoMessage added in v0.1.29

func (*Fragment) ProtoMessage()

func (*Fragment) Reset added in v0.1.29

func (x *Fragment) Reset()

func (*Fragment) SizeVT added in v0.1.29

func (m *Fragment) SizeVT() (n int)

func (*Fragment) String added in v0.1.29

func (x *Fragment) String() string

func (*Fragment) UnmarshalJSON added in v0.1.29

func (x *Fragment) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the Fragment from JSON.

func (*Fragment) UnmarshalProtoJSON added in v0.1.29

func (x *Fragment) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the Fragment message from JSON.

func (*Fragment) UnmarshalVT added in v0.1.29

func (m *Fragment) UnmarshalVT(dAtA []byte) error

type Light added in v0.1.33

type Light struct {
	Kind Light_Kind `protobuf:"varint,1,opt,name=kind,proto3" json:"kind,omitempty"`
	// Origin is where a point or spot light sits.
	Origin []float32 `protobuf:"fixed32,2,rep,packed,name=origin,proto3" json:"origin,omitempty"`
	// Direction is the unit vector a sun or spot light shines along.
	Direction []float32 `protobuf:"fixed32,3,rep,packed,name=direction,proto3" json:"direction,omitempty"`
	// Color is the linear color times the brightness.
	Color []float32 `protobuf:"fixed32,4,rep,packed,name=color,proto3" json:"color,omitempty"`
	// Range is the distance at which a point or spot light fades out.
	Range float32 `protobuf:"fixed32,5,opt,name=range,proto3" json:"range,omitempty"`
	// Shadow is the light's channel in Lighting.shadows.
	Shadow uint32 `protobuf:"varint,6,opt,name=shadow,proto3" json:"shadow,omitempty"`
	// Inner and outer are the half angles, in degrees, of a point light's
	// cone around direction: full brightness inside inner, fading to none at
	// outer. An outer of 180 shines every way.
	Inner float32 `protobuf:"fixed32,7,opt,name=inner,proto3" json:"inner,omitempty"`
	Outer float32 `protobuf:"fixed32,8,opt,name=outer,proto3" json:"outer,omitempty"`
	// contains filtered or unexported fields
}

Light is one stationary light, in the world's coordinates.

func (*Light) CloneMessageVT added in v0.1.33

func (m *Light) CloneMessageVT() protobuf_go_lite.CloneMessage

func (*Light) CloneVT added in v0.1.33

func (m *Light) CloneVT() *Light

func (*Light) EqualMessageVT added in v0.1.33

func (this *Light) EqualMessageVT(thatMsg any) bool

func (*Light) EqualVT added in v0.1.33

func (this *Light) EqualVT(that *Light) bool

func (*Light) GetColor added in v0.1.33

func (x *Light) GetColor() []float32

func (*Light) GetDirection added in v0.1.33

func (x *Light) GetDirection() []float32

func (*Light) GetInner added in v0.1.33

func (x *Light) GetInner() float32

func (*Light) GetKind added in v0.1.33

func (x *Light) GetKind() Light_Kind

func (*Light) GetOrigin added in v0.1.33

func (x *Light) GetOrigin() []float32

func (*Light) GetOuter added in v0.1.33

func (x *Light) GetOuter() float32

func (*Light) GetRange added in v0.1.33

func (x *Light) GetRange() float32

func (*Light) GetShadow added in v0.1.33

func (x *Light) GetShadow() uint32

func (*Light) MarshalJSON added in v0.1.33

func (x *Light) MarshalJSON() ([]byte, error)

MarshalJSON marshals the Light to JSON.

func (*Light) MarshalProtoJSON added in v0.1.33

func (x *Light) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the Light message to JSON.

func (*Light) MarshalProtoText added in v0.1.33

func (x *Light) MarshalProtoText() string

func (*Light) MarshalToSizedBufferVT added in v0.1.33

func (m *Light) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*Light) MarshalToVT added in v0.1.33

func (m *Light) MarshalToVT(dAtA []byte) (int, error)

func (*Light) MarshalVT added in v0.1.33

func (m *Light) MarshalVT() (dAtA []byte, err error)

func (*Light) ProtoMessage added in v0.1.33

func (*Light) ProtoMessage()

func (*Light) Reset added in v0.1.33

func (x *Light) Reset()

func (*Light) SizeVT added in v0.1.33

func (m *Light) SizeVT() (n int)

func (*Light) String added in v0.1.33

func (x *Light) String() string

func (*Light) UnmarshalJSON added in v0.1.33

func (x *Light) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the Light from JSON.

func (*Light) UnmarshalProtoJSON added in v0.1.33

func (x *Light) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the Light message from JSON.

func (*Light) UnmarshalVT added in v0.1.33

func (m *Light) UnmarshalVT(dAtA []byte) error

type Light_Kind added in v0.1.33

type Light_Kind int32

Kind is how a light spreads.

const (
	// KIND_SUN shines along direction from infinitely far away.
	Light_KIND_SUN Light_Kind = 0
	// KIND_POINT shines every way from origin.
	Light_KIND_POINT Light_Kind = 1
	// KIND_SPOT shines from origin into the half space along direction.
	Light_KIND_SPOT Light_Kind = 2
)

func (Light_Kind) Enum added in v0.1.33

func (x Light_Kind) Enum() *Light_Kind

func (Light_Kind) MarshalJSON added in v0.1.33

func (x Light_Kind) MarshalJSON() ([]byte, error)

MarshalJSON marshals the Light_Kind to JSON.

func (Light_Kind) MarshalProtoJSON added in v0.1.33

func (x Light_Kind) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the Light_Kind to JSON.

func (Light_Kind) MarshalProtoText added in v0.1.33

func (x Light_Kind) MarshalProtoText() string

func (Light_Kind) MarshalText added in v0.1.33

func (x Light_Kind) MarshalText() ([]byte, error)

MarshalText marshals the Light_Kind to text.

func (Light_Kind) String added in v0.1.33

func (x Light_Kind) String() string

func (*Light_Kind) UnmarshalJSON added in v0.1.33

func (x *Light_Kind) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the Light_Kind from JSON.

func (*Light_Kind) UnmarshalProtoJSON added in v0.1.33

func (x *Light_Kind) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the Light_Kind from JSON.

func (*Light_Kind) UnmarshalText added in v0.1.33

func (x *Light_Kind) UnmarshalText(b []byte) error

UnmarshalText unmarshals the Light_Kind from text.

type Lighting added in v0.1.33

type Lighting struct {

	// Irradiance is the archive path of the irradiance's constant term, linear
	// HDR color.
	Irradiance string `protobuf:"bytes,1,opt,name=irradiance,proto3" json:"irradiance,omitempty"`
	// Direction is the archive path of the irradiance's luminance direction,
	// each component centered on one half.
	Direction string `protobuf:"bytes,2,opt,name=direction,proto3" json:"direction,omitempty"`
	// Shadows is the archive path of the stationary lights' baked shadows, one
	// light per channel.
	Shadows string `protobuf:"bytes,3,opt,name=shadows,proto3" json:"shadows,omitempty"`
	// UvScale scales a vertex's lightmap coordinates onto the lightmaps.
	UvScale []float32 `protobuf:"fixed32,4,rep,packed,name=uv_scale,json=uvScale,proto3" json:"uvScale,omitempty"`
	// Lights are the stationary lights.
	Lights []*Light `protobuf:"bytes,5,rep,name=lights,proto3" json:"lights,omitempty"`
	// contains filtered or unexported fields
}

Lighting is a map's baked light. Its lightmaps cover the world meshes, which sample them at their lightmap coordinates scaled by uv_scale. The irradiance and direction maps hold the light that bounces and the lights baked whole; the stationary lights are drawn at runtime over it, each masked by one channel of the shadow map.

func (*Lighting) CloneMessageVT added in v0.1.33

func (m *Lighting) CloneMessageVT() protobuf_go_lite.CloneMessage

func (*Lighting) CloneVT added in v0.1.33

func (m *Lighting) CloneVT() *Lighting

func (*Lighting) EqualMessageVT added in v0.1.33

func (this *Lighting) EqualMessageVT(thatMsg any) bool

func (*Lighting) EqualVT added in v0.1.33

func (this *Lighting) EqualVT(that *Lighting) bool

func (*Lighting) GetDirection added in v0.1.33

func (x *Lighting) GetDirection() string

func (*Lighting) GetIrradiance added in v0.1.33

func (x *Lighting) GetIrradiance() string

func (*Lighting) GetLights added in v0.1.33

func (x *Lighting) GetLights() []*Light

func (*Lighting) GetShadows added in v0.1.33

func (x *Lighting) GetShadows() string

func (*Lighting) GetUvScale added in v0.1.33

func (x *Lighting) GetUvScale() []float32

func (*Lighting) MarshalJSON added in v0.1.33

func (x *Lighting) MarshalJSON() ([]byte, error)

MarshalJSON marshals the Lighting to JSON.

func (*Lighting) MarshalProtoJSON added in v0.1.33

func (x *Lighting) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the Lighting message to JSON.

func (*Lighting) MarshalProtoText added in v0.1.33

func (x *Lighting) MarshalProtoText() string

func (*Lighting) MarshalToSizedBufferVT added in v0.1.33

func (m *Lighting) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*Lighting) MarshalToVT added in v0.1.33

func (m *Lighting) MarshalToVT(dAtA []byte) (int, error)

func (*Lighting) MarshalVT added in v0.1.33

func (m *Lighting) MarshalVT() (dAtA []byte, err error)

func (*Lighting) ProtoMessage added in v0.1.33

func (*Lighting) ProtoMessage()

func (*Lighting) Reset added in v0.1.33

func (x *Lighting) Reset()

func (*Lighting) SizeVT added in v0.1.33

func (m *Lighting) SizeVT() (n int)

func (*Lighting) String added in v0.1.33

func (x *Lighting) String() string

func (*Lighting) UnmarshalJSON added in v0.1.33

func (x *Lighting) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the Lighting from JSON.

func (*Lighting) UnmarshalProtoJSON added in v0.1.33

func (x *Lighting) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the Lighting message from JSON.

func (*Lighting) UnmarshalVT added in v0.1.33

func (m *Lighting) UnmarshalVT(dAtA []byte) error

type Listing

type Listing struct {

	// Dirs are the archive's directories, sorted, such as "models/heroes_wip".
	// The archive's root is the empty string.
	Dirs []string `protobuf:"bytes,1,rep,name=dirs,proto3" json:"dirs,omitempty"`
	// Files are the archive's files, sorted by directory and then by name.
	Files []*File `protobuf:"bytes,2,rep,name=files,proto3" json:"files,omitempty"`
	// contains filtered or unexported fields
}

Listing is every file in the game's archive, grouped by directory so each directory's path is sent once.

func (*Listing) CloneMessageVT

func (m *Listing) CloneMessageVT() protobuf_go_lite.CloneMessage

func (*Listing) CloneVT

func (m *Listing) CloneVT() *Listing

func (*Listing) EqualMessageVT

func (this *Listing) EqualMessageVT(thatMsg any) bool

func (*Listing) EqualVT

func (this *Listing) EqualVT(that *Listing) bool

func (*Listing) GetDirs

func (x *Listing) GetDirs() []string

func (*Listing) GetFiles

func (x *Listing) GetFiles() []*File

func (*Listing) MarshalJSON

func (x *Listing) MarshalJSON() ([]byte, error)

MarshalJSON marshals the Listing to JSON.

func (*Listing) MarshalProtoJSON

func (x *Listing) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the Listing message to JSON.

func (*Listing) MarshalProtoText

func (x *Listing) MarshalProtoText() string

func (*Listing) MarshalToSizedBufferVT

func (m *Listing) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*Listing) MarshalToVT

func (m *Listing) MarshalToVT(dAtA []byte) (int, error)

func (*Listing) MarshalVT

func (m *Listing) MarshalVT() (dAtA []byte, err error)

func (*Listing) ProtoMessage

func (*Listing) ProtoMessage()

func (*Listing) Reset

func (x *Listing) Reset()

func (*Listing) SizeVT

func (m *Listing) SizeVT() (n int)

func (*Listing) String

func (x *Listing) String() string

func (*Listing) UnmarshalJSON

func (x *Listing) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the Listing from JSON.

func (*Listing) UnmarshalProtoJSON

func (x *Listing) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the Listing message from JSON.

func (*Listing) UnmarshalVT

func (m *Listing) UnmarshalVT(dAtA []byte) error

type Material

type Material struct {

	// Shader is the shader's name, such as "pbr.vfx".
	Shader string `protobuf:"bytes,1,opt,name=shader,proto3" json:"shader,omitempty"`
	// Textures maps each texture parameter, such as "g_tColor", to the
	// compiled texture's archive path.
	Textures map[string]string `` /* 157-byte string literal not displayed */
	// Ints maps each integer parameter, such as the feature "F_SELF_ILLUM",
	// to its value.
	Ints map[string]int64 `` /* 150-byte string literal not displayed */
	// Floats maps each float parameter, such as "g_flSelfIllumScale1", to its
	// value.
	Floats map[string]float32 `` /* 155-byte string literal not displayed */
	// Vectors maps each vector parameter, such as "g_vColorTint1", to its
	// value.
	Vectors map[string]*Vector `` /* 155-byte string literal not displayed */
	// contains filtered or unexported fields
}

Material is a material's shader and the parameters it sets.

func (*Material) CloneMessageVT

func (m *Material) CloneMessageVT() protobuf_go_lite.CloneMessage

func (*Material) CloneVT

func (m *Material) CloneVT() *Material

func (*Material) EqualMessageVT

func (this *Material) EqualMessageVT(thatMsg any) bool

func (*Material) EqualVT

func (this *Material) EqualVT(that *Material) bool

func (*Material) GetFloats added in v0.1.29

func (x *Material) GetFloats() map[string]float32

func (*Material) GetInts added in v0.1.29

func (x *Material) GetInts() map[string]int64

func (*Material) GetShader

func (x *Material) GetShader() string

func (*Material) GetTextures

func (x *Material) GetTextures() map[string]string

func (*Material) GetVectors added in v0.1.29

func (x *Material) GetVectors() map[string]*Vector

func (*Material) MarshalJSON

func (x *Material) MarshalJSON() ([]byte, error)

MarshalJSON marshals the Material to JSON.

func (*Material) MarshalProtoJSON

func (x *Material) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the Material message to JSON.

func (*Material) MarshalProtoText

func (x *Material) MarshalProtoText() string

func (*Material) MarshalToSizedBufferVT

func (m *Material) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*Material) MarshalToVT

func (m *Material) MarshalToVT(dAtA []byte) (int, error)

func (*Material) MarshalVT

func (m *Material) MarshalVT() (dAtA []byte, err error)

func (*Material) ProtoMessage

func (*Material) ProtoMessage()

func (*Material) Reset

func (x *Material) Reset()

func (*Material) SizeVT

func (m *Material) SizeVT() (n int)

func (*Material) String

func (x *Material) String() string

func (*Material) UnmarshalJSON

func (x *Material) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the Material from JSON.

func (*Material) UnmarshalProtoJSON

func (x *Material) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the Material message from JSON.

func (*Material) UnmarshalVT

func (m *Material) UnmarshalVT(dAtA []byte) error

type Material_FloatsEntry added in v0.1.29

type Material_FloatsEntry struct {
	Key   string  `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	Value float32 `protobuf:"fixed32,2,opt,name=value,proto3" json:"value,omitempty"`
	// contains filtered or unexported fields
}

func (*Material_FloatsEntry) GetKey added in v0.1.29

func (x *Material_FloatsEntry) GetKey() string

func (*Material_FloatsEntry) GetValue added in v0.1.29

func (x *Material_FloatsEntry) GetValue() float32

func (*Material_FloatsEntry) MarshalJSON added in v0.1.29

func (x *Material_FloatsEntry) MarshalJSON() ([]byte, error)

MarshalJSON marshals the Material_FloatsEntry to JSON.

func (*Material_FloatsEntry) MarshalProtoJSON added in v0.1.29

func (x *Material_FloatsEntry) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the Material_FloatsEntry message to JSON.

func (*Material_FloatsEntry) MarshalProtoText added in v0.1.29

func (x *Material_FloatsEntry) MarshalProtoText() string

func (*Material_FloatsEntry) ProtoMessage added in v0.1.29

func (*Material_FloatsEntry) ProtoMessage()

func (*Material_FloatsEntry) Reset added in v0.1.29

func (x *Material_FloatsEntry) Reset()

func (*Material_FloatsEntry) String added in v0.1.29

func (x *Material_FloatsEntry) String() string

func (*Material_FloatsEntry) UnmarshalJSON added in v0.1.29

func (x *Material_FloatsEntry) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the Material_FloatsEntry from JSON.

func (*Material_FloatsEntry) UnmarshalProtoJSON added in v0.1.29

func (x *Material_FloatsEntry) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the Material_FloatsEntry message from JSON.

type Material_IntsEntry added in v0.1.29

type Material_IntsEntry struct {
	Key   string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	Value int64  `protobuf:"varint,2,opt,name=value,proto3" json:"value,omitempty"`
	// contains filtered or unexported fields
}

func (*Material_IntsEntry) GetKey added in v0.1.29

func (x *Material_IntsEntry) GetKey() string

func (*Material_IntsEntry) GetValue added in v0.1.29

func (x *Material_IntsEntry) GetValue() int64

func (*Material_IntsEntry) MarshalJSON added in v0.1.29

func (x *Material_IntsEntry) MarshalJSON() ([]byte, error)

MarshalJSON marshals the Material_IntsEntry to JSON.

func (*Material_IntsEntry) MarshalProtoJSON added in v0.1.29

func (x *Material_IntsEntry) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the Material_IntsEntry message to JSON.

func (*Material_IntsEntry) MarshalProtoText added in v0.1.29

func (x *Material_IntsEntry) MarshalProtoText() string

func (*Material_IntsEntry) ProtoMessage added in v0.1.29

func (*Material_IntsEntry) ProtoMessage()

func (*Material_IntsEntry) Reset added in v0.1.29

func (x *Material_IntsEntry) Reset()

func (*Material_IntsEntry) String added in v0.1.29

func (x *Material_IntsEntry) String() string

func (*Material_IntsEntry) UnmarshalJSON added in v0.1.29

func (x *Material_IntsEntry) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the Material_IntsEntry from JSON.

func (*Material_IntsEntry) UnmarshalProtoJSON added in v0.1.29

func (x *Material_IntsEntry) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the Material_IntsEntry message from JSON.

type Material_TexturesEntry

type Material_TexturesEntry struct {
	Key   string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
	// contains filtered or unexported fields
}

func (*Material_TexturesEntry) GetKey

func (x *Material_TexturesEntry) GetKey() string

func (*Material_TexturesEntry) GetValue

func (x *Material_TexturesEntry) GetValue() string

func (*Material_TexturesEntry) MarshalJSON

func (x *Material_TexturesEntry) MarshalJSON() ([]byte, error)

MarshalJSON marshals the Material_TexturesEntry to JSON.

func (*Material_TexturesEntry) MarshalProtoJSON

func (x *Material_TexturesEntry) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the Material_TexturesEntry message to JSON.

func (*Material_TexturesEntry) MarshalProtoText

func (x *Material_TexturesEntry) MarshalProtoText() string

func (*Material_TexturesEntry) ProtoMessage

func (*Material_TexturesEntry) ProtoMessage()

func (*Material_TexturesEntry) Reset

func (x *Material_TexturesEntry) Reset()

func (*Material_TexturesEntry) String

func (x *Material_TexturesEntry) String() string

func (*Material_TexturesEntry) UnmarshalJSON

func (x *Material_TexturesEntry) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the Material_TexturesEntry from JSON.

func (*Material_TexturesEntry) UnmarshalProtoJSON

func (x *Material_TexturesEntry) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the Material_TexturesEntry message from JSON.

type Material_VectorsEntry added in v0.1.29

type Material_VectorsEntry struct {
	Key   string  `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	Value *Vector `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
	// contains filtered or unexported fields
}

func (*Material_VectorsEntry) GetKey added in v0.1.29

func (x *Material_VectorsEntry) GetKey() string

func (*Material_VectorsEntry) GetValue added in v0.1.29

func (x *Material_VectorsEntry) GetValue() *Vector

func (*Material_VectorsEntry) MarshalJSON added in v0.1.29

func (x *Material_VectorsEntry) MarshalJSON() ([]byte, error)

MarshalJSON marshals the Material_VectorsEntry to JSON.

func (*Material_VectorsEntry) MarshalProtoJSON added in v0.1.29

func (x *Material_VectorsEntry) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the Material_VectorsEntry message to JSON.

func (*Material_VectorsEntry) MarshalProtoText added in v0.1.29

func (x *Material_VectorsEntry) MarshalProtoText() string

func (*Material_VectorsEntry) ProtoMessage added in v0.1.29

func (*Material_VectorsEntry) ProtoMessage()

func (*Material_VectorsEntry) Reset added in v0.1.29

func (x *Material_VectorsEntry) Reset()

func (*Material_VectorsEntry) String added in v0.1.29

func (x *Material_VectorsEntry) String() string

func (*Material_VectorsEntry) UnmarshalJSON added in v0.1.29

func (x *Material_VectorsEntry) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the Material_VectorsEntry from JSON.

func (*Material_VectorsEntry) UnmarshalProtoJSON added in v0.1.29

func (x *Material_VectorsEntry) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the Material_VectorsEntry message from JSON.

type Mesh

type Mesh struct {

	// Name is the mesh's name, often empty.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// VertexBuffers are the mesh's vertex buffers, by draw call buffer index.
	VertexBuffers []*Buffer `protobuf:"bytes,2,rep,name=vertex_buffers,json=vertexBuffers,proto3" json:"vertexBuffers,omitempty"`
	// IndexBuffers are the mesh's index buffers, by draw call buffer index.
	IndexBuffers []*Buffer `protobuf:"bytes,3,rep,name=index_buffers,json=indexBuffers,proto3" json:"indexBuffers,omitempty"`
	// DrawCalls are the mesh's draw calls across its scene objects.
	DrawCalls []*DrawCall `protobuf:"bytes,4,rep,name=draw_calls,json=drawCalls,proto3" json:"drawCalls,omitempty"`
	// LodMask has bit n set when the mesh draws at level of detail n.
	LodMask uint64 `protobuf:"varint,5,opt,name=lod_mask,json=lodMask,proto3" json:"lodMask,omitempty"`
	// GroupMask has bit n set when the mesh belongs to mesh group n.
	GroupMask uint64 `protobuf:"varint,6,opt,name=group_mask,json=groupMask,proto3" json:"groupMask,omitempty"`
	// contains filtered or unexported fields
}

Mesh is one mesh of a model.

func (*Mesh) CloneMessageVT

func (m *Mesh) CloneMessageVT() protobuf_go_lite.CloneMessage

func (*Mesh) CloneVT

func (m *Mesh) CloneVT() *Mesh

func (*Mesh) EqualMessageVT

func (this *Mesh) EqualMessageVT(thatMsg any) bool

func (*Mesh) EqualVT

func (this *Mesh) EqualVT(that *Mesh) bool

func (*Mesh) GetDrawCalls

func (x *Mesh) GetDrawCalls() []*DrawCall

func (*Mesh) GetGroupMask

func (x *Mesh) GetGroupMask() uint64

func (*Mesh) GetIndexBuffers

func (x *Mesh) GetIndexBuffers() []*Buffer

func (*Mesh) GetLodMask

func (x *Mesh) GetLodMask() uint64

func (*Mesh) GetName

func (x *Mesh) GetName() string

func (*Mesh) GetVertexBuffers

func (x *Mesh) GetVertexBuffers() []*Buffer

func (*Mesh) MarshalJSON

func (x *Mesh) MarshalJSON() ([]byte, error)

MarshalJSON marshals the Mesh to JSON.

func (*Mesh) MarshalProtoJSON

func (x *Mesh) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the Mesh message to JSON.

func (*Mesh) MarshalProtoText

func (x *Mesh) MarshalProtoText() string

func (*Mesh) MarshalToSizedBufferVT

func (m *Mesh) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*Mesh) MarshalToVT

func (m *Mesh) MarshalToVT(dAtA []byte) (int, error)

func (*Mesh) MarshalVT

func (m *Mesh) MarshalVT() (dAtA []byte, err error)

func (*Mesh) ProtoMessage

func (*Mesh) ProtoMessage()

func (*Mesh) Reset

func (x *Mesh) Reset()

func (*Mesh) SizeVT

func (m *Mesh) SizeVT() (n int)

func (*Mesh) String

func (x *Mesh) String() string

func (*Mesh) UnmarshalJSON

func (x *Mesh) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the Mesh from JSON.

func (*Mesh) UnmarshalProtoJSON

func (x *Mesh) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the Mesh message from JSON.

func (*Mesh) UnmarshalVT

func (m *Mesh) UnmarshalVT(dAtA []byte) error

type Model

type Model struct {

	// Meshes are the model's meshes in the order the buffer route numbers them.
	Meshes []*Mesh `protobuf:"bytes,1,rep,name=meshes,proto3" json:"meshes,omitempty"`
	// Groups names the model's mesh groups, by bit of Mesh.group_mask.
	Groups []string `protobuf:"bytes,2,rep,name=groups,proto3" json:"groups,omitempty"`
	// DefaultGroups is the mask of mesh groups the game draws by default; zero
	// means every group.
	DefaultGroups uint64 `protobuf:"varint,3,opt,name=default_groups,json=defaultGroups,proto3" json:"defaultGroups,omitempty"`
	// Lods is how many levels of detail the model has, at least one.
	Lods uint32 `protobuf:"varint,4,opt,name=lods,proto3" json:"lods,omitempty"`
	// Materials holds each material the draw calls name, by its name.
	Materials map[string]*Material `` /* 159-byte string literal not displayed */
	// Collision is the model's collision shapes, empty for a model without.
	Collision *Collision `protobuf:"bytes,6,opt,name=collision,proto3" json:"collision,omitempty"`
	// contains filtered or unexported fields
}

Model is a compiled model: every mesh it holds, in every mesh group and level of detail, and the materials its draw calls name.

func (*Model) CloneMessageVT

func (m *Model) CloneMessageVT() protobuf_go_lite.CloneMessage

func (*Model) CloneVT

func (m *Model) CloneVT() *Model

func (*Model) EqualMessageVT

func (this *Model) EqualMessageVT(thatMsg any) bool

func (*Model) EqualVT

func (this *Model) EqualVT(that *Model) bool

func (*Model) GetCollision added in v0.1.34

func (x *Model) GetCollision() *Collision

func (*Model) GetDefaultGroups

func (x *Model) GetDefaultGroups() uint64

func (*Model) GetGroups

func (x *Model) GetGroups() []string

func (*Model) GetLods

func (x *Model) GetLods() uint32

func (*Model) GetMaterials

func (x *Model) GetMaterials() map[string]*Material

func (*Model) GetMeshes

func (x *Model) GetMeshes() []*Mesh

func (*Model) MarshalJSON

func (x *Model) MarshalJSON() ([]byte, error)

MarshalJSON marshals the Model to JSON.

func (*Model) MarshalProtoJSON

func (x *Model) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the Model message to JSON.

func (*Model) MarshalProtoText

func (x *Model) MarshalProtoText() string

func (*Model) MarshalToSizedBufferVT

func (m *Model) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*Model) MarshalToVT

func (m *Model) MarshalToVT(dAtA []byte) (int, error)

func (*Model) MarshalVT

func (m *Model) MarshalVT() (dAtA []byte, err error)

func (*Model) ProtoMessage

func (*Model) ProtoMessage()

func (*Model) Reset

func (x *Model) Reset()

func (*Model) SizeVT

func (m *Model) SizeVT() (n int)

func (*Model) String

func (x *Model) String() string

func (*Model) UnmarshalJSON

func (x *Model) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the Model from JSON.

func (*Model) UnmarshalProtoJSON

func (x *Model) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the Model message from JSON.

func (*Model) UnmarshalVT

func (m *Model) UnmarshalVT(dAtA []byte) error

type Model_MaterialsEntry

type Model_MaterialsEntry struct {
	Key   string    `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	Value *Material `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
	// contains filtered or unexported fields
}

func (*Model_MaterialsEntry) GetKey

func (x *Model_MaterialsEntry) GetKey() string

func (*Model_MaterialsEntry) GetValue

func (x *Model_MaterialsEntry) GetValue() *Material

func (*Model_MaterialsEntry) MarshalJSON

func (x *Model_MaterialsEntry) MarshalJSON() ([]byte, error)

MarshalJSON marshals the Model_MaterialsEntry to JSON.

func (*Model_MaterialsEntry) MarshalProtoJSON

func (x *Model_MaterialsEntry) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the Model_MaterialsEntry message to JSON.

func (*Model_MaterialsEntry) MarshalProtoText

func (x *Model_MaterialsEntry) MarshalProtoText() string

func (*Model_MaterialsEntry) ProtoMessage

func (*Model_MaterialsEntry) ProtoMessage()

func (*Model_MaterialsEntry) Reset

func (x *Model_MaterialsEntry) Reset()

func (*Model_MaterialsEntry) String

func (x *Model_MaterialsEntry) String() string

func (*Model_MaterialsEntry) UnmarshalJSON

func (x *Model_MaterialsEntry) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the Model_MaterialsEntry from JSON.

func (*Model_MaterialsEntry) UnmarshalProtoJSON

func (x *Model_MaterialsEntry) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the Model_MaterialsEntry message from JSON.

type Placement added in v0.1.29

type Placement struct {

	// Model is the model's index in World.models.
	Model uint32 `protobuf:"varint,1,opt,name=model,proto3" json:"model,omitempty"`
	// Transform is the model's 3x4 row-major transform into the world; empty
	// means the identity.
	Transform []float32 `protobuf:"fixed32,2,rep,packed,name=transform,proto3" json:"transform,omitempty"`
	// Tint is the placement's sRGB color and alpha tint; empty means white.
	Tint []float32 `protobuf:"fixed32,3,rep,packed,name=tint,proto3" json:"tint,omitempty"`
	// Fragments are an aggregate's draws, each one draw call of the model's
	// finest level of detail. A placement without fragments draws the whole
	// model at its finest level of detail.
	Fragments []*Fragment `protobuf:"bytes,4,rep,name=fragments,proto3" json:"fragments,omitempty"`
	// Materials replaces the material of a draw call, by its index across the
	// model's meshes, with one of World.materials.
	Materials map[uint32]string `` /* 160-byte string literal not displayed */
	// contains filtered or unexported fields
}

Placement draws one model of World.models into the world.

func (*Placement) CloneMessageVT added in v0.1.29

func (m *Placement) CloneMessageVT() protobuf_go_lite.CloneMessage

func (*Placement) CloneVT added in v0.1.29

func (m *Placement) CloneVT() *Placement

func (*Placement) EqualMessageVT added in v0.1.29

func (this *Placement) EqualMessageVT(thatMsg any) bool

func (*Placement) EqualVT added in v0.1.29

func (this *Placement) EqualVT(that *Placement) bool

func (*Placement) GetFragments added in v0.1.29

func (x *Placement) GetFragments() []*Fragment

func (*Placement) GetMaterials added in v0.1.29

func (x *Placement) GetMaterials() map[uint32]string

func (*Placement) GetModel added in v0.1.29

func (x *Placement) GetModel() uint32

func (*Placement) GetTint added in v0.1.29

func (x *Placement) GetTint() []float32

func (*Placement) GetTransform added in v0.1.29

func (x *Placement) GetTransform() []float32

func (*Placement) MarshalJSON added in v0.1.29

func (x *Placement) MarshalJSON() ([]byte, error)

MarshalJSON marshals the Placement to JSON.

func (*Placement) MarshalProtoJSON added in v0.1.29

func (x *Placement) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the Placement message to JSON.

func (*Placement) MarshalProtoText added in v0.1.29

func (x *Placement) MarshalProtoText() string

func (*Placement) MarshalToSizedBufferVT added in v0.1.29

func (m *Placement) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*Placement) MarshalToVT added in v0.1.29

func (m *Placement) MarshalToVT(dAtA []byte) (int, error)

func (*Placement) MarshalVT added in v0.1.29

func (m *Placement) MarshalVT() (dAtA []byte, err error)

func (*Placement) ProtoMessage added in v0.1.29

func (*Placement) ProtoMessage()

func (*Placement) Reset added in v0.1.29

func (x *Placement) Reset()

func (*Placement) SizeVT added in v0.1.29

func (m *Placement) SizeVT() (n int)

func (*Placement) String added in v0.1.29

func (x *Placement) String() string

func (*Placement) UnmarshalJSON added in v0.1.29

func (x *Placement) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the Placement from JSON.

func (*Placement) UnmarshalProtoJSON added in v0.1.29

func (x *Placement) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the Placement message from JSON.

func (*Placement) UnmarshalVT added in v0.1.29

func (m *Placement) UnmarshalVT(dAtA []byte) error

type Placement_MaterialsEntry added in v0.1.29

type Placement_MaterialsEntry struct {
	Key   uint32 `protobuf:"varint,1,opt,name=key,proto3" json:"key,omitempty"`
	Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
	// contains filtered or unexported fields
}

func (*Placement_MaterialsEntry) GetKey added in v0.1.29

func (x *Placement_MaterialsEntry) GetKey() uint32

func (*Placement_MaterialsEntry) GetValue added in v0.1.29

func (x *Placement_MaterialsEntry) GetValue() string

func (*Placement_MaterialsEntry) MarshalJSON added in v0.1.29

func (x *Placement_MaterialsEntry) MarshalJSON() ([]byte, error)

MarshalJSON marshals the Placement_MaterialsEntry to JSON.

func (*Placement_MaterialsEntry) MarshalProtoJSON added in v0.1.29

func (x *Placement_MaterialsEntry) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the Placement_MaterialsEntry message to JSON.

func (*Placement_MaterialsEntry) MarshalProtoText added in v0.1.29

func (x *Placement_MaterialsEntry) MarshalProtoText() string

func (*Placement_MaterialsEntry) ProtoMessage added in v0.1.29

func (*Placement_MaterialsEntry) ProtoMessage()

func (*Placement_MaterialsEntry) Reset added in v0.1.29

func (x *Placement_MaterialsEntry) Reset()

func (*Placement_MaterialsEntry) String added in v0.1.29

func (x *Placement_MaterialsEntry) String() string

func (*Placement_MaterialsEntry) UnmarshalJSON added in v0.1.29

func (x *Placement_MaterialsEntry) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the Placement_MaterialsEntry from JSON.

func (*Placement_MaterialsEntry) UnmarshalProtoJSON added in v0.1.29

func (x *Placement_MaterialsEntry) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the Placement_MaterialsEntry message from JSON.

type Resource

type Resource struct {

	// Blocks are the resource's block tags in file order, such as "DATA".
	Blocks []string `protobuf:"bytes,1,rep,name=blocks,proto3" json:"blocks,omitempty"`
	// Json holds each KeyValues3 block decoded, as one JSON object keyed by
	// block tag.
	Json string `protobuf:"bytes,2,opt,name=json,proto3" json:"json,omitempty"`
	// contains filtered or unexported fields
}

Resource is any compiled resource's blocks.

func (*Resource) CloneMessageVT

func (m *Resource) CloneMessageVT() protobuf_go_lite.CloneMessage

func (*Resource) CloneVT

func (m *Resource) CloneVT() *Resource

func (*Resource) EqualMessageVT

func (this *Resource) EqualMessageVT(thatMsg any) bool

func (*Resource) EqualVT

func (this *Resource) EqualVT(that *Resource) bool

func (*Resource) GetBlocks

func (x *Resource) GetBlocks() []string

func (*Resource) GetJson

func (x *Resource) GetJson() string

func (*Resource) MarshalJSON

func (x *Resource) MarshalJSON() ([]byte, error)

MarshalJSON marshals the Resource to JSON.

func (*Resource) MarshalProtoJSON

func (x *Resource) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the Resource message to JSON.

func (*Resource) MarshalProtoText

func (x *Resource) MarshalProtoText() string

func (*Resource) MarshalToSizedBufferVT

func (m *Resource) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*Resource) MarshalToVT

func (m *Resource) MarshalToVT(dAtA []byte) (int, error)

func (*Resource) MarshalVT

func (m *Resource) MarshalVT() (dAtA []byte, err error)

func (*Resource) ProtoMessage

func (*Resource) ProtoMessage()

func (*Resource) Reset

func (x *Resource) Reset()

func (*Resource) SizeVT

func (m *Resource) SizeVT() (n int)

func (*Resource) String

func (x *Resource) String() string

func (*Resource) UnmarshalJSON

func (x *Resource) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the Resource from JSON.

func (*Resource) UnmarshalProtoJSON

func (x *Resource) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the Resource message from JSON.

func (*Resource) UnmarshalVT

func (m *Resource) UnmarshalVT(dAtA []byte) error

type Texture

type Texture struct {

	// Width is the largest mip's width in texels.
	Width uint32 `protobuf:"varint,1,opt,name=width,proto3" json:"width,omitempty"`
	// Height is the largest mip's height in texels.
	Height uint32 `protobuf:"varint,2,opt,name=height,proto3" json:"height,omitempty"`
	// Depth is the largest mip's depth; one for a flat texture.
	Depth uint32 `protobuf:"varint,3,opt,name=depth,proto3" json:"depth,omitempty"`
	// Format is the texture's stored format, as the game numbers it.
	Format uint32 `protobuf:"varint,4,opt,name=format,proto3" json:"format,omitempty"`
	// Mips is how many mips the file holds.
	Mips uint32 `protobuf:"varint,5,opt,name=mips,proto3" json:"mips,omitempty"`
	// Cube reports a cube map, whose mips hold six faces.
	Cube bool `protobuf:"varint,6,opt,name=cube,proto3" json:"cube,omitempty"`
	// Served reports that the mips route can answer this format's mips.
	Served bool `protobuf:"varint,7,opt,name=served,proto3" json:"served,omitempty"`
	// contains filtered or unexported fields
}

Texture is a compiled texture's header.

func (*Texture) CloneMessageVT

func (m *Texture) CloneMessageVT() protobuf_go_lite.CloneMessage

func (*Texture) CloneVT

func (m *Texture) CloneVT() *Texture

func (*Texture) EqualMessageVT

func (this *Texture) EqualMessageVT(thatMsg any) bool

func (*Texture) EqualVT

func (this *Texture) EqualVT(that *Texture) bool

func (*Texture) GetCube

func (x *Texture) GetCube() bool

func (*Texture) GetDepth

func (x *Texture) GetDepth() uint32

func (*Texture) GetFormat

func (x *Texture) GetFormat() uint32

func (*Texture) GetHeight

func (x *Texture) GetHeight() uint32

func (*Texture) GetMips

func (x *Texture) GetMips() uint32

func (*Texture) GetServed

func (x *Texture) GetServed() bool

func (*Texture) GetWidth

func (x *Texture) GetWidth() uint32

func (*Texture) MarshalJSON

func (x *Texture) MarshalJSON() ([]byte, error)

MarshalJSON marshals the Texture to JSON.

func (*Texture) MarshalProtoJSON

func (x *Texture) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the Texture message to JSON.

func (*Texture) MarshalProtoText

func (x *Texture) MarshalProtoText() string

func (*Texture) MarshalToSizedBufferVT

func (m *Texture) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*Texture) MarshalToVT

func (m *Texture) MarshalToVT(dAtA []byte) (int, error)

func (*Texture) MarshalVT

func (m *Texture) MarshalVT() (dAtA []byte, err error)

func (*Texture) ProtoMessage

func (*Texture) ProtoMessage()

func (*Texture) Reset

func (x *Texture) Reset()

func (*Texture) SizeVT

func (m *Texture) SizeVT() (n int)

func (*Texture) String

func (x *Texture) String() string

func (*Texture) UnmarshalJSON

func (x *Texture) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the Texture from JSON.

func (*Texture) UnmarshalProtoJSON

func (x *Texture) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the Texture message from JSON.

func (*Texture) UnmarshalVT

func (m *Texture) UnmarshalVT(dAtA []byte) error

type Vector added in v0.1.29

type Vector struct {
	X float32 `protobuf:"fixed32,1,opt,name=x,proto3" json:"x,omitempty"`
	Y float32 `protobuf:"fixed32,2,opt,name=y,proto3" json:"y,omitempty"`
	Z float32 `protobuf:"fixed32,3,opt,name=z,proto3" json:"z,omitempty"`
	W float32 `protobuf:"fixed32,4,opt,name=w,proto3" json:"w,omitempty"`
	// contains filtered or unexported fields
}

Vector is a four component material parameter.

func (*Vector) CloneMessageVT added in v0.1.29

func (m *Vector) CloneMessageVT() protobuf_go_lite.CloneMessage

func (*Vector) CloneVT added in v0.1.29

func (m *Vector) CloneVT() *Vector

func (*Vector) EqualMessageVT added in v0.1.29

func (this *Vector) EqualMessageVT(thatMsg any) bool

func (*Vector) EqualVT added in v0.1.29

func (this *Vector) EqualVT(that *Vector) bool

func (*Vector) GetW added in v0.1.29

func (x *Vector) GetW() float32

func (*Vector) GetX added in v0.1.29

func (x *Vector) GetX() float32

func (*Vector) GetY added in v0.1.29

func (x *Vector) GetY() float32

func (*Vector) GetZ added in v0.1.29

func (x *Vector) GetZ() float32

func (*Vector) MarshalJSON added in v0.1.29

func (x *Vector) MarshalJSON() ([]byte, error)

MarshalJSON marshals the Vector to JSON.

func (*Vector) MarshalProtoJSON added in v0.1.29

func (x *Vector) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the Vector message to JSON.

func (*Vector) MarshalProtoText added in v0.1.29

func (x *Vector) MarshalProtoText() string

func (*Vector) MarshalToSizedBufferVT added in v0.1.29

func (m *Vector) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*Vector) MarshalToVT added in v0.1.29

func (m *Vector) MarshalToVT(dAtA []byte) (int, error)

func (*Vector) MarshalVT added in v0.1.29

func (m *Vector) MarshalVT() (dAtA []byte, err error)

func (*Vector) ProtoMessage added in v0.1.29

func (*Vector) ProtoMessage()

func (*Vector) Reset added in v0.1.29

func (x *Vector) Reset()

func (*Vector) SizeVT added in v0.1.29

func (m *Vector) SizeVT() (n int)

func (*Vector) String added in v0.1.29

func (x *Vector) String() string

func (*Vector) UnmarshalJSON added in v0.1.29

func (x *Vector) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the Vector from JSON.

func (*Vector) UnmarshalProtoJSON added in v0.1.29

func (x *Vector) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the Vector message from JSON.

func (*Vector) UnmarshalVT added in v0.1.29

func (m *Vector) UnmarshalVT(dAtA []byte) error

type World added in v0.1.29

type World struct {

	// Models are the archive paths of the models the placements draw.
	Models []string `protobuf:"bytes,1,rep,name=models,proto3" json:"models,omitempty"`
	// Placements are the world's scene objects and aggregates.
	Placements []*Placement `protobuf:"bytes,2,rep,name=placements,proto3" json:"placements,omitempty"`
	// Materials holds each material a placement puts in place of a model's
	// own, by its name.
	Materials map[string]*Material `` /* 159-byte string literal not displayed */
	// Lighting is the map's baked light, absent for a map built without it.
	Lighting *Lighting `protobuf:"bytes,4,opt,name=lighting,proto3" json:"lighting,omitempty"`
	// contains filtered or unexported fields
}

World is a compiled map's static geometry: every model its world nodes place, and where. Entities, such as doors and moving props, are not part of it.

func (*World) CloneMessageVT added in v0.1.29

func (m *World) CloneMessageVT() protobuf_go_lite.CloneMessage

func (*World) CloneVT added in v0.1.29

func (m *World) CloneVT() *World

func (*World) EqualMessageVT added in v0.1.29

func (this *World) EqualMessageVT(thatMsg any) bool

func (*World) EqualVT added in v0.1.29

func (this *World) EqualVT(that *World) bool

func (*World) GetLighting added in v0.1.33

func (x *World) GetLighting() *Lighting

func (*World) GetMaterials added in v0.1.29

func (x *World) GetMaterials() map[string]*Material

func (*World) GetModels added in v0.1.29

func (x *World) GetModels() []string

func (*World) GetPlacements added in v0.1.29

func (x *World) GetPlacements() []*Placement

func (*World) MarshalJSON added in v0.1.29

func (x *World) MarshalJSON() ([]byte, error)

MarshalJSON marshals the World to JSON.

func (*World) MarshalProtoJSON added in v0.1.29

func (x *World) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the World message to JSON.

func (*World) MarshalProtoText added in v0.1.29

func (x *World) MarshalProtoText() string

func (*World) MarshalToSizedBufferVT added in v0.1.29

func (m *World) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*World) MarshalToVT added in v0.1.29

func (m *World) MarshalToVT(dAtA []byte) (int, error)

func (*World) MarshalVT added in v0.1.29

func (m *World) MarshalVT() (dAtA []byte, err error)

func (*World) ProtoMessage added in v0.1.29

func (*World) ProtoMessage()

func (*World) Reset added in v0.1.29

func (x *World) Reset()

func (*World) SizeVT added in v0.1.29

func (m *World) SizeVT() (n int)

func (*World) String added in v0.1.29

func (x *World) String() string

func (*World) UnmarshalJSON added in v0.1.29

func (x *World) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the World from JSON.

func (*World) UnmarshalProtoJSON added in v0.1.29

func (x *World) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the World message from JSON.

func (*World) UnmarshalVT added in v0.1.29

func (m *World) UnmarshalVT(dAtA []byte) error

type World_MaterialsEntry added in v0.1.29

type World_MaterialsEntry struct {
	Key   string    `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	Value *Material `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
	// contains filtered or unexported fields
}

func (*World_MaterialsEntry) GetKey added in v0.1.29

func (x *World_MaterialsEntry) GetKey() string

func (*World_MaterialsEntry) GetValue added in v0.1.29

func (x *World_MaterialsEntry) GetValue() *Material

func (*World_MaterialsEntry) MarshalJSON added in v0.1.29

func (x *World_MaterialsEntry) MarshalJSON() ([]byte, error)

MarshalJSON marshals the World_MaterialsEntry to JSON.

func (*World_MaterialsEntry) MarshalProtoJSON added in v0.1.29

func (x *World_MaterialsEntry) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the World_MaterialsEntry message to JSON.

func (*World_MaterialsEntry) MarshalProtoText added in v0.1.29

func (x *World_MaterialsEntry) MarshalProtoText() string

func (*World_MaterialsEntry) ProtoMessage added in v0.1.29

func (*World_MaterialsEntry) ProtoMessage()

func (*World_MaterialsEntry) Reset added in v0.1.29

func (x *World_MaterialsEntry) Reset()

func (*World_MaterialsEntry) String added in v0.1.29

func (x *World_MaterialsEntry) String() string

func (*World_MaterialsEntry) UnmarshalJSON added in v0.1.29

func (x *World_MaterialsEntry) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the World_MaterialsEntry from JSON.

func (*World_MaterialsEntry) UnmarshalProtoJSON added in v0.1.29

func (x *World_MaterialsEntry) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the World_MaterialsEntry message from JSON.

Jump to

Keyboard shortcuts

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