mirror of
https://github.com/status-im/whispervis.git
synced 2025-02-01 07:55:29 +00:00
Add transparent node material
This commit is contained in:
parent
22e3d374a0
commit
c6f7972b99
18
material.go
18
material.go
@ -3,10 +3,11 @@ package main
|
||||
import "github.com/divan/three"
|
||||
|
||||
var (
|
||||
DefaultNodeMaterial = NewNodeMaterial()
|
||||
BlinkedNodeMaterial = NewBlinkedNodeMaterial()
|
||||
DefaultEdgeMaterial = NewEdgeMaterial()
|
||||
BlinkedEdgeMaterial = NewBlinkedEdgeMaterial()
|
||||
DefaultNodeMaterial = NewNodeMaterial()
|
||||
BlinkedNodeMaterial = NewBlinkedNodeMaterial()
|
||||
TransparentNodeMaterial = NewTransparentNodeMaterial()
|
||||
DefaultEdgeMaterial = NewEdgeMaterial()
|
||||
BlinkedEdgeMaterial = NewBlinkedEdgeMaterial()
|
||||
)
|
||||
|
||||
const (
|
||||
@ -31,6 +32,15 @@ func NewBlinkedNodeMaterial() three.Material {
|
||||
return three.NewMeshPhongMaterial(params)
|
||||
}
|
||||
|
||||
// NewTransparentNodeMaterial creates a new transparent material for the graph normal node.
|
||||
func NewTransparentNodeMaterial() three.Material {
|
||||
params := three.NewMaterialParameters()
|
||||
params.Color = three.NewColorRGB(0, 255, 0)
|
||||
params.Transparent = true
|
||||
params.Opacity = 0.5
|
||||
return three.NewMeshPhongMaterial(params)
|
||||
}
|
||||
|
||||
// NewEdgeMaterial creates a new default material for the graph edge lines.
|
||||
func NewEdgeMaterial() three.Material {
|
||||
params := three.NewMaterialParameters()
|
||||
|
Loading…
x
Reference in New Issue
Block a user