@abi-software/scaffoldvuer 0.1.3 → 0.1.5-1.beta.2
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/.eslintrc.js +12 -0
- package/README.md +88 -2
- package/babel.config.js +9 -0
- package/dist/scaffoldvuer.common.js +3088 -74192
- package/dist/scaffoldvuer.common.js.map +1 -1
- package/dist/scaffoldvuer.css +1 -91
- package/dist/scaffoldvuer.umd.js +3090 -74194
- package/dist/scaffoldvuer.umd.js.map +1 -1
- package/dist/scaffoldvuer.umd.min.js +1 -195
- package/dist/scaffoldvuer.umd.min.js.map +1 -1
- package/package-lock.json +13115 -4688
- package/package.json +34 -11
- package/src/App.vue +410 -9
- package/src/assets/_variables.scss +43 -0
- package/src/assets/styles.scss +7 -0
- package/src/components/ModelsInformation.js +35 -0
- package/src/components/ModelsTable.vue +113 -0
- package/src/components/OpacityControls.vue +222 -0
- package/src/components/ScaffoldVuer.md +44 -0
- package/src/components/ScaffoldVuer.vue +1435 -52
- package/src/components/TraditionalControls.vue +546 -0
- package/src/components/index.js +3 -11
- package/src/credential.json +12 -0
- package/src/main.js +6 -0
- package/src/scripts/BaseModule.js +80 -0
- package/src/scripts/RendererModule.js +261 -0
- package/src/scripts/WebGL.js +94 -0
- package/src/scripts/annotation.js +5 -0
- package/src/scripts/eventNotifier.js +65 -0
- package/src/scripts/graphicsHighlight.js +132 -0
- package/src/scripts/organsRenderer.js +536 -0
- package/styleguide.config.js +22 -0
- package/vue.config.js +36 -9
package/.eslintrc.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
extends: [
|
|
3
|
+
// add more generic rulesets here, such as:
|
|
4
|
+
'plugin:vue/recommended', // Use this if you are using Vue.js 2.x.,
|
|
5
|
+
|
|
6
|
+
],
|
|
7
|
+
rules: {
|
|
8
|
+
// override/add rules settings here, such as:
|
|
9
|
+
// 'vue/no-unused-vars': 'error'
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
|
package/README.md
CHANGED
|
@@ -1,2 +1,88 @@
|
|
|
1
|
-
Scaffoldvuer
|
|
2
|
-
|
|
1
|
+
# Scaffoldvuer
|
|
2
|
+
|
|
3
|
+
This project aims to provide high-level 3D physiological models viewing capability.
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
## Scaffoldvuer on NPM
|
|
7
|
+
|
|
8
|
+
Scaffoldvuer is available on npm and can be installed into your project with the following command:
|
|
9
|
+
```bash
|
|
10
|
+
npm i @abi-software/scaffoldvuer
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Project setup
|
|
14
|
+
```
|
|
15
|
+
npm install
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
### Compiles and minifies for production
|
|
19
|
+
```
|
|
20
|
+
npm run build-bundle
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## How to use
|
|
24
|
+
Install the package in your vue app project with the following command "npm i @abi-software/scaffoldvuer".
|
|
25
|
+
Import the package in your script as followed:
|
|
26
|
+
```javascript
|
|
27
|
+
import { ScaffoldVuer } from '@abi-software/scaffoldvuer';
|
|
28
|
+
import '@abi-software/scaffoldvuer/dist/scaffoldvuer.css';
|
|
29
|
+
```
|
|
30
|
+
Local registration in vue component:
|
|
31
|
+
```javascript
|
|
32
|
+
export default {
|
|
33
|
+
...
|
|
34
|
+
components: {
|
|
35
|
+
ScaffoldVuer,
|
|
36
|
+
}
|
|
37
|
+
...
|
|
38
|
+
}
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
The codes above register the ScaffoldVuer component in the global scope.
|
|
43
|
+
You can now use the ScaffoldVuer in your vue template as followed:
|
|
44
|
+
```html
|
|
45
|
+
<ScaffoldVuer url="Metafile.json" v-on:scaffold-selected="ScaffoldSelected" style="height:50%"/>
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
url should be a variable/string containing the url of a compatible json model.
|
|
49
|
+
scaffold-selected is the custom event triggered when a part of the 3D-scaffold is selected, see below for a
|
|
50
|
+
sample callback.
|
|
51
|
+
|
|
52
|
+
```javascript
|
|
53
|
+
methods: {
|
|
54
|
+
ScaffoldSelected: function(annotation) {
|
|
55
|
+
console.log(annotation);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
```
|
|
59
|
+
A more in depth API reference can be found here: https://abi-software.github.io/scaffoldvuer/ .
|
|
60
|
+
|
|
61
|
+
## Project setup from Github
|
|
62
|
+
|
|
63
|
+
The source code is available from Github, it can be found here: https://github.com/ABI-Software/scaffoldvuer .
|
|
64
|
+
|
|
65
|
+
### Clone the respositroy
|
|
66
|
+
```bash
|
|
67
|
+
git clone https://github.com/ABI-Software/scaffoldvuer.git
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
### Setup
|
|
71
|
+
```bash
|
|
72
|
+
npm install
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
### Compiles and minifies for production
|
|
76
|
+
```bash
|
|
77
|
+
npm run build-bundle
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
### Run the sample application
|
|
81
|
+
```bash
|
|
82
|
+
npm run serve
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
## Example
|
|
87
|
+
The following example showcases ScaffoldVuer in action: https://mapcore-demo.org/current/scaffoldvuer/
|
|
88
|
+
|