package framework
Functions
CreateDrawingFromMeshBasicLit
func CreateDrawingFromMeshBasicLit(host *engine.Host, mesh *rendering.Mesh, textures []*rendering.Texture) (rendering.Drawing, error)
CreateDrawingFromMeshBasicLitDynamic
func CreateDrawingFromMeshBasicLitDynamic(host *engine.Host, mesh *rendering.Mesh, textures []*rendering.Texture) (rendering.Drawing, error)
CreateDrawingFromMeshUnlit
func CreateDrawingFromMeshUnlit(host *engine.Host, mesh *rendering.Mesh, textures []*rendering.Texture) (rendering.Drawing, error)
CreateDrawingFromMeshUnlitTransparent
func CreateDrawingFromMeshUnlitTransparent(host *engine.Host, mesh *rendering.Mesh, textures []*rendering.Texture) (rendering.Drawing, error)
RegisterDrawingSpecification
SpawnTemplate
SpawnTemplate loads an entity template asset identified by id from the
host's asset database, deserializes it into a stages.EntityDescription
(using JSON on desktop debug builds or the archive deserializer in other
builds), and creates a new entity configured from that description.
If parent is non-nil the new entity will be parented to it. The created
entity is initialized via stages.SetupEntityFromDescription and returned,
or an error is returned if the asset cannot be read or deserialized.
SpawnTemplateWithTransform
func SpawnTemplateWithTransform(id string, host *engine.Host, parent *engine.Entity, pos, rot, scale matrix.Vec3) (*engine.Entity, error)
SpawnTemplateWithTransform loads an entity template asset identified by
id, creates a new entity from that template (optionally parented to
parent), then sets the entity's transform to the provided position,
rotation and scale. It is a thin wrapper around SpawnTemplate that applies
the transform before returning the created entity or any encountered error.
Parameters: - id: template asset id to load from the host's asset database - host: the engine host used to create the entity and read assets - parent: optional parent entity to attach the new entity to - pos, rot, scale: transform components applied to the new entity
Returns the newly created entity or a non-nil error if the template could not be read or deserialized.
Types
DrawingSpecCreateInfo
struct
type DrawingSpecCreateInfo struct {
LoadedMesh load_result.Result
Meshes []*rendering.Mesh
Textures []*rendering.Texture
SkipMatSearch bool
}
DrawingSpecification
struct
FindDrawingSpecification
DrawingSpecification.CreateDrawings
func (s DrawingSpecification) CreateDrawings(host *engine.Host, info DrawingSpecCreateInfo) (ModelDrawingSlice, error)
DrawingSpecification.IsValid
DrawingSpecificationRenderInfo
struct
type DrawingSpecificationRenderInfo struct {
Material string
DataFactory func() rendering.DrawInstance
}
EncryptedInt32
struct
EncryptedInt32.Add
EncryptedInt32.Decrement
EncryptedInt32.Decrypt
EncryptedInt32.Encrypt
EncryptedInt32.Increment
EncryptedInt32.SetValue
EncryptedInt32.Subtract
EncryptedInt32.Value
ModelDrawing
struct
ModelDrawingSlice
CreateDrawingsBasic
CreateDrawingsBasicLit
CreateDrawingsBasicLitDynamic
func CreateDrawingsBasicLitDynamic(host *engine.Host, res load_result.Result) (ModelDrawingSlice, error)
CreateDrawingsBasicLitStatic
func CreateDrawingsBasicLitStatic(host *engine.Host, res load_result.Result) (ModelDrawingSlice, error)
CreateDrawingsPBR
CreateDrawingsUnlit
CreateDrawingsUnlitTransparent
func CreateDrawingsUnlitTransparent(host *engine.Host, res load_result.Result) (ModelDrawingSlice, error)