glTF

package
v0.0.0-...-dc22212 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2016 License: MIT Imports: 3 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 {
	GlTFChildOfRootProperty
	ByteStride    int       `json:"byteStride" validator:"gte=0, lte=255"`
	ComponentType int       `json:"componentType" validator:"required"`
	Count         int       `json:"count" validator:"required, gte=1"`
	Type          string    `json:"type,omitempty" validator:"required"`
	Max           []float64 `json:"max,omitempty"`
	Min           []float64 `json:"min,omitempty"`
	BufferView    GlTFid    `json:"bufferView,omitempty" validator:"required"`
	ByteOffset    int       `json:"byteOffset" validator:"required, gte=0"`
}

http://json-schema.org/draft-03/schema A typed view into a bufferView. A bufferView contains raw binary data. An accessor provides a typed view into a bufferView or a subset of a bufferView similar to how WebGL's `vertexAttribPointer()` defines an attribute in a buffer.

func (Accessor) MarshalEasyJSON

func (v Accessor) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (Accessor) MarshalJSON

func (v Accessor) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*Accessor) UnmarshalEasyJSON

func (v *Accessor) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*Accessor) UnmarshalJSON

func (v *Accessor) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type Animation

type Animation struct {
	GlTFChildOfRootProperty
	Channels   []AnimationChannel            `json:"channels"`
	Parameters map[string]AnimationParameter `json:"parameters"`
	Samplers   map[string]AnimationSampler   `json:"samplers"`
}

http://json-schema.org/draft-03/schema A keyframe animation.

func (Animation) MarshalEasyJSON

func (v Animation) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (Animation) MarshalJSON

func (v Animation) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*Animation) UnmarshalEasyJSON

func (v *Animation) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*Animation) UnmarshalJSON

func (v *Animation) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type AnimationChannel

type AnimationChannel struct {
	GlTFProperty
	Target  AnimationChannelTarget `json:"target,omitempty" validator:"required"`
	Sampler GlTFid                 `json:"sampler,omitempty" validator:"required"`
}

http://json-schema.org/draft-03/schema Targets an animation's sampler at a node's property.

func (AnimationChannel) MarshalEasyJSON

func (v AnimationChannel) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (AnimationChannel) MarshalJSON

func (v AnimationChannel) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*AnimationChannel) UnmarshalEasyJSON

func (v *AnimationChannel) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*AnimationChannel) UnmarshalJSON

func (v *AnimationChannel) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type AnimationChannelTarget

type AnimationChannelTarget struct {
	GlTFProperty
	Id   GlTFid `json:"id,omitempty" validator:"required"`
	Path string `json:"path,omitempty" validator:"required"`
}

http://json-schema.org/draft-03/schema The ID of the node and TRS property that an animation channel targets.

func (AnimationChannelTarget) MarshalEasyJSON

func (v AnimationChannelTarget) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (AnimationChannelTarget) MarshalJSON

func (v AnimationChannelTarget) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*AnimationChannelTarget) UnmarshalEasyJSON

func (v *AnimationChannelTarget) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*AnimationChannelTarget) UnmarshalJSON

func (v *AnimationChannelTarget) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type AnimationParameter

type AnimationParameter interface{}

http://json-schema.org/draft-03/schema The ID of the accessor containing keyframes for this parameter.

type AnimationSampler

type AnimationSampler struct {
	GlTFProperty
	Interpolation string `json:"interpolation"`
	Output        GlTFid `json:"output,omitempty" validator:"required"`
	Input         GlTFid `json:"input,omitempty" validator:"required"`
}

http://json-schema.org/draft-03/schema Combines input and output parameters with an interpolation algorithm to define a keyframe graph (but not its target).

func (AnimationSampler) MarshalEasyJSON

func (v AnimationSampler) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (AnimationSampler) MarshalJSON

func (v AnimationSampler) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*AnimationSampler) UnmarshalEasyJSON

