diff --git a/go.mod b/go.mod index 8502c3a..63bdcd8 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/emer/emergent/v2 go 1.22 require ( - cogentcore.org/core v0.3.4 + cogentcore.org/core v0.3.5 github.com/BurntSushi/toml v1.3.2 github.com/stretchr/testify v1.9.0 golang.org/x/exp v0.0.0-20240823005443-9b4947da3948 diff --git a/go.sum b/go.sum index 2bd36fd..ef74d14 100644 --- a/go.sum +++ b/go.sum @@ -1,5 +1,5 @@ -cogentcore.org/core v0.3.4 h1:cR+tbFHobLYwAdIW7+0WXnnUdinidrnBse6iqnIBuL0= -cogentcore.org/core v0.3.4/go.mod h1:HiWp9KXOQmYNaW5wdGpMBEHQTVprdsfBzVmTJ8OPk1A= +cogentcore.org/core v0.3.5 h1:qTW/+GSUbeYYCSi29zdAQ/fnjWg2/E/aTbAMbfAFGfI= +cogentcore.org/core v0.3.5/go.mod h1:q3OrXihYG2aTE2oG785ad5b6aJ3wzSCXeeD2SSLKWIE= github.com/Bios-Marcel/wastebasket v0.0.4-0.20240213135800-f26f1ae0a7c4 h1:6lx9xzJAhdjq0LvVfbITeC3IH9Fzvo1aBahyPu2FuG8= github.com/Bios-Marcel/wastebasket v0.0.4-0.20240213135800-f26f1ae0a7c4/go.mod h1:FChzXi1izqzdPb6BiNZmcZLGyTYiT61iGx9Rxx9GNeI= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= diff --git a/netview/layraster.go b/netview/layraster.go index a6104de..4881559 100644 --- a/netview/layraster.go +++ b/netview/layraster.go @@ -10,7 +10,7 @@ import ( ) func (lm *LayMesh) RasterSize2D() (nVtx, nIndex int) { - ss := &lm.Lay.AsEmer().SampleShape + ss := lm.Lay.AsEmer().GetSampleShape() nuz := ss.DimSize(0) nux := ss.DimSize(1) nz := nuz*nux + nuz - 1 @@ -24,7 +24,7 @@ func (lm *LayMesh) RasterSize2D() (nVtx, nIndex int) { } func (lm *LayMesh) RasterSize4D() (nVtx, nIndex int) { - ss := &lm.Lay.AsEmer().SampleShape + ss := lm.Lay.AsEmer().GetSampleShape() npz := ss.DimSize(0) // p = pool npx := ss.DimSize(1) nuz := ss.DimSize(2) // u = unit @@ -42,7 +42,7 @@ func (lm *LayMesh) RasterSize4D() (nVtx, nIndex int) { } func (lm *LayMesh) RasterSet2DX(vtxAry, normAry, texAry, clrAry math32.ArrayF32, idxAry math32.ArrayU32) { - ss := &lm.Lay.AsEmer().SampleShape + ss := lm.Lay.AsEmer().GetSampleShape() nuz := ss.DimSize(0) nux := ss.DimSize(1) nz := nuz*nux + nuz - 1 @@ -123,7 +123,7 @@ func (lm *LayMesh) RasterSet2DX(vtxAry, normAry, texAry, clrAry math32.ArrayF32, } func (lm *LayMesh) RasterSet2DZ(vtxAry, normAry, texAry, clrAry math32.ArrayF32, idxAry math32.ArrayU32) { - ss := &lm.Lay.AsEmer().SampleShape + ss := lm.Lay.AsEmer().GetSampleShape() nuz := ss.DimSize(0) nux := ss.DimSize(1) nx := nuz*nux + nuz - 1 @@ -203,7 +203,7 @@ func (lm *LayMesh) RasterSet2DZ(vtxAry, normAry, texAry, clrAry math32.ArrayF32, } func (lm *LayMesh) RasterSet4DX(vtxAry, normAry, texAry, clrAry math32.ArrayF32, idxAry math32.ArrayU32) { - ss := &lm.Lay.AsEmer().SampleShape + ss := lm.Lay.AsEmer().GetSampleShape() npz := ss.DimSize(0) // p = pool npx := ss.DimSize(1) nuz := ss.DimSize(2) // u = unit @@ -304,7 +304,7 @@ func (lm *LayMesh) RasterSet4DX(vtxAry, normAry, texAry, clrAry math32.ArrayF32, } func (lm *LayMesh) RasterSet4DZ(vtxAry, normAry, texAry, clrAry math32.ArrayF32, idxAry math32.ArrayU32) { - ss := &lm.Lay.AsEmer().SampleShape + ss := lm.Lay.AsEmer().GetSampleShape() npz := ss.DimSize(0) // p = pool npx := ss.DimSize(1) nuz := ss.DimSize(2) // u = unit diff --git a/netview/netview.go b/netview/netview.go index 26ad4a5..3527ac5 100644 --- a/netview/netview.go +++ b/netview/netview.go @@ -613,7 +613,7 @@ func (nv *NetView) UnitValue(lay emer.Layer, idx []int) (raw, scaled float32, cl // scaled is in range -1..1 func (nv *NetView) UnitValRaster(lay emer.Layer, idx []int, rCtr int) (raw, scaled float32, clr color.RGBA, hasval bool) { lb := lay.AsEmer() - idx1d := lb.SampleShape.Offset(idx) + idx1d := lb.GetSampleShape().Offset(idx) ridx := lb.SampleIndexes if len(ridx) == 0 { // no rep if idx1d >= lb.Shape.Len() {