json

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2022 License: MIT Imports: 3 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CollisionMesh

type CollisionMesh struct {
	Triangles []Triangle `json:"triangles"`
}

type Entity

type Entity struct {
	Model  string      `json:"model"`
	Matrix [16]float32 `json:"matrix"`
}

type Level

type Level struct {
	SkyboxTexture            string          `json:"skybox_texture"`
	AmbientReflectionTexture string          `json:"ambient_reflection_texture"`
	AmbientRefractionTexture string          `json:"ambient_refraction_texture"`
	IrradianceTexture        string          `json:"irradiance_texture"`
	StartCollisionMesh       CollisionMesh   `json:"start_collision_mesh"`
	Waypoints                []Position      `json:"waypoints"`
	StaticMeshes             []Mesh          `json:"static_meshes"`
	CollisionMeshes          []CollisionMesh `json:"collision_meshes"`
	StaticEntities           []Entity        `json:"static_entities"`
}

type LevelDecoder

type LevelDecoder struct{}

func NewLevelDecoder

func NewLevelDecoder() *LevelDecoder

func (*LevelDecoder) Decode

func (d *LevelDecoder) Decode(in io.Reader) (*Level, error)

type LevelEncoder

type LevelEncoder struct{}

func NewLevelEncoder

func NewLevelEncoder() *LevelEncoder

func (*LevelEncoder) Encode

func (e *LevelEncoder) Encode(out io.Writer, level *Level) error

type Mesh

type Mesh struct {
	Coords    []float32 `json:"coords"`
	Normals   []float32 `json:"normals"`
	TexCoords []float32 `json:"tex_coords"`
	Indices   []int     `json:"indices"`
	SubMeshes []SubMesh `json:"sub_meshes"`
}

type Position

type Position [3]float32

type SubMesh

type SubMesh struct {
	Name           string `json:"name"`
	IndexOffset    int    `json:"index_offset"`
	IndexCount     int    `json:"index_count"`
	DiffuseTexture string `json:"diffuse_texture"`
}

type Triangle

type Triangle [3]Position

Jump to

Keyboard shortcuts

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