w-threejs-vue 1.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.
- package/.editorconfig +9 -0
- package/.eslintignore +3 -0
- package/.eslintrc.js +55 -0
- package/.jsdoc +25 -0
- package/LICENSE +21 -0
- package/README.md +39 -0
- package/SECURITY.md +5 -0
- package/babel.config.js +15 -0
- package/dist/w-threejs-vue.umd.js +26 -0
- package/dist/w-threejs-vue.umd.js.map +1 -0
- package/docs/examples/app.html +66 -0
- package/docs/examples/app.umd.js +31 -0
- package/docs/examples/app.umd.js.map +1 -0
- package/docs/examples/ex-AppBasicAutoRotateDeg.html +190 -0
- package/docs/examples/ex-AppBasicBackgroundColor.html +189 -0
- package/docs/examples/ex-AppBasicSize.html +170 -0
- package/docs/examples/ex-AppBasicUploadStl.html +237 -0
- package/docs/examples/ex-AppBasicUseAutoRotate.html +189 -0
- package/docs/examples/ex-AppCmCameraFar.html +191 -0
- package/docs/examples/ex-AppCmCameraFov.html +191 -0
- package/docs/examples/ex-AppCmCameraNear.html +191 -0
- package/docs/examples/ex-AppCmCameraOrthographicRatio.html +191 -0
- package/docs/examples/ex-AppCmCameraType.html +190 -0
- package/docs/examples/ex-AppCmGetCameraViewAngle.html +218 -0
- package/docs/examples/ex-AppCmSetCameraAzimuthAngle.html +190 -0
- package/docs/examples/ex-AppCmSetCameraPolarAngle.html +190 -0
- package/docs/examples/ex-AppCmSetCameraViewAngle.html +194 -0
- package/docs/examples/ex-AppHpHelperAxesLengthRatio.html +189 -0
- package/docs/examples/ex-AppHpHelperGridDensity.html +189 -0
- package/docs/examples/ex-AppHpHelperGridLengthRatio.html +189 -0
- package/docs/examples/ex-AppHpHelperGridPositionRatioZ.html +189 -0
- package/docs/examples/ex-AppHpUseHelperAxes.html +189 -0
- package/docs/examples/ex-AppHpUseHelperGrid.html +189 -0
- package/docs/examples/ex-AppLgLegnedBackgroundColor.html +189 -0
- package/docs/examples/ex-AppLgLegnedHeight.html +189 -0
- package/docs/examples/ex-AppLgLegnedHeightMax.html +189 -0
- package/docs/examples/ex-AppLtLightAmbientColor.html +189 -0
- package/docs/examples/ex-AppLtLightDirectionColor.html +191 -0
- package/docs/examples/ex-AppLtLightDirectionIntensity.html +191 -0
- package/docs/examples/ex-AppLtLightDirectionPos.html +191 -0
- package/docs/examples/ex-AppLtLightPointColor.html +192 -0
- package/docs/examples/ex-AppLtLightPointDecay.html +192 -0
- package/docs/examples/ex-AppLtLightPointDistance.html +192 -0
- package/docs/examples/ex-AppLtLightPointIntensity.html +192 -0
- package/docs/examples/ex-AppLtLightPointPoss.html +192 -0
- package/docs/examples/ex-AppLtUseLightAmbient.html +191 -0
- package/docs/examples/ex-AppLtUseLightDirection.html +191 -0
- package/docs/examples/ex-AppLtUseLightPoint.html +191 -0
- package/docs/examples/ex-AppMhGetMeshsInfor.html +198 -0
- package/docs/examples/ex-AppMhSetMeshColor.html +190 -0
- package/docs/examples/ex-AppMhSetMeshLabelText.html +190 -0
- package/docs/examples/ex-AppMhSetMeshLabelTextColor.html +190 -0
- package/docs/examples/ex-AppMhSetMeshLabelTextFontFamily.html +190 -0
- package/docs/examples/ex-AppMhSetMeshLabelTextFontSize.html +190 -0
- package/docs/examples/ex-AppMhSetMeshLabelVisible.html +198 -0
- package/docs/examples/ex-AppMhSetMeshVisible.html +198 -0
- package/docs/examples/ex-AppMuMenuIcons.html +217 -0
- package/docs/examples/ex-AppMuMenuTooltips.html +218 -0
- package/docs/fonts/Montserrat/Montserrat-Bold.eot +0 -0
- package/docs/fonts/Montserrat/Montserrat-Bold.ttf +0 -0
- package/docs/fonts/Montserrat/Montserrat-Bold.woff +0 -0
- package/docs/fonts/Montserrat/Montserrat-Bold.woff2 +0 -0
- package/docs/fonts/Montserrat/Montserrat-Regular.eot +0 -0
- package/docs/fonts/Montserrat/Montserrat-Regular.ttf +0 -0
- package/docs/fonts/Montserrat/Montserrat-Regular.woff +0 -0
- package/docs/fonts/Montserrat/Montserrat-Regular.woff2 +0 -0
- package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.eot +0 -0
- package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.svg +978 -0
- package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.ttf +0 -0
- package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.woff +0 -0
- package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.woff2 +0 -0
- package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.eot +0 -0
- package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.svg +1049 -0
- package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.ttf +0 -0
- package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.woff +0 -0
- package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.woff2 +0 -0
- package/docs/index.html +84 -0
- package/docs/module-WThreejsVue.html +216 -0
- package/docs/scripts/collapse.js +39 -0
- package/docs/scripts/commonNav.js +28 -0
- package/docs/scripts/linenumber.js +25 -0
- package/docs/scripts/nav.js +12 -0
- package/docs/scripts/polyfill.js +4 -0
- package/docs/scripts/prettify/Apache-License-2.0.txt +202 -0
- package/docs/scripts/prettify/lang-css.js +2 -0
- package/docs/scripts/prettify/prettify.js +28 -0
- package/docs/scripts/search.js +99 -0
- package/docs/styles/jsdoc.css +776 -0
- package/docs/styles/prettify.css +80 -0
- package/package.json +74 -0
- package/public/index.html +42 -0
- package/src/App.vue +574 -0
- package/src/AppBasicAutoRotateDeg.vue +102 -0
- package/src/AppBasicBackgroundColor.vue +101 -0
- package/src/AppBasicSize.vue +90 -0
- package/src/AppBasicUploadStl.vue +159 -0
- package/src/AppBasicUseAutoRotate.vue +101 -0
- package/src/AppCmCameraFar.vue +103 -0
- package/src/AppCmCameraFov.vue +103 -0
- package/src/AppCmCameraNear.vue +103 -0
- package/src/AppCmCameraOrthographicRatio.vue +103 -0
- package/src/AppCmCameraType.vue +102 -0
- package/src/AppCmGetCameraViewAngle.vue +135 -0
- package/src/AppCmSetCameraAzimuthAngle.vue +104 -0
- package/src/AppCmSetCameraPolarAngle.vue +104 -0
- package/src/AppCmSetCameraViewAngle.vue +105 -0
- package/src/AppHpHelperAxesLengthRatio.vue +101 -0
- package/src/AppHpHelperGridDensity.vue +101 -0
- package/src/AppHpHelperGridLengthRatio.vue +101 -0
- package/src/AppHpHelperGridPositionRatioZ.vue +101 -0
- package/src/AppHpUseHelperAxes.vue +101 -0
- package/src/AppHpUseHelperGrid.vue +101 -0
- package/src/AppLgLegnedBackgroundColor.vue +101 -0
- package/src/AppLgLegnedHeight.vue +101 -0
- package/src/AppLgLegnedHeightMax.vue +101 -0
- package/src/AppLtLightAmbientColor.vue +101 -0
- package/src/AppLtLightDirectionColor.vue +103 -0
- package/src/AppLtLightDirectionIntensity.vue +103 -0
- package/src/AppLtLightDirectionPos.vue +103 -0
- package/src/AppLtLightPointColor.vue +104 -0
- package/src/AppLtLightPointDecay.vue +104 -0
- package/src/AppLtLightPointDistance.vue +104 -0
- package/src/AppLtLightPointIntensity.vue +104 -0
- package/src/AppLtLightPointPoss.vue +104 -0
- package/src/AppLtUseLightAmbient.vue +103 -0
- package/src/AppLtUseLightDirection.vue +103 -0
- package/src/AppLtUseLightPoint.vue +103 -0
- package/src/AppMhGetMeshsInfor.vue +112 -0
- package/src/AppMhSetMeshColor.vue +104 -0
- package/src/AppMhSetMeshLabelText.vue +104 -0
- package/src/AppMhSetMeshLabelTextColor.vue +104 -0
- package/src/AppMhSetMeshLabelTextFontFamily.vue +104 -0
- package/src/AppMhSetMeshLabelTextFontSize.vue +104 -0
- package/src/AppMhSetMeshLabelVisible.vue +106 -0
- package/src/AppMhSetMeshVisible.vue +106 -0
- package/src/AppMuMenuIcons.vue +130 -0
- package/src/AppMuMenuTooltips.vue +131 -0
- package/src/components/WThreejsVue.vue +955 -0
- package/src/js/addStl.mjs +83 -0
- package/src/js/getCsrdFromMeshs.mjs +85 -0
- package/src/js/plot3d.mjs +1407 -0
- package/src/main.js +8 -0
- package/test/all.test.mjs +10 -0
- package/toolg/addVersion.mjs +4 -0
- package/toolg/cleanFolder.mjs +4 -0
- package/toolg/gDistApp.mjs +38 -0
- package/toolg/gDistRollupComps.mjs +22 -0
- package/toolg/gDocExams.mjs +47 -0
- package/toolg/gExtractHtml.mjs +159 -0
- package/toolg/modifyReadme.mjs +4 -0
- package/vue.config.js +21 -0
package/src/App.vue
ADDED
|
@@ -0,0 +1,574 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
style=""
|
|
4
|
+
:changeMenus="changeMenus"
|
|
5
|
+
>
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
<template v-if="!isNarrow">
|
|
9
|
+
<a href="https://github.com/yuda-lyu/w-plot-vue" class="github-corner" style="position:fixed; top:0; right:0; border:0; z-index:10000;" aria-label="View source on GitHub" target="_blank" rel="noreferrer noopener">
|
|
10
|
+
<svg width="80" height="80" viewBox="0 0 250 250" style="fill:rgba(0,0,0,0.25); color:#fff; position: absolute; top: 0; border: 0; right: 0;" aria-hidden="true"><path d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"></path><path d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2" fill="currentColor" style="transform-origin: 130px 106px;" class="octo-arm"></path><path d="M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z" fill="currentColor" class="octo-body"></path></svg>
|
|
11
|
+
</a>
|
|
12
|
+
</template>
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
<div style="background:#f5f5f5;">
|
|
16
|
+
|
|
17
|
+
<div style="width:calc( 100vw - 20px ); overflow-x:auto;" v-if="cmpsL1 && cmpsL1.length>0">
|
|
18
|
+
<WListHorizontal
|
|
19
|
+
:items="cmpsL1"
|
|
20
|
+
:itemActive.sync="cmpP1"
|
|
21
|
+
:itemBackgroundColor="'transparent'"
|
|
22
|
+
:itemBackgroundColorHover="'#eee'"
|
|
23
|
+
:itemBackgroundColorActive="'#eee'"
|
|
24
|
+
:keyText="'name'"
|
|
25
|
+
:paddingStyle="{v:12,h:20}"
|
|
26
|
+
@update:itemActive="(v)=>{indP3=0;indP2=0;indP1=getInd(v,cmpsL1)}"
|
|
27
|
+
>
|
|
28
|
+
<template v-slot:item="props">
|
|
29
|
+
<div style="">
|
|
30
|
+
{{props.item.name}}
|
|
31
|
+
</div>
|
|
32
|
+
</template>
|
|
33
|
+
</WListHorizontal>
|
|
34
|
+
<div style="height:1px; background:#ddd;"></div>
|
|
35
|
+
</div>
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
<div style="width:calc( 100vw - 20px ); overflow-x:auto;" v-if="cmpsL2 && cmpsL2.length>0">
|
|
39
|
+
<div style="height:3px; background:#fff;"></div>
|
|
40
|
+
<WListHorizontal
|
|
41
|
+
:items="cmpsL2"
|
|
42
|
+
:itemActive.sync="cmpP2"
|
|
43
|
+
:itemBackgroundColor="'transparent'"
|
|
44
|
+
:itemBackgroundColorHover="'#eee'"
|
|
45
|
+
:itemBackgroundColorActive="'#eee'"
|
|
46
|
+
:keyText="'name'"
|
|
47
|
+
:paddingStyle="{v:12,h:20}"
|
|
48
|
+
@update:itemActive="(v)=>{indP3=0;indP2=getInd(v,cmpsL2)}"
|
|
49
|
+
>
|
|
50
|
+
<template v-slot:item="props">
|
|
51
|
+
<div style="">
|
|
52
|
+
{{props.item.name}}
|
|
53
|
+
</div>
|
|
54
|
+
</template>
|
|
55
|
+
</WListHorizontal>
|
|
56
|
+
<div style="height:1px; background:#ddd;"></div>
|
|
57
|
+
</div>
|
|
58
|
+
|
|
59
|
+
<div style="width:calc( 100vw - 20px ); overflow-x:auto;" v-if="cmpsL3 && cmpsL3.length>0">
|
|
60
|
+
<div style="height:3px; background:#fff;"></div>
|
|
61
|
+
<WListHorizontal
|
|
62
|
+
:items="cmpsL3"
|
|
63
|
+
:itemActive.sync="cmpP3"
|
|
64
|
+
:itemBackgroundColor="'transparent'"
|
|
65
|
+
:itemBackgroundColorHover="'#eee'"
|
|
66
|
+
:itemBackgroundColorActive="'#eee'"
|
|
67
|
+
:keyText="'name'"
|
|
68
|
+
:paddingStyle="{v:12,h:20}"
|
|
69
|
+
@update:itemActive="(v)=>{indP3=getInd(v,cmpsL3)}"
|
|
70
|
+
>
|
|
71
|
+
<template v-slot:item="props">
|
|
72
|
+
<div style="">
|
|
73
|
+
{{props.item.name}}
|
|
74
|
+
</div>
|
|
75
|
+
</template>
|
|
76
|
+
</WListHorizontal>
|
|
77
|
+
<div style="height:1px; background:#ddd;"></div>
|
|
78
|
+
</div>
|
|
79
|
+
|
|
80
|
+
</div>
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
<div style="padding:20px;">
|
|
84
|
+
|
|
85
|
+
<AppBasicSize v-if="cmpPick==='size'"></AppBasicSize>
|
|
86
|
+
|
|
87
|
+
<AppBasicBackgroundColor v-if="cmpPick==='backgroundColor'"></AppBasicBackgroundColor>
|
|
88
|
+
|
|
89
|
+
<AppBasicUseAutoRotate v-if="cmpPick==='useAutoRotate'"></AppBasicUseAutoRotate>
|
|
90
|
+
|
|
91
|
+
<AppBasicAutoRotateDeg v-if="cmpPick==='autoRotateDeg'"></AppBasicAutoRotateDeg>
|
|
92
|
+
|
|
93
|
+
<AppBasicUploadStl v-if="cmpPick==='uploadStl'"></AppBasicUploadStl>
|
|
94
|
+
|
|
95
|
+
<AppCmCameraType v-if="cmpPick==='cameraType'"></AppCmCameraType>
|
|
96
|
+
|
|
97
|
+
<AppCmCameraFov v-if="cmpPick==='cameraFov'"></AppCmCameraFov>
|
|
98
|
+
|
|
99
|
+
<AppCmCameraNear v-if="cmpPick==='cameraNear'"></AppCmCameraNear>
|
|
100
|
+
|
|
101
|
+
<AppCmCameraFar v-if="cmpPick==='cameraFar'"></AppCmCameraFar>
|
|
102
|
+
|
|
103
|
+
<AppCmCameraOrthographicRatio v-if="cmpPick==='cameraOrthographicRatio'"></AppCmCameraOrthographicRatio>
|
|
104
|
+
|
|
105
|
+
<AppCmSetCameraAzimuthAngle v-if="cmpPick==='setCameraAzimuthAngle'"></AppCmSetCameraAzimuthAngle>
|
|
106
|
+
|
|
107
|
+
<AppCmSetCameraPolarAngle v-if="cmpPick==='setCameraPolarAngle'"></AppCmSetCameraPolarAngle>
|
|
108
|
+
|
|
109
|
+
<AppCmSetCameraViewAngle v-if="cmpPick==='setCameraViewAngle'"></AppCmSetCameraViewAngle>
|
|
110
|
+
|
|
111
|
+
<AppCmGetCameraViewAngle v-if="cmpPick==='getCameraViewAngle'"></AppCmGetCameraViewAngle>
|
|
112
|
+
|
|
113
|
+
<AppHpUseHelperAxes v-if="cmpPick==='useHelperAxes'"></AppHpUseHelperAxes>
|
|
114
|
+
|
|
115
|
+
<AppHpHelperAxesLengthRatio v-if="cmpPick==='helperAxesLengthRatio'"></AppHpHelperAxesLengthRatio>
|
|
116
|
+
|
|
117
|
+
<AppHpUseHelperGrid v-if="cmpPick==='useHelperGrid'"></AppHpUseHelperGrid>
|
|
118
|
+
|
|
119
|
+
<AppHpHelperGridLengthRatio v-if="cmpPick==='helperGridLengthRatio'"></AppHpHelperGridLengthRatio>
|
|
120
|
+
|
|
121
|
+
<AppHpHelperGridDensity v-if="cmpPick==='helperGridDensity'"></AppHpHelperGridDensity>
|
|
122
|
+
|
|
123
|
+
<AppHpHelperGridPositionRatioZ v-if="cmpPick==='helperGridPositionRatioZ'"></AppHpHelperGridPositionRatioZ>
|
|
124
|
+
|
|
125
|
+
<AppLtUseLightAmbient v-if="cmpPick==='useLightAmbient'"></AppLtUseLightAmbient>
|
|
126
|
+
|
|
127
|
+
<AppLtLightAmbientColor v-if="cmpPick==='lightAmbientColor'"></AppLtLightAmbientColor>
|
|
128
|
+
|
|
129
|
+
<AppLtUseLightPoint v-if="cmpPick==='useLightPoint'"></AppLtUseLightPoint>
|
|
130
|
+
|
|
131
|
+
<AppLtLightPointPoss v-if="cmpPick==='lightPointPoss'"></AppLtLightPointPoss>
|
|
132
|
+
|
|
133
|
+
<AppLtLightPointColor v-if="cmpPick==='lightPointColor'"></AppLtLightPointColor>
|
|
134
|
+
|
|
135
|
+
<AppLtLightPointIntensity v-if="cmpPick==='lightPointIntensity'"></AppLtLightPointIntensity>
|
|
136
|
+
|
|
137
|
+
<AppLtLightPointDistance v-if="cmpPick==='lightPointDistance'"></AppLtLightPointDistance>
|
|
138
|
+
|
|
139
|
+
<AppLtLightPointDecay v-if="cmpPick==='lightPointDecay'"></AppLtLightPointDecay>
|
|
140
|
+
|
|
141
|
+
<AppLtUseLightDirection v-if="cmpPick==='useLightDirection'"></AppLtUseLightDirection>
|
|
142
|
+
|
|
143
|
+
<AppLtLightDirectionColor v-if="cmpPick==='lightDirectionColor'"></AppLtLightDirectionColor>
|
|
144
|
+
|
|
145
|
+
<AppLtLightDirectionIntensity v-if="cmpPick==='lightDirectionIntensity'"></AppLtLightDirectionIntensity>
|
|
146
|
+
|
|
147
|
+
<AppLtLightDirectionPos v-if="cmpPick==='lightDirectionPos'"></AppLtLightDirectionPos>
|
|
148
|
+
|
|
149
|
+
<AppMhGetMeshsInfor v-if="cmpPick==='getMeshsInfor'"></AppMhGetMeshsInfor>
|
|
150
|
+
|
|
151
|
+
<AppMhSetMeshVisible v-if="cmpPick==='setMeshVisible'"></AppMhSetMeshVisible>
|
|
152
|
+
|
|
153
|
+
<AppMhSetMeshColor v-if="cmpPick==='setMeshColor'"></AppMhSetMeshColor>
|
|
154
|
+
|
|
155
|
+
<AppMhSetMeshLabelVisible v-if="cmpPick==='setMeshLabelVisible'"></AppMhSetMeshLabelVisible>
|
|
156
|
+
|
|
157
|
+
<AppMhSetMeshLabelText v-if="cmpPick==='setMeshLabelText'"></AppMhSetMeshLabelText>
|
|
158
|
+
|
|
159
|
+
<AppMhSetMeshLabelTextColor v-if="cmpPick==='setMeshLabelTextColor'"></AppMhSetMeshLabelTextColor>
|
|
160
|
+
|
|
161
|
+
<AppMhSetMeshLabelTextFontSize v-if="cmpPick==='setMeshLabelTextFontSize'"></AppMhSetMeshLabelTextFontSize>
|
|
162
|
+
|
|
163
|
+
<AppMhSetMeshLabelTextFontFamily v-if="cmpPick==='setMeshLabelTextFontFamily'"></AppMhSetMeshLabelTextFontFamily>
|
|
164
|
+
|
|
165
|
+
<AppLgLegnedBackgroundColor v-if="cmpPick==='legnedBackgroundColor'"></AppLgLegnedBackgroundColor>
|
|
166
|
+
|
|
167
|
+
<AppLgLegnedHeight v-if="cmpPick==='legnedHeight'"></AppLgLegnedHeight>
|
|
168
|
+
|
|
169
|
+
<AppLgLegnedHeightMax v-if="cmpPick==='legnedHeightMax'"></AppLgLegnedHeightMax>
|
|
170
|
+
|
|
171
|
+
<AppMuMenuIcons v-if="cmpPick==='menuIcons'"></AppMuMenuIcons>
|
|
172
|
+
|
|
173
|
+
<AppMuMenuTooltips v-if="cmpPick==='menuTooltips'"></AppMuMenuTooltips>
|
|
174
|
+
|
|
175
|
+
</div>
|
|
176
|
+
|
|
177
|
+
|
|
178
|
+
</div>
|
|
179
|
+
</template>
|
|
180
|
+
|
|
181
|
+
<script>
|
|
182
|
+
import get from 'lodash-es/get'
|
|
183
|
+
import each from 'lodash-es/each'
|
|
184
|
+
// import cloneDeep from 'lodash-es/cloneDeep'
|
|
185
|
+
import urlParse from 'wsemi/src/urlParse.mjs'
|
|
186
|
+
import WListHorizontal from 'w-component-vue/src/components/WListHorizontal.vue'
|
|
187
|
+
import AppBasicSize from './AppBasicSize.vue'
|
|
188
|
+
import AppBasicBackgroundColor from './AppBasicBackgroundColor.vue'
|
|
189
|
+
import AppBasicUseAutoRotate from './AppBasicUseAutoRotate.vue'
|
|
190
|
+
import AppBasicAutoRotateDeg from './AppBasicAutoRotateDeg.vue'
|
|
191
|
+
import AppBasicUploadStl from './AppBasicUploadStl.vue'
|
|
192
|
+
import AppCmCameraType from './AppCmCameraType.vue'
|
|
193
|
+
import AppCmCameraFov from './AppCmCameraFov.vue'
|
|
194
|
+
import AppCmCameraNear from './AppCmCameraNear.vue'
|
|
195
|
+
import AppCmCameraFar from './AppCmCameraFar.vue'
|
|
196
|
+
import AppCmCameraOrthographicRatio from './AppCmCameraOrthographicRatio.vue'
|
|
197
|
+
import AppCmSetCameraAzimuthAngle from './AppCmSetCameraAzimuthAngle.vue'
|
|
198
|
+
import AppCmSetCameraPolarAngle from './AppCmSetCameraPolarAngle.vue'
|
|
199
|
+
import AppCmSetCameraViewAngle from './AppCmSetCameraViewAngle.vue'
|
|
200
|
+
import AppCmGetCameraViewAngle from './AppCmGetCameraViewAngle.vue'
|
|
201
|
+
import AppHpUseHelperAxes from './AppHpUseHelperAxes.vue'
|
|
202
|
+
import AppHpHelperAxesLengthRatio from './AppHpHelperAxesLengthRatio.vue'
|
|
203
|
+
import AppHpUseHelperGrid from './AppHpUseHelperGrid.vue'
|
|
204
|
+
import AppHpHelperGridLengthRatio from './AppHpHelperGridLengthRatio.vue'
|
|
205
|
+
import AppHpHelperGridDensity from './AppHpHelperGridDensity.vue'
|
|
206
|
+
import AppHpHelperGridPositionRatioZ from './AppHpHelperGridPositionRatioZ.vue'
|
|
207
|
+
import AppLtUseLightAmbient from './AppLtUseLightAmbient.vue'
|
|
208
|
+
import AppLtLightAmbientColor from './AppLtLightAmbientColor.vue'
|
|
209
|
+
import AppLtUseLightPoint from './AppLtUseLightPoint.vue'
|
|
210
|
+
import AppLtLightPointPoss from './AppLtLightPointPoss.vue'
|
|
211
|
+
import AppLtLightPointColor from './AppLtLightPointColor.vue'
|
|
212
|
+
import AppLtLightPointIntensity from './AppLtLightPointIntensity.vue'
|
|
213
|
+
import AppLtLightPointDistance from './AppLtLightPointDistance.vue'
|
|
214
|
+
import AppLtLightPointDecay from './AppLtLightPointDecay.vue'
|
|
215
|
+
import AppLtUseLightDirection from './AppLtUseLightDirection.vue'
|
|
216
|
+
import AppLtLightDirectionColor from './AppLtLightDirectionColor.vue'
|
|
217
|
+
import AppLtLightDirectionIntensity from './AppLtLightDirectionIntensity.vue'
|
|
218
|
+
import AppLtLightDirectionPos from './AppLtLightDirectionPos.vue'
|
|
219
|
+
import AppMhGetMeshsInfor from './AppMhGetMeshsInfor.vue'
|
|
220
|
+
import AppMhSetMeshVisible from './AppMhSetMeshVisible.vue'
|
|
221
|
+
import AppMhSetMeshColor from './AppMhSetMeshColor.vue'
|
|
222
|
+
import AppMhSetMeshLabelVisible from './AppMhSetMeshLabelVisible.vue'
|
|
223
|
+
import AppMhSetMeshLabelText from './AppMhSetMeshLabelText.vue'
|
|
224
|
+
import AppMhSetMeshLabelTextColor from './AppMhSetMeshLabelTextColor.vue'
|
|
225
|
+
import AppMhSetMeshLabelTextFontSize from './AppMhSetMeshLabelTextFontSize.vue'
|
|
226
|
+
import AppMhSetMeshLabelTextFontFamily from './AppMhSetMeshLabelTextFontFamily.vue'
|
|
227
|
+
import AppLgLegnedBackgroundColor from './AppLgLegnedBackgroundColor.vue'
|
|
228
|
+
import AppLgLegnedHeight from './AppLgLegnedHeight.vue'
|
|
229
|
+
import AppLgLegnedHeightMax from './AppLgLegnedHeightMax.vue'
|
|
230
|
+
import AppMuMenuIcons from './AppMuMenuIcons.vue'
|
|
231
|
+
import AppMuMenuTooltips from './AppMuMenuTooltips.vue'
|
|
232
|
+
|
|
233
|
+
|
|
234
|
+
export default {
|
|
235
|
+
components: {
|
|
236
|
+
WListHorizontal,
|
|
237
|
+
AppBasicSize,
|
|
238
|
+
AppBasicBackgroundColor,
|
|
239
|
+
AppBasicUseAutoRotate,
|
|
240
|
+
AppBasicAutoRotateDeg,
|
|
241
|
+
AppBasicUploadStl,
|
|
242
|
+
AppCmCameraType,
|
|
243
|
+
AppCmCameraFov,
|
|
244
|
+
AppCmCameraNear,
|
|
245
|
+
AppCmCameraFar,
|
|
246
|
+
AppCmCameraOrthographicRatio,
|
|
247
|
+
AppCmSetCameraAzimuthAngle,
|
|
248
|
+
AppCmSetCameraPolarAngle,
|
|
249
|
+
AppCmSetCameraViewAngle,
|
|
250
|
+
AppCmGetCameraViewAngle,
|
|
251
|
+
AppHpUseHelperAxes,
|
|
252
|
+
AppHpHelperAxesLengthRatio,
|
|
253
|
+
AppHpUseHelperGrid,
|
|
254
|
+
AppHpHelperGridLengthRatio,
|
|
255
|
+
AppHpHelperGridDensity,
|
|
256
|
+
AppHpHelperGridPositionRatioZ,
|
|
257
|
+
AppLtUseLightAmbient,
|
|
258
|
+
AppLtLightAmbientColor,
|
|
259
|
+
AppLtUseLightPoint,
|
|
260
|
+
AppLtLightPointPoss,
|
|
261
|
+
AppLtLightPointColor,
|
|
262
|
+
AppLtLightPointIntensity,
|
|
263
|
+
AppLtLightPointDistance,
|
|
264
|
+
AppLtLightPointDecay,
|
|
265
|
+
AppLtUseLightDirection,
|
|
266
|
+
AppLtLightDirectionColor,
|
|
267
|
+
AppLtLightDirectionIntensity,
|
|
268
|
+
AppLtLightDirectionPos,
|
|
269
|
+
AppMhGetMeshsInfor,
|
|
270
|
+
AppMhSetMeshVisible,
|
|
271
|
+
AppMhSetMeshColor,
|
|
272
|
+
AppMhSetMeshLabelVisible,
|
|
273
|
+
AppMhSetMeshLabelText,
|
|
274
|
+
AppMhSetMeshLabelTextColor,
|
|
275
|
+
AppMhSetMeshLabelTextFontSize,
|
|
276
|
+
AppMhSetMeshLabelTextFontFamily,
|
|
277
|
+
AppLgLegnedBackgroundColor,
|
|
278
|
+
AppLgLegnedHeight,
|
|
279
|
+
AppLgLegnedHeightMax,
|
|
280
|
+
AppMuMenuIcons,
|
|
281
|
+
AppMuMenuTooltips,
|
|
282
|
+
},
|
|
283
|
+
data: function() {
|
|
284
|
+
let cmps = [
|
|
285
|
+
{
|
|
286
|
+
name: 'basic',
|
|
287
|
+
cmps: [
|
|
288
|
+
{ name: 'size' },
|
|
289
|
+
{ name: 'backgroundColor' },
|
|
290
|
+
{ name: 'useAutoRotate' },
|
|
291
|
+
{ name: 'autoRotateDeg' },
|
|
292
|
+
{ name: 'uploadStl' },
|
|
293
|
+
],
|
|
294
|
+
},
|
|
295
|
+
{
|
|
296
|
+
name: 'camera',
|
|
297
|
+
cmps: [
|
|
298
|
+
{ name: 'cameraType' },
|
|
299
|
+
{ name: 'cameraFov' },
|
|
300
|
+
{ name: 'cameraNear' },
|
|
301
|
+
{ name: 'cameraFar' },
|
|
302
|
+
{ name: 'cameraOrthographicRatio' },
|
|
303
|
+
{ name: 'setCameraAzimuthAngle' },
|
|
304
|
+
{ name: 'setCameraPolarAngle' },
|
|
305
|
+
{ name: 'setCameraViewAngle' },
|
|
306
|
+
{ name: 'getCameraViewAngle' },
|
|
307
|
+
],
|
|
308
|
+
},
|
|
309
|
+
{
|
|
310
|
+
name: 'helperAxes',
|
|
311
|
+
cmps: [
|
|
312
|
+
{ name: 'useHelperAxes' },
|
|
313
|
+
{ name: 'helperAxesLengthRatio' },
|
|
314
|
+
],
|
|
315
|
+
},
|
|
316
|
+
{
|
|
317
|
+
name: 'helperGrid',
|
|
318
|
+
cmps: [
|
|
319
|
+
{ name: 'useHelperGrid' },
|
|
320
|
+
{ name: 'helperGridLengthRatio' },
|
|
321
|
+
{ name: 'helperGridDensity' },
|
|
322
|
+
{ name: 'helperGridPositionRatioZ' },
|
|
323
|
+
],
|
|
324
|
+
},
|
|
325
|
+
{
|
|
326
|
+
name: 'lightAmbient',
|
|
327
|
+
cmps: [
|
|
328
|
+
{ name: 'useLightAmbient' },
|
|
329
|
+
{ name: 'lightAmbientColor' },
|
|
330
|
+
],
|
|
331
|
+
},
|
|
332
|
+
{
|
|
333
|
+
name: 'lightPoint',
|
|
334
|
+
cmps: [
|
|
335
|
+
{ name: 'useLightPoint' },
|
|
336
|
+
{ name: 'lightPointPoss' },
|
|
337
|
+
{ name: 'lightPointColor' },
|
|
338
|
+
{ name: 'lightPointIntensity' },
|
|
339
|
+
{ name: 'lightPointDistance' },
|
|
340
|
+
{ name: 'lightPointDecay' },
|
|
341
|
+
],
|
|
342
|
+
},
|
|
343
|
+
{
|
|
344
|
+
name: 'lightDirection',
|
|
345
|
+
cmps: [
|
|
346
|
+
{ name: 'useLightDirection' },
|
|
347
|
+
{ name: 'lightDirectionColor' },
|
|
348
|
+
{ name: 'lightDirectionIntensity' },
|
|
349
|
+
{ name: 'lightDirectionPos' },
|
|
350
|
+
],
|
|
351
|
+
},
|
|
352
|
+
{
|
|
353
|
+
name: 'mesh',
|
|
354
|
+
cmps: [
|
|
355
|
+
{ name: 'getMeshsInfor' },
|
|
356
|
+
{ name: 'setMeshVisible' },
|
|
357
|
+
{ name: 'setMeshColor' },
|
|
358
|
+
{ name: 'setMeshLabelVisible' },
|
|
359
|
+
{ name: 'setMeshLabelText' },
|
|
360
|
+
{ name: 'setMeshLabelTextColor' },
|
|
361
|
+
{ name: 'setMeshLabelTextFontSize' },
|
|
362
|
+
{ name: 'setMeshLabelTextFontFamily' },
|
|
363
|
+
],
|
|
364
|
+
},
|
|
365
|
+
{
|
|
366
|
+
name: 'menu',
|
|
367
|
+
cmps: [
|
|
368
|
+
{ name: 'menuIcons' },
|
|
369
|
+
{ name: 'menuTooltips' },
|
|
370
|
+
],
|
|
371
|
+
},
|
|
372
|
+
{
|
|
373
|
+
name: 'legend',
|
|
374
|
+
cmps: [
|
|
375
|
+
{ name: 'legnedBackgroundColor' },
|
|
376
|
+
{ name: 'legnedHeight' },
|
|
377
|
+
{ name: 'legnedHeightMax' },
|
|
378
|
+
],
|
|
379
|
+
},
|
|
380
|
+
]
|
|
381
|
+
return {
|
|
382
|
+
|
|
383
|
+
cmpsL1: cmps,
|
|
384
|
+
indP1: null,
|
|
385
|
+
cmpP1: null,
|
|
386
|
+
|
|
387
|
+
cmpsL2: null,
|
|
388
|
+
indP2: null,
|
|
389
|
+
cmpP2: null,
|
|
390
|
+
|
|
391
|
+
cmpsL3: null,
|
|
392
|
+
indP3: null,
|
|
393
|
+
cmpP3: null,
|
|
394
|
+
|
|
395
|
+
cmpsL4: null,
|
|
396
|
+
|
|
397
|
+
cmpPick: '',
|
|
398
|
+
|
|
399
|
+
}
|
|
400
|
+
},
|
|
401
|
+
mounted: function() {
|
|
402
|
+
let vo = this
|
|
403
|
+
|
|
404
|
+
//default
|
|
405
|
+
vo.indP1 = 0
|
|
406
|
+
vo.indP2 = 0
|
|
407
|
+
vo.indP3 = 0
|
|
408
|
+
|
|
409
|
+
//urlParse, http://localhost:8080/?cmp=w-set-multi
|
|
410
|
+
let p = urlParse(location.href)
|
|
411
|
+
// console.log('p', p)
|
|
412
|
+
|
|
413
|
+
//viewPick
|
|
414
|
+
vo.viewPick(get(p, 'cmp', ''))
|
|
415
|
+
|
|
416
|
+
},
|
|
417
|
+
computed: {
|
|
418
|
+
|
|
419
|
+
changeMenus: function() {
|
|
420
|
+
let vo = this
|
|
421
|
+
vo.modifyMenus(vo.indP1, vo.indP2, vo.indP3)
|
|
422
|
+
return ''
|
|
423
|
+
},
|
|
424
|
+
|
|
425
|
+
isNarrow: function() {
|
|
426
|
+
return window.innerWidth < 1000
|
|
427
|
+
},
|
|
428
|
+
|
|
429
|
+
},
|
|
430
|
+
methods: {
|
|
431
|
+
|
|
432
|
+
modifyMenus: function() {
|
|
433
|
+
let vo = this
|
|
434
|
+
|
|
435
|
+
let cmpPick = ''
|
|
436
|
+
|
|
437
|
+
setTimeout(() => {
|
|
438
|
+
|
|
439
|
+
// console.log('call P1')
|
|
440
|
+
vo.cmpP1 = get(vo.cmpsL1, vo.indP1, {})
|
|
441
|
+
vo.cmpsL2 = get(vo.cmpP1, `cmps`, [])
|
|
442
|
+
let _cmpPick = get(vo.cmpP1, `name`, '')
|
|
443
|
+
if (_cmpPick) {
|
|
444
|
+
cmpPick = _cmpPick
|
|
445
|
+
}
|
|
446
|
+
// console.log('vo.cmpP1', cloneDeep(vo.cmpP1))
|
|
447
|
+
// console.log('vo.cmpsL2', cloneDeep(vo.cmpsL2))
|
|
448
|
+
|
|
449
|
+
}, 50)
|
|
450
|
+
|
|
451
|
+
setTimeout(() => {
|
|
452
|
+
|
|
453
|
+
// console.log('call P2')
|
|
454
|
+
let cmps = get(vo.cmpP1, `cmps`, [])
|
|
455
|
+
vo.cmpP2 = get(cmps, vo.indP2, {})
|
|
456
|
+
vo.cmpsL3 = get(vo.cmpP2, `cmps`, [])
|
|
457
|
+
let _cmpPick = get(vo.cmpP2, `name`, '')
|
|
458
|
+
if (_cmpPick) {
|
|
459
|
+
cmpPick = _cmpPick
|
|
460
|
+
}
|
|
461
|
+
// console.log('vo.cmpP2', cloneDeep(vo.cmpP2))
|
|
462
|
+
// console.log('vo.cmpsL3', cloneDeep(vo.cmpsL3))
|
|
463
|
+
|
|
464
|
+
}, 100)
|
|
465
|
+
|
|
466
|
+
setTimeout(() => {
|
|
467
|
+
|
|
468
|
+
// console.log('call P3')
|
|
469
|
+
let cmps = get(vo.cmpP2, `cmps`, [])
|
|
470
|
+
vo.cmpP3 = get(cmps, vo.indP3, {})
|
|
471
|
+
vo.cmpsL4 = get(vo.cmpP3, `cmps`, [])
|
|
472
|
+
let _cmpPick = get(vo.cmpP3, `name`, '')
|
|
473
|
+
if (_cmpPick) {
|
|
474
|
+
cmpPick = _cmpPick
|
|
475
|
+
}
|
|
476
|
+
// console.log('vo.cmpP3', cloneDeep(vo.cmpP3))
|
|
477
|
+
// console.log('vo.cmpsL4', cloneDeep(vo.cmpsL4))
|
|
478
|
+
|
|
479
|
+
//update
|
|
480
|
+
vo.cmpPick = cmpPick
|
|
481
|
+
// console.log('cmpPick', cmpPick)
|
|
482
|
+
|
|
483
|
+
}, 150)
|
|
484
|
+
|
|
485
|
+
},
|
|
486
|
+
|
|
487
|
+
getInd: function(item, items) {
|
|
488
|
+
// let vo = this
|
|
489
|
+
let ind = -1
|
|
490
|
+
each(items, (v, k) => {
|
|
491
|
+
if (item.name === v.name) {
|
|
492
|
+
ind = k
|
|
493
|
+
return false //跳出
|
|
494
|
+
}
|
|
495
|
+
})
|
|
496
|
+
return ind
|
|
497
|
+
},
|
|
498
|
+
|
|
499
|
+
viewPick: function(cmpPick) {
|
|
500
|
+
let vo = this
|
|
501
|
+
let _cmpPick = cmpPick
|
|
502
|
+
let r = ''
|
|
503
|
+
let rs = []
|
|
504
|
+
let ls = []
|
|
505
|
+
let pv = (ts) => {
|
|
506
|
+
each(ts, (v, k) => {
|
|
507
|
+
ls.push(k)
|
|
508
|
+
|
|
509
|
+
//name, _name
|
|
510
|
+
let name = get(v, `name`, '')
|
|
511
|
+
let _name = name
|
|
512
|
+
|
|
513
|
+
//cmps
|
|
514
|
+
let cmps = get(v, `cmps`, [])
|
|
515
|
+
|
|
516
|
+
//push
|
|
517
|
+
let cls = ls.join('.')
|
|
518
|
+
let b = _name === _cmpPick
|
|
519
|
+
rs.push({
|
|
520
|
+
cls,
|
|
521
|
+
name,
|
|
522
|
+
b,
|
|
523
|
+
})
|
|
524
|
+
|
|
525
|
+
//save
|
|
526
|
+
if (b) {
|
|
527
|
+
r = JSON.parse(JSON.stringify(ls))
|
|
528
|
+
}
|
|
529
|
+
|
|
530
|
+
//遞迴pv
|
|
531
|
+
if (cmps.length > 0) {
|
|
532
|
+
pv(cmps)
|
|
533
|
+
}
|
|
534
|
+
|
|
535
|
+
ls.pop()
|
|
536
|
+
})
|
|
537
|
+
}
|
|
538
|
+
pv(vo.cmpsL1)
|
|
539
|
+
// console.log('rs', rs)
|
|
540
|
+
// console.log('r', r)
|
|
541
|
+
vo.indP1 = get(r, 0, 0)
|
|
542
|
+
vo.indP2 = get(r, 1, 0)
|
|
543
|
+
vo.indP3 = get(r, 2, 0)
|
|
544
|
+
},
|
|
545
|
+
|
|
546
|
+
},
|
|
547
|
+
}
|
|
548
|
+
</script>
|
|
549
|
+
|
|
550
|
+
<style>
|
|
551
|
+
.item-link {
|
|
552
|
+
display: inline-block;
|
|
553
|
+
margin: 10px 10px 0px 0px;
|
|
554
|
+
padding: 5px 10px;
|
|
555
|
+
font-size: 0.8rem;
|
|
556
|
+
color: #fff;
|
|
557
|
+
background-color: #443a65;
|
|
558
|
+
cursor: pointer;
|
|
559
|
+
text-decoration: none;
|
|
560
|
+
}
|
|
561
|
+
.option-label {
|
|
562
|
+
position:absolute;
|
|
563
|
+
left:10px;
|
|
564
|
+
top:-33px;
|
|
565
|
+
padding:4px 20px 7px 20px;
|
|
566
|
+
border-left:1px solid #ddd;
|
|
567
|
+
border-top:1px solid #ddd;
|
|
568
|
+
border-right:1px solid #ddd;
|
|
569
|
+
border-bottom:1px solid #f6f6f6;
|
|
570
|
+
border-top-left-radius:15px;
|
|
571
|
+
border-top-right-radius:15px;
|
|
572
|
+
background:#f6f6f6;
|
|
573
|
+
}
|
|
574
|
+
</style>
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
|
|
4
|
+
<div style="padding:20px;">
|
|
5
|
+
<div style="font-size:1.5rem;">autoRotateDeg</div>
|
|
6
|
+
<a href="//yuda-lyu.github.io/w-threejs-vue/examples/ex-AppBasicAutoRotateDeg.html" target="_blank" class="item-link">example</a>
|
|
7
|
+
<a href="//github.com/yuda-lyu/w-threejs-vue/blob/master/docs/examples/ex-AppBasicAutoRotateDeg.html" target="_blank" class="item-link">code</a>
|
|
8
|
+
</div>
|
|
9
|
+
|
|
10
|
+
<div style="padding:0px 20px;">
|
|
11
|
+
|
|
12
|
+
<div style="display:flex; padding-bottom:40px; overflow-x:auto;">
|
|
13
|
+
|
|
14
|
+
<div style="position:relative;">
|
|
15
|
+
<div style="position:absolute; right:2px; top:1px; z-index:1;" v-if="!loading">
|
|
16
|
+
<button style="margin:0px 3px 3px 0px;" @click="setAutoRotateDeg(20)">set to 20</button>
|
|
17
|
+
<button style="margin:0px 3px 3px 0px;" @click="setAutoRotateDeg(-5)">set to -5</button>
|
|
18
|
+
</div>
|
|
19
|
+
<WThreejsVue
|
|
20
|
+
:opt="opt"
|
|
21
|
+
@init="loading=false"
|
|
22
|
+
></WThreejsVue>
|
|
23
|
+
</div>
|
|
24
|
+
|
|
25
|
+
<div style="padding-left:20px;">
|
|
26
|
+
|
|
27
|
+
<div :style="`border:1px solid #ddd; width:600px; min-width:600px; height:${opt.height}px; overflow-y:auto;`">
|
|
28
|
+
<div style="padding-left:5px;">
|
|
29
|
+
<div id="optjson" style="font-size:10pt;"></div>
|
|
30
|
+
</div>
|
|
31
|
+
</div>
|
|
32
|
+
|
|
33
|
+
</div>
|
|
34
|
+
|
|
35
|
+
</div>
|
|
36
|
+
|
|
37
|
+
</div>
|
|
38
|
+
|
|
39
|
+
</div>
|
|
40
|
+
</template>
|
|
41
|
+
|
|
42
|
+
<script>
|
|
43
|
+
import WThreejsVue from './components/WThreejsVue.vue'
|
|
44
|
+
import jv from 'w-jsonview-tree'
|
|
45
|
+
|
|
46
|
+
export default {
|
|
47
|
+
components: {
|
|
48
|
+
WThreejsVue,
|
|
49
|
+
},
|
|
50
|
+
data: function() {
|
|
51
|
+
return {
|
|
52
|
+
'loading': true,
|
|
53
|
+
'opt': {
|
|
54
|
+
width: 800,
|
|
55
|
+
height: 600,
|
|
56
|
+
items: [
|
|
57
|
+
{
|
|
58
|
+
url: 'https://cdn.jsdelivr.net/npm/w-demores@1.0.25/res/model/stl/3d_wheel-hub.stl',
|
|
59
|
+
name: 'Wheel Hub',
|
|
60
|
+
color: 'rgba(214, 92, 92, 0.9)',
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
url: 'https://cdn.jsdelivr.net/npm/w-demores@1.0.25/res/model/stl/3d_ushape-connector.stl',
|
|
64
|
+
name: 'Ushape Connector',
|
|
65
|
+
color: 'rgba(214, 214, 92, 0.9)',
|
|
66
|
+
},
|
|
67
|
+
],
|
|
68
|
+
useAutoRotate: true,
|
|
69
|
+
autoRotateDeg: -5,
|
|
70
|
+
},
|
|
71
|
+
'action': [
|
|
72
|
+
],
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
mounted: function() {
|
|
76
|
+
let vo = this
|
|
77
|
+
vo.showOptJson()
|
|
78
|
+
},
|
|
79
|
+
watch: {
|
|
80
|
+
opt: {
|
|
81
|
+
handler: function() {
|
|
82
|
+
let vo = this
|
|
83
|
+
vo.showOptJson()
|
|
84
|
+
},
|
|
85
|
+
deep: true,
|
|
86
|
+
},
|
|
87
|
+
},
|
|
88
|
+
methods: {
|
|
89
|
+
showOptJson: function() {
|
|
90
|
+
let vo = this
|
|
91
|
+
jv(vo.opt, document.querySelector('#optjson'), { expanded: true })
|
|
92
|
+
},
|
|
93
|
+
setAutoRotateDeg: function(r) {
|
|
94
|
+
let vo = this
|
|
95
|
+
vo.opt.autoRotateDeg = r
|
|
96
|
+
},
|
|
97
|
+
},
|
|
98
|
+
}
|
|
99
|
+
</script>
|
|
100
|
+
|
|
101
|
+
<style>
|
|
102
|
+
</style>
|