@openbraininstitute/morphoviewer 0.26.2 → 0.26.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/button-reset-camera/button-reset-camera.js +2 -2
- package/dist/components/button-reset-camera/button-reset-camera.module.css +10 -0
- package/dist/components/controls-layout/controls-layout.js +1 -1
- package/dist/components/controls-layout/controls-layout.module.css +53 -0
- package/dist/components/morpho-viewer-octree/morpho-viewer-octree.js +1 -1
- package/dist/components/morpho-viewer-octree/morpho-viewer-octree.module.css +70 -0
- package/dist/components/morpho-viewer-octree/painter/manager.d.ts.map +1 -1
- package/dist/components/morpho-viewer-octree/painter/manager.js +9 -4
- package/dist/components/morpho-viewer-octree/types.d.ts +2 -1
- package/dist/components/morpho-viewer-octree/types.d.ts.map +1 -1
- package/dist/components/morpho-viewer-scalebar/morpho-viewer-scalebar.js +1 -1
- package/dist/components/morpho-viewer-scalebar/morpho-viewer-scalebar.module.css +13 -0
- package/dist/components/morpho-viewer-simul/components/ModeSelector/ModeSelector.js +1 -1
- package/dist/components/morpho-viewer-simul/components/ModeSelector/ModeSelector.module.css +25 -0
- package/dist/components/morpho-viewer-simul/components/add-recording-dialog/add-recording-dialog.js +2 -2
- package/dist/components/morpho-viewer-simul/components/add-recording-dialog/add-recording-dialog.module.css +115 -0
- package/dist/components/morpho-viewer-simul/components/hint/hint.js +1 -1
- package/dist/components/morpho-viewer-simul/components/hint/hint.module.css +23 -0
- package/dist/components/morpho-viewer-simul/components/legend-overlay/legend-overlay.js +1 -1
- package/dist/components/morpho-viewer-simul/components/legend-overlay/legend-overlay.module.css +5 -0
- package/dist/components/morpho-viewer-simul/components/spiking-controller/current-time/current-time.d.ts +1 -1
- package/dist/components/morpho-viewer-simul/components/spiking-controller/current-time/current-time.js +2 -2
- package/dist/components/morpho-viewer-simul/components/spiking-controller/current-time/current-time.module.css +20 -0
- package/dist/components/morpho-viewer-simul/components/spiking-controller/play-button/play-button.js +3 -3
- package/dist/components/morpho-viewer-simul/components/spiking-controller/play-button/play-button.module.css +21 -0
- package/dist/components/morpho-viewer-simul/components/spiking-controller/simul-combo/simul-combo.d.ts +1 -1
- package/dist/components/morpho-viewer-simul/components/spiking-controller/simul-combo/simul-combo.js +1 -1
- package/dist/components/morpho-viewer-simul/components/spiking-controller/simul-combo/simul-combo.module.css +52 -0
- package/dist/components/morpho-viewer-simul/components/spiking-controller/speed-combo/speed-combo.js +1 -1
- package/dist/components/morpho-viewer-simul/components/spiking-controller/speed-combo/speed-combo.module.css +69 -0
- package/dist/components/morpho-viewer-simul/components/spiking-controller/spiking-controller.js +1 -1
- package/dist/components/morpho-viewer-simul/components/zoom-slider/zoom-slider.js +3 -3
- package/dist/components/morpho-viewer-simul/components/zoom-slider/zoom-slider.module.css +60 -0
- package/dist/components/morpho-viewer-simul/morpho-viewer-simul.js +1 -1
- package/dist/components/morpho-viewer-simul/morpho-viewer-simul.module.css +94 -0
- package/dist/components/morpho-viewer-simul/painter/manager.js +1 -1
- package/dist/components/morpho-viewer-simul/painter/painters/overlay/cursor/cursor.js +1 -1
- package/dist/components/morpho-viewer-simul/painter/painters/overlay/cursor/fill.js +1 -1
- package/dist/components/morpho-viewer-simul/painter/painters/overlay/overlay.js +1 -1
- package/dist/components/morpho-viewer-simul/painter/painters/overlay/ticks.d.ts +1 -1
- package/dist/components/morpho-viewer-simul/painter/painters/spiking/spiking.js +1 -1
- package/dist/components/morpho-viewer-small-circuit/morpho-viewer-small-circuit.js +1 -1
- package/dist/components/morpho-viewer-small-circuit/morpho-viewer-small-circuit.module.css +63 -0
- package/dist/components/morpho-viewer-small-circuit/painter/manager.js +3 -3
- package/dist/components/morpho-viewer-small-circuit/painter/offscreen-painter/offscreen-painter.d.ts +1 -1
- package/dist/components/morpho-viewer-small-circuit/painter/offscreen-painter/offscreen-painter.js +1 -1
- package/dist/components/morpho-viewer-small-circuit/painter/painter-cell/factory/tree.d.ts +1 -1
- package/dist/components/morpho-viewer-small-circuit/painter/painter-cell/factory/tree.js +1 -1
- package/dist/components/morpho-viewer-small-circuit/painter/painter-cell/painter-cell.js +1 -1
- package/dist/components/morpho-viewer-somas-only/manager/manager.js +2 -2
- package/dist/components/morpho-viewer-somas-only/morpho-viewer-somas-only.js +1 -1
- package/dist/components/morpho-viewer-somas-only/morpho-viewer-somas-only.module.css +15 -0
- package/dist/components/morpho-viewer-spinner/morpho-viewer-spinner.js +2 -2
- package/dist/components/morpho-viewer-spinner/morpho-viewer-spinner.module.css +31 -0
- package/dist/components/tooltip/tooltip.js +1 -1
- package/dist/components/tooltip/tooltip.module.css +74 -0
- package/dist/icons/icon.module.css +19 -0
- package/dist/icons/spinner.js +1 -1
- package/dist/morphology/painter/factory.js +1 -1
- package/dist/morphology/painter/nodes.d.ts +1 -1
- package/dist/morphology/painter/nodes.js +1 -1
- package/dist/morphology/painter/painter.d.ts +1 -1
- package/dist/morphology/painter/segments.js +1 -1
- package/dist/morphology/painter/textures.d.ts +1 -1
- package/dist/package.json +3 -3
- package/dist/parser/swc.d.ts +1 -1
- package/dist/parser/swc.js +1 -1
- package/dist/tools/morphology-to-tree.d.ts +2 -2
- package/dist/tools/morphology-to-tree.js +1 -1
- package/dist/tools/swc-to-tree.d.ts +1 -1
- package/dist/tools/swc-to-tree.js +1 -1
- package/package.json +8 -4
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
.speedCombo {
|
|
2
|
+
position: absolute;
|
|
3
|
+
left: 0;
|
|
4
|
+
bottom: calc(48px + 32px);
|
|
5
|
+
width: 48px;
|
|
6
|
+
height: auto;
|
|
7
|
+
display: grid;
|
|
8
|
+
place-items: center;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
button.speedComboButton {
|
|
12
|
+
display: inline-block;
|
|
13
|
+
font: inherit;
|
|
14
|
+
font-size: 80%;
|
|
15
|
+
border: none;
|
|
16
|
+
color: #000;
|
|
17
|
+
background: #fff;
|
|
18
|
+
border-radius: 99vmax;
|
|
19
|
+
width: auto;
|
|
20
|
+
text-align: center;
|
|
21
|
+
|
|
22
|
+
&:hover {
|
|
23
|
+
background: #adf;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
div.dialog {
|
|
28
|
+
backdrop-filter: brightness(0.333);
|
|
29
|
+
position: absolute;
|
|
30
|
+
left: 0;
|
|
31
|
+
top: 0;
|
|
32
|
+
width: 100%;
|
|
33
|
+
height: 100%;
|
|
34
|
+
opacity: 0;
|
|
35
|
+
pointer-events: none;
|
|
36
|
+
transition: all 0.2s;
|
|
37
|
+
z-index: 9999;
|
|
38
|
+
|
|
39
|
+
&.open {
|
|
40
|
+
opacity: 1;
|
|
41
|
+
pointer-events: all;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
> div.column {
|
|
45
|
+
display: flex;
|
|
46
|
+
flex-wrap: nowrap;
|
|
47
|
+
flex-direction: column;
|
|
48
|
+
justify-content: flex-start;
|
|
49
|
+
align-items: flex-start;
|
|
50
|
+
gap: 0.5em;
|
|
51
|
+
border: none;
|
|
52
|
+
background: #0005;
|
|
53
|
+
position: absolute;
|
|
54
|
+
top: auto;
|
|
55
|
+
left: 0;
|
|
56
|
+
bottom: calc(80px + 32px);
|
|
57
|
+
padding: 8px;
|
|
58
|
+
margin: 0;
|
|
59
|
+
|
|
60
|
+
> div.row {
|
|
61
|
+
display: flex;
|
|
62
|
+
flex-wrap: nowrap;
|
|
63
|
+
flex-direction: row;
|
|
64
|
+
justify-content: flex-start;
|
|
65
|
+
align-items: center;
|
|
66
|
+
gap: 0.5em;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
package/dist/components/morpho-viewer-simul/components/spiking-controller/spiking-controller.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { useEventValue } from "
|
|
2
|
+
import { useEventValue } from "./../../../../utils";
|
|
3
3
|
import PlayButton from "./play-button";
|
|
4
4
|
import SimulCombo from "./simul-combo";
|
|
5
5
|
import { SpeedCombo } from "./speed-combo";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { classNames, useEventValue } from "
|
|
2
|
+
import { classNames, useEventValue } from "./../../../../utils";
|
|
3
3
|
import styles from "./zoom-slider.module.css";
|
|
4
|
-
import { IconZoomOut } from "
|
|
5
|
-
import { IconZoomIn } from "
|
|
4
|
+
import { IconZoomOut } from "./../../../icons/zoom-out";
|
|
5
|
+
import { IconZoomIn } from "./../../../icons/zoom-in";
|
|
6
6
|
export default function ZoomSlider({ className, painterManager }) {
|
|
7
7
|
const zoom = useEventValue(1, painterManager.eventZoom);
|
|
8
8
|
return (_jsxs("div", { className: classNames(className, styles.zoomSlider), children: [_jsx("button", { type: "button", onClick: painterManager.zoomOut, children: _jsx(IconZoomOut, {}) }), _jsx("input", { type: "range", value: zoom, onInput: (evt) => {
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
.zoomSlider {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-wrap: nowrap;
|
|
4
|
+
flex-direction: row;
|
|
5
|
+
justify-content: flex-start;
|
|
6
|
+
align-items: center;
|
|
7
|
+
gap: 0.5em;
|
|
8
|
+
width: 50%;
|
|
9
|
+
z-index: 9;
|
|
10
|
+
|
|
11
|
+
> * {
|
|
12
|
+
flex: 1 1 auto;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
> button {
|
|
16
|
+
flex: 0 0 auto;
|
|
17
|
+
display: grid;
|
|
18
|
+
place-items: center;
|
|
19
|
+
width: 1.5em;
|
|
20
|
+
height: 1.5em;
|
|
21
|
+
border-radius: 0.25em;
|
|
22
|
+
cursor: pointer;
|
|
23
|
+
background-color: #adf0;
|
|
24
|
+
transition: all 0.3s;
|
|
25
|
+
|
|
26
|
+
&:hover {
|
|
27
|
+
background-color: #adf;
|
|
28
|
+
color: #000;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
> :global(.ant-slider) {
|
|
33
|
+
> :global(.ant-slider-rail) {
|
|
34
|
+
background-color: #fff7;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
--color-input-range: #adf;
|
|
39
|
+
|
|
40
|
+
/* input[type="range"]::-webkit-slider-thumb {
|
|
41
|
+
background: var(--color-input-range);
|
|
42
|
+
cursor: pointer;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
input[type="range"]::-moz-range-thumb {
|
|
46
|
+
background: var(--color-input-range);
|
|
47
|
+
cursor: pointer;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
input[type="range"]::-ms-thumb {
|
|
51
|
+
background: var(--color-input-range);
|
|
52
|
+
cursor: pointer;
|
|
53
|
+
} */
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
@container (width < 600px) {
|
|
57
|
+
.zoomSlider > input {
|
|
58
|
+
display: none;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { tgdFullscreenToggle } from "@tolokoban/tgd";
|
|
3
3
|
import React from "react";
|
|
4
|
-
import { useDebugMode } from "
|
|
4
|
+
import { useDebugMode } from "./../../utils";
|
|
5
5
|
import { ButtonCameraReset } from "../button-reset-camera";
|
|
6
6
|
import { IconClose } from "../icons/close";
|
|
7
7
|
import { IconCopy } from "../icons/copy";
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
.main {
|
|
2
|
+
position: absolute;
|
|
3
|
+
left: 0;
|
|
4
|
+
top: 0;
|
|
5
|
+
width: 100%;
|
|
6
|
+
height: 100%;
|
|
7
|
+
overflow: hidden;
|
|
8
|
+
|
|
9
|
+
background-color: #000;
|
|
10
|
+
color: #fff;
|
|
11
|
+
|
|
12
|
+
> canvas {
|
|
13
|
+
position: absolute;
|
|
14
|
+
left: 0;
|
|
15
|
+
top: 0;
|
|
16
|
+
width: 100%;
|
|
17
|
+
height: 100%;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.loading {
|
|
21
|
+
position: absolute;
|
|
22
|
+
left: 0;
|
|
23
|
+
top: 0;
|
|
24
|
+
width: 100%;
|
|
25
|
+
height: 100%;
|
|
26
|
+
display: grid;
|
|
27
|
+
place-content: center;
|
|
28
|
+
font-size: 1000%;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
> header {
|
|
32
|
+
top: 0;
|
|
33
|
+
bottom: auto;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
> footer {
|
|
37
|
+
top: auto;
|
|
38
|
+
bottom: 0;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
> header,
|
|
42
|
+
> footer {
|
|
43
|
+
container-type: inline-size;
|
|
44
|
+
position: absolute;
|
|
45
|
+
left: 0;
|
|
46
|
+
width: 100%;
|
|
47
|
+
box-sizing: border-box;
|
|
48
|
+
padding: 1em;
|
|
49
|
+
margin: 0;
|
|
50
|
+
display: flex;
|
|
51
|
+
flex-wrap: nowrap;
|
|
52
|
+
flex-direction: row;
|
|
53
|
+
justify-content: space-between;
|
|
54
|
+
align-items: center;
|
|
55
|
+
gap: 0;
|
|
56
|
+
|
|
57
|
+
> div.flex {
|
|
58
|
+
display: flex;
|
|
59
|
+
flex-wrap: nowrap;
|
|
60
|
+
flex-direction: row;
|
|
61
|
+
justify-content: flex-start;
|
|
62
|
+
align-items: center;
|
|
63
|
+
gap: 0.5em;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
button {
|
|
67
|
+
font: inherit;
|
|
68
|
+
width: 2.5em;
|
|
69
|
+
height: 2.5em;
|
|
70
|
+
display: grid;
|
|
71
|
+
place-items: center;
|
|
72
|
+
flex: 0 0 auto;
|
|
73
|
+
cursor: pointer;
|
|
74
|
+
color: #fff;
|
|
75
|
+
border: 2px solid #000;
|
|
76
|
+
border-radius: 2px;
|
|
77
|
+
background: #3a3a3a;
|
|
78
|
+
margin: 0;
|
|
79
|
+
box-sizing: border-box;
|
|
80
|
+
transition: all 0.3s;
|
|
81
|
+
|
|
82
|
+
&:hover {
|
|
83
|
+
background-color: #adf;
|
|
84
|
+
color: #000;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.zoomSlider {
|
|
89
|
+
color: #fff;
|
|
90
|
+
flex: 0 0 auto;
|
|
91
|
+
width: 240px;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { TgdColor, TgdContext, TgdControllerCameraOrbit, TgdEvent, TgdMat4, TgdVec3, tgdCalcMapRange, } from "@tolokoban/tgd";
|
|
3
3
|
import React from "react";
|
|
4
|
-
import { useEventValue } from "
|
|
4
|
+
import { useEventValue } from "./../../../utils";
|
|
5
5
|
import { makeCamera } from "./camera";
|
|
6
6
|
import { Initializer } from "./initializer";
|
|
7
7
|
import { computeSectionOffset } from "./math";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { TgdPainter, TgdPainterGroup, TgdPainterIcon, } from "@tolokoban/tgd";
|
|
2
2
|
import { PainterCursorFill } from "./fill";
|
|
3
3
|
import { makeTexture } from "./texture";
|
|
4
|
-
import { TIMELINE_HEIGHT, TIMELINE_MARGIN } from "
|
|
4
|
+
import { TIMELINE_HEIGHT, TIMELINE_MARGIN } from "./../../../../contants";
|
|
5
5
|
export class PainterCursor extends TgdPainter {
|
|
6
6
|
constructor(context, spikingManager) {
|
|
7
7
|
super();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { TgdPainter, TgdPainterProgram, TgdUniformBufferObject, TgdVec2, } from "@tolokoban/tgd";
|
|
2
|
-
import { TIMELINE_MARGIN, TIMELINE_HEIGHT } from "
|
|
2
|
+
import { TIMELINE_MARGIN, TIMELINE_HEIGHT } from "./../../../../contants";
|
|
3
3
|
export class PainterCursorFill extends TgdPainter {
|
|
4
4
|
constructor(context, spikingManager) {
|
|
5
5
|
super();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { TgdColor, TgdPainterGroup, TgdPainterOverlay, TgdTexture2D, tgdCalcClamp, tgdCanvasCreate, tgdCanvasCreateWithContext2D, } from "@tolokoban/tgd";
|
|
2
|
-
import { TIMELINE_HEIGHT, TIMELINE_MARGIN } from "
|
|
2
|
+
import { TIMELINE_HEIGHT, TIMELINE_MARGIN } from "./../../../contants";
|
|
3
3
|
import { PainterCursor } from "./cursor";
|
|
4
4
|
import { FramebufferTicks } from "./ticks";
|
|
5
5
|
export class PainterSpikingOverlay extends TgdPainterGroup {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { TgdContext, TgdEvent, TgdPainterFramebuffer, TgdPainterProgram, TgdTexture2D } from "@tolokoban/tgd";
|
|
2
|
-
import { MorphoViewerSpikeRecord } from "
|
|
2
|
+
import { MorphoViewerSpikeRecord } from "../../../types/public";
|
|
3
3
|
export interface FramebufferTicksOptions {
|
|
4
4
|
texture: TgdTexture2D;
|
|
5
5
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { tgdCalcMix, TgdFilterBlur, TgdMaterialSolid, TgdPainterClear, TgdPainterFilter, TgdPainterFramebuffer, TgdPainterGroup, TgdPainterSegmentsMorphing, TgdPainterState, TgdTexture2D, } from "@tolokoban/tgd";
|
|
2
|
-
import { SPIKING_BLUR_SIZE, SPIKING_COLOR, SPIKING_COLOR_MIX, SPIKING_RADIUS_MULTIPLIER, } from "
|
|
2
|
+
import { SPIKING_BLUR_SIZE, SPIKING_COLOR, SPIKING_COLOR_MIX, SPIKING_RADIUS_MULTIPLIER, } from "./../../../contants";
|
|
3
3
|
export class PainterSpiking extends TgdPainterGroup {
|
|
4
4
|
constructor(context, data, spikingManager) {
|
|
5
5
|
super({ name: "PainterSpiking" });
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { tgdFullscreenToggle } from "@tolokoban/tgd";
|
|
3
3
|
import React from "react";
|
|
4
|
-
import { classNames } from "
|
|
4
|
+
import { classNames } from "./../../utils";
|
|
5
5
|
import { ControlsLayout } from "../controls-layout";
|
|
6
6
|
import MorphoViewerScalebar from "../morpho-viewer-scalebar";
|
|
7
7
|
import { usePainterManager } from "./painter";
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
.morphoViewerSmallCircuit {
|
|
2
|
+
position: relative;
|
|
3
|
+
left: 0;
|
|
4
|
+
top: 0;
|
|
5
|
+
width: 100%;
|
|
6
|
+
height: 100%;
|
|
7
|
+
color: #fff;
|
|
8
|
+
|
|
9
|
+
>canvas.webgl {
|
|
10
|
+
position: absolute;
|
|
11
|
+
left: 0;
|
|
12
|
+
top: 0;
|
|
13
|
+
width: 100%;
|
|
14
|
+
height: 100%;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
>header {
|
|
18
|
+
position: absolute;
|
|
19
|
+
left: 0;
|
|
20
|
+
top: 0;
|
|
21
|
+
width: 100%;
|
|
22
|
+
box-sizing: border-box;
|
|
23
|
+
padding: 1em;
|
|
24
|
+
margin: 0;
|
|
25
|
+
display: flex;
|
|
26
|
+
flex-wrap: nowrap;
|
|
27
|
+
flex-direction: row;
|
|
28
|
+
justify-content: space-between;
|
|
29
|
+
align-items: center;
|
|
30
|
+
gap: 2em;
|
|
31
|
+
|
|
32
|
+
>div.flex {
|
|
33
|
+
display: flex;
|
|
34
|
+
flex-wrap: nowrap;
|
|
35
|
+
flex-direction: row;
|
|
36
|
+
justify-content: flex-start;
|
|
37
|
+
align-items: center;
|
|
38
|
+
gap: 0.5em;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
button {
|
|
42
|
+
font: inherit;
|
|
43
|
+
width: 2.5em;
|
|
44
|
+
height: 2.5em;
|
|
45
|
+
display: grid;
|
|
46
|
+
place-items: center;
|
|
47
|
+
flex: 0 0 auto;
|
|
48
|
+
cursor: pointer;
|
|
49
|
+
color: #fff;
|
|
50
|
+
border: 2px solid #000;
|
|
51
|
+
border-radius: 2px;
|
|
52
|
+
background: #3a3a3a;
|
|
53
|
+
margin: 0;
|
|
54
|
+
box-sizing: border-box;
|
|
55
|
+
transition: all 0.3s;
|
|
56
|
+
|
|
57
|
+
&:hover {
|
|
58
|
+
background-color: #adf;
|
|
59
|
+
color: #000;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { TgdBoundingBox, TgdCameraOrthographic, TgdColor, TgdContext, TgdEvent, TgdPainterClear, TgdPainterGroup, TgdPainterState, TgdValueWaitable, } from "@tolokoban/tgd";
|
|
2
2
|
import React from "react";
|
|
3
|
-
import { watchSpacePerPixel } from "
|
|
4
|
-
import { PainterGizmo } from "
|
|
5
|
-
import { CacheLRU } from "
|
|
3
|
+
import { watchSpacePerPixel } from "./../../../behaviors";
|
|
4
|
+
import { PainterGizmo } from "./../../../painters/gizmo";
|
|
5
|
+
import { CacheLRU } from "./../../../tools/cache-lru";
|
|
6
6
|
import { CameraManager } from "./camera";
|
|
7
7
|
import { OffscreenPainter } from "./offscreen-painter";
|
|
8
8
|
import { PainterCell } from "./painter-cell";
|
package/dist/components/morpho-viewer-small-circuit/painter/offscreen-painter/offscreen-painter.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { TgdContext } from "@tolokoban/tgd";
|
|
2
|
-
import type { CacheLRU } from "
|
|
2
|
+
import type { CacheLRU } from "../../../../tools/cache-lru";
|
|
3
3
|
import type { MorphoViewerSmallCircuitCell, MorphoViewerSmallCircuitCellData } from "../../types";
|
|
4
4
|
export interface OffscreenPainterOptions {
|
|
5
5
|
circuit: MorphoViewerSmallCircuitCell[];
|
package/dist/components/morpho-viewer-small-circuit/painter/offscreen-painter/offscreen-painter.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { TgdContext, TgdPainterClear, TgdPainterGroup, TgdPainterState, webglPresetDepth, } from "@tolokoban/tgd";
|
|
2
|
-
import { vec3ToInt16 } from "
|
|
2
|
+
import { vec3ToInt16 } from "./../../../../utils";
|
|
3
3
|
import { PainterCell } from "../painter-cell";
|
|
4
4
|
const FIRST_INDEX = 1;
|
|
5
5
|
export class OffscreenPainter {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { TgdBoundingBox, type TgdContext, type TgdMaterial, TgdPainterNode } from "@tolokoban/tgd";
|
|
2
|
-
import { type MorphoViewerTree } from "
|
|
2
|
+
import { type MorphoViewerTree } from "../../../../morpho-viewer-simul";
|
|
3
3
|
export declare function createCellFromTree(context: TgdContext, material: TgdMaterial, tree: MorphoViewerTree, forSelection: boolean): {
|
|
4
4
|
bbox: TgdBoundingBox;
|
|
5
5
|
node: TgdPainterNode;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { TgdBoundingBox, TgdPainterNode, TgdPainterSegments, TgdPainterSegmentsData, } from "@tolokoban/tgd";
|
|
2
|
-
import { MorphoViewerTreeItemType, } from "
|
|
2
|
+
import { MorphoViewerTreeItemType, } from "./../../../../morpho-viewer-simul";
|
|
3
3
|
export function createCellFromTree(context, material, tree, forSelection) {
|
|
4
4
|
const segmentsSoma = new TgdPainterSegmentsData();
|
|
5
5
|
const segmentsNeurites = new TgdPainterSegmentsData();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __awaiter } from "tslib";
|
|
2
2
|
import { TgdBoundingBox, TgdColor, TgdGeometrySphereIco, TgdLight, TgdMaterialDiffuse, TgdMaterialFlat, TgdMaterialFlatTexture, TgdPainterGroup, TgdPainterMesh, TgdQuat, TgdTexture2D, TgdVec4, tgdCanvasCreateFill, tgdCanvasCreatePalette, } from "@tolokoban/tgd";
|
|
3
|
-
import { int16ToVec3 } from "
|
|
3
|
+
import { int16ToVec3 } from "./../../../../utils";
|
|
4
4
|
import { createCellFromTree } from "./factory/tree";
|
|
5
5
|
export class PainterCell extends TgdPainterGroup {
|
|
6
6
|
constructor(context, options) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { TgdBoundingBox, TgdCameraOrthographic, TgdContext, TgdControllerCameraOrbit, TgdEvent, TgdPainterClear, TgdPainterState, tgdActionCreateCameraInterpolation, } from "@tolokoban/tgd";
|
|
2
2
|
import React from "react";
|
|
3
|
-
import { watchSpacePerPixel } from "
|
|
4
|
-
import { PainterGizmo } from "
|
|
3
|
+
import { watchSpacePerPixel } from "./../../../behaviors";
|
|
4
|
+
import { PainterGizmo } from "./../../../painters/gizmo";
|
|
5
5
|
import { PainterCellInfos } from "./painter-cell-infos";
|
|
6
6
|
class PainterManager {
|
|
7
7
|
constructor() {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { tgdFullscreenToggle } from "@tolokoban/tgd";
|
|
3
3
|
import React from "react";
|
|
4
|
-
import { classNames } from "
|
|
4
|
+
import { classNames } from "./../../utils";
|
|
5
5
|
import { ControlsLayout } from "../controls-layout";
|
|
6
6
|
import MorphoViewerScalebar from "../morpho-viewer-scalebar";
|
|
7
7
|
import { useManager as usePainterManager } from "./manager";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { IconSpinner } from "
|
|
3
|
-
import { classNames } from "
|
|
2
|
+
import { IconSpinner } from "./../../icons/spinner";
|
|
3
|
+
import { classNames } from "./../../utils";
|
|
4
4
|
import styles from "./morpho-viewer-spinner.module.css";
|
|
5
5
|
export function MorphoViewerSpinner({ className, label = "Neuron" }) {
|
|
6
6
|
return (_jsxs("div", { className: classNames(className, styles.morphoViewerSpinner), children: [_jsx(IconSpinner, {}), _jsxs("div", { children: ["Loading", _jsx("br", {}), label] })] }));
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
div.morphoViewerSpinner {
|
|
2
|
+
position: absolute;
|
|
3
|
+
left: 0;
|
|
4
|
+
top: 0;
|
|
5
|
+
width: 100%;
|
|
6
|
+
height: 100%;
|
|
7
|
+
font: inherit;
|
|
8
|
+
font-size: 2em;
|
|
9
|
+
font-weight: normal;
|
|
10
|
+
display: grid;
|
|
11
|
+
place-items: center;
|
|
12
|
+
color: #fff;
|
|
13
|
+
background-color: #000;
|
|
14
|
+
|
|
15
|
+
>div {
|
|
16
|
+
margin: 0;
|
|
17
|
+
padding: 0;
|
|
18
|
+
position: absolute;
|
|
19
|
+
left: 0;
|
|
20
|
+
top: 0;
|
|
21
|
+
width: 100%;
|
|
22
|
+
height: 100%;
|
|
23
|
+
display: grid;
|
|
24
|
+
place-items: center;
|
|
25
|
+
text-align: center;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
>svg {
|
|
29
|
+
font-size: 600%;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { classNames } from "
|
|
2
|
+
import { classNames } from "./../../utils";
|
|
3
3
|
import styles from "./tooltip.module.css";
|
|
4
4
|
export default function Tooltip({ className, classNameTooltip, tooltip, arrow = "top", arrowWidth = 16, arrowHeight = 16, backColor = "#fff", foreColor = "#000", children, }) {
|
|
5
5
|
return (_jsxs("div", { className: classNames(className, styles.container), style: {
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
.container {
|
|
2
|
+
position: relative;
|
|
3
|
+
--custom-backColor: #fff;
|
|
4
|
+
--custom-foreColor: #000;
|
|
5
|
+
--arrowWidth: 16px;
|
|
6
|
+
--arrowHeight: 16px;
|
|
7
|
+
--borderColor: var(--custom-foreColor);
|
|
8
|
+
--borderColor: color-mix(in srgb, var(--custom-foreColor) 50%, transparent 50%);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.tooltip {
|
|
12
|
+
border-radius: 0.25em;
|
|
13
|
+
padding: 0.5em 1em;
|
|
14
|
+
color: var(--custom-foreColor, #000);
|
|
15
|
+
background-color: var(--custom-backColor, #fff);
|
|
16
|
+
position: absolute;
|
|
17
|
+
/* width: fit-content; */
|
|
18
|
+
z-index: 999999;
|
|
19
|
+
box-shadow: 0 0.25em 0.5em #0007;
|
|
20
|
+
pointer-events: none;
|
|
21
|
+
border: 1px solid var(--borderColor);
|
|
22
|
+
text-align: center;
|
|
23
|
+
min-width: 160px;
|
|
24
|
+
transition: opacity 0.2s;
|
|
25
|
+
opacity: 0;
|
|
26
|
+
|
|
27
|
+
&.top {
|
|
28
|
+
left: 50%;
|
|
29
|
+
bottom: 0;
|
|
30
|
+
transform: translate(-50%, calc(100% + var(--arrowHeight)));
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
&.topLeft {
|
|
34
|
+
left: 50%;
|
|
35
|
+
bottom: 0;
|
|
36
|
+
transform: translate(calc(-1 * var(--arrowWidth)), calc(100% + var(--arrowHeight)));
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
&.topRight {
|
|
40
|
+
left: 50%;
|
|
41
|
+
bottom: 0;
|
|
42
|
+
transform: translate(calc(-100% + var(--arrowWidth)), calc(100% + var(--arrowHeight)));
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.arrow {
|
|
46
|
+
width: var(--arrowWidth);
|
|
47
|
+
height: var(--arrowHeight);
|
|
48
|
+
fill: var(--custom-backColor);
|
|
49
|
+
stroke: var(--borderColor);
|
|
50
|
+
position: absolute;
|
|
51
|
+
|
|
52
|
+
&.top {
|
|
53
|
+
top: 0;
|
|
54
|
+
left: 50%;
|
|
55
|
+
transform: translate(-50%, calc(-100% + 1px));
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
&.topLeft {
|
|
59
|
+
top: 0;
|
|
60
|
+
left: var(--arrowWidth);
|
|
61
|
+
transform: translate(-50%, calc(-100% + 1px));
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
&.topRight {
|
|
65
|
+
top: 0;
|
|
66
|
+
right: var(--arrowWidth);
|
|
67
|
+
transform: translate(50%, calc(-100% + 1px));
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.container:hover .tooltip {
|
|
73
|
+
opacity: 1;
|
|
74
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
svg.icon {
|
|
2
|
+
width: var(--custom-icon-size, 1.5em);
|
|
3
|
+
height: var(--custom-icon-size, 1.5em);
|
|
4
|
+
background-color: transparent;
|
|
5
|
+
fill: currentColor;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
svg.spin {
|
|
9
|
+
animation: spin 0.6s linear infinite;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
@keyframes spin {
|
|
13
|
+
from {
|
|
14
|
+
transform: rotate(0deg);
|
|
15
|
+
}
|
|
16
|
+
to {
|
|
17
|
+
transform: rotate(360deg);
|
|
18
|
+
}
|
|
19
|
+
}
|
package/dist/icons/spinner.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { classNames } from "
|
|
2
|
+
import { classNames } from "./../utils";
|
|
3
3
|
import styles from "./icon.module.css";
|
|
4
4
|
export function IconSpinner({ className, style, size }) {
|
|
5
5
|
return (_jsxs("svg", { className: classNames(className, styles.icon, styles.spin), style: Object.assign({ "--custom-icon-size": size !== null && size !== void 0 ? size : "1.5em" }, style), viewBox: "-12 -12 24 24", stroke: "currentColor", xmlns: "http://www.w3.org/2000/svg", children: [_jsx("title", { children: "spinner" }), _jsx("path", { d: "M0,-8A8,8 0 0,0 -8,0", strokeWidth: "1", strokeLinecap: "round", fill: "none" })] }));
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type TgdContext, TgdPainterGroup } from "@tolokoban/tgd";
|
|
2
|
-
import type { ColorsInterface } from "
|
|
2
|
+
import type { ColorsInterface } from "../../colors";
|
|
3
3
|
import type { CellNodes } from "./nodes";
|
|
4
4
|
export declare class SwcPainter extends TgdPainterGroup {
|
|
5
5
|
readonly context: TgdContext;
|