materials

package module
v0.0.0-...-23b6792 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2020 License: BSD-2-Clause Imports: 10 Imported by: 0

README

Forgery/core/materials

Material loading and management subsystem. This is the improved stuff taken from (forgery-go)[https://github.com/emily33901/forgery-go] but was originally made by Galaco.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Material

type Material struct {
	Props *vmt.Properties

	Textures struct {
		Albedo *textures.Texture

		Normal *textures.Texture
		// contains filtered or unexported fields
	}
	// contains filtered or unexported fields
}

Material

func Load

func Load(path string, fs *filesystem.Filesystem) (*Material, error)

func NewMaterial

func NewMaterial(filePath string, props *vmt.Properties) (mat *Material)

func (*Material) EvictTextures

func (mat *Material) EvictTextures()

func (*Material) FilePath

func (mat *Material) FilePath() string

FilePath returns this materials location in whatever filesystem it was found

func (*Material) G3nMaterial

func (mat *Material) G3nMaterial() *material.Standard

func (*Material) Height

func (mat *Material) Height() int

Height returns this materials height. Albedo is used to determine material height where possible

func (*Material) Loaded

func (mat *Material) Loaded() bool

func (*Material) TextureLoaded

func (mat *Material) TextureLoaded(ev *textures.TextureLoadedEvent)

func (*Material) Width

func (mat *Material) Width() int

Width returns this materials width. Albedo is used to determine material width where possible

Jump to

Keyboard shortcuts

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