gltf: github.com/qmuntal/gltf/specular Index | Files

package specular

import "github.com/qmuntal/gltf/specular"

Index

Package Files

specular.go

Constants

const (
    // ExtPBRSpecularGlossiness defines the PBRSpecularGlossiness unique key.
    ExtPBRSpecularGlossiness = "KHR_materials_pbrSpecularGlossiness"
)

func New Uses

func New() json.Unmarshaler

New returns a new specular.PBRSpecularGlossiness.

type PBRSpecularGlossiness Uses

type PBRSpecularGlossiness struct {
    DiffuseFactor             *gltf.RGBA        `json:"diffuseFactor,omitempty"`
    DiffuseTexture            *gltf.TextureInfo `json:"diffuseTexture,omitempty"`
    SpecularFactor            *gltf.RGB         `json:"specularFactor,omitempty"`
    GlossinessFactor          *float64          `json:"glossinessFactor,omitempty" validate:"omitempty,gte=0,lte=1"`
    SpecularGlossinessTexture *gltf.TextureInfo `json:"specularGlossinessTexture,omitempty"`
}

PBRSpecularGlossiness defines a specular-glossiness material model.

func (*PBRSpecularGlossiness) MarshalJSON Uses

func (p *PBRSpecularGlossiness) MarshalJSON() ([]byte, error)

MarshalJSON marshal the pbr with the correct default values.

func (*PBRSpecularGlossiness) UnmarshalJSON Uses

func (p *PBRSpecularGlossiness) UnmarshalJSON(data []byte) error

UnmarshalJSON unmarshal the pbr with the correct default values.

Package specular imports 3 packages (graph). Updated 2019-03-25. Refresh now. Tools for package owners.