func (v *AnimationSampler) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*AnimationSampler) UnmarshalJSON

func (v *AnimationSampler) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type ArrayValues

type ArrayValues interface{}

http://json-schema.org/draft-03/schema

type Asset

type Asset struct {
	GlTFProperty
	Copyright          string       `json:"copyright,omitempty"`
	Generator          string       `json:"generator,omitempty"`
	PremultipliedAlpha bool         `json:"premultipliedAlpha"`
	Profile            AssetProfile `json:"profile"`
	Version            string       `json:"version,omitempty" validator:"required"`
}

http://json-schema.org/draft-03/schema Metadata about the glTF asset.

func (Asset) MarshalEasyJSON

func (v Asset) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (Asset) MarshalJSON

func (v Asset) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*Asset) UnmarshalEasyJSON

func (v *Asset) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*Asset) UnmarshalJSON

func (v *Asset) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type AssetProfile

type AssetProfile struct {
	GlTFProperty
	Version string `json:"version"`
	Api     string `json:"api"`
}

http://json-schema.org/draft-03/schema Specifies the target rendering API and version, e.g., WebGL 1.0.3.

func (AssetProfile) MarshalEasyJSON

func (v AssetProfile) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (AssetProfile) MarshalJSON

func (v AssetProfile) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*AssetProfile) UnmarshalEasyJSON

func (v *AssetProfile) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*AssetProfile) UnmarshalJSON

func (v *AssetProfile) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type Buffer

type Buffer struct {
	GlTFChildOfRootProperty
	Uri        string `json:"uri,omitempty" validator:"required"`
	ByteLength int    `json:"byteLength" validator:"gte=0"`
	Type       string `json:"type"`
}

http://json-schema.org/draft-03/schema A buffer points to binary geometry, animation, or skins.

func (Buffer) MarshalEasyJSON

func (v Buffer) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (Buffer) MarshalJSON

func (v Buffer) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*Buffer) UnmarshalEasyJSON

func (v *Buffer) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*Buffer) UnmarshalJSON

func (v *Buffer) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type BufferView

type BufferView struct {
	GlTFChildOfRootProperty
	Buffer     GlTFid `json:"buffer,omitempty" validator:"required"`
	ByteOffset int    `json:"byteOffset" validator:"required, gte=0"`
	ByteLength int    `json:"byteLength" validator:"gte=0"`
	Target     int    `json:"target"`
}

http://json-schema.org/draft-03/schema A view into a buffer generally representing a subset of the buffer.

func (BufferView) MarshalEasyJSON

func (v BufferView) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (BufferView) MarshalJSON

func (v BufferView) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*BufferView) UnmarshalEasyJSON

func (v *BufferView) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*BufferView) UnmarshalJSON

func (v *BufferView) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type Camera

type Camera struct {
	GlTFChildOfRootProperty
	Orthographic CameraOrthographic `json:"orthographic,omitempty"`
	Perspective  CameraPerspective  `json:"perspective,omitempty"`
	Type         string             `json:"type,omitempty" validator:"required"`
}

http://json-schema.org/draft-03/schema A camera's projection. A node can reference a camera ID to apply a transform to place the camera in the scene.

func (Camera) MarshalEasyJSON

func (v Camera) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (Camera) MarshalJSON

func (v Camera) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*Camera) UnmarshalEasyJSON

func (v *Camera) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*Camera) UnmarshalJSON

func (v *Camera) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type CameraOrthographic

type CameraOrthographic struct {
	GlTFProperty
	Xmag  float64 `json:"xmag,omitempty" validator:"required"`
	Ymag  float64 `json:"ymag,omitempty" validator:"required"`
	Zfar  float64 `json:"zfar,omitempty" validator:"required, gte=0"`
	Znear float64 `json:"znear,omitempty" validator:"required, gte=0"`
}

http://json-schema.org/draft-03/schema An orthographic camera containing properties to create an orthographic projection matrix.

