Skip to content

Commit

Permalink
Many feature updates
Browse files Browse the repository at this point in the history
- working on improving flex layout
- adding ID in table
- various fixes to 3D interaction
- added a "searched" state to make the 3D viewer more reactive
- added (non-functional) waveform/duration buttons
  • Loading branch information
dbirman committed Feb 8, 2024
1 parent cda3413 commit b29fdb8
Show file tree
Hide file tree
Showing 8 changed files with 5,925 additions and 5,785 deletions.
1 change: 0 additions & 1 deletion Unity/Assets/Resources/PerformanceTestRunInfo.json

This file was deleted.

1 change: 0 additions & 1 deletion Unity/Assets/Resources/PerformanceTestRunSettings.json

This file was deleted.

18 changes: 5 additions & 13 deletions Unity/Assets/Scripts/NPUltraRuntime.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using BrainAtlas;
using System.Collections.Generic;
using System.Linq;
#if UNITY_EDITOR
using UnityEditor;
#endif
Expand Down Expand Up @@ -106,20 +107,11 @@ public void Search(string searchStr)
_rootNode.SetVisibility(true, OntologyNode.OntologyNodeSide.Full);
_searchedNode = BrainAtlasManager.ActiveReferenceAtlas.Ontology.ID2Node(
BrainAtlasManager.ActiveReferenceAtlas.Ontology.Acronym2ID(searchStr));
LoadNode(_searchedNode, 0.25f);
LoadNode(_searchedNode, 0.15f);

// Resize neurons
float[] scales = new float[_data.Names.Length];

for (int i = 0; i < _data.Names.Length; i++)
{
if (_data.Names[i].Contains(searchStr))
scales[i] = UNIT_SIZE;
else
scales[i] = UNIT_SIZE_DISABLED;
}

_meshManager.SetScale(_data.Names, scales);
int[] searched = _data.Areas.Select(x => x.Contains(searchStr) ? 1 : -1).ToArray();
_meshManager.SetSearched(_data.Names, searched);
}
else
{
Expand All @@ -131,7 +123,7 @@ public void Search(string searchStr)
_rootNode.SetVisibility(false, OntologyNode.OntologyNodeSide.Full);
_searchedNode.SetVisibility(false, OntologyNode.OntologyNodeSide.Full);

_meshManager.SetScale(_data.Names, UNIT_SIZE);
_meshManager.SetSearched(_data.Names, 0);
}
}

Expand Down
Binary file modified build/Build/build.data.unityweb
Binary file not shown.
Binary file modified build/Build/build.framework.js.unityweb
Binary file not shown.
Binary file modified build/Build/build.wasm.unityweb
Binary file not shown.
Loading

0 comments on commit b29fdb8

Please sign in to comment.