mirror of
https://github.com/status-im/whispervis.git
synced 2025-02-01 16:04:56 +00:00
Add transparent node material
This commit is contained in:
parent
22e3d374a0
commit
c6f7972b99
10
material.go
10
material.go
@ -5,6 +5,7 @@ import "github.com/divan/three"
|
||||
var (
|
||||
DefaultNodeMaterial = NewNodeMaterial()
|
||||
BlinkedNodeMaterial = NewBlinkedNodeMaterial()
|
||||
TransparentNodeMaterial = NewTransparentNodeMaterial()
|
||||
DefaultEdgeMaterial = NewEdgeMaterial()
|
||||
BlinkedEdgeMaterial = NewBlinkedEdgeMaterial()
|
||||
)
|
||||
@ -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