@abi-software/scaffoldvuer 1.21.1-beta.2 → 2.0.0

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.
Files changed (45) hide show
  1. package/README.md +31 -12
  2. package/dist/index.html +9 -6
  3. package/dist/scaffoldvuer.js +14095 -13154
  4. package/dist/scaffoldvuer.umd.cjs +48 -48
  5. package/dist/style.css +1 -1
  6. package/eslint.config.js +37 -9
  7. package/package.json +10 -3
  8. package/public/index.html +9 -6
  9. package/src/App.vue +312 -279
  10. package/src/ScaffoldVuer-wc.js +4 -4
  11. package/src/app/DropZone.vue +11 -27
  12. package/src/app/ModelsInformation.js +22 -19
  13. package/src/app/ModelsTable.vue +42 -65
  14. package/src/app/TextureDemos.js +38 -64
  15. package/src/assets/_variables.scss +12 -10
  16. package/src/components/GlyphsControls.vue +3 -23
  17. package/src/components/LinesControls.vue +27 -66
  18. package/src/components/OpacityControls.vue +22 -26
  19. package/src/components/PointsControls.vue +20 -71
  20. package/src/components/PrimitiveControls.vue +35 -49
  21. package/src/components/ScaffoldOverlay.vue +63 -63
  22. package/src/components/ScaffoldTooltip.vue +36 -49
  23. package/src/components/ScaffoldTreeControls.vue +81 -129
  24. package/src/components/ScaffoldVuer.vue +509 -498
  25. package/src/components/TextureSlidesControls.vue +22 -64
  26. package/src/components/TransformationControls.vue +15 -42
  27. package/src/components/index.js +2 -2
  28. package/src/main.js +16 -18
  29. package/src/scripts/Annotation.js +3 -3
  30. package/src/scripts/BaseModule.js +26 -30
  31. package/src/scripts/EventNotifier.js +30 -36
  32. package/src/scripts/GraphicsHighlight.js +43 -50
  33. package/src/scripts/LocalFilesHelper.js +27 -26
  34. package/src/scripts/MappedNerves.js +2139 -697
  35. package/src/scripts/MappedOrgans.js +24 -25
  36. package/src/scripts/OrgansRenderer.js +445 -425
  37. package/src/scripts/RendererModule.js +133 -122
  38. package/src/scripts/Search.js +135 -151
  39. package/src/scripts/Utilities.js +129 -127
  40. package/src/scripts/WebGL.js +57 -91
  41. package/src/scripts/niftiHelper.js +3 -3
  42. package/src/store/index.js +7 -7
  43. package/vite.config.js +51 -50
  44. package/vite.static-build.js +7 -7
  45. package/vuese-generator.js +48 -56
package/README.md CHANGED
@@ -5,32 +5,38 @@ This project aims to provide high-level 3D physiological models viewing capabili
5
5
  Scaffoldvuer is now built with Vue3 frameworks. Vue 2 version of Scaffoldvuer is no longer maintained and the source
6
6
  can be found in this [branch](https://github.com/ABI-Software/scaffoldvuer/tree/Vue-2).
7
7
 
8
-
9
8
  ## Scaffoldvuer on NPM
10
9
 
11
10
  Scaffoldvuer is available on npm and can be installed into your project with the following command:
11
+
12
12
  ```bash
13
13
  npm i @abi-software/scaffoldvuer
14
14
  ```
15
15
 
16
16
  ## Project setup
17
+
17
18
  ```
18
19
  npm install
19
20
  ```
20
21
 
21
22
  ### Compiles and minifies for production
23
+
22
24
  ```
23
25
  npm run build-bundle
24
26
  ```
25
27
 
26
28
  ## How to use
29
+
27
30
  Install the package in your vue app project with the following command "npm i @abi-software/scaffoldvuer".
28
31
  Import the package in your script as followed:
32
+
29
33
  ```javascript
30
34
  import { ScaffoldVuer } from '@abi-software/scaffoldvuer';
31
35
  import '@abi-software/scaffoldvuer/dist/style.css';
32
36
  ```
37
+
33
38
  Local registration in vue component:
39
+
34
40
  ```javascript
35
41
  export default {
36
42
  ...
@@ -41,12 +47,11 @@ export default {
41
47
  }
42
48
  ```
43
49
 
44
-
45
-
46
50
  The codes above register the ScaffoldVuer component in the global scope.
47
51
  You can now use the ScaffoldVuer in your vue template as followed:
52
+
48
53
  ```html
49
- <ScaffoldVuer url="Metafile.json" v-on:scaffold-selected="ScaffoldSelected" style="height:50%"/>
54
+ <ScaffoldVuer url="Metafile.json" v-on:scaffold-selected="ScaffoldSelected" style="height:50%" />
50
55
  ```
51
56
 
52
57
  url should be a variable/string containing the url of a compatible json model.
@@ -60,6 +65,7 @@ sample callback.
60
65
  }
61
66
  }
62
67
  ```
68
+
63
69
  A more in depth API reference can be found here: https://abi-software.github.io/scaffoldvuer/ .
64
70
 
65
71
  ## Project setup from Github
@@ -67,27 +73,31 @@ A more in depth API reference can be found here: https://abi-software.github.io/
67
73
  The source code is available from Github, it can be found here: https://github.com/ABI-Software/scaffoldvuer .
68
74
 
69
75
  ### Clone the respositroy
76
+
70
77
  ```bash
71
78
  git clone https://github.com/ABI-Software/scaffoldvuer.git
72
79
  ```
73
80
 
74
81
  ### Setup
82
+
75
83
  ```bash
76
84
  npm install
77
85
  ```
78
86
 
79
87
  ### Compiles and minifies for production
88
+
80
89
  ```bash
81
90
  npm run build-bundle
