Documentation ¶
Index ¶
- Variables
- func BuildCubeTextureAsset(image *CubeImage, format asset.TexelFormat) *asset.CubeTexture
- func BuildTwoDTextureAsset(image *Image) *asset.TwoDTexture
- func CubeUVToUVW(side CubeSide, uv dprec.Vec2) dprec.Vec3
- func UVWToEquirectangularUV(uvw dprec.Vec3) dprec.Vec2
- type Action
- type Animation
- type AnimationBinding
- type Armature
- type BuildCubeImageAction
- type BuildCubeImageOption
- func WithBottomImage(image ImageProvider) BuildCubeImageOption
- func WithDimension(dimension int) BuildCubeImageOption
- func WithFrontImage(image ImageProvider) BuildCubeImageOption
- func WithLeftImage(image ImageProvider) BuildCubeImageOption
- func WithRearImage(image ImageProvider) BuildCubeImageOption
- func WithRightImage(image ImageProvider) BuildCubeImageOption
- func WithTopImage(image ImageProvider) BuildCubeImageOption
- type BuildCubeSideFromEquirectangularAction
- type BuildIrradianceCubeImageAction
- type BuildIrradianceCubeImageOption
- type Color
- type CubeImage
- func (t *CubeImage) RGBA16FData(side CubeSide) []byte
- func (t *CubeImage) RGBA32FData(side CubeSide) []byte
- func (t *CubeImage) RGBA8Data(side CubeSide) []byte
- func (t *CubeImage) Scale(newDimension int) *CubeImage
- func (i *CubeImage) SideToImage(side CubeSide) *Image
- func (s CubeImage) TexelUVW(uvw dprec.Vec3) Color
- type CubeImageProvider
- type CubeImageSide
- type CubeSide
- type Described
- type Image
- type ImageProvider
- type Joint
- type Level
- type LevelCollisionMesh
- type LevelEntity
- type LevelProvider
- type LightDefinition
- type LightInstance
- type LightType
- type Material
- type MeshDefinition
- type MeshFragment
- type MeshInstance
- type Model
- type ModelProvider
- type Node
- type OpenGLTFResourceAction
- type OpenImageResourceAction
- type OpenLevelResourceAction
- type Packer
- type Pipeline
- func (p *Pipeline) BuildCubeImage(opts ...BuildCubeImageOption) *BuildCubeImageAction
- func (p *Pipeline) BuildCubeSideFromEquirectangular(side CubeSide, image ImageProvider) *BuildCubeSideFromEquirectangularAction
- func (p *Pipeline) BuildIrradianceCubeImage(image CubeImageProvider, opts ...BuildIrradianceCubeImageOption) *BuildIrradianceCubeImageAction
- func (p *Pipeline) OpenGLTFResource(uri string) *OpenGLTFResourceAction
- func (p *Pipeline) OpenImageResource(uri string) *OpenImageResourceAction
- func (p *Pipeline) OpenLevelResource(uri string) *OpenLevelResourceAction
- func (p *Pipeline) SaveCubeTextureAsset(resource asset.Resource, image CubeImageProvider, ...) *SaveCubeTextureAction
- func (p *Pipeline) SaveLevelAsset(resource asset.Resource, level LevelProvider) *SaveLevelAssetAction
- func (p *Pipeline) SaveModelAsset(resource asset.Resource, model ModelProvider, opts ...SaveModelAssetOption) *SaveModelAssetAction
- func (p *Pipeline) SaveTwoDTextureAsset(resource asset.Resource, image ImageProvider) *SaveTwoDTextureAssetAction
- func (p *Pipeline) ScaleCubeImage(image CubeImageProvider, dimension int) *ScaleCubeImageAction
- type Primitive
- type Properties
- type RotationKeyframe
- type SaveCubeTextureAction
- type SaveCubeTextureOption
- type SaveLevelAssetAction
- type SaveModelAssetAction
- type SaveModelAssetOption
- type SaveTwoDTextureAssetAction
- type ScaleCubeImageAction
- type ScaleKeyframe
- type TextureRef
- type TranslationKeyframe
- type Triangle
- type Vertex
- type VertexLayout
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrFocused = fmt.Errorf("focused pipelines")
Functions ¶
func BuildCubeTextureAsset ¶ added in v0.9.0
func BuildCubeTextureAsset(image *CubeImage, format asset.TexelFormat) *asset.CubeTexture
func BuildTwoDTextureAsset ¶ added in v0.3.0
func BuildTwoDTextureAsset(image *Image) *asset.TwoDTexture
Types ¶
type Animation ¶ added in v0.9.0
type Animation struct { Name string StartTime float64 EndTime float64 Bindings []*AnimationBinding }
type AnimationBinding ¶ added in v0.9.0
type AnimationBinding struct { Node *Node TranslationKeyframes []TranslationKeyframe RotationKeyframes []RotationKeyframe ScaleKeyframes []ScaleKeyframe }
type BuildCubeImageAction ¶
type BuildCubeImageAction struct {
// contains filtered or unexported fields
}
func (*BuildCubeImageAction) CubeImage ¶
func (a *BuildCubeImageAction) CubeImage() *CubeImage
func (*BuildCubeImageAction) Describe ¶
func (*BuildCubeImageAction) Describe() string
func (*BuildCubeImageAction) Run ¶
func (a *BuildCubeImageAction) Run() error
type BuildCubeImageOption ¶
type BuildCubeImageOption func(a *BuildCubeImageAction)
func WithBottomImage ¶
func WithBottomImage(image ImageProvider) BuildCubeImageOption
func WithDimension ¶
func WithDimension(dimension int) BuildCubeImageOption
func WithFrontImage ¶
func WithFrontImage(image ImageProvider) BuildCubeImageOption
func WithLeftImage ¶
func WithLeftImage(image ImageProvider) BuildCubeImageOption
func WithRearImage ¶
func WithRearImage(image ImageProvider) BuildCubeImageOption
func WithRightImage ¶
func WithRightImage(image ImageProvider) BuildCubeImageOption
func WithTopImage ¶
func WithTopImage(image ImageProvider) BuildCubeImageOption
type BuildCubeSideFromEquirectangularAction ¶
type BuildCubeSideFromEquirectangularAction struct {
// contains filtered or unexported fields
}
func (*BuildCubeSideFromEquirectangularAction) Describe ¶
func (*BuildCubeSideFromEquirectangularAction) Describe() string
func (*BuildCubeSideFromEquirectangularAction) Image ¶
func (a *BuildCubeSideFromEquirectangularAction) Image() *Image
func (*BuildCubeSideFromEquirectangularAction) Run ¶
func (a *BuildCubeSideFromEquirectangularAction) Run() error
type BuildIrradianceCubeImageAction ¶
type BuildIrradianceCubeImageAction struct {
// contains filtered or unexported fields
}
func (*BuildIrradianceCubeImageAction) CubeImage ¶
func (a *BuildIrradianceCubeImageAction) CubeImage() *CubeImage
func (*BuildIrradianceCubeImageAction) Describe ¶
func (a *BuildIrradianceCubeImageAction) Describe() string
func (*BuildIrradianceCubeImageAction) Run ¶
func (a *BuildIrradianceCubeImageAction) Run() error
type BuildIrradianceCubeImageOption ¶
type BuildIrradianceCubeImageOption func(a *BuildIrradianceCubeImageAction)
func WithSampleCount ¶
func WithSampleCount(count int) BuildIrradianceCubeImageOption
type CubeImage ¶
type CubeImage struct { Dimension int Sides [6]CubeImageSide }
func (*CubeImage) RGBA16FData ¶ added in v0.7.0
func (*CubeImage) RGBA32FData ¶
func (*CubeImage) SideToImage ¶
type CubeImageProvider ¶
type CubeImageProvider interface {
CubeImage() *CubeImage
}
type CubeImageSide ¶
type CubeImageSide struct {
Texels [][]Color
}
func (CubeImageSide) Texel ¶
func (s CubeImageSide) Texel(x, y int) Color
type Image ¶
func BuildCubeSideFromEquirectangular ¶ added in v0.3.0
func BuildCubeSideFromEquirectangularScaled ¶ added in v0.3.0
func BuildImageResource ¶ added in v0.3.0
func (*Image) BilinearTexel ¶
func (*Image) RGBA32FData ¶ added in v0.3.0
type ImageProvider ¶
type ImageProvider interface {
Image() *Image
}
type Level ¶
type Level struct { SkyboxTexture string AmbientReflectionTexture string AmbientRefractionTexture string Materials []*Material StaticEntities []*LevelEntity StaticMeshes []*MeshDefinition CollisionMeshes []*LevelCollisionMesh }
type LevelCollisionMesh ¶
type LevelCollisionMesh struct {
Triangles []Triangle
}
type LevelProvider ¶
type LevelProvider interface {
Level() *Level
}
type LightDefinition ¶ added in v0.10.0
type LightInstance ¶ added in v0.10.0
type LightInstance struct { Name string Node *Node Definition *LightDefinition }
type Material ¶
type Material struct { Name string BackfaceCulling bool AlphaTesting bool AlphaThreshold float32 Blending bool Color sprec.Vec4 ColorTexture *TextureRef Metallic float32 Roughness float32 MetallicRoughnessTexture *TextureRef NormalScale float32 NormalTexture *TextureRef Properties Properties }
func (Material) HasSkipCollision ¶ added in v0.10.0
func (Material) IsInvisible ¶ added in v0.10.0
type MeshDefinition ¶ added in v0.9.0
type MeshDefinition struct { Name string VertexLayout VertexLayout Vertices []Vertex Indices []int Fragments []MeshFragment Properties Properties }
func (MeshDefinition) HasCollision ¶ added in v0.10.0
func (d MeshDefinition) HasCollision() bool
type MeshFragment ¶ added in v0.9.0
type MeshInstance ¶ added in v0.9.0
type MeshInstance struct { Name string Node *Node Armature *Armature Definition *MeshDefinition }
func (MeshInstance) HasCollision ¶ added in v0.9.0
func (i MeshInstance) HasCollision() bool
type Model ¶
type Model struct { RootNodes []*Node Animations []*Animation Armatures []*Armature Materials []*Material MeshDefinitions []*MeshDefinition MeshInstances []*MeshInstance LightDefinitions []*LightDefinition LightInstances []*LightInstance Textures []*Image Properties Properties }
type ModelProvider ¶
type ModelProvider interface {
Model() *Model
}
type OpenGLTFResourceAction ¶
type OpenGLTFResourceAction struct {
// contains filtered or unexported fields
}
func (*OpenGLTFResourceAction) Describe ¶
func (a *OpenGLTFResourceAction) Describe() string
func (*OpenGLTFResourceAction) Model ¶
func (a *OpenGLTFResourceAction) Model() *Model
func (*OpenGLTFResourceAction) Run ¶
func (a *OpenGLTFResourceAction) Run() error
type OpenImageResourceAction ¶
type OpenImageResourceAction struct {
// contains filtered or unexported fields
}
func (*OpenImageResourceAction) Describe ¶
func (a *OpenImageResourceAction) Describe() string
func (*OpenImageResourceAction) Image ¶
func (a *OpenImageResourceAction) Image() *Image
func (*OpenImageResourceAction) Run ¶
func (a *OpenImageResourceAction) Run() error
type OpenLevelResourceAction ¶
type OpenLevelResourceAction struct {
// contains filtered or unexported fields
}
func (*OpenLevelResourceAction) Describe ¶
func (a *OpenLevelResourceAction) Describe() string
func (*OpenLevelResourceAction) Level ¶
func (a *OpenLevelResourceAction) Level() *Level
func (*OpenLevelResourceAction) Run ¶
func (a *OpenLevelResourceAction) Run() error
type Packer ¶
type Packer struct {
// contains filtered or unexported fields
}
func (*Packer) RunParallel ¶
type Pipeline ¶
type Pipeline struct {
// contains filtered or unexported fields
}
func (*Pipeline) BuildCubeImage ¶
func (p *Pipeline) BuildCubeImage(opts ...BuildCubeImageOption) *BuildCubeImageAction
func (*Pipeline) BuildCubeSideFromEquirectangular ¶
func (p *Pipeline) BuildCubeSideFromEquirectangular(side CubeSide, image ImageProvider) *BuildCubeSideFromEquirectangularAction
func (*Pipeline) BuildIrradianceCubeImage ¶
func (p *Pipeline) BuildIrradianceCubeImage(image CubeImageProvider, opts ...BuildIrradianceCubeImageOption) *BuildIrradianceCubeImageAction
func (*Pipeline) OpenGLTFResource ¶
func (p *Pipeline) OpenGLTFResource(uri string) *OpenGLTFResourceAction
func (*Pipeline) OpenImageResource ¶
func (p *Pipeline) OpenImageResource(uri string) *OpenImageResourceAction
func (*Pipeline) OpenLevelResource ¶
func (p *Pipeline) OpenLevelResource(uri string) *OpenLevelResourceAction
func (*Pipeline) SaveCubeTextureAsset ¶
func (p *Pipeline) SaveCubeTextureAsset(resource asset.Resource, image CubeImageProvider, opts ...SaveCubeTextureOption) *SaveCubeTextureAction
func (*Pipeline) SaveLevelAsset ¶
func (p *Pipeline) SaveLevelAsset(resource asset.Resource, level LevelProvider) *SaveLevelAssetAction
func (*Pipeline) SaveModelAsset ¶
func (p *Pipeline) SaveModelAsset(resource asset.Resource, model ModelProvider, opts ...SaveModelAssetOption) *SaveModelAssetAction
func (*Pipeline) SaveTwoDTextureAsset ¶
func (p *Pipeline) SaveTwoDTextureAsset(resource asset.Resource, image ImageProvider) *SaveTwoDTextureAssetAction
func (*Pipeline) ScaleCubeImage ¶
func (p *Pipeline) ScaleCubeImage(image CubeImageProvider, dimension int) *ScaleCubeImageAction
type Properties ¶ added in v0.10.0
func (Properties) HasCollision ¶ added in v0.10.0
func (p Properties) HasCollision() bool
func (Properties) HasSkipCollision ¶ added in v0.10.0
func (p Properties) HasSkipCollision() bool
func (Properties) IsInvisible ¶ added in v0.10.0
func (p Properties) IsInvisible() bool
func (Properties) IsSet ¶ added in v0.10.0
func (p Properties) IsSet(key string) bool
type RotationKeyframe ¶ added in v0.9.0
type SaveCubeTextureAction ¶
type SaveCubeTextureAction struct {
// contains filtered or unexported fields
}
func (*SaveCubeTextureAction) Describe ¶
func (a *SaveCubeTextureAction) Describe() string
func (*SaveCubeTextureAction) Run ¶
func (a *SaveCubeTextureAction) Run() error
type SaveCubeTextureOption ¶
type SaveCubeTextureOption func(a *SaveCubeTextureAction)
func WithFormat ¶
func WithFormat(format asset.TexelFormat) SaveCubeTextureOption
type SaveLevelAssetAction ¶
type SaveLevelAssetAction struct {
// contains filtered or unexported fields
}
func (*SaveLevelAssetAction) Describe ¶
func (a *SaveLevelAssetAction) Describe() string
func (*SaveLevelAssetAction) Run ¶
func (a *SaveLevelAssetAction) Run() error
type SaveModelAssetAction ¶
type SaveModelAssetAction struct {
// contains filtered or unexported fields
}
func (*SaveModelAssetAction) Describe ¶
func (a *SaveModelAssetAction) Describe() string
func (*SaveModelAssetAction) Run ¶
func (a *SaveModelAssetAction) Run() error
type SaveModelAssetOption ¶ added in v0.9.0
type SaveModelAssetOption func(a *SaveModelAssetAction)
func WithCollisionMesh ¶ added in v0.9.0
func WithCollisionMesh(collisionMesh bool) SaveModelAssetOption
type SaveTwoDTextureAssetAction ¶
type SaveTwoDTextureAssetAction struct {
// contains filtered or unexported fields
}
func (*SaveTwoDTextureAssetAction) Describe ¶
func (a *SaveTwoDTextureAssetAction) Describe() string
func (*SaveTwoDTextureAssetAction) Run ¶
func (a *SaveTwoDTextureAssetAction) Run() error
type ScaleCubeImageAction ¶
type ScaleCubeImageAction struct {
// contains filtered or unexported fields
}
func (*ScaleCubeImageAction) CubeImage ¶
func (a *ScaleCubeImageAction) CubeImage() *CubeImage
func (*ScaleCubeImageAction) Describe ¶
func (a *ScaleCubeImageAction) Describe() string
func (*ScaleCubeImageAction) Run ¶
func (a *ScaleCubeImageAction) Run() error
type ScaleKeyframe ¶ added in v0.9.0
type TextureRef ¶ added in v0.9.0
type TranslationKeyframe ¶ added in v0.9.0
Click to show internal directories.
Click to hide internal directories.