@abi-software/scaffoldvuer 0.2.3-alpha-2 → 0.3.1

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 (49) hide show
  1. package/.eslintrc.js +12 -12
  2. package/CHANGELOG.md +344 -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 +277 -34
  7. package/dist/scaffoldvuer-wc.umd.js +277 -34
  8. package/dist/scaffoldvuer-wc.umd.min.js +277 -34
  9. package/dist/scaffoldvuer.common.js +1252 -529
  10. package/dist/scaffoldvuer.common.js.map +1 -1
  11. package/dist/scaffoldvuer.css +1 -1
  12. package/dist/scaffoldvuer.umd.js +1252 -529
  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 +123 -222
  28. package/src/components/PrimitiveControls.vue +173 -0
  29. package/src/components/ScaffoldTooltip.vue +142 -142
  30. package/src/components/ScaffoldVuer.md +44 -44
  31. package/src/components/ScaffoldVuer.vue +2007 -2007
  32. package/src/components/TextureSlidesControls.vue +272 -0
  33. package/src/components/TreeControls.vue +707 -699
  34. package/src/components/index.js +7 -7
  35. package/src/credential.json +12 -0
  36. package/src/main.js +14 -14
  37. package/src/scripts/BaseModule.js +80 -80
  38. package/src/scripts/RendererModule.js +289 -289
  39. package/src/scripts/WebGL.js +94 -94
  40. package/src/scripts/annotation.js +5 -5
  41. package/src/scripts/eventNotifier.js +66 -66
  42. package/src/scripts/graphicsHighlight.js +134 -134
  43. package/src/scripts/organsRenderer.js +587 -587
  44. package/src/scripts/search.js +182 -182
  45. package/src/scripts/utilities.js +146 -146
  46. package/styleguide.config.js +22 -22
  47. package/vue.config.js +41 -41
  48. package/src/components/test.pdf +0 -0
  49. package/src/searchControls.vue +0 -122
