Documentation ¶
Overview ¶
Package rbxl implements a decoder and encoder for Roblox's binary file format.
The easiest way to decode and encode files is through the functions DeserializePlace, SerializePlace, DeserializeModel, and SerializeModel. These decode and encode directly between byte streams and Root structures specified by the rbxfile package. For most purposes, this is all that is required to read and write Roblox binary files. Further documentation gives an overview of how the package works internally.
Overview ¶
A Serializer is used to transform data from byte streams to Root structures and back. A serializer specifies a decoder and encoder. Both a decoder and encoder combined is referred to as a "codec".
Codecs transform data between a generic rbxfile.Root structure, and this package's "format model" structure. Custom codecs can be implemented. For example, you might wish to decode files normally, but encode them in an alternative way:
serializer := NewSerializer(nil, CustomEncoder)
Custom codecs can be used with a Serializer by implementing the Decoder and Encoder interfaces. Both do not need to be implemented. In the example above, passing nil as an argument causes the serializer to use the default "RobloxCodec", which implements both a default decoder and encoder. This codec attempts to emulate how Roblox decodes and encodes its files.
A FormatModel is the representation of the file format itself, rather than the data it contains. The FormatModel is like a buffer between the byte stream and the Root structure. FormatModels can be encoded (and rarely, decoded) to and from Root structures in multiple ways, which is specified by codecs. However, there is only one way to encode and decode to and from a byte stream, which is handled by the FormatModel.
Index ¶
- Constants
- Variables
- func DecodeValue(value Value) rbxfile.Value
- func DeserializeModel(r io.Reader) (root *rbxfile.Root, err error)
- func DeserializePlace(r io.Reader) (root *rbxfile.Root, err error)
- func SerializeModel(w io.Writer, root *rbxfile.Root) (err error)
- func SerializePlace(w io.Writer, root *rbxfile.Root) (err error)
- func ValuesToBytes(t Type, a []Value) (b []byte, err error)
- type Chunk
- type ChunkEnd
- type ChunkInstance
- type ChunkMeta
- type ChunkParent
- type ChunkProperty
- type ChunkSharedStrings
- type ChunkUnknown
- type Decoder
- type Encoder
- type ErrChunk
- type ErrInvalidType
- type ErrUnrecognizedVersion
- type ErrValue
- type FormatModel
- type Mode
- type RobloxCodec
- type Serializer
- type SharedString
- type Type
- type Value
- type ValueAxes
- type ValueBool
- type ValueBrickColor
- type ValueCFrame
- type ValueCFrameQuat
- type ValueColor3
- type ValueColor3uint8
- type ValueColorSequence
- type ValueColorSequenceKeypoint
- type ValueDouble
- type ValueFaces
- type ValueFloat
- type ValueInt
- type ValueInt64
- type ValueNumberRange
- type ValueNumberSequence
- type ValueNumberSequenceKeypoint
- type ValuePhysicalProperties
- type ValueRay
- type ValueRect
- type ValueReference
- type ValueSharedString
- type ValueString
- type ValueToken
- type ValueUDim
- type ValueUDim2
- type ValueVector2
- type ValueVector2int16
- type ValueVector3
- type ValueVector3int16
Constants ¶
const BinaryHeader = "\x89\xff\r\n\x1a\n"
BinaryHeader is the header magic of a binary file.
const BinaryMarker = "!"
BinaryMarker indicates the start of a binary file, rather than an XML file.
const RobloxSig = "<roblox"
RobloxSig is the signature a Roblox file (binary or XML).
Variables ¶
var ( ErrInvalidSig = errors.New("invalid signature") ErrCorruptHeader = errors.New("the file header is corrupted") ErrChunkParentArray = errors.New("length of parent array does not match children array") )
var ( WarnReserveNonZero = errors.New("reserved space in file header is non-zero") WarnEndChunkCompressed = errors.New("end chunk is compressed") WarnEndChunkContent = errors.New("end chunk content is not `</roblox>`") WarnEndChunkNotLast = errors.New("end chunk is not the last chunk") )
Functions ¶
func DecodeValue ¶ added in v0.3.0
DecodeValue converts a Value to a rbxfile.Value. Returns nil if the value could not be decoded.
ValueString is always converted to a rbxfile.ValueString.
ValueReference and ValueSharedString, which require external information in order to decode, return nil.
func DeserializeModel ¶
Deserialize decodes data from r into a Root structure using the default decoder. Data is interpreted as a Roblox model file.
func DeserializePlace ¶
Deserialize decodes data from r into a Root structure using the default decoder. Data is interpreted as a Roblox place file.
func SerializeModel ¶
Serialize encodes data from a Root structure to w using the default encoder. Data is interpreted as a Roblox model file.
func SerializePlace ¶
Serialize encodes data from a Root structure to w using the default encoder. Data is interpreted as a Roblox place file.
Types ¶
type Chunk ¶
type Chunk interface { // Signature returns a signature used to identify the chunk's type. Signature() [4]byte // Compressed returns whether the chunk was compressed when decoding, or // whether thed chunk should be compressed when encoding. Compressed() bool // SetCompressed sets whether the chunk should be compressed when // encoding. SetCompressed(bool) // ReadFrom processes the payload of a decompressed chunk. ReadFrom(r io.Reader) (n int64, err error) // WriteTo writes the data from a chunk to an uncompressed payload. The // payload will be compressed afterward depending on the chunk's // compression settings. WriteTo(w io.Writer) (n int64, err error) }
Chunk is a portion of the model that contains distinct data.
type ChunkEnd ¶
type ChunkEnd struct { // Whether the chunk is compressed. IsCompressed bool // The raw decompressed content of the chunk. For maximum compatibility, // the content should be "</roblox>", and the chunk should be // uncompressed. The decoder will emit warnings indicating such, if this // is not the case. Content []byte }
ChunkEnd is a Chunk that signals the end of the file. It causes the decoder to stop reading chunks, so it should be the last chunk.
func (*ChunkEnd) Compressed ¶
func (*ChunkEnd) SetCompressed ¶
type ChunkInstance ¶
type ChunkInstance struct { // Whether the chunk is compressed. IsCompressed bool // ClassID is a number identifying the instance group. ClassID int32 // ClassName indicates the ClassName property of each instance in the // group. ClassName string // InstanceIDs is a list of numbers that identify each instance in the // group, which can be referred to in other chunks. The length of the // array indicates how many instances are in the group. InstanceIDs []int32 // IsService indicates the chunk has GetService flags. IsService bool // GetService is a list of flags indicating how to treat each instance in // the group. Each byte in the list corresponds to the instance in // InstanceIDs. // // A value of 0x0 will treat the instance normally, using Instance.new() // to create the instance. // // A value of 0x1 will treat the instance as a service, using // game:GetService() to get the instance. GetService []byte }
ChunkInstance is a Chunk that contains information about the instances in the file. Instances of the same ClassName are grouped together into this kind of chunk, which are called "instance groups".
func (*ChunkInstance) Compressed ¶
func (c *ChunkInstance) Compressed() bool
func (*ChunkInstance) SetCompressed ¶
func (c *ChunkInstance) SetCompressed(b bool)
func (ChunkInstance) Signature ¶
func (ChunkInstance) Signature() [4]byte
type ChunkMeta ¶
ChunkMeta is a Chunk that contains file metadata.
func (*ChunkMeta) Compressed ¶
func (*ChunkMeta) SetCompressed ¶
type ChunkParent ¶
type ChunkParent struct { // Whether the chunk is compressed. IsCompressed bool // Version is the version of the chunk. Reserved so that the format of the // parent chunk can be changed without changing the version of the entire // file format. Version uint8 // Children is a list of instances referred to by instance ID. The length // of this array should be equal to InstanceCount. Children []int32 // Parents is a list of instances, referred to by instance ID, that // indicate the Parent of the corresponding instance in the Children // array. The length of this array should be equal to the length of // Children. Parents []int32 }
ChunkParent is a Chunk that contains information about the parent-child relationships between instances in the model.
func (*ChunkParent) Compressed ¶
func (c *ChunkParent) Compressed() bool
func (*ChunkParent) SetCompressed ¶
func (c *ChunkParent) SetCompressed(b bool)
func (ChunkParent) Signature ¶
func (ChunkParent) Signature() [4]byte
type ChunkProperty ¶
type ChunkProperty struct { // Whether the chunk is compressed. IsCompressed bool // ClassID is the ID of an instance group contained in a ChunkInstance. ClassID int32 // PropertyName is the name of a valid property in each instance of the // corresponding instance group. PropertyName string // DataType is a number indicating the type of the property. DataType Type // Properties is a list of Values of the given DataType. Each value in the // array corresponds to the property of an instance in the specified // group. Properties []Value }
ChunkProperty is a Chunk that contains information about the properties of a group of instances.
func (*ChunkProperty) Compressed ¶
func (c *ChunkProperty) Compressed() bool
func (*ChunkProperty) SetCompressed ¶
func (c *ChunkProperty) SetCompressed(b bool)
func (ChunkProperty) Signature ¶
func (ChunkProperty) Signature() [4]byte
type ChunkSharedStrings ¶
type ChunkSharedStrings struct { bool }IsCompressed
ChunkSharedStrings is a Chunk that contains shared strings.
func (*ChunkSharedStrings) Compressed ¶
func (c *ChunkSharedStrings) Compressed() bool
func (*ChunkSharedStrings) ReadFrom ¶
func (c *ChunkSharedStrings) ReadFrom(r io.Reader) (n int64, err error)
func (*ChunkSharedStrings) SetCompressed ¶
func (c *ChunkSharedStrings) SetCompressed(b bool)
func (ChunkSharedStrings) Signature ¶
func (ChunkSharedStrings) Signature() [4]byte
type ChunkUnknown ¶
type ChunkUnknown struct { // Whether the chunk is compressed. IsCompressed bool // The signature of the chunk. Sig [4]byte // The raw content of the chunk. Bytes []byte }
ChunkUnknown is a Chunk that is not known by the format.
func (*ChunkUnknown) Compressed ¶
func (c *ChunkUnknown) Compressed() bool
func (*ChunkUnknown) Error ¶
func (c *ChunkUnknown) Error() string
func (*ChunkUnknown) SetCompressed ¶
func (c *ChunkUnknown) SetCompressed(b bool)
func (*ChunkUnknown) Signature ¶
func (c *ChunkUnknown) Signature() [4]byte
type Decoder ¶
type Decoder interface {
Decode(model *FormatModel) (root *rbxfile.Root, err error)
}
Decoder decodes a FormatModel to a generic rbxfile.Root structure.
type Encoder ¶
type Encoder interface {
Encode(root *rbxfile.Root) (model *FormatModel, err error)
}
Encoder encodes a rbxfile.Root structure to a FormatModel.
type ErrInvalidType ¶
type ErrInvalidType struct { Chunk *ChunkProperty Bytes []byte }
func (*ErrInvalidType) Error ¶
func (err *ErrInvalidType) Error() string
type ErrUnrecognizedVersion ¶
type ErrUnrecognizedVersion uint16
func (ErrUnrecognizedVersion) Error ¶
func (err ErrUnrecognizedVersion) Error() string
type FormatModel ¶
type FormatModel struct { // Version indicates the version of the format model. Version uint16 // ClassCount is the number of unique classes in the model. ClassCount uint32 // InstanceCount is the number of unique instances in the model. InstanceCount uint32 // Chunks is a list of Chunks present in the model. Chunks []Chunk // If Strict is true, certain errors normally emitted as warnings are // instead emitted as errors. Strict bool // Warnings is a list of non-fatal problems that have occurred. This will // be cleared and populated when calling either ReadFrom and WriteTo. // Codecs may also clear and populate this when decoding or encoding. Warnings []error }
FormatModel models Roblox's binary file format. Directly, it can be used to control exactly how a file is encoded.
type RobloxCodec ¶
type RobloxCodec struct {
Mode Mode
}
RobloxCodec implements Decoder and Encoder to emulate Roblox's internal codec as closely as possible.
func (RobloxCodec) Decode ¶
func (c RobloxCodec) Decode(model *FormatModel) (root *rbxfile.Root, err error)
func (RobloxCodec) Encode ¶
func (c RobloxCodec) Encode(root *rbxfile.Root) (model *FormatModel, err error)
type Serializer ¶
type Serializer struct { Decoder Decoder Encoder Encoder // DecoderXML is used to decode the legacy XML format. If DecoderXML is // not nil, then the serializer will attempt to detect if the stream is in // the XML format. If so, then it will be decoded using an rbxlx.Serializer // with the given decoder. DecoderXML rbxlx.Decoder }
Serializer implements functions that decode and encode directly between byte streams and rbxfile Root structures.
func NewSerializer ¶
func NewSerializer(d Decoder, e Encoder) Serializer
NewSerializer returns a new Serializer with a specified decoder and encoder. If either value is nil, the default RobloxCodec will be used in its place. DecoderXML is set to rbxlx.RobloxCodec.
func (Serializer) Deserialize ¶
Deserialize decodes data from r into a Root structure using the specified decoder.
type SharedString ¶
type SharedString struct {}
type Type ¶
type Type byte
Type represents a type that can be serialized.
const ( TypeInvalid Type = 0x0 TypeString Type = 0x1 TypeBool Type = 0x2 TypeInt Type = 0x3 TypeFloat Type = 0x4 TypeDouble Type = 0x5 TypeUDim Type = 0x6 TypeUDim2 Type = 0x7 TypeRay Type = 0x8 TypeFaces Type = 0x9 TypeAxes Type = 0xA TypeBrickColor Type = 0xB TypeColor3 Type = 0xC TypeVector2 Type = 0xD TypeVector3 Type = 0xE TypeVector2int16 Type = 0xF TypeCFrame Type = 0x10 TypeCFrameQuat Type = 0x11 TypeToken Type = 0x12 TypeReference Type = 0x13 TypeVector3int16 Type = 0x14 TypeNumberSequence Type = 0x15 TypeColorSequence Type = 0x16 TypeNumberRange Type = 0x17 TypeRect Type = 0x18 TypePhysicalProperties Type = 0x19 TypeColor3uint8 Type = 0x1A TypeInt64 Type = 0x1B )
func FromValueType ¶
FromValueType returns the Type corresponding to a given rbxfile.Type.
func (Type) FieldSize ¶ added in v0.3.0
FieldSize returns the number of bytes of each field within a value of the type, where the type is a variable-length array of fields. Returns 0 if the type is invalid or not array-like.
func (Type) Size ¶ added in v0.3.0
Size returns the number of bytes required to hold a value of the type. Returns < 0 if the size depends on the value, and 0 if the type is invalid.
A Size() of < 0 with a non-zero FieldSize() indicates an array-like type, where the first 4 bytes are the size of the array, and each element has a size of FieldSize().
A Size() of < 0 with a FieldSize() of 0 indicates a type with a customized size.
type Value ¶
type Value interface { // Type returns an identifier indicating the type. Type() Type // BytesLen returns the number of bytes required to encode the value. BytesLen() int // Bytes encodes value to buf, panicking if buf is shorter than BytesLen(). Bytes(buf []byte) // FromBytes decodes the value from buf. Returns an error if the value could // not be decoded. If successful, BytesLen() will return the number of bytes // read from buf. FromBytes(buf []byte) error }
Value represents a value of a certain Type.
func EncodeValue ¶ added in v0.3.0
EncodeValue converts a rbxfile.Value to a Value. Returns nil if the value could not be encoded.
Because the rbxl format has only one string type, the following types are converted to ValueString:
- rbxfile.ValueString
- rbxfile.ValueBinaryString
- rbxfile.ValueProtectedString
- rbxfile.ValueContent
rbxfile.ValueReference and rbxfile.ValueSharedString, which require external information in order to encode, return nil.
type ValueBrickColor ¶
type ValueBrickColor uint32
func (ValueBrickColor) Bytes ¶
func (v ValueBrickColor) Bytes(b []byte)
func (ValueBrickColor) BytesLen ¶
func (v ValueBrickColor) BytesLen() int
func (*ValueBrickColor) FromBytes ¶
func (v *ValueBrickColor) FromBytes(b []byte) error
func (ValueBrickColor) Type ¶
func (ValueBrickColor) Type() Type
type ValueCFrame ¶
type ValueCFrame struct { Special uint8 Rotation [9]float32 Position ValueVector3 }
func (ValueCFrame) Bytes ¶
func (v ValueCFrame) Bytes(b []byte)
func (ValueCFrame) BytesLen ¶
func (v ValueCFrame) BytesLen() int
func (*ValueCFrame) FromBytes ¶
func (v *ValueCFrame) FromBytes(b []byte) error
func (ValueCFrame) ToCFrameQuat ¶ added in v0.3.0
func (v ValueCFrame) ToCFrameQuat() (q ValueCFrameQuat)
ToCFrameQuat converts the value to a ValueCFrameQuat.
func (ValueCFrame) Type ¶
func (ValueCFrame) Type() Type
type ValueCFrameQuat ¶ added in v0.3.0
type ValueCFrameQuat struct { Special uint8 QX, QY, QZ, QW float32 Position ValueVector3 }
func (ValueCFrameQuat) Bytes ¶ added in v0.3.0
func (v ValueCFrameQuat) Bytes(b []byte)
func (ValueCFrameQuat) BytesLen ¶ added in v0.3.0
func (v ValueCFrameQuat) BytesLen() int
func (*ValueCFrameQuat) FromBytes ¶ added in v0.3.0
func (v *ValueCFrameQuat) FromBytes(b []byte) error
func (ValueCFrameQuat) ToCFrame ¶ added in v0.3.0
func (v ValueCFrameQuat) ToCFrame() ValueCFrame
ToCFrame converts the value to a ValueCFrame.
func (ValueCFrameQuat) Type ¶ added in v0.3.0
func (ValueCFrameQuat) Type() Type
type ValueColor3 ¶
type ValueColor3 struct {
R, G, B ValueFloat
}
func (ValueColor3) Bytes ¶
func (v ValueColor3) Bytes(b []byte)
func (ValueColor3) BytesLen ¶
func (v ValueColor3) BytesLen() int
func (*ValueColor3) FromBytes ¶
func (v *ValueColor3) FromBytes(b []byte) error
func (ValueColor3) Type ¶
func (ValueColor3) Type() Type
type ValueColor3uint8 ¶
type ValueColor3uint8 struct {
R, G, B byte
}
func (ValueColor3uint8) Bytes ¶
func (v ValueColor3uint8) Bytes(b []byte)
func (ValueColor3uint8) BytesLen ¶
func (v ValueColor3uint8) BytesLen() int
func (*ValueColor3uint8) FromBytes ¶
func (v *ValueColor3uint8) FromBytes(b []byte) error
func (ValueColor3uint8) Type ¶
func (ValueColor3uint8) Type() Type
type ValueColorSequence ¶
type ValueColorSequence []ValueColorSequenceKeypoint
func (ValueColorSequence) Bytes ¶
func (v ValueColorSequence) Bytes(b []byte)
func (ValueColorSequence) BytesLen ¶
func (v ValueColorSequence) BytesLen() int
func (*ValueColorSequence) FromBytes ¶
func (v *ValueColorSequence) FromBytes(b []byte) error
func (ValueColorSequence) Type ¶
func (ValueColorSequence) Type() Type
type ValueColorSequenceKeypoint ¶
type ValueColorSequenceKeypoint struct { Time float32 Value ValueColor3 Envelope float32 }
type ValueDouble ¶
type ValueDouble float64
func (ValueDouble) Bytes ¶
func (v ValueDouble) Bytes(b []byte)
func (ValueDouble) BytesLen ¶
func (v ValueDouble) BytesLen() int
func (*ValueDouble) FromBytes ¶
func (v *ValueDouble) FromBytes(b []byte) error
func (ValueDouble) Type ¶
func (ValueDouble) Type() Type
type ValueFaces ¶
type ValueFaces struct {
Right, Top, Back, Left, Bottom, Front bool
}
func (ValueFaces) Bytes ¶
func (v ValueFaces) Bytes(b []byte)
func (ValueFaces) BytesLen ¶
func (v ValueFaces) BytesLen() int
func (*ValueFaces) FromBytes ¶
func (v *ValueFaces) FromBytes(b []byte) error
func (ValueFaces) Type ¶
func (ValueFaces) Type() Type
type ValueFloat ¶
type ValueFloat float32
func (ValueFloat) Bytes ¶
func (v ValueFloat) Bytes(b []byte)
func (ValueFloat) BytesLen ¶
func (v ValueFloat) BytesLen() int
func (*ValueFloat) FromBytes ¶
func (v *ValueFloat) FromBytes(b []byte) error
func (ValueFloat) Type ¶
func (ValueFloat) Type() Type
type ValueInt64 ¶
type ValueInt64 int64
func (ValueInt64) Bytes ¶
func (v ValueInt64) Bytes(b []byte)
func (ValueInt64) BytesLen ¶
func (v ValueInt64) BytesLen() int
func (*ValueInt64) FromBytes ¶
func (v *ValueInt64) FromBytes(b []byte) error
func (ValueInt64) Type ¶
func (ValueInt64) Type() Type
type ValueNumberRange ¶
type ValueNumberRange struct {
Min, Max float32
}
func (ValueNumberRange) Bytes ¶
func (v ValueNumberRange) Bytes(b []byte)
func (ValueNumberRange) BytesLen ¶
func (v ValueNumberRange) BytesLen() int
func (*ValueNumberRange) FromBytes ¶
func (v *ValueNumberRange) FromBytes(b []byte) error
func (ValueNumberRange) Type ¶
func (ValueNumberRange) Type() Type
type ValueNumberSequence ¶
type ValueNumberSequence []ValueNumberSequenceKeypoint
func (ValueNumberSequence) Bytes ¶
func (v ValueNumberSequence) Bytes(b []byte)
func (ValueNumberSequence) BytesLen ¶
func (v ValueNumberSequence) BytesLen() int
func (*ValueNumberSequence) FromBytes ¶
func (v *ValueNumberSequence) FromBytes(b []byte) error
func (ValueNumberSequence) Type ¶
func (ValueNumberSequence) Type() Type
type ValueNumberSequenceKeypoint ¶
type ValueNumberSequenceKeypoint struct {
Time, Value, Envelope float32
}
type ValuePhysicalProperties ¶
type ValuePhysicalProperties struct { CustomPhysics byte Density float32 Friction float32 Elasticity float32 FrictionWeight float32 ElasticityWeight float32 }
func (ValuePhysicalProperties) Bytes ¶
func (v ValuePhysicalProperties) Bytes(b []byte)
func (ValuePhysicalProperties) BytesLen ¶
func (v ValuePhysicalProperties) BytesLen() int
func (*ValuePhysicalProperties) FromBytes ¶
func (v *ValuePhysicalProperties) FromBytes(b []byte) error
func (ValuePhysicalProperties) Type ¶
func (ValuePhysicalProperties) Type() Type
type ValueRay ¶
type ValueRect ¶ added in v0.3.0
type ValueRect struct {
Min, Max ValueVector2
}
type ValueReference ¶
type ValueReference int32
func (ValueReference) Bytes ¶
func (v ValueReference) Bytes(b []byte)
func (ValueReference) BytesLen ¶
func (v ValueReference) BytesLen() int
func (*ValueReference) FromBytes ¶
func (v *ValueReference) FromBytes(b []byte) error
func (ValueReference) Type ¶
func (ValueReference) Type() Type
type ValueSharedString ¶
type ValueSharedString uint32
func (ValueSharedString) Bytes ¶
func (v ValueSharedString) Bytes(b []byte)
func (ValueSharedString) BytesLen ¶
func (v ValueSharedString) BytesLen() int
func (*ValueSharedString) FromBytes ¶
func (v *ValueSharedString) FromBytes(b []byte) error
func (ValueSharedString) Type ¶
func (ValueSharedString) Type() Type
type ValueString ¶
type ValueString []byte
func (ValueString) Bytes ¶
func (v ValueString) Bytes(b []byte)
func (ValueString) BytesLen ¶
func (v ValueString) BytesLen() int
func (*ValueString) FromBytes ¶
func (v *ValueString) FromBytes(b []byte) error
func (ValueString) Type ¶
func (ValueString) Type() Type
type ValueToken ¶
type ValueToken uint32
func (ValueToken) Bytes ¶
func (v ValueToken) Bytes(b []byte)
func (ValueToken) BytesLen ¶
func (v ValueToken) BytesLen() int
func (*ValueToken) FromBytes ¶
func (v *ValueToken) FromBytes(b []byte) error
func (ValueToken) Type ¶
func (ValueToken) Type() Type
type ValueUDim ¶
type ValueUDim struct { Scale ValueFloat Offset ValueInt }
type ValueUDim2 ¶
type ValueUDim2 struct { ScaleX ValueFloat ScaleY ValueFloat OffsetX ValueInt OffsetY ValueInt }
func (ValueUDim2) Bytes ¶
func (v ValueUDim2) Bytes(b []byte)
func (ValueUDim2) BytesLen ¶
func (v ValueUDim2) BytesLen() int
func (*ValueUDim2) FromBytes ¶
func (v *ValueUDim2) FromBytes(b []byte) error
func (ValueUDim2) Type ¶
func (ValueUDim2) Type() Type
type ValueVector2 ¶
type ValueVector2 struct {
X, Y ValueFloat
}
func (ValueVector2) Bytes ¶
func (v ValueVector2) Bytes(b []byte)
func (ValueVector2) BytesLen ¶
func (v ValueVector2) BytesLen() int
func (*ValueVector2) FromBytes ¶
func (v *ValueVector2) FromBytes(b []byte) error
func (ValueVector2) Type ¶
func (ValueVector2) Type() Type
type ValueVector2int16 ¶
type ValueVector2int16 struct {
X, Y int16
}
func (ValueVector2int16) Bytes ¶
func (v ValueVector2int16) Bytes(b []byte)
func (ValueVector2int16) BytesLen ¶
func (v ValueVector2int16) BytesLen() int
func (*ValueVector2int16) FromBytes ¶
func (v *ValueVector2int16) FromBytes(b []byte) error
func (ValueVector2int16) Type ¶
func (ValueVector2int16) Type() Type
type ValueVector3 ¶
type ValueVector3 struct {
X, Y, Z ValueFloat
}
func (ValueVector3) Bytes ¶
func (v ValueVector3) Bytes(b []byte)
func (ValueVector3) BytesLen ¶
func (v ValueVector3) BytesLen() int
func (*ValueVector3) FromBytes ¶
func (v *ValueVector3) FromBytes(b []byte) error
func (ValueVector3) Type ¶
func (ValueVector3) Type() Type
type ValueVector3int16 ¶
type ValueVector3int16 struct {
X, Y, Z int16
}
func (ValueVector3int16) Bytes ¶
func (v ValueVector3int16) Bytes(b []byte)
func (ValueVector3int16) BytesLen ¶
func (v ValueVector3int16) BytesLen() int
func (*ValueVector3int16) FromBytes ¶
func (v *ValueVector3int16) FromBytes(b []byte) error
func (ValueVector3int16) Type ¶
func (ValueVector3int16) Type() Type