Skip to content

package assets

import "kaijuengine.com/engine/assets"

Constants

TextureSquare

"square.png"

TextureCube

"cube.png"

TextureBlankSquare

"blank_square.png"

MaterialDefinitionGrid

"grid.material"

MaterialDefinitionUnlit

"unlit.material"

MaterialDefinitionUnlitTransparent

"unlit_transparent.material"

MaterialDefinitionBasic

"basic.material"

MaterialDefinitionBasicTransparent

"basic_transparent.material"

MaterialDefinitionPBR

"pbr.material"

MaterialDefinitionTerrain

"terrain.material"

MaterialDefinitionBasicSkinned

"basic_skinned.material"

MaterialDefinitionText3D

"text3d.material"

MaterialDefinitionText3DTransparent

"text3d_transparent.material"

MaterialDefinitionText

"text.material"

MaterialDefinitionTextTransparent

"text_transparent.material"

MaterialDefinitionCombine

"combine.material"

MaterialDefinitionComposite

"composite.material"

MaterialDefinitionUI

"ui.material"

MaterialDefinitionUITransparent

"ui_transparent.material"

MaterialDefinitionSprite

"sprite.material"

MaterialDefinitionSpriteTransparent

"sprite_transparent.material"

MaterialDefinitionLightDepth

"light_depth.material"

MaterialDefinitionLightDepthCSM1

"light_depth_csm1.material"

MaterialDefinitionLightDepthCSM2

"light_depth_csm2.material"

MaterialDefinitionLightCubeDepth

"light_cube_depth.material"

MaterialDefinitionParticle

"particle.material"

MaterialDefinitionParticleTransparent

"particle_transparent.material"

MaterialDefinitionEdTransformWire

"ed_transform_wire.material"

MaterialDefinitionEdFrustumWire

"ed_frustum_wire.material"

MaterialDefinitionEdGizmo

"ed_gizmo.material"

ShaderTextVert

"text.vert.spv"

ShaderTextFrag

"text.frag.spv"

ShaderText3DVert

"text3d.vert.spv"

ShaderText3DFrag

ShaderTextFrag

ShaderCompositeVert

"composite.vert.spv"

ShaderCompositeFrag

"composite.frag.spv"

ShaderHdrVert

"hdr.vert.spv"

ShaderHdrFrag

"hdr.frag.spv"

ShaderUIVert

"ui.vert.spv"

ShaderUIFrag

"ui.frag.spv"

ShadersUINineFrag

"ui_nine.frag.spv"

Types

ArchiveDatabase

struct

type ArchiveDatabase struct {
    // Has unexported fields.
}

ArchiveDatabase.Cache

func (a *ArchiveDatabase) Cache(key string, data []byte)

ArchiveDatabase.CacheClear

func (a *ArchiveDatabase) CacheClear()

ArchiveDatabase.CacheRemove

func (a *ArchiveDatabase) CacheRemove(key string)

ArchiveDatabase.Close

func (a *ArchiveDatabase) Close()

ArchiveDatabase.Exists

func (a *ArchiveDatabase) Exists(key string) bool

ArchiveDatabase.PostWindowCreate

func (a *ArchiveDatabase) PostWindowCreate(windowHandle PostWindowCreateHandle) error

ArchiveDatabase.Read

func (a *ArchiveDatabase) Read(key string) ([]byte, error)

ArchiveDatabase.ReadText

func (a *ArchiveDatabase) ReadText(key string) (string, error)

Database

interface

type Database interface {
    PostWindowCreate(windowHandle PostWindowCreateHandle) error
    Cache(key string, data []byte)
    CacheRemove(key string)
    CacheClear()
    Read(key string) ([]byte, error)
    ReadText(key string) (string, error)
    Exists(key string) bool
    Close()
}

NewArchiveDatabase

func NewArchiveDatabase(archive string, key []byte) (Database, error)

NewFileDatabase

func NewFileDatabase(root string) (Database, error)

DebugContentDatabase

struct

type DebugContentDatabase struct{}

DebugContentDatabase.Cache

func (DebugContentDatabase) Cache(key string, data []byte)

DebugContentDatabase.CacheClear

func (DebugContentDatabase) CacheClear()

DebugContentDatabase.CacheRemove

func (DebugContentDatabase) CacheRemove(key string)

DebugContentDatabase.Close

func (DebugContentDatabase) Close()

DebugContentDatabase.Exists

func (e DebugContentDatabase) Exists(key string) bool

DebugContentDatabase.PostWindowCreate

func (DebugContentDatabase) PostWindowCreate(PostWindowCreateHandle) error

DebugContentDatabase.Read

func (e DebugContentDatabase) Read(key string) ([]byte, error)

DebugContentDatabase.ReadText

func (e DebugContentDatabase) ReadText(key string) (string, error)

FileDatabase

struct

type FileDatabase struct {
    // Has unexported fields.
}

FileDatabase.Cache

func (a *FileDatabase) Cache(key string, data []byte)

FileDatabase.CacheClear

func (a *FileDatabase) CacheClear()

FileDatabase.CacheRemove

func (a *FileDatabase) CacheRemove(key string)

FileDatabase.Close

func (a *FileDatabase) Close()

FileDatabase.Exists

func (a *FileDatabase) Exists(key string) bool

FileDatabase.PostWindowCreate

func (a *FileDatabase) PostWindowCreate(PostWindowCreateHandle) error

FileDatabase.Read

func (a *FileDatabase) Read(key string) ([]byte, error)

FileDatabase.ReadText

func (a *FileDatabase) ReadText(key string) (string, error)

MockDatabase

struct

type MockDatabase struct {
    // Has unexported fields.
}

MockDatabase implements the assets.Database interface for testing.

NewMockDB

func NewMockDB(files map[string][]byte) *MockDatabase

MockDatabase.AddFile

func (m *MockDatabase) AddFile(key string, data []byte)

MockDatabase.Cache

func (m *MockDatabase) Cache(key string, data []byte)

MockDatabase.CacheClear

func (m *MockDatabase) CacheClear()

MockDatabase.CacheRemove

func (m *MockDatabase) CacheRemove(key string)

MockDatabase.Close

func (m *MockDatabase) Close()

MockDatabase.Exists

func (m *MockDatabase) Exists(key string) bool

MockDatabase.PostWindowCreate

func (m *MockDatabase) PostWindowCreate(windowHandle PostWindowCreateHandle) error

MockDatabase.Read

func (m *MockDatabase) Read(key string) ([]byte, error)

MockDatabase.ReadText

func (m *MockDatabase) ReadText(key string) (string, error)

MockDatabase.RemoveFile

func (m *MockDatabase) RemoveFile(key string)

PostWindowCreateHandle

interface

type PostWindowCreateHandle interface {
    ReadApplicationAsset(path string) ([]byte, error)
}