Documentation
¶
Index ¶
- Constants
- func WriteBinary(glb GLB) (output_glb []byte, err error)
- type DefaultConvertToKtx2ImageDependencies
- func (d *DefaultConvertToKtx2ImageDependencies) CommandExecutor(name string, args ...string) error
- func (d *DefaultConvertToKtx2ImageDependencies) ContentTypeDetector(data []byte) string
- func (d *DefaultConvertToKtx2ImageDependencies) FileCreator(filePath string) (interfaces.File, error)
- func (d *DefaultConvertToKtx2ImageDependencies) FileReader(filePath string) ([]byte, error)
- func (d *DefaultConvertToKtx2ImageDependencies) FileRemover(filePath string) error
- func (d *DefaultConvertToKtx2ImageDependencies) ImageSizer(data []byte) (int, int, error)
- func (d *DefaultConvertToKtx2ImageDependencies) ParamsGenerator(mode string, width, height int, inputPath, outputPath string, isSRGB bool, ...) []string
- func (d *DefaultConvertToKtx2ImageDependencies) UUIDGenerator() string
- type DefaultConvertToKtx2TextureDependencies
- type GLB
Constants ¶
View Source
const ( ChunkTypeJSON = 0x4e4f534a ChunkTypeBIN = 0x004e4942 GLB_HEADER_LENGTH = 12 GLB_MAGIC = 0x46546C67 )
Variables ¶
This section is empty.
Functions ¶
func WriteBinary ¶
Types ¶
type DefaultConvertToKtx2ImageDependencies ¶ added in v0.0.5
type DefaultConvertToKtx2ImageDependencies struct{}
func (*DefaultConvertToKtx2ImageDependencies) CommandExecutor ¶ added in v0.0.5
func (d *DefaultConvertToKtx2ImageDependencies) CommandExecutor(name string, args ...string) error
func (*DefaultConvertToKtx2ImageDependencies) ContentTypeDetector ¶ added in v0.0.5
func (d *DefaultConvertToKtx2ImageDependencies) ContentTypeDetector(data []byte) string
func (*DefaultConvertToKtx2ImageDependencies) FileCreator ¶ added in v0.0.5
func (d *DefaultConvertToKtx2ImageDependencies) FileCreator(filePath string) (interfaces.File, error)
func (*DefaultConvertToKtx2ImageDependencies) FileReader ¶ added in v0.0.5
func (d *DefaultConvertToKtx2ImageDependencies) FileReader(filePath string) ([]byte, error)
func (*DefaultConvertToKtx2ImageDependencies) FileRemover ¶ added in v0.0.5
func (d *DefaultConvertToKtx2ImageDependencies) FileRemover(filePath string) error
func (*DefaultConvertToKtx2ImageDependencies) ImageSizer ¶ added in v0.0.5
func (d *DefaultConvertToKtx2ImageDependencies) ImageSizer(data []byte) (int, int, error)
func (*DefaultConvertToKtx2ImageDependencies) ParamsGenerator ¶ added in v0.0.5
func (*DefaultConvertToKtx2ImageDependencies) UUIDGenerator ¶ added in v0.0.5
func (d *DefaultConvertToKtx2ImageDependencies) UUIDGenerator() string
type DefaultConvertToKtx2TextureDependencies ¶ added in v0.0.5
type DefaultConvertToKtx2TextureDependencies struct{}
func (*DefaultConvertToKtx2TextureDependencies) ConvertToKtx2Image ¶ added in v0.0.5
func (d *DefaultConvertToKtx2TextureDependencies) ConvertToKtx2Image(deps interfaces.ConvertToKtx2ImageDependenciesInterface, ktx2Mode string, buf []byte, isSRGB bool, etc1sQuality int, uastcQuality int, zstdLevel int) ([]byte, error)
type GLB ¶
type GLB struct { // GltfDocument represents the parsed document of the JSON part of the GLTF file. // This field contains information about the scene's structure, asset metadata, animations, materials, etc. GltfDocument gltf.Document // BIN is a byte slice that stores the binary portion of the GLTF file. // It includes the binary format asset data such as mesh vertex data and textures. BIN []byte }
GLB represents a GLTF 2.0 Binary File Format structure. This format encapsulates both the JSON description of a GLTF scene and its associated binary data in a single binary blob.
func ReadBinary ¶
func (*GLB) ResizeTexture ¶
func (*GLB) ToKtx2Texture ¶ added in v0.0.1
func (g *GLB) ToKtx2Texture(deps interfaces.ConvertToKtx2TextureDependenciesInterface, ktx2Mode string, etc1sQuality int, uastcQuality int, zstdLevel int) (err error)
Click to show internal directories.
Click to hide internal directories.