func (CameraOrthographic) MarshalEasyJSON

func (v CameraOrthographic) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (CameraOrthographic) MarshalJSON

func (v CameraOrthographic) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*CameraOrthographic) UnmarshalEasyJSON

func (v *CameraOrthographic) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*CameraOrthographic) UnmarshalJSON

func (v *CameraOrthographic) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type CameraPerspective

type CameraPerspective struct {
	GlTFProperty
	AspectRatio float64 `json:"aspectRatio,omitempty" validator:"gte=0"`
	Yfov        float64 `json:"yfov,omitempty" validator:"required, gte=0"`
	Zfar        float64 `json:"zfar,omitempty" validator:"required, gte=0"`
	Znear       float64 `json:"znear,omitempty" validator:"required, gte=0"`
}

http://json-schema.org/draft-03/schema A perspective camera containing properties to create a perspective projection matrix.

func (CameraPerspective) MarshalEasyJSON

func (v CameraPerspective) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (CameraPerspective) MarshalJSON

func (v CameraPerspective) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*CameraPerspective) UnmarshalEasyJSON

func (v *CameraPerspective) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*CameraPerspective) UnmarshalJSON

func (v *CameraPerspective) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type Extension

type Extension interface{}

http://json-schema.org/draft-03/schema Dictionary object with extension-specific objects.

type Extras

type Extras interface{}

http://json-schema.org/draft-03/schema Application-specific data.

type GlTF

type GlTF struct {
	GlTFProperty
	Animations     map[string]Animation  `json:"animations"`
	Asset          Asset                 `json:"asset"`
	Samplers       map[string]Sampler    `json:"samplers"`
	Scene          GlTFid                `json:"scene,omitempty"`
	Scenes         map[string]Scene      `json:"scenes"`
	ExtensionsUsed []string              `json:"extensionsUsed"`
	Buffers        map[string]Buffer     `json:"buffers"`
	Cameras        map[string]Camera     `json:"cameras"`
	Images         map[string]Image      `json:"images"`
	Nodes          map[string]Node       `json:"nodes"`
	Shaders        map[string]Shader     `json:"shaders"`
	Accessors      map[string]Accessor   `json:"accessors"`
	Materials      map[string]Material   `json:"materials"`
	Programs       map[string]Program    `json:"programs"`
	Skins          map[string]Skin       `json:"skins"`
	BufferViews    map[string]BufferView `json:"bufferViews"`
	Meshes         map[string]Mesh       `json:"meshes"`
	Techniques     map[string]Technique  `json:"techniques"`
	Textures       map[string]Texture    `json:"textures"`
}

http://json-schema.org/draft-03/schema The root object for a glTF asset.

func (GlTF) MarshalEasyJSON

func (v GlTF) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (GlTF) MarshalJSON

func (v GlTF) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*GlTF) UnmarshalEasyJSON

func (v *GlTF) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*GlTF) UnmarshalJSON

func (v *GlTF) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type GlTFChildOfRootProperty

type GlTFChildOfRootProperty struct {
	GlTFProperty
	Name string `json:"name,omitempty"`
}

http://json-schema.org/draft-03/schema

func (GlTFChildOfRootProperty) MarshalEasyJSON

func (v GlTFChildOfRootProperty) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (GlTFChildOfRootProperty) MarshalJSON

func (v GlTFChildOfRootProperty) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*GlTFChildOfRootProperty) UnmarshalEasyJSON

func (v *GlTFChildOfRootProperty) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*GlTFChildOfRootProperty) UnmarshalJSON

func (v *GlTFChildOfRootProperty) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type GlTFProperty

type GlTFProperty struct {
	Extensions Extension `json:"extensions,omitempty"`
	Extras     Extras    `json:"extras,omitempty"`
}

http://json-schema.org/draft-03/schema

func (GlTFProperty) MarshalEasyJSON

func (v GlTFProperty) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (GlTFProperty) MarshalJSON

