Documentation ¶
Index ¶
- Constants
- Variables
- func DecodeLight(param1 uint8) float64
- type BlockNeighborhood
- func (b *BlockNeighborhood) FetchBlock(w *world.World, posOffset, worldPos spatial.BlockPosition)
- func (b *BlockNeighborhood) GetNode(pos spatial.NodePosition) (string, uint8, uint8)
- func (b *BlockNeighborhood) GetParam1(pos spatial.NodePosition) uint8
- func (b *BlockNeighborhood) SetBlock(pos spatial.BlockPosition, block *world.MapBlock)
- type NodeRasterizer
- type RenderableNode
- type Renderer
- type TilePosition
Constants ¶
View Source
const ( ZeroIntensity = 0 MapEdgeIntensity = 11 FullIntensity = 15 )
View Source
const BaseResolution = 16
View Source
const Gamma = 2.2
Variables ¶
View Source
var SunLightDir = lm.Vec3(-0.5, 1, -0.8).Normalize()
View Source
var SunLightIntensity = 0.95 / SunLightDir.MaxComponent()
Functions ¶
func DecodeLight ¶
Types ¶
type BlockNeighborhood ¶
type BlockNeighborhood struct {
// contains filtered or unexported fields
}
func (*BlockNeighborhood) FetchBlock ¶
func (b *BlockNeighborhood) FetchBlock(w *world.World, posOffset, worldPos spatial.BlockPosition)
func (*BlockNeighborhood) GetNode ¶
func (b *BlockNeighborhood) GetNode(pos spatial.NodePosition) (string, uint8, uint8)
func (*BlockNeighborhood) GetParam1 ¶
func (b *BlockNeighborhood) GetParam1(pos spatial.NodePosition) uint8
func (*BlockNeighborhood) SetBlock ¶
func (b *BlockNeighborhood) SetBlock(pos spatial.BlockPosition, block *world.MapBlock)
type NodeRasterizer ¶
type NodeRasterizer struct {
// contains filtered or unexported fields
}
func NewNodeRasterizer ¶
func NewNodeRasterizer(projection lm.Matrix3) NodeRasterizer
func (*NodeRasterizer) Render ¶
func (r *NodeRasterizer) Render(node RenderableNode, nodeDef *game.NodeDefinition) *raster.RenderBuffer
type RenderableNode ¶
type Renderer ¶
type Renderer interface {
RenderTile(pos TilePosition, w *world.World, game *game.Game) *raster.RenderBuffer
}
type TilePosition ¶
type TilePosition struct {
X, Y int
}
Click to show internal directories.
Click to hide internal directories.