mapdata

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KindRing = 0
	KindLine = 1
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Color

type Color struct {
	R, G, B, A float32
}

type DrawPass

type DrawPass struct {
	LayerIndex  int
	FillColor   *Color
	StrokeColor *Color
	RankFilter  bool
}

type Layer

type Layer struct {
	Name    string
	Kind    int
	GeomIDs []int32
}

type WireCounts

type WireCounts struct {
	Layers     int `json:"layers"`
	Geometries int `json:"geometries"`
	Vertices   int `json:"vertices"`
}

type WireDrawPass

type WireDrawPass struct {
	Layer      string `json:"layer"`
	Fill       string `json:"fill"`
	Stroke     string `json:"stroke"`
	RankFilter bool   `json:"rankFilter"`
}

type WireGeometry

type WireGeometry struct {
	Rank   int     `json:"rank"`
	N      int     `json:"n"`
	Coords []int32 `json:"coords"`
}

type WireLayer

type WireLayer struct {
	Name       string         `json:"name"`
	Kind       int            `json:"kind"`
	Count      int            `json:"count"`
	Geometries []WireGeometry `json:"geometries"`
}

type WireWorld

type WireWorld struct {
	Format     string         `json:"format"`
	Version    int            `json:"version"`
	Source     string         `json:"source"`
	Scale      int32          `json:"scale"`
	Note       string         `json:"note"`
	Counts     WireCounts     `json:"counts"`
	DrawOrder  []WireDrawPass `json:"drawOrder"`
	Background string         `json:"background"`
	Layers     []WireLayer    `json:"layers"`
}

type World

type World struct {
	Scale      int32
	Background Color
	DrawOrder  []DrawPass
	Layers     []Layer
	Coords     []int32
	GeomRank   []int32
	GeomN      []int32
	GeomStart  []int32
	GeomLayer  []int32
	MinX       []int32
	MinY       []int32
	MaxX       []int32
	MaxY       []int32
	GeomCount  int32
}

func LoadJSON

func LoadJSON(path string) (*World, error)

func LoadJSONBytes

func LoadJSONBytes(data []byte) (*World, error)

func (*World) Unload

func (w *World) Unload()

Jump to

Keyboard shortcuts

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