Documentation ¶
Index ¶
Constants ¶
View Source
const (
// ExtensionName defines the KHR_draco_mesh_compression unique key.
ExtensionName = "KHR_draco_mesh_compression"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Mesh ¶
type Mesh struct {
// contains filtered or unexported fields
}
Mesh contains the necessary information to process a draco-encoded in a gltf context.
func UnmarshalMesh ¶
UnmarshalMesh unmarshal the draco-encoded mesh from a gltf.BufferView
func (Mesh) ReadAttr ¶
ReadAttr reads the named attribute of a gltf.Primitive. If the attribute is defined in the primitive but not in the mesh it fallbacks to modeler.ReadAccessor. buffer can be nil.
func (Mesh) ReadIndices ¶
ReadIndices reads the faces of the Mesh. buffer can be nil.
type PrimitiveExt ¶
type PrimitiveExt struct { Extensions gltf.Extensions `json:"extensions,omitempty"` Extras interface{} `json:"extras,omitempty"` BufferView uint32 `json:"bufferView"` Attributes gltf.Attribute `json:"attributes"` }
PrimitiveExt extends the gltf.Primtive info to handle draco compressed meshes.
func GetPrimitiveExt ¶
func GetPrimitiveExt(p *gltf.Primitive) *PrimitiveExt
GetPrimitiveExt retrieve a PrimitiveExt from p. If p does not contain the draco extensions it returns nil.
Click to show internal directories.
Click to hide internal directories.