@@ -0,0 +1,272 @@
1
+ <template>
2
+ <el-container v-show="settings.length > 0" class="t-slides-container">
3
+ <el-header height="30px" class="header">
4
+ <div>Texture Slides Settings</div>
5
+ </el-header>
6
+ <el-main class="block">
7
+ <el-row v-for="(slide, index) in settings" :key="slide.id">
8
+ <el-col :offset="0" :span="2">
9
+ <el-select
10
+ :popper-append-to-body="false"
11
+ :value="slide.direction"
12
+ placeholder="Select"
13
+ class="input-box"
14
+ popper-class="viewer_dropdown"
15
+ @change="modifyDirection($event, slide)"
16
+ >
17
+ <el-option
18
+ v-for="item in directions"
19
+ :key="item.value"
20
+ :label="item.label"
21
+ :value="item.value"
22
+ />
23
+ </el-select>
24
+ </el-col>
25
+ <el-col :offset="0" :span="14">
26
+ <el-slider
27
+ v-model="slide.value"
28
+ class="my-slider"
29
+ :step="0.01"
30
+ :min="0"
31
+ :max="1"
32
+ :show-tooltip="false"
33
+ @input="modifySlide(slide)"
34
+ />
35
+ </el-col>
36
+ <el-col :offset="0" :span="3">
37
+ <el-input-number
38
+ v-model="slide.value"
39
+ :step="0.01"
40
+ :min="0"
41
+ :max="1"
42
+ :controls="false"
43
+ class="input-box number-input"
44
+ />
45
+ </el-col>
46
+ <el-col :offset="2" :span="2">
47
+ <i
48
+ class="el-icon-close close-icon"
49
+ @click="removeSlide(index, slide)"
50
+ />
51
+ </el-col>
52
+ </el-row>
53
+ </el-main>
54
+ <el-footer height="30px" class="add-slides-text" @click.native="addNewSlide">
55
+ <el-row>
56
+ <el-col :span="2">
57
+ <i class="el-icon-plus" />
58
+ </el-col>
59
+ <el-col :span="10"> Add a new slide </el-col>
60
+ </el-row>
61
+ </el-footer>
62
+ </el-container>
63
+ </template>
64
+
65
+ <script>
66
+ /* eslint-disable no-alert, no-console */
67
+ import Vue from "vue";
68
+ import {
69
+ Col,
70
+ Container,
71
+ Footer,
72
+ Header,
73
+ Icon,
74
+ InputNumber,
75
+ Main,
76
+ Row,
77
+ Slider,
78
+ } from "element-ui";
79
+ import lang from "element-ui/lib/locale/lang/en";
80
+ import locale from "element-ui/lib/locale";
81
+
82
+ locale.use(lang);
83
+ Vue.use(Col);
84
+ Vue.use(Container);
85
+ Vue.use(Footer);
86
+ Vue.use(Header);
87
+ Vue.use(Icon);
88
+ Vue.use(InputNumber);
89
+ Vue.use(Main);
90
+ Vue.use(Slider);
91
+ Vue.use(Row);
92
+
93
+ /**
94
+ * A component to control the opacity of the target object.
95
+ */
96
+ export default {
97
+ name: "TextureSlidesControls",
98
+ data: function () {
99
+ return {
100
+ settings: [],
101
+ directions: [
102
+ {
103
+ value: "x",
104
+ label: "x",
105
+ },
106
+ {
107
+ value: "y",
108
+ label: "y",
109
+ },
110
+ {
111
+ value: "z",
112
+ label: "z",
113
+ },
114
+ ],
115
+ };
116
+ },
117
+ watch: {
118
+ settings: function () {
119
+ if (this.material && this._zincObject) {
120
+ this._zincObject.setAlpha(this.material.opacity);
121
+ }
122
+ },
123
+ },
124
+ mounted: function () {
125
+ this._zincObject = undefined;
126
+ },
127
+ methods: {
128
+ setObject: function (object) {
129
+ if (object.isTextureSlides) {
130
+ this._zincObject = object;
131
+ this.settings = this._zincObject.getTextureSettings();
132
+ } else {
133
+ this._zincObject = undefined;
134
+ this.settings = [];
135
+ }
136
+ },
137
+ addNewSlide: function () {
138
+ const newSettings = { direction: "x", value: 0 };
139
+ const returnSettings = this._zincObject.createSlide(newSettings);
140
+ this.settings.push(returnSettings);
141
+ },
142
+ modifyDirection: function(direction, slide) {
143
+ if (slide) {
144
+ slide.direction = direction;
145
+ this._zincObject.modifySlideSettings(slide);
146
+ }
147
+ },
148
+ modifySlide: function (slide) {
149
+ if (slide) {
150
+ this._zincObject.modifySlideSettings(slide);
151
+ }
152
+ },
153
+ removeSlide: function (index, slide) {
154
+ this._zincObject.removeSlideWithId(slide.id);
155
+ this.settings.splice(index, 1);
156
+ },
157
+ },
158
+ };
159
+ </script>
160
+
161
+ <!-- Add "scoped" attribute to limit CSS to this component only -->
162
+ <style scoped lang="scss">
163
+ @import "~element-ui/packages/theme-chalk/src/col";
164
+ @import "~element-ui/packages/theme-chalk/src/container";
165
+ @import "~element-ui/packages/theme-chalk/src/input-number";
166
+ @import "~element-ui/packages/theme-chalk/src/slider";
167
+ @import "~element-ui/packages/theme-chalk/src/row";
168
+
169
+ .header {
170
+ color: #606266;
171
+ line-height: 1;
172
+ padding: 8px 17px 1px 15px;
173
+ border-bottom: 1px solid #ebeef5;
174
+ font-size: 14px;
175
+ }
176
+
177
+ .add-slides-text {
178
+ color: $app-primary-color;
179
+ line-height: 1;
180
+ padding: 9px 17px 9px 15px;
181
+ border-top: 1px solid #ebeef5;
182
+ font-size: 12px;
183
+ cursor: pointer;
184
+ pointer-events: auto;
185
+ }
186
+
187
+ .display {
188
+ width: 44px;
189
+ }
190
+
191
+ .block {
192
+ pointer-events: auto;
193
+ &.el-main {
194
+ padding: 5px;
195
+ &::-webkit-scrollbar {
196
+ width: 10px;
197
+ }
198
+
199
+ &::-webkit-scrollbar-thumb {
200
+ border-radius: 10px;
201
+ box-shadow: inset 0 0 6px #c0c4cc;
202
+ }
203
+ }
204
+ }
205
+
206
+ .my-slider {
207
+ width: 109px;
208
+ top: -6px;
209
+ left: 50px;
210
+ position: relative;
211
+ }
212
+
213
+ .t-slides-container {
214
+ width: 300px;
215
+ height: 250px;
216
+ border-radius: 4px;
217
+ border: solid 1px #d8dce6;
218
+ background-color: #fff;
219
+ overflow-y: none;
220
+ }
221
+
222
+ ::v-deep .el-slider__bar {
223
+ background-color: $app-primary-color;
224
+ }
225
+
226
+ .input-box {
227
+ width: 42px;
228
+ border-radius: 4px;
229
+ border: 1px solid rgb(144, 147, 153);
230
+ background-color: var(--white);
231
+ font-weight: 500;
232
+ color: rgb(48, 49, 51);
233
+ margin-left: 8px;
234
+
235
+ &.number-input {
236
+ width: 42px;
237
+ ::v-deep .el-input__inner {
238
+ padding-left: 0px;
239
+ padding-right: 0px;
240
+ }
241
+ }
242
+
243
+ ::v-deep .el-input__inner {
244
+ color: $app-primary-color;
245
+ height: 22px;
246
+ padding-left: 8px;
247
+ padding-right: 8px;
248
+ border: none;
249
+ font-family: "Asap", sans-serif;
250
+ line-height: 22px;
251
+ }
252
+
253
+ ::v-deep .el-input,
254
+ ::v-deep .el-input__icon {
255
+ line-height: 22px;
256
+ }
257
+
258
+ .viewer_dropdown .el-select-dropdown__item {
259
+ white-space: nowrap;
260
+ color: $app-primary-color;
261
+ text-align: left;
262
+ font-family: "Asap", sans-serif;
263
+ }
264
+ }
265
+
266
+ .close-icon {
267
+ color: $app-primary-color;
268
+ top: 2px;
269
+ position: relative;
270
+ cursor: pointer;
271
+ }
272
+ </style>