whispervis/material.go
2018-09-20 15:41:24 +03:00

18 lines
541 B
Go

package main
import "github.com/divan/three"
// NewNodeMaterial creates a new default material for the graph node lines.
func NewNodeMaterial() three.Material {
params := three.NewMaterialParameters()
params.Color = three.NewColor(0, 255, 0)
return three.NewMeshPhongMaterial(params)
}
// NewEdgeMaterial creates a new default material for the graph edge lines.
func NewEdgeMatherial() three.Material {
params := three.NewMaterialParameters()
params.Color = three.NewColor(200, 200, 255)
return three.NewLineBasicMaterial(params)
}