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
18
material.go
18
material.go
@ -3,10 +3,11 @@ package main
|
|||||||
import "github.com/divan/three"
|
import "github.com/divan/three"
|
||||||
|
|
||||||
var (
|
var (
|
||||||
DefaultNodeMaterial = NewNodeMaterial()
|
DefaultNodeMaterial = NewNodeMaterial()
|
||||||
BlinkedNodeMaterial = NewBlinkedNodeMaterial()
|
BlinkedNodeMaterial = NewBlinkedNodeMaterial()
|
||||||
DefaultEdgeMaterial = NewEdgeMaterial()
|
TransparentNodeMaterial = NewTransparentNodeMaterial()
|
||||||
BlinkedEdgeMaterial = NewBlinkedEdgeMaterial()
|
DefaultEdgeMaterial = NewEdgeMaterial()
|
||||||
|
BlinkedEdgeMaterial = NewBlinkedEdgeMaterial()
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
@ -31,6 +32,15 @@ func NewBlinkedNodeMaterial() three.Material {
|
|||||||
return three.NewMeshPhongMaterial(params)
|
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.
|
// NewEdgeMaterial creates a new default material for the graph edge lines.
|
||||||
func NewEdgeMaterial() three.Material {
|
func NewEdgeMaterial() three.Material {
|
||||||
params := three.NewMaterialParameters()
|
params := three.NewMaterialParameters()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user