func (v GlTFProperty) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*GlTFProperty) UnmarshalEasyJSON

func (v *GlTFProperty) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*GlTFProperty) UnmarshalJSON

func (v *GlTFProperty) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type Image

type Image struct {
	GlTFChildOfRootProperty
	Uri string `json:"uri,omitempty" validator:"required"`
}

http://json-schema.org/draft-03/schema Image data used to create a texture.

func (Image) MarshalEasyJSON

func (v Image) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (Image) MarshalJSON

func (v Image) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*Image) UnmarshalEasyJSON

func (v *Image) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*Image) UnmarshalJSON

func (v *Image) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type Material

type Material struct {
	GlTFChildOfRootProperty
	Technique GlTFid                    `json:"technique,omitempty"`
	Values    map[string]MaterialValues `json:"values"`
}

http://json-schema.org/draft-03/schema The material appearance of a primitive.

func (Material) MarshalEasyJSON

func (v Material) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (Material) MarshalJSON

func (v Material) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*Material) UnmarshalEasyJSON

func (v *Material) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*Material) UnmarshalJSON

func (v *Material) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type MaterialValues

type MaterialValues interface{}

http://json-schema.org/draft-03/schema A dictionary object of parameter values. Parameters with the same name as the technique's parameter override the technique's parameter value.

type Mesh

type Mesh struct {
	GlTFChildOfRootProperty
	Primitives []MeshPrimitive `json:"primitives"`
}

http://json-schema.org/draft-03/schema A set of primitives to be rendered. A node can contain one or more meshes. A node's transform places the mesh in the scene.

func (Mesh) MarshalEasyJSON

func (v Mesh) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (Mesh) MarshalJSON

func (v Mesh) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*Mesh) UnmarshalEasyJSON

func (v *Mesh) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*Mesh) UnmarshalJSON

func (v *Mesh) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type MeshPrimitive

type MeshPrimitive struct {
	GlTFProperty
	Attributes map[string]MeshPrimitiveAttribute `json:"attributes"`
	Indices    GlTFid                            `json:"indices,omitempty"`
	Material   GlTFid                            `json:"material,omitempty" validator:"required"`
	Mode       int                               `json:"mode"`
}

http://json-schema.org/draft-03/schema Geometry to be rendered with the given material.

func (MeshPrimitive) MarshalEasyJSON

func (v MeshPrimitive) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (MeshPrimitive) MarshalJSON

func (v MeshPrimitive) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*MeshPrimitive) UnmarshalEasyJSON

func (v *MeshPrimitive) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*MeshPrimitive) UnmarshalJSON

func (v *MeshPrimitive) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type MeshPrimitiveAttribute

type MeshPrimitiveAttribute interface{}

http://json-schema.org/draft-03/schema A dictionary object of strings, where each string is the ID of the accessor containing an attribute.

type Node

type Node struct {
	GlTFChildOfRootProperty
	Meshes      []GlTFid  `json:"meshes,omitempty"`
	Rotation    []float64 `json:"rotation"`
	Scale       []float64 `json:"scale"`
	Translation []float64 `json:"translation"`
	Camera      GlTFid    `json:"camera,omitempty"`
	Skeletons   []GlTFid  `json:"skeletons,omitempty"`
	Skin        GlTFid    `json:"skin,omitempty"`
	JointName   GlTFid    `json:"jointName,omitempty"`
	Matrix      []float64 `json:"matrix"`
	Children    []GlTFid  `json:"children"`
}

http://json-schema.org/draft-03/schema A node in the node hierarchy. A node can have either the `camera`, `meshes`, or `skeletons`/`skin`/`meshes` properties defined. In the later case, all `primitives` in the referenced `meshes` contain `JOINT` and `WEIGHT` attributes and the referenced `material`/`technique` from each `primitive` has parameters with `JOINT` and `WEIGHT` semantics. A node can have either a `matrix` or any combination of `translation`/`rotation`/`scale` (TRS) properties. If none are provided, the transform is the identity.

