@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.
Files changed (48) hide show
  1. package/.eslintrc.js +12 -12
  2. package/CHANGELOG.md +332 -316
  3. package/LICENSE +201 -201
  4. package/README.md +164 -164
  5. package/babel.config.js +14 -14
  6. package/dist/scaffoldvuer-wc.common.js +34 -34
  7. package/dist/scaffoldvuer-wc.umd.js +34 -34
  8. package/dist/scaffoldvuer-wc.umd.min.js +34 -34
  9. package/dist/scaffoldvuer.common.js +373 -364
  10. package/dist/scaffoldvuer.common.js.map +1 -1
  11. package/dist/scaffoldvuer.css +1 -1
  12. package/dist/scaffoldvuer.umd.js +373 -364
  13. package/dist/scaffoldvuer.umd.js.map +1 -1
  14. package/dist/scaffoldvuer.umd.min.js +1 -1
  15. package/dist/scaffoldvuer.umd.min.js.map +1 -1
  16. package/package-lock.json +18121 -18119
  17. package/package.json +89 -89
  18. package/public/index.html +17 -17
  19. package/src/App.vue +669 -669
  20. package/src/ScaffoldVuer-wc.js +13 -13
  21. package/src/app/DropZone.vue +114 -114
  22. package/src/app/ModelsInformation.js +35 -35
  23. package/src/app/ModelsTable.vue +113 -113
  24. package/src/app/TextureDemos.js +114 -114
  25. package/src/assets/_variables.scss +43 -43
  26. package/src/assets/styles.scss +7 -7
  27. package/src/components/OpacityControls.vue +222 -222
  28. package/src/components/PrimitiveControls.vue +158 -0
  29. package/src/components/ScaffoldTooltip.vue +142 -142
  30. package/src/components/ScaffoldVuer.md +44 -44
  31. package/src/components/ScaffoldVuer.vue +2006 -1997
  32. package/src/components/TreeControls.vue +699 -699
  33. package/src/components/index.js +7 -7
  34. package/src/credential.json +12 -0
  35. package/src/main.js +14 -14
  36. package/src/scripts/BaseModule.js +80 -80
  37. package/src/scripts/RendererModule.js +289 -289
  38. package/src/scripts/WebGL.js +94 -94
  39. package/src/scripts/annotation.js +5 -5
  40. package/src/scripts/eventNotifier.js +66 -66
  41. package/src/scripts/graphicsHighlight.js +134 -134
  42. package/src/scripts/organsRenderer.js +587 -587
  43. package/src/scripts/search.js +182 -182
  44. package/src/scripts/utilities.js +146 -146
  45. package/styleguide.config.js +22 -22
  46. package/vue.config.js +41 -41
  47. package/src/components/test.pdf +0 -0
  48. package/src/searchControls.vue +0 -122
