dsltf

package
v0.0.0-...-ddc071b Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2023 License: GPL-3.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Accessor

type Accessor struct {
	BufferView    uint32
	ByteOffset    uint32
	Type          string
	ComponentType uint32
	Count         uint32
	Min           []float32
	Max           []float32
}

Accessor should be immutable to the GLTF asset

type AnimSampler

type AnimSampler struct {
	Input          uint32
	Interpoloation string
	Output         uint32
}

type Animation

type Animation struct {
	Channels []Channel
	Samplers []AnimSampler
}

type Buffer

type Buffer struct {
	Uri        string
	ByteLength uint32
}

type BufferView

type BufferView struct {
	Buffer     uint32
	ByteOffset uint32
	ByteLength uint32
	ByteStride uint32
	Target     uint32
}

type Camera

type Camera struct {
	Type         string
	Perpective   PersCamera
	Orthographic OrthCamera
}

type Channel

type Channel struct {
	Target []TargetAnim
}

type ColorTexture

type ColorTexture struct {
	Scale    float32
	Strength float32
	Index    uint32
	TexCoord uint32
}

type DSLTF

type DSLTF struct {
	Scenes       []Scene
	Nodes        []Node
	Cameras      []Camera
	Meshes       []Mesh
	Buffers      []Buffer
	BufferView   []BufferView
	Material     []Material
	Textures     []TextureDescriptor
	Images       []Image
	Sampler      []Sampler
	Skins        []Skin
	Animations   []Animation
	MasterBuffer []byte
}

DSLTF Main Root Node

type Image

type Image struct {
	Uri        string
	BufferView uint32
	MimeType   string
}

type Material

type Material struct {
	PbrMetallicRoughness PbrMetallicRough
}

type Mesh

type Mesh struct {
	Attributes map[string]uint32 // Accessor Index for Mesh attributes ("POSITION", "NORMAL", etc)
	Primitives []Primitive
}

type Node

type Node struct {
	Name        string
	Mesh        uint32
	Camera      uint32
	Skin        uint32
	Matrix      []float32
	Translation []float32
	Rotation    []float32
	Scale       []float32
	Children    []uint32
}

Scenes

type OrthCamera

type OrthCamera struct {
	Xmag  float32
	Ymag  float32
	Zfar  float32
	Znear float32
}

type PbrMetallicRough

type PbrMetallicRough struct {
	BaseColorTexture         ColorTexture
	BaseColorFactor          []float32
	MetallicRoughnessTexture ColorTexture
	MetallicFactor           float32
	RoughnessFactor          float32
	NormalTexture            ColorTexture
	EmissiveTexture          ColorTexture
	OcclusionTexture         ColorTexture
	EmmissiveFactor          []float32
}

type PersCamera

type PersCamera struct {
	AspectRatio float32
	Yfov        float32
	Zfar        float32
	Znear       float32
}

type Primitive

type Primitive struct {
	Indices  uint32
	Mode     uint32
	Material uint32
	Targets  map[string]uint32 //Map attributes to morph target accessors
	Weights  []float32         //Mesh Weights
}

type Sampler

type Sampler struct {
	MagFilter uint32
	MinFilter uint32
	WrapS     uint32
	WrapT     uint32
}

type Scene

type Scene struct {
	Nodes []uint32
}

type Skin

type Skin struct {
	InverseBindMatrices uint32 //Accessor whic references Joint Matrices buffers
	Joints              []uint32
}

SKINS and Animations

type TargetAnim

type TargetAnim struct {
	Node uint32
	Path string
}

type TextureDescriptor

type TextureDescriptor struct {
	Source  uint32
	Sampler uint32
}

Textures

Jump to

Keyboard shortcuts

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