82
91
  ```
83
92
 
84
93
  ### Run the sample application
94
+
85
95
  ```bash
86
96
  npm run serve
87
97
  ```
88
98
 
89
-
90
99
  ## Example
100
+
91
101
  The following example showcases ScaffoldVuer in action: https://mapcore-demo.org/current/scaffoldvuer/
92
102
 
93
103
  ## Scaffoldvuer release process:
@@ -99,29 +109,34 @@ Scaffoldvuer uses [semantic versioning](https://semver.org/).
99
109
  If any changes are experimental or parallel to the main development, [npm dist tags](https://docs.npmjs.com/cli/v9/commands/npm-dist-tag) are used to keep this version from being the default when `npm install @abi-software/scaffoldvuer` is used.
100
110
 
101
111
  Dist tags can be used like so:
112
+
102
113
  ```
103
114
  npm publish --tag <tag>
104
115
  ```
105
116
 
106
117
  `<tag>` is the dist tag to add. In example: `npm publish --tag beta`
107
118
 
108
- ### Publishing
119
+ ### Publishing
109
120
 
110
121
  #### 1. Update the package number in [package.json](https://github.com/ABI-Software/scaffoldvuer/blob/main/package.json)
111
- #### 2. Bundles for scaffoldvuer can be built by using
122
+
123
+ #### 2. Bundles for scaffoldvuer can be built by using
124
+
112
125
  ```
113
126
  npm run build-bundle
114
127
  ```
115
128
 
116
129
  This builds the package to be digested by other vue packages by importing either the build or the source.
117
130
 
118
- ##### Build import
131
+ ##### Build import
132
+
119
133
  ```
120
134
  import { ScaffoldVuer } from "@abi-software/scaffoldvuer";
121
135
  import '@abi-software/scaffoldvuer/dist/map-side-bar.css';
122
136
  ```
123
137
 
124
- ##### Source import (used in [abi-software/mapintegratedvuer](https://github.com/abi-Software/mapintegratedvuer))
138
+ ##### Source import (used in [abi-software/mapintegratedvuer](https://github.com/abi-Software/mapintegratedvuer))
139
+
125
140
  ```
126
141
  import { ScaffoldVuer } from "@abi-software/scaffoldvuer/src/components/index.js";
127
142
  ```
@@ -131,6 +146,7 @@ import { ScaffoldVuer } from "@abi-software/scaffoldvuer/src/components/index.js
131
146
  ### Testing
132
147
 
133
148
  #### Testing [`zincjs`](https://github.com/alan-wu/ZincJS)
149
+
134
150
  Check that the version of zincjs used is running correctly and passing the tests.
135
151
 
136
152
  Test runs can be found here:
@@ -139,6 +155,7 @@ https://autotest.bioeng.auckland.ac.nz/jenkins/blue/organizations/jenkins/ZincJS
139
155
  Click on the latest test and search for `zincjs@` to find the zincjs version number.
140
156
 
141
157
  #### Visual check
158
+
142
159
  Open the links below, checking that they load in, render correctly and are usable:
143
160
 
144
161
  Region
@@ -160,9 +177,11 @@ Surfaces
160
177
  http://localhost:8081/#/?url=https://mapcore-bucket1.s3.us-west-2.amazonaws.com/format-testing/Surfaces/beating_heart_metadata.json
161
178
 
162
179
  #### Testing the build bundle in other packages
180
+
163
181
  Use one of the following methods for testing the scaffoldvuer build in apps that depend on this package:
164
- 1. Use [`npm link`](https://docs.npmjs.com/cli/v8/commands/npm-link) to test scaffoldvuer works in apps that import it.
165
- 2. Use symlink, or copy and paste the `/dist` directory.
166
- 3. Modify the package.json to <your-npm-account>/scaffoldvuer and publish. (Careful! If this is not done the version will need to be [deprecated](https://docs.npmjs.com/cli/v8/commands/npm-deprecate)
182
+
183
+ 1. Use [`npm link`](https://docs.npmjs.com/cli/v8/commands/npm-link) to test scaffoldvuer works in apps that import it.
184
+ 2. Use symlink, or copy and paste the `/dist` directory.
185
+ 3. Modify the package.json to <your-npm-account>/scaffoldvuer and publish. (Careful! If this is not done the version will need to be [deprecated](https://docs.npmjs.com/cli/v8/commands/npm-deprecate)
167
186
 
168
187
  One of the above methods will often need to be used in [abi-software/mapintegratedvuer](https://github.com/abi-Software/mapintegratedvuer)
package/dist/index.html CHANGED
@@ -1,15 +1,18 @@
1
- <!DOCTYPE html>
1
+ <!doctype html>
2
2
  <html lang="en">
3
3
  <head>
4
- <meta charset="utf-8">
5
- <meta http-equiv="X-UA-Compatible" content="IE=edge">
6
- <meta name="viewport" content="width=device-width,initial-scale=1.0">
7
- <link rel="icon" href="<%= BASE_URL %>favicon.ico">
4
+ <meta charset="utf-8" />
5
+ <meta http-equiv="X-UA-Compatible" content="IE=edge" />
6
+ <meta name="viewport" content="width=device-width,initial-scale=1.0" />
7
+ <link rel="icon" href="<%= BASE_URL %>favicon.ico" />
8
8
  <title>scaffoldvuer</title>
9
9
  </head>
10
10
  <body>
11
11
  <noscript>
12
- <strong>We're sorry but scaffoldvuer doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
12
+ <strong>
13
+ We're sorry but scaffoldvuer doesn't work properly without JavaScript enabled. Please enable
14
+ it to continue.
15
+ </strong>
13
16
  </noscript>
14
17
  <div id="app"></div>
15
18
  <!-- built files will be auto injected -->