@@ -1,222 +1,222 @@
1
- <template>
2
- <div
3
- v-if="material!=undefined"
4
- ref="control"
5
- class="opacity-control"
6
- >
7
- <el-drawer
8
- custom-class="my-drawer"
9
- class="drawer-content"
10
- :visible.sync="drawerOpen"
11
- :append-to-body="false"
12
- :modal-append-to-body="false"
13
- size="300"
14
- :with-header="false"
15
- :wrapper-closable="false"
16
- :modal="false"
17
- >
18
- <div
19
- v-if="drawerOpen"
20
- class="tab-button close"
21
- @click="toggleDrawer"
22
- >
23
- <i class="el-icon-arrow-right" />
24
- </div>
25
- <el-container class="opacity-container">
26
- <el-header
27
- height="37px"
28
- class="header"
29
- >
30
- <div>Opacity</div>
31
- </el-header>
32
- <el-main class="main">
33
- <div class="block">
34
- <span class="display">{{ displayString }}</span>
35
- <el-slider
36
- v-model="material.opacity"
37
- class="my-slider"
38
- :step="0.01"
39
- :min="0"
40
- :max="1"
41
- :format-tooltip="formatTooltip"
42
- :show-tooltip="false"
43
- />
44
- </div>
45
- </el-main>
46
- </el-container>
47
- </el-drawer>
48
- <div
49
- v-if="!drawerOpen"
50
- class="tab-button open"
51
- @click="toggleDrawer"
52
- >
53
- <i class="el-icon-arrow-left" />
54
- </div>
55
- </div>
56
- </template>
57
-
58
- <script>
59
- /* eslint-disable no-alert, no-console */
60
- import Vue from "vue";
61
- import { Container, Drawer, Header, Icon, Main, Slider } from "element-ui";
62
- import lang from "element-ui/lib/locale/lang/en";
63
- import locale from "element-ui/lib/locale";
64
-
65
- locale.use(lang);
66
- Vue.use(Container);
67
- Vue.use(Drawer);
68
- Vue.use(Header);
69
- Vue.use(Icon);
70
- Vue.use(Main);
71
- Vue.use(Slider);
72
-
73
- /**
74
- * A component to control the opacity of the target object.
75
- */
76
- export default {
77
- name: "OpacityControls",
78
- data: function() {
79
- return {
80
- displayString: "100%",
81
- material: undefined,
82
- drawerOpen: true
83
- };
84
- },
85
- watch: {
86
- "material.opacity": function() {
87
- if (this.material) {
88
- this._zincobject.setAlpha(this.material.opacity);
89
- }
90
- }
91
- },
92
- mounted: function() {
93
- this._zincobject = undefined;
94
- },
95
- methods: {
96
- formatTooltip(val) {
97
- this.displayString = Math.floor(100 * val + 0.5) + "%";
98
- return this.displayString;
99
- },
100
- toggleDrawer: function() {
101
- this.drawerOpen = !this.drawerOpen;
102
- },
103
- setObject(object) {
104
- if (object) this.material = object.morph.material;
105
- else this.material = undefined;
106
- this._zincobject = object;
107
- }
108
- }
109
- };
110
- </script>
111
-
112
- <!-- Add "scoped" attribute to limit CSS to this component only -->
113
- <style scoped lang="scss">
114
- @import "~element-ui/packages/theme-chalk/src/container";
115
- @import "~element-ui/packages/theme-chalk/src/drawer";
116
- @import "~element-ui/packages/theme-chalk/src/slider";
117
-
118
- .opacity-control {
119
- text-align: left;
120
- width:300px;
121
- }
122
-
123
- .header {
124
- color: #606266;
125
- line-height: 1;
126
- padding: 9px 17px 0 15px;
127
- border-bottom: 1px solid #ebeef5;
128
- font-size: 14px;
129
- }
130
-
131
- .display {
132
- width: 44px;
133
- }
134
-
135
- .icon {
136
- right: 17px;
137
- position: absolute;
138
- top: 10px;
139
- }
140
-
141
- .main {
142
- font-size: 13px;
143
- padding: 20px 17px 0 15px;
144
- }
145
-
146
- .block {
147
- left: 40px;
148
- position: absolute;
149
- top: 57px;
150
- width: 200px;
151
- }
152
-
153
- .my-slider {
154
- position: absolute;
155
- width: 109px;
156
- top: -12px;
157
- left: 50px;
158
- pointer-events: auto;
159
- }
160
-
161
- .opacity-container {
162
- width: 224px;
163
- height: 93px;
164
- border-radius: 4px;
165
- border: solid 1px #d8dce6;
166
- background-color: #fff;
167
- }
168
-
169
- ::v-deep .el-slider__bar {
170
- background-color: $app-primary-color;
171
- }
172
-
173
- .drawer-content {
174
- position: relative;
175
- height: 93px;
176
- pointer-events: none;
177
- }
178
-
179
- ::v-deep .my-drawer {
180
- background: rgba(0, 0, 0, 0);
181
- box-shadow: none;
182
- }
183
-
184
- ::v-deep .my-drawer .el-drawer__body {
185
- height: 93px;
186
- }
187
-
188
- .tab-button {
189
- width: 20px;
190
- height: 40px;
191
- z-index: 8;
192
- right: 0px;
193
-
194
- box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.06);
195
- border: solid 1px #e4e7ed;
196
- background-color: #FFFFFF;
197
- text-align: center;
198
- vertical-align: middle;
199
- cursor: pointer;
200
- pointer-events: auto;
201
- //transition: bottom 0.3s;
202
-
203
- &.close {
204
- float: left;
205
- flex: 1;
206
- border-right: 0;
207
- margin-top: 26px;
208
- }
209
-
210
- &.open {
211
- position: absolute;
212
- bottom:26px;
213
- }
214
-
215
- i {
216
- margin-top: 12px;
217
- color: $app-primary-color;
218
- transform: scaleY(2.5);
219
- }
220
- }
221
-
222
- </style>
1
+ <template>
2
+ <div
3
+ v-if="material!=undefined"
4
+ ref="control"
5
+ class="opacity-control"
6
+ >
7
+ <el-drawer
8
+ custom-class="my-drawer"
9
+ class="drawer-content"
10
+ :visible.sync="drawerOpen"
11
+ :append-to-body="false"
12
+ :modal-append-to-body="false"
13
+ size="300"
14
+ :with-header="false"
15
+ :wrapper-closable="false"
16
+ :modal="false"
17
+ >
18
+ <div
19
+ v-if="drawerOpen"
20
+ class="tab-button close"
21
+ @click="toggleDrawer"
22
+ >
23
+ <i class="el-icon-arrow-right" />
24
+ </div>
25
+ <el-container class="opacity-container">
26
+ <el-header
27
+ height="37px"
28
+ class="header"
29
+ >
30
+ <div>Opacity</div>
31
+ </el-header>
32
+ <el-main class="main">
33
+ <div class="block">
34
+ <span class="display">{{ displayString }}</span>
35
+ <el-slider
36
+ v-model="material.opacity"
37
+ class="my-slider"
38
+ :step="0.01"
39
+ :min="0"
40
+ :max="1"
41
+ :format-tooltip="formatTooltip"
42
+ :show-tooltip="false"
43
+ />
44
+ </div>
45
+ </el-main>
46
+ </el-container>
47
+ </el-drawer>
48
+ <div
49
+ v-if="!drawerOpen"
50
+ class="tab-button open"
51
+ @click="toggleDrawer"
52
+ >
53
+ <i class="el-icon-arrow-left" />
54
+ </div>
55
+ </div>
56
+ </template>
57
+
58
+ <script>
59
+ /* eslint-disable no-alert, no-console */
60
+ import Vue from "vue";
61
+ import { Container, Drawer, Header, Icon, Main, Slider } from "element-ui";
62
+ import lang from "element-ui/lib/locale/lang/en";
63
+ import locale from "element-ui/lib/locale";
64
+
65
+ locale.use(lang);
66
+ Vue.use(Container);
67
+ Vue.use(Drawer);
68
+ Vue.use(Header);
69
+ Vue.use(Icon);
70
+ Vue.use(Main);
71
+ Vue.use(Slider);
72
+
73
+ /**
74
+ * A component to control the opacity of the target object.
75
+ */
76
+ export default {
77
+ name: "OpacityControls",
78
+ data: function() {
79
+ return {
80
+ displayString: "100%",
81
+ material: undefined,
82
+ drawerOpen: true
83
+ };
84
+ },
85
+ watch: {
86
+ "material.opacity": function() {
87
+ if (this.material) {
88
+ this._zincobject.setAlpha(this.material.opacity);
89
+ }
90
+ }
91
+ },
92
+ mounted: function() {
93
+ this._zincobject = undefined;
94
+ },
95
+ methods: {
96
+ formatTooltip(val) {
97
+ this.displayString = Math.floor(100 * val + 0.5) + "%";
98
+ return this.displayString;
99
+ },
100
+ toggleDrawer: function() {
101
+ this.drawerOpen = !this.drawerOpen;
102
+ },
103
+ setObject(object) {
104
+ if (object) this.material = object.morph.material;
105
+ else this.material = undefined;
106
+ this._zincobject = object;
107
+ }
108
+ }
109
+ };
110
+ </script>
111
+
112
+ <!-- Add "scoped" attribute to limit CSS to this component only -->
113
+ <style scoped lang="scss">
114
+ @import "~element-ui/packages/theme-chalk/src/container";
115
+ @import "~element-ui/packages/theme-chalk/src/drawer";
116
+ @import "~element-ui/packages/theme-chalk/src/slider";
117
+
118
+ .opacity-control {
119
+ text-align: left;
120
+ width:300px;
121
+ }
122
+
123
+ .header {
124
+ color: #606266;
125
+ line-height: 1;
126
+ padding: 9px 17px 0 15px;
127
+ border-bottom: 1px solid #ebeef5;
128
+ font-size: 14px;
129
+ }
130
+
131
+ .display {
132
+ width: 44px;
133
+ }
134
+
135
+ .icon {
136
+ right: 17px;
137
+ position: absolute;
138
+ top: 10px;
139
+ }
140
+
141
+ .main {
142
+ font-size: 13px;
143
+ padding: 20px 17px 0 15px;
144
+ }
145
+
146
+ .block {
147
+ left: 40px;
148
+ position: absolute;
149
+ top: 57px;
150
+ width: 200px;
151
+ }
152
+
153
+ .my-slider {
154
+ position: absolute;
155
+ width: 109px;
156
+ top: -12px;
157
+ left: 50px;
158
+ pointer-events: auto;
159
+ }
160
+
161
+ .opacity-container {
162
+ width: 224px;
163
+ height: 93px;
164
+ border-radius: 4px;
165
+ border: solid 1px #d8dce6;
166
+ background-color: #fff;
167
+ }
168
+
169
+ ::v-deep .el-slider__bar {
170
+ background-color: $app-primary-color;
171
+ }
172
+
173
+ .drawer-content {
174
+ position: relative;
175
+ height: 93px;
176
+ pointer-events: none;
177
+ }
178
+
179
+ ::v-deep .my-drawer {
180
+ background: rgba(0, 0, 0, 0);
181
+ box-shadow: none;
182
+ }
183
+
184
+ ::v-deep .my-drawer .el-drawer__body {
185
+ height: 93px;
186
+ }
187
+
188
+ .tab-button {
189
+ width: 20px;
190
+ height: 40px;
191
+ z-index: 8;
192
+ right: 0px;
193
+
194
+ box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.06);
195
+ border: solid 1px #e4e7ed;
196
+ background-color: #FFFFFF;
197
+ text-align: center;
198
+ vertical-align: middle;
199
+ cursor: pointer;
200
+ pointer-events: auto;
201
+ //transition: bottom 0.3s;
202
+
203
+ &.close {
204
+ float: left;
205
+ flex: 1;
206
+ border-right: 0;
207
+ margin-top: 26px;
208
+ }
209
+
210
+ &.open {
211
+ position: absolute;
212
+ bottom:26px;
213
+ }
214
+
215
+ i {
216
+ margin-top: 12px;
217
+ color: $app-primary-color;
218
+ transform: scaleY(2.5);
219
+ }
220
+ }
221
+
222
+ </style>
@@ -0,0 +1,158 @@
1
+ <template>
2
+ <div
3
+ v-show="material!=undefined"
4
+ class="primitive-controls"
5
+ >
6
+ <el-drawer
7
+ custom-class="my-drawer"
8
+ class="drawer-content"
9
+ :visible.sync="drawerOpen"
10
+ :append-to-body="false"
11
+ :modal-append-to-body="false"
12
+ size="300"
13
+ :with-header="false"
14
+ :wrapper-closable="false"
15
+ :modal="false"
16
+ >
17
+ <div
18
+ v-if="drawerOpen"
19
+ class="tab-button close"
20
+ @click="toggleDrawer"
21
+ >
22
+ <i class="el-icon-arrow-right" />
23
+ </div>
24
+ <opacity-controls
25
+ :material="material"
26
+ ref="opacityControls" />
27
+ </el-drawer>
28
+ <div
29
+ v-if="!drawerOpen"
30
+ class="tab-button open"
31
+ @click="toggleDrawer"
32
+ >
33
+ <i class="el-icon-arrow-left" />
34
+ </div>
35
+ </div>
36
+ </template>
37
+
38
+ <script>
39
+ /* eslint-disable no-alert, no-console */
40
+ import Vue from "vue";
41
+ import OpacityControls from "./OpacityControls";
42
+ import { Drawer, Icon } from "element-ui";
43
+ import lang from "element-ui/lib/locale/lang/en";
44
+ import locale from "element-ui/lib/locale";
45
+
46
+ locale.use(lang);
47
+ Vue.use(Drawer);
48
+ Vue.use(Icon);
49
+
50
+ /**
51
+ * A component to control the opacity of the target object.
52
+ */
53
+ export default {
54
+ name: "PrimitiveControls",
55
+ components: {
56
+ OpacityControls,
57
+ },
58
+ data: function() {
59
+ return {
60
+ material: undefined,
61
+ drawerOpen: true
62
+ };
63
+ },
64
+ watch: {
65
+
66
+ },
67
+ mounted: function() {
68
+ this._zincobject = undefined;
69
+ },
70
+ methods: {
71
+ formatTooltip(val) {
72
+ this.displayString = Math.floor(100 * val + 0.5) + "%";
73
+ return this.displayString;
74
+ },
75
+ toggleDrawer: function() {
76
+ this.drawerOpen = !this.drawerOpen;
77
+ },
78
+ setObject(object) {
79
+ console.log(object, this.$refs)
80
+ if (object && object.morph) this.material = object.morph.material;
81
+ else this.material = undefined;
82
+ this.$refs.opacityControls.setObject(object);
83
+ }
84
+ }
85
+ };
86
+ </script>
87
+
88
+ <!-- Add "scoped" attribute to limit CSS to this component only -->
89
+ <style scoped lang="scss">
90
+ @import "~element-ui/packages/theme-chalk/src/container";
91
+ @import "~element-ui/packages/theme-chalk/src/drawer";
92
+ @import "~element-ui/packages/theme-chalk/src/slider";
93
+
94
+ .primitive-controls {
95
+ text-align: left;
96
+ width:300px;
97
+ }
98
+
99
+ .display {
100
+ width: 44px;
101
+ }
102
+
103
+ .icon {
104
+ right: 17px;
105
+ position: absolute;
106
+ top: 10px;
107
+ }
108
+
109
+ .drawer-content {
110
+ position: relative;
111
+ height: 93px;
112
+ pointer-events: none;
113
+ }
114
+
115
+ ::v-deep .my-drawer {
116
+ background: rgba(0, 0, 0, 0);
117
+ box-shadow: none;
118
+ }
119
+
120
+ ::v-deep .my-drawer .el-drawer__body {
121
+ height: 93px;
122
+ }
123
+
124
+ .tab-button {
125
+ width: 20px;
126
+ height: 40px;
127
+ z-index: 8;
128
+ right: 0px;
129
+
130
+ box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.06);
131
+ border: solid 1px #e4e7ed;
132
+ background-color: #FFFFFF;
133
+ text-align: center;
134
+ vertical-align: middle;
135
+ cursor: pointer;
136
+ pointer-events: auto;
137
+ //transition: bottom 0.3s;
138
+
139
+ &.close {
140
+ float: left;
141
+ flex: 1;
142
+ border-right: 0;
143
+ margin-top: 26px;
144
+ }
145
+
146
+ &.open {
147
+ position: absolute;
148
+ bottom:26px;
149
+ }
150
+
151
+ i {
152
+ margin-top: 12px;
153
+ color: $app-primary-color;
154
+ transform: scaleY(2.5);
155
+ }
156
+ }
157
+
158
+ </style>