Documentation
¶
Index ¶
- func BuildBuffer(buf Buffer) *bytes.Reader
- func Decode[T any](d Decoder, data []byte) (T, error)
- func IsNilish(val any) bool
- func Marshal(v any) ([]byte, error)
- func ParseJsonUsingBuffers[T any](buffers []Buffer, bufferViews []BufferView, data []byte) (T, error)
- func Unmarshal[T any](data []byte) (T, error)
- type Buffer
- type BufferView
- type Bytes
- type Decoder
- type Encoder
- type Png
- type Schema
- type Serializable
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildBuffer ¶
func ParseJsonUsingBuffers ¶
func ParseJsonUsingBuffers[T any](buffers []Buffer, bufferViews []BufferView, data []byte) (T, error)
Types ¶
type Buffer ¶
type Buffer struct { ByteLength int `json:"byteLength"` // The length of the buffer in bytes. URI string `json:"uri,omitempty"` // The URI (or IRI) of the buffer. Relative paths are relative to the current glTF asset. Instead of referencing an external file, this field **MAY** contain a `data:`-URI. }
type BufferView ¶
type Bytes ¶ added in v0.2.0
type Bytes struct {
Data []byte
}
Catch-all helper for serializing arbitrary binary data
type Encoder ¶
type Encoder struct {
// contains filtered or unexported fields
}
func (*Encoder) StartNewBuffer ¶
func (e *Encoder) StartNewBuffer()
type Schema ¶
type Schema[T any] struct { Buffers []Buffer `json:"buffers,omitempty"` BufferViews []BufferView `json:"bufferViews,omitempty"` Data T `json:"data"` }
Click to show internal directories.
Click to hide internal directories.