func (Node) MarshalEasyJSON

func (v Node) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (Node) MarshalJSON

func (v Node) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*Node) UnmarshalEasyJSON

func (v *Node) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*Node) UnmarshalJSON

func (v *Node) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type Program

type Program struct {
	GlTFChildOfRootProperty
	VertexShader   GlTFid   `json:"vertexShader,omitempty" validator:"required"`
	Attributes     []string `json:"attributes"`
	FragmentShader GlTFid   `json:"fragmentShader,omitempty" validator:"required"`
}

http://json-schema.org/draft-03/schema A shader program, including its vertex and fragment shader, and names of vertex shader attributes.

func (Program) MarshalEasyJSON

func (v Program) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (Program) MarshalJSON

func (v Program) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*Program) UnmarshalEasyJSON

func (v *Program) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*Program) UnmarshalJSON

func (v *Program) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type Sampler

type Sampler struct {
	GlTFChildOfRootProperty
	MagFilter int `json:"magFilter"`
	MinFilter int `json:"minFilter"`
	WrapS     int `json:"wrapS"`
	WrapT     int `json:"wrapT"`
}

http://json-schema.org/draft-03/schema Texture sampler properties for filtering and wrapping modes.

func (Sampler) MarshalEasyJSON

func (v Sampler) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (Sampler) MarshalJSON

func (v Sampler) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*Sampler) UnmarshalEasyJSON

func (v *Sampler) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*Sampler) UnmarshalJSON

func (v *Sampler) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type Scene

type Scene struct {
	GlTFChildOfRootProperty
	Nodes []GlTFid `json:"nodes"`
}

http://json-schema.org/draft-03/schema The root nodes of a scene.

func (Scene) MarshalEasyJSON

func (v Scene) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (Scene) MarshalJSON

func (v Scene) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*Scene) UnmarshalEasyJSON

func (v *Scene) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*Scene) UnmarshalJSON

func (v *Scene) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type Shader

type Shader struct {
	GlTFChildOfRootProperty
	Uri  string `json:"uri,omitempty" validator:"required"`
	Type int    `json:"type" validator:"required"`
}

http://json-schema.org/draft-03/schema A vertex or fragment shader.

func (Shader) MarshalEasyJSON

func (v Shader) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (Shader) MarshalJSON

func (v Shader) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*Shader) UnmarshalEasyJSON

func (v *Shader) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*Shader) UnmarshalJSON

func (v *Shader) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type Skin

type Skin struct {
	GlTFChildOfRootProperty
	BindShapeMatrix     []float64 `json:"bindShapeMatrix"`
	InverseBindMatrices GlTFid    `json:"inverseBindMatrices,omitempty" validator:"required"`
	JointNames          []GlTFid  `json:"jointNames,omitempty" validator:"required"`
}

http://json-schema.org/draft-03/schema Joints and matrices defining a skin.

func (Skin) MarshalEasyJSON

func (v Skin) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (Skin) MarshalJSON

func (v Skin) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*Skin) UnmarshalEasyJSON

func (v *Skin) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*Skin) UnmarshalJSON

func (v *Skin) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type Technique

type Technique struct {
	GlTFChildOfRootProperty
	Parameters map[string]TechniqueParameters `json:"parameters"`
	Attributes map[string]TechniqueAttribute  `json:"attributes"`
	Program    GlTFid                         `json:"program,omitempty" validator:"required"`
	Uniforms   map[string]TechniqueUniform    `json:"uniforms"`
	States     TechniqueStates                `json:"states"`
}

http://json-schema.org/draft-03/schema A template for material appearances.

func (Technique) MarshalEasyJSON

func (v Technique) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (Technique) MarshalJSON

func (v Technique) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*Technique) UnmarshalEasyJSON

func (v *Technique) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*Technique) UnmarshalJSON

