@abi-software/scaffoldvuer 0.2.3-alpha → 0.3.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.
- package/.eslintrc.js +12 -12
- package/CHANGELOG.md +332 -316
- package/LICENSE +201 -201
- package/README.md +164 -164
- package/babel.config.js +14 -14
- package/dist/scaffoldvuer-wc.common.js +34 -34
- package/dist/scaffoldvuer-wc.umd.js +34 -34
- package/dist/scaffoldvuer-wc.umd.min.js +34 -34
- package/dist/scaffoldvuer.common.js +373 -364
- package/dist/scaffoldvuer.common.js.map +1 -1
- package/dist/scaffoldvuer.css +1 -1
- package/dist/scaffoldvuer.umd.js +373 -364
- package/dist/scaffoldvuer.umd.js.map +1 -1
- package/dist/scaffoldvuer.umd.min.js +1 -1
- package/dist/scaffoldvuer.umd.min.js.map +1 -1
- package/package-lock.json +18121 -18119
- package/package.json +89 -89
- package/public/index.html +17 -17
- package/src/App.vue +669 -669
- package/src/ScaffoldVuer-wc.js +13 -13
- package/src/app/DropZone.vue +114 -114
- package/src/app/ModelsInformation.js +35 -35
- package/src/app/ModelsTable.vue +113 -113
- package/src/app/TextureDemos.js +114 -114
- package/src/assets/_variables.scss +43 -43
- package/src/assets/styles.scss +7 -7
- package/src/components/OpacityControls.vue +222 -222
- package/src/components/PrimitiveControls.vue +158 -0
- package/src/components/ScaffoldTooltip.vue +142 -142
- package/src/components/ScaffoldVuer.md +44 -44
- package/src/components/ScaffoldVuer.vue +2006 -1997
- package/src/components/TreeControls.vue +699 -699
- package/src/components/index.js +7 -7
- package/src/credential.json +12 -0
- package/src/main.js +14 -14
- package/src/scripts/BaseModule.js +80 -80
- package/src/scripts/RendererModule.js +289 -289
- package/src/scripts/WebGL.js +94 -94
- package/src/scripts/annotation.js +5 -5
- package/src/scripts/eventNotifier.js +66 -66
- package/src/scripts/graphicsHighlight.js +134 -134
- package/src/scripts/organsRenderer.js +587 -587
- package/src/scripts/search.js +182 -182
- package/src/scripts/utilities.js +146 -146
- package/styleguide.config.js +22 -22
- package/vue.config.js +41 -41
- package/src/components/test.pdf +0 -0
- package/src/searchControls.vue +0 -122
package/src/app/TextureDemos.js
CHANGED
|
@@ -1,114 +1,114 @@
|
|
|
1
|
-
import volumeTexture from "zincjs/src/shaders/volumeTexture.js";
|
|
2
|
-
|
|
3
|
-
const getVolumeTexture = (texture) => {
|
|
4
|
-
const myUniforms = volumeTexture.getUniforms();
|
|
5
|
-
myUniforms.volume_scale.value.set(
|
|
6
|
-
texture.size.width / texture.size.depth,
|
|
7
|
-
texture.size.height / texture.size.depth,
|
|
8
|
-
1
|
|
9
|
-
);
|
|
10
|
-
myUniforms.diffuse.value = texture.impl;
|
|
11
|
-
myUniforms.depth.value = texture.size.depth;
|
|
12
|
-
myUniforms.volume_dims.value = [200, 200, 200];
|
|
13
|
-
const options = {
|
|
14
|
-
fs: volumeTexture.fs,
|
|
15
|
-
vs: volumeTexture.vs,
|
|
16
|
-
uniforms: myUniforms,
|
|
17
|
-
glslVersion: volumeTexture.glslVersion,
|
|
18
|
-
};
|
|
19
|
-
return options;
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
const getTexture = async (scaffoldModule, texture_prefix) => {
|
|
23
|
-
const imgArray = [];
|
|
24
|
-
const texture = new scaffoldModule.Zinc.TextureArray();
|
|
25
|
-
for (let i = 1733; i < 1860; i++) {
|
|
26
|
-
imgArray.push(`${texture_prefix}/foot${i}.jpg`);
|
|
27
|
-
//imgArray.push(`${process.env.VUE_APP_TEXTURE_FOOT_PREFIX}/foot${i}.jpg`);
|
|
28
|
-
}
|
|
29
|
-
await texture.loadFromImages(imgArray);
|
|
30
|
-
return texture;
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
export const testVolume = async (scaffoldVuer, texture_prefix) => {
|
|
34
|
-
const cube = new scaffoldVuer.$module.Zinc.THREE.BoxGeometry(1, 1, 1);
|
|
35
|
-
const zincObject = new scaffoldVuer.$module.Zinc.Geometry();
|
|
36
|
-
zincObject.setName("Texture volume");
|
|
37
|
-
cube.translate(0.5, 0.5, 0.5);
|
|
38
|
-
let meshOptions = {};
|
|
39
|
-
meshOptions.opacity = 1.0;
|
|
40
|
-
meshOptions.localTimeEnabled = false;
|
|
41
|
-
meshOptions.localMorphColour = false;
|
|
42
|
-
const texture = await getTexture(scaffoldVuer.$module, texture_prefix);
|
|
43
|
-
const options = getVolumeTexture(texture);
|
|
44
|
-
const material = texture.getMaterial(options);
|
|
45
|
-
zincObject.createMesh(cube, material, meshOptions);
|
|
46
|
-
scaffoldVuer.addZincObject(zincObject);
|
|
47
|
-
zincObject.morph.matrix.set(
|
|
48
|
-
-100,
|
|
49
|
-
0,
|
|
50
|
-
0,
|
|
51
|
-
-60,
|
|
52
|
-
0,
|
|
53
|
-
-100,
|
|
54
|
-
0,
|
|
55
|
-
-100,
|
|
56
|
-
0,
|
|
57
|
-
0,
|
|
58
|
-
-100,
|
|
59
|
-
30,
|
|
60
|
-
0,
|
|
61
|
-
0,
|
|
62
|
-
0,
|
|
63
|
-
1
|
|
64
|
-
);
|
|
65
|
-
//console.log(zincObject.morph.matrix)
|
|
66
|
-
window.texture = zincObject;
|
|
67
|
-
};
|
|
68
|
-
|
|
69
|
-
export const testSlides = async (scaffoldVuer, texture_prefix) => {
|
|
70
|
-
const scaffoldModule = scaffoldVuer.$module;
|
|
71
|
-
const texture = await getTexture(scaffoldModule, texture_prefix);
|
|
72
|
-
const textureSlides = new scaffoldModule.Zinc.TextureSlides(texture);
|
|
73
|
-
textureSlides.setName("Texture slides");
|
|
74
|
-
textureSlides.createSlides([
|
|
75
|
-
{
|
|
76
|
-
direction: "y",
|
|
77
|
-
value: 0.1,
|
|
78
|
-
},
|
|
79
|
-
{
|
|
80
|
-
direction: "y",
|
|
81
|
-
value: 0.3,
|
|
82
|
-
},
|
|
83
|
-
{
|
|
84
|
-
direction: "y",
|
|
85
|
-
value: 0.5,
|
|
86
|
-
},
|
|
87
|
-
{
|
|
88
|
-
direction: "y",
|
|
89
|
-
value: 0.7,
|
|
90
|
-
},
|
|
91
|
-
{
|
|
92
|
-
direction: "y",
|
|
93
|
-
value: 0.9,
|
|
94
|
-
},
|
|
95
|
-
{
|
|
96
|
-
direction: "x",
|
|
97
|
-
value: 0.5,
|
|
98
|
-
},
|
|
99
|
-
{
|
|
100
|
-
direction: "z",
|
|
101
|
-
value: 0.5,
|
|
102
|
-
},
|
|
103
|
-
]);
|
|
104
|
-
//textureSlides.morph.matrix.set(-100, 0, 0, 0, 0, -100, 0, 0, 0, 0, -100, 0, -60, -100, 30, 1);
|
|
105
|
-
//textureSlides.morph.matrix.set( -100, 0, 0, -60, 0, -100, 0, -100, 0, 0, -100, 30, 0, 0, 0, 1 );
|
|
106
|
-
|
|
107
|
-
const n = textureSlides.morph.matrix.clone();
|
|
108
|
-
n.set(-100, 0, 0, -10, 0, -200, 0, 0, 0, 0, -100, 0, 0, 0, 10, 1);
|
|
109
|
-
textureSlides.morph.applyMatrix4(n);
|
|
110
|
-
scaffoldVuer.addZincObject(textureSlides);
|
|
111
|
-
//scaffoldVuer.fitWindow();
|
|
112
|
-
window.texture = textureSlides;
|
|
113
|
-
};
|
|
114
|
-
|
|
1
|
+
import volumeTexture from "zincjs/src/shaders/volumeTexture.js";
|
|
2
|
+
|
|
3
|
+
const getVolumeTexture = (texture) => {
|
|
4
|
+
const myUniforms = volumeTexture.getUniforms();
|
|
5
|
+
myUniforms.volume_scale.value.set(
|
|
6
|
+
texture.size.width / texture.size.depth,
|
|
7
|
+
texture.size.height / texture.size.depth,
|
|
8
|
+
1
|
|
9
|
+
);
|
|
10
|
+
myUniforms.diffuse.value = texture.impl;
|
|
11
|
+
myUniforms.depth.value = texture.size.depth;
|
|
12
|
+
myUniforms.volume_dims.value = [200, 200, 200];
|
|
13
|
+
const options = {
|
|
14
|
+
fs: volumeTexture.fs,
|
|
15
|
+
vs: volumeTexture.vs,
|
|
16
|
+
uniforms: myUniforms,
|
|
17
|
+
glslVersion: volumeTexture.glslVersion,
|
|
18
|
+
};
|
|
19
|
+
return options;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
const getTexture = async (scaffoldModule, texture_prefix) => {
|
|
23
|
+
const imgArray = [];
|
|
24
|
+
const texture = new scaffoldModule.Zinc.TextureArray();
|
|
25
|
+
for (let i = 1733; i < 1860; i++) {
|
|
26
|
+
imgArray.push(`${texture_prefix}/foot${i}.jpg`);
|
|
27
|
+
//imgArray.push(`${process.env.VUE_APP_TEXTURE_FOOT_PREFIX}/foot${i}.jpg`);
|
|
28
|
+
}
|
|
29
|
+
await texture.loadFromImages(imgArray);
|
|
30
|
+
return texture;
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
export const testVolume = async (scaffoldVuer, texture_prefix) => {
|
|
34
|
+
const cube = new scaffoldVuer.$module.Zinc.THREE.BoxGeometry(1, 1, 1);
|
|
35
|
+
const zincObject = new scaffoldVuer.$module.Zinc.Geometry();
|
|
36
|
+
zincObject.setName("Texture volume");
|
|
37
|
+
cube.translate(0.5, 0.5, 0.5);
|
|
38
|
+
let meshOptions = {};
|
|
39
|
+
meshOptions.opacity = 1.0;
|
|
40
|
+
meshOptions.localTimeEnabled = false;
|
|
41
|
+
meshOptions.localMorphColour = false;
|
|
42
|
+
const texture = await getTexture(scaffoldVuer.$module, texture_prefix);
|
|
43
|
+
const options = getVolumeTexture(texture);
|
|
44
|
+
const material = texture.getMaterial(options);
|
|
45
|
+
zincObject.createMesh(cube, material, meshOptions);
|
|
46
|
+
scaffoldVuer.addZincObject(zincObject);
|
|
47
|
+
zincObject.morph.matrix.set(
|
|
48
|
+
-100,
|
|
49
|
+
0,
|
|
50
|
+
0,
|
|
51
|
+
-60,
|
|
52
|
+
0,
|
|
53
|
+
-100,
|
|
54
|
+
0,
|
|
55
|
+
-100,
|
|
56
|
+
0,
|
|
57
|
+
0,
|
|
58
|
+
-100,
|
|
59
|
+
30,
|
|
60
|
+
0,
|
|
61
|
+
0,
|
|
62
|
+
0,
|
|
63
|
+
1
|
|
64
|
+
);
|
|
65
|
+
//console.log(zincObject.morph.matrix)
|
|
66
|
+
window.texture = zincObject;
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
export const testSlides = async (scaffoldVuer, texture_prefix) => {
|
|
70
|
+
const scaffoldModule = scaffoldVuer.$module;
|
|
71
|
+
const texture = await getTexture(scaffoldModule, texture_prefix);
|
|
72
|
+
const textureSlides = new scaffoldModule.Zinc.TextureSlides(texture);
|
|
73
|
+
textureSlides.setName("Texture slides");
|
|
74
|
+
textureSlides.createSlides([
|
|
75
|
+
{
|
|
76
|
+
direction: "y",
|
|
77
|
+
value: 0.1,
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
direction: "y",
|
|
81
|
+
value: 0.3,
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
direction: "y",
|
|
85
|
+
value: 0.5,
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
direction: "y",
|
|
89
|
+
value: 0.7,
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
direction: "y",
|
|
93
|
+
value: 0.9,
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
direction: "x",
|
|
97
|
+
value: 0.5,
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
direction: "z",
|
|
101
|
+
value: 0.5,
|
|
102
|
+
},
|
|
103
|
+
]);
|
|
104
|
+
//textureSlides.morph.matrix.set(-100, 0, 0, 0, 0, -100, 0, 0, 0, 0, -100, 0, -60, -100, 30, 1);
|
|
105
|
+
//textureSlides.morph.matrix.set( -100, 0, 0, -60, 0, -100, 0, -100, 0, 0, -100, 30, 0, 0, 0, 1 );
|
|
106
|
+
|
|
107
|
+
const n = textureSlides.morph.matrix.clone();
|
|
108
|
+
n.set(-100, 0, 0, -10, 0, -200, 0, 0, 0, 0, -100, 0, 0, 0, 10, 1);
|
|
109
|
+
textureSlides.morph.applyMatrix4(n);
|
|
110
|
+
scaffoldVuer.addZincObject(textureSlides);
|
|
111
|
+
//scaffoldVuer.fitWindow();
|
|
112
|
+
window.texture = textureSlides;
|
|
113
|
+
};
|
|
114
|
+
|
|
@@ -1,43 +1,43 @@
|
|
|
1
|
-
// Primary colors
|
|
2
|
-
$purple: #8300BF;
|
|
3
|
-
$darkBlue: #24245B;
|
|
4
|
-
$grey: #303133;
|
|
5
|
-
|
|
6
|
-
// Secondary colors
|
|
7
|
-
$lightPurple: #BC00FC;
|
|
8
|
-
$blue: #0026FF;
|
|
9
|
-
|
|
10
|
-
// Status colors
|
|
11
|
-
$success: #5e9f69;
|
|
12
|
-
$warning: #FF8400;
|
|
13
|
-
$danger: #b51d09;
|
|
14
|
-
|
|
15
|
-
// Text colors
|
|
16
|
-
$neutralGrey: #616161;
|
|
17
|
-
$mediumGrey: #606266;
|
|
18
|
-
$lightGrey: #909399;
|
|
19
|
-
|
|
20
|
-
// Line colors
|
|
21
|
-
$lineColor1: #DCDFE6;
|
|
22
|
-
$lineColor2: #E4E7ED;
|
|
23
|
-
|
|
24
|
-
// Background colors
|
|
25
|
-
$background: #F5F7FA;
|
|
26
|
-
$cochlear: #FFFFFF;
|
|
27
|
-
|
|
28
|
-
//Search box colors
|
|
29
|
-
$darkGrey: #606266;
|
|
30
|
-
|
|
31
|
-
$app-primary-color: $purple;
|
|
32
|
-
$app-secondary-color: $darkBlue;
|
|
33
|
-
$text-color: $grey;
|
|
34
|
-
$input-text: $grey;
|
|
35
|
-
|
|
36
|
-
$system-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif !important;
|
|
37
|
-
$font-family: 'Asap', sans-serif;
|
|
38
|
-
|
|
39
|
-
// Viewport Sizes
|
|
40
|
-
$viewport-sm: 20rem;
|
|
41
|
-
$viewport-md: 47rem;
|
|
42
|
-
$viewport-lg: 64rem;
|
|
43
|
-
$viewport-xlg: 120rem;
|
|
1
|
+
// Primary colors
|
|
2
|
+
$purple: #8300BF;
|
|
3
|
+
$darkBlue: #24245B;
|
|
4
|
+
$grey: #303133;
|
|
5
|
+
|
|
6
|
+
// Secondary colors
|
|
7
|
+
$lightPurple: #BC00FC;
|
|
8
|
+
$blue: #0026FF;
|
|
9
|
+
|
|
10
|
+
// Status colors
|
|
11
|
+
$success: #5e9f69;
|
|
12
|
+
$warning: #FF8400;
|
|
13
|
+
$danger: #b51d09;
|
|
14
|
+
|
|
15
|
+
// Text colors
|
|
16
|
+
$neutralGrey: #616161;
|
|
17
|
+
$mediumGrey: #606266;
|
|
18
|
+
$lightGrey: #909399;
|
|
19
|
+
|
|
20
|
+
// Line colors
|
|
21
|
+
$lineColor1: #DCDFE6;
|
|
22
|
+
$lineColor2: #E4E7ED;
|
|
23
|
+
|
|
24
|
+
// Background colors
|
|
25
|
+
$background: #F5F7FA;
|
|
26
|
+
$cochlear: #FFFFFF;
|
|
27
|
+
|
|
28
|
+
//Search box colors
|
|
29
|
+
$darkGrey: #606266;
|
|
30
|
+
|
|
31
|
+
$app-primary-color: $purple;
|
|
32
|
+
$app-secondary-color: $darkBlue;
|
|
33
|
+
$text-color: $grey;
|
|
34
|
+
$input-text: $grey;
|
|
35
|
+
|
|
36
|
+
$system-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif !important;
|
|
37
|
+
$font-family: 'Asap', sans-serif;
|
|
38
|
+
|
|
39
|
+
// Viewport Sizes
|
|
40
|
+
$viewport-sm: 20rem;
|
|
41
|
+
$viewport-md: 47rem;
|
|
42
|
+
$viewport-lg: 64rem;
|
|
43
|
+
$viewport-xlg: 120rem;
|
package/src/assets/styles.scss
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
@import url('https://fonts.googleapis.com/css?family=Asap:400,400i,500,600,700&display=swap');
|
|
2
|
-
|
|
3
|
-
@import '_variables';
|
|
4
|
-
|
|
5
|
-
/* icon font path, required */
|
|
6
|
-
$--color-primary: $app-primary-color !default;
|
|
7
|
-
$--font-path: '~element-ui/lib/theme-chalk/fonts';
|
|
1
|
+
@import url('https://fonts.googleapis.com/css?family=Asap:400,400i,500,600,700&display=swap');
|
|
2
|
+
|
|
3
|
+
@import '_variables';
|
|
4
|
+
|
|
5
|
+
/* icon font path, required */
|
|
6
|
+
$--color-primary: $app-primary-color !default;
|
|
7
|
+
$--font-path: '~element-ui/lib/theme-chalk/fonts';
|