func (v *Technique) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type TechniqueAttribute

type TechniqueAttribute interface{}

http://json-schema.org/draft-03/schema A dictionary object of strings that maps GLSL attribute names to technique parameter IDs.

type TechniqueParameters

type TechniqueParameters struct {
	GlTFProperty
	Value    interface{} `json:"value,omitempty"`
	Count    int         `json:"count" validator:"gte=1"`
	Node     GlTFid      `json:"node,omitempty"`
	Type     int         `json:"type" validator:"required"`
	Semantic string      `json:"semantic,omitempty"`
}

http://json-schema.org/draft-03/schema An attribute or uniform input to a technique, and an optional semantic and value.

func (TechniqueParameters) MarshalEasyJSON

func (v TechniqueParameters) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (TechniqueParameters) MarshalJSON

func (v TechniqueParameters) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*TechniqueParameters) UnmarshalEasyJSON

func (v *TechniqueParameters) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*TechniqueParameters) UnmarshalJSON

func (v *TechniqueParameters) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type TechniqueStates

type TechniqueStates struct {
	GlTFProperty
	Enable    []int                    `json:"enable"`
	Functions TechniqueStatesFunctions `json:"functions,omitempty"`
}

http://json-schema.org/draft-03/schema Fixed-function rendering states.

func (TechniqueStates) MarshalEasyJSON

func (v TechniqueStates) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (TechniqueStates) MarshalJSON

func (v TechniqueStates) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*TechniqueStates) UnmarshalEasyJSON

func (v *TechniqueStates) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*TechniqueStates) UnmarshalJSON

func (v *TechniqueStates) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type TechniqueStatesFunctions

type TechniqueStatesFunctions struct {
	GlTFProperty
	BlendColor            []float64 `json:"blendColor"`
	BlendEquationSeparate []int     `json:"blendEquationSeparate"`
	BlendFuncSeparate     []int     `json:"blendFuncSeparate"`
	CullFace              []int     `json:"cullFace"`
	FrontFace             []int     `json:"frontFace"`
	PolygonOffset         []float64 `json:"polygonOffset"`
	Scissor               []float64 `json:"scissor"`
	ColorMask             []bool    `json:"colorMask"`
	DepthFunc             []int     `json:"depthFunc"`
	DepthMask             []bool    `json:"depthMask"`
	DepthRange            []float64 `json:"depthRange"`
	LineWidth             []float64 `json:"lineWidth"`
}

http://json-schema.org/draft-03/schema Arguments for fixed-function rendering state functions other than `enable()`/`disable()`.

func (TechniqueStatesFunctions) MarshalEasyJSON

func (v TechniqueStatesFunctions) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (TechniqueStatesFunctions) MarshalJSON

func (v TechniqueStatesFunctions) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*TechniqueStatesFunctions) UnmarshalEasyJSON

func (v *TechniqueStatesFunctions) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*TechniqueStatesFunctions) UnmarshalJSON

func (v *TechniqueStatesFunctions) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type TechniqueUniform

type TechniqueUniform interface{}

http://json-schema.org/draft-03/schema A dictionary object of strings that maps GLSL uniform names to technique parameter IDs.

type Texture

type Texture struct {
	GlTFChildOfRootProperty
	Format         int    `json:"format"`
	InternalFormat int    `json:"internalFormat"`
	Sampler        GlTFid `json:"sampler,omitempty" validator:"required"`
	Source         GlTFid `json:"source,omitempty" validator:"required"`
	Target         int    `json:"target"`
	Type           int    `json:"type"`
}

http://json-schema.org/draft-03/schema A texture and its sampler.

func (Texture) MarshalEasyJSON

func (v Texture) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (Texture) MarshalJSON

func (v Texture) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*Texture) UnmarshalEasyJSON

func (v *Texture) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*Texture) UnmarshalJSON

func (v *Texture) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

Source Files

Jump to

Keyboard shortcuts

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