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
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
|
|
4
|
+
<div style="padding:20px;">
|
|
5
|
+
<div style="font-size:1.5rem;">setCameraViewAngle</div>
|
|
6
|
+
<a href="//yuda-lyu.github.io/w-threejs-vue/examples/ex-AppCmSetCameraViewAngle.html" target="_blank" class="item-link">example</a>
|
|
7
|
+
<a href="//github.com/yuda-lyu/w-threejs-vue/blob/master/docs/examples/ex-AppCmSetCameraViewAngle.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="setCameraViewAngle(0,0)">set (0,0) for x-y plane</button>
|
|
17
|
+
<button style="margin:0px 3px 3px 0px;" @click="setCameraViewAngle(0,90)">set (0,90) for x-z plane</button>
|
|
18
|
+
<button style="margin:0px 3px 3px 0px;" @click="setCameraViewAngle(90,90)">set (90,90) for y-z plane</button>
|
|
19
|
+
</div>
|
|
20
|
+
<WThreejsVue
|
|
21
|
+
ref="thr"
|
|
22
|
+
:opt="opt"
|
|
23
|
+
@init="loading=false"
|
|
24
|
+
></WThreejsVue>
|
|
25
|
+
</div>
|
|
26
|
+
|
|
27
|
+
<div style="padding-left:20px;">
|
|
28
|
+
|
|
29
|
+
<div :style="`border:1px solid #ddd; width:600px; min-width:600px; height:${opt.height}px; overflow-y:auto;`">
|
|
30
|
+
<div style="padding-left:5px;">
|
|
31
|
+
<div id="optjson" style="font-size:10pt;"></div>
|
|
32
|
+
</div>
|
|
33
|
+
</div>
|
|
34
|
+
|
|
35
|
+
</div>
|
|
36
|
+
|
|
37
|
+
</div>
|
|
38
|
+
|
|
39
|
+
</div>
|
|
40
|
+
|
|
41
|
+
</div>
|
|
42
|
+
</template>
|
|
43
|
+
|
|
44
|
+
<script>
|
|
45
|
+
import WThreejsVue from './components/WThreejsVue.vue'
|
|
46
|
+
import jv from 'w-jsonview-tree'
|
|
47
|
+
|
|
48
|
+
export default {
|
|
49
|
+
components: {
|
|
50
|
+
WThreejsVue,
|
|
51
|
+
},
|
|
52
|
+
data: function() {
|
|
53
|
+
return {
|
|
54
|
+
'loading': true,
|
|
55
|
+
'opt': {
|
|
56
|
+
width: 800,
|
|
57
|
+
height: 600,
|
|
58
|
+
items: [
|
|
59
|
+
{
|
|
60
|
+
url: 'https://cdn.jsdelivr.net/npm/w-demores@1.0.25/res/model/stl/3d_wheel-hub.stl',
|
|
61
|
+
name: 'Wheel Hub',
|
|
62
|
+
color: 'rgba(214, 92, 92, 0.9)',
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
url: 'https://cdn.jsdelivr.net/npm/w-demores@1.0.25/res/model/stl/3d_ushape-connector.stl',
|
|
66
|
+
name: 'Ushape Connector',
|
|
67
|
+
color: 'rgba(214, 214, 92, 0.9)',
|
|
68
|
+
},
|
|
69
|
+
],
|
|
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
|
+
setCameraViewAngle: function(az, polar) {
|
|
94
|
+
let vo = this
|
|
95
|
+
try {
|
|
96
|
+
vo.$refs.thr.getInst().setCameraViewAngle(az, polar)
|
|
97
|
+
}
|
|
98
|
+
catch (err) {}
|
|
99
|
+
},
|
|
100
|
+
},
|
|
101
|
+
}
|
|
102
|
+
</script>
|
|
103
|
+
|
|
104
|
+
<style>
|
|
105
|
+
</style>
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
|
|
4
|
+
<div style="padding:20px;">
|
|
5
|
+
<div style="font-size:1.5rem;">helperAxesLengthRatio</div>
|
|
6
|
+
<a href="//yuda-lyu.github.io/w-threejs-vue/examples/ex-AppHpHelperAxesLengthRatio.html" target="_blank" class="item-link">example</a>
|
|
7
|
+
<a href="//github.com/yuda-lyu/w-threejs-vue/blob/master/docs/examples/ex-AppHpHelperAxesLengthRatio.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="setHelperAxesLengthRatio(1)">set to 1</button>
|
|
17
|
+
<button style="margin:0px 3px 3px 0px;" @click="setHelperAxesLengthRatio(1.6)">set to 1.6</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
|
+
helperAxesLengthRatio: 1.6,
|
|
69
|
+
},
|
|
70
|
+
'action': [
|
|
71
|
+
],
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
mounted: function() {
|
|
75
|
+
let vo = this
|
|
76
|
+
vo.showOptJson()
|
|
77
|
+
},
|
|
78
|
+
watch: {
|
|
79
|
+
opt: {
|
|
80
|
+
handler: function() {
|
|
81
|
+
let vo = this
|
|
82
|
+
vo.showOptJson()
|
|
83
|
+
},
|
|
84
|
+
deep: true,
|
|
85
|
+
},
|
|
86
|
+
},
|
|
87
|
+
methods: {
|
|
88
|
+
showOptJson: function() {
|
|
89
|
+
let vo = this
|
|
90
|
+
jv(vo.opt, document.querySelector('#optjson'), { expanded: true })
|
|
91
|
+
},
|
|
92
|
+
setHelperAxesLengthRatio: function(r) {
|
|
93
|
+
let vo = this
|
|
94
|
+
vo.opt.helperAxesLengthRatio = r
|
|
95
|
+
},
|
|
96
|
+
},
|
|
97
|
+
}
|
|
98
|
+
</script>
|
|
99
|
+
|
|
100
|
+
<style>
|
|
101
|
+
</style>
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
|
|
4
|
+
<div style="padding:20px;">
|
|
5
|
+
<div style="font-size:1.5rem;">helperGridDensity</div>
|
|
6
|
+
<a href="//yuda-lyu.github.io/w-threejs-vue/examples/ex-AppHpHelperGridDensity.html" target="_blank" class="item-link">example</a>
|
|
7
|
+
<a href="//github.com/yuda-lyu/w-threejs-vue/blob/master/docs/examples/ex-AppHpHelperGridDensity.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="setHelperGridDensity(50)">set to 50</button>
|
|
17
|
+
<button style="margin:0px 3px 3px 0px;" @click="setHelperGridDensity(100)">set to 100</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
|
+
helperGridDensity: 100,
|
|
69
|
+
},
|
|
70
|
+
'action': [
|
|
71
|
+
],
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
mounted: function() {
|
|
75
|
+
let vo = this
|
|
76
|
+
vo.showOptJson()
|
|
77
|
+
},
|
|
78
|
+
watch: {
|
|
79
|
+
opt: {
|
|
80
|
+
handler: function() {
|
|
81
|
+
let vo = this
|
|
82
|
+
vo.showOptJson()
|
|
83
|
+
},
|
|
84
|
+
deep: true,
|
|
85
|
+
},
|
|
86
|
+
},
|
|
87
|
+
methods: {
|
|
88
|
+
showOptJson: function() {
|
|
89
|
+
let vo = this
|
|
90
|
+
jv(vo.opt, document.querySelector('#optjson'), { expanded: true })
|
|
91
|
+
},
|
|
92
|
+
setHelperGridDensity: function(r) {
|
|
93
|
+
let vo = this
|
|
94
|
+
vo.opt.helperGridDensity = r
|
|
95
|
+
},
|
|
96
|
+
},
|
|
97
|
+
}
|
|
98
|
+
</script>
|
|
99
|
+
|
|
100
|
+
<style>
|
|
101
|
+
</style>
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
|
|
4
|
+
<div style="padding:20px;">
|
|
5
|
+
<div style="font-size:1.5rem;">helperGridLengthRatio</div>
|
|
6
|
+
<a href="//yuda-lyu.github.io/w-threejs-vue/examples/ex-AppHpHelperGridLengthRatio.html" target="_blank" class="item-link">example</a>
|
|
7
|
+
<a href="//github.com/yuda-lyu/w-threejs-vue/blob/master/docs/examples/ex-AppHpHelperGridLengthRatio.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="setHelperGridLengthRatio(5)">set to 5</button>
|
|
17
|
+
<button style="margin:0px 3px 3px 0px;" @click="setHelperGridLengthRatio(10)">set to 10</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
|
+
helperGridLengthRatio: 10,
|
|
69
|
+
},
|
|
70
|
+
'action': [
|
|
71
|
+
],
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
mounted: function() {
|
|
75
|
+
let vo = this
|
|
76
|
+
vo.showOptJson()
|
|
77
|
+
},
|
|
78
|
+
watch: {
|
|
79
|
+
opt: {
|
|
80
|
+
handler: function() {
|
|
81
|
+
let vo = this
|
|
82
|
+
vo.showOptJson()
|
|
83
|
+
},
|
|
84
|
+
deep: true,
|
|
85
|
+
},
|
|
86
|
+
},
|
|
87
|
+
methods: {
|
|
88
|
+
showOptJson: function() {
|
|
89
|
+
let vo = this
|
|
90
|
+
jv(vo.opt, document.querySelector('#optjson'), { expanded: true })
|
|
91
|
+
},
|
|
92
|
+
setHelperGridLengthRatio: function(r) {
|
|
93
|
+
let vo = this
|
|
94
|
+
vo.opt.helperGridLengthRatio = r
|
|
95
|
+
},
|
|
96
|
+
},
|
|
97
|
+
}
|
|
98
|
+
</script>
|
|
99
|
+
|
|
100
|
+
<style>
|
|
101
|
+
</style>
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
|
|
4
|
+
<div style="padding:20px;">
|
|
5
|
+
<div style="font-size:1.5rem;">helperGridPositionRatioZ</div>
|
|
6
|
+
<a href="//yuda-lyu.github.io/w-threejs-vue/examples/ex-AppHpHelperGridPositionRatioZ.html" target="_blank" class="item-link">example</a>
|
|
7
|
+
<a href="//github.com/yuda-lyu/w-threejs-vue/blob/master/docs/examples/ex-AppHpHelperGridPositionRatioZ.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="setHelperGridPositionRatioZ(-1)">set to -1</button>
|
|
17
|
+
<button style="margin:0px 3px 3px 0px;" @click="setHelperGridPositionRatioZ(-0.3)">set to -0.3</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
|
+
helperGridPositionRatioZ: -0.3,
|
|
69
|
+
},
|
|
70
|
+
'action': [
|
|
71
|
+
],
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
mounted: function() {
|
|
75
|
+
let vo = this
|
|
76
|
+
vo.showOptJson()
|
|
77
|
+
},
|
|
78
|
+
watch: {
|
|
79
|
+
opt: {
|
|
80
|
+
handler: function() {
|
|
81
|
+
let vo = this
|
|
82
|
+
vo.showOptJson()
|
|
83
|
+
},
|
|
84
|
+
deep: true,
|
|
85
|
+
},
|
|
86
|
+
},
|
|
87
|
+
methods: {
|
|
88
|
+
showOptJson: function() {
|
|
89
|
+
let vo = this
|
|
90
|
+
jv(vo.opt, document.querySelector('#optjson'), { expanded: true })
|
|
91
|
+
},
|
|
92
|
+
setHelperGridPositionRatioZ: function(r) {
|
|
93
|
+
let vo = this
|
|
94
|
+
vo.opt.helperGridPositionRatioZ = r
|
|
95
|
+
},
|
|
96
|
+
},
|
|
97
|
+
}
|
|
98
|
+
</script>
|
|
99
|
+
|
|
100
|
+
<style>
|
|
101
|
+
</style>
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
|
|
4
|
+
<div style="padding:20px;">
|
|
5
|
+
<div style="font-size:1.5rem;">useHelperAxes</div>
|
|
6
|
+
<a href="//yuda-lyu.github.io/w-threejs-vue/examples/ex-AppHpUseHelperAxes.html" target="_blank" class="item-link">example</a>
|
|
7
|
+
<a href="//github.com/yuda-lyu/w-threejs-vue/blob/master/docs/examples/ex-AppHpUseHelperAxes.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="setUseHelperAxes(true)">show</button>
|
|
17
|
+
<button style="margin:0px 3px 3px 0px;" @click="setUseHelperAxes(false)">hide</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
|
+
useHelperAxes: false,
|
|
69
|
+
},
|
|
70
|
+
'action': [
|
|
71
|
+
],
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
mounted: function() {
|
|
75
|
+
let vo = this
|
|
76
|
+
vo.showOptJson()
|
|
77
|
+
},
|
|
78
|
+
watch: {
|
|
79
|
+
opt: {
|
|
80
|
+
handler: function() {
|
|
81
|
+
let vo = this
|
|
82
|
+
vo.showOptJson()
|
|
83
|
+
},
|
|
84
|
+
deep: true,
|
|
85
|
+
},
|
|
86
|
+
},
|
|
87
|
+
methods: {
|
|
88
|
+
showOptJson: function() {
|
|
89
|
+
let vo = this
|
|
90
|
+
jv(vo.opt, document.querySelector('#optjson'), { expanded: true })
|
|
91
|
+
},
|
|
92
|
+
setUseHelperAxes: function(b) {
|
|
93
|
+
let vo = this
|
|
94
|
+
vo.opt.useHelperAxes = b
|
|
95
|
+
},
|
|
96
|
+
},
|
|
97
|
+
}
|
|
98
|
+
</script>
|
|
99
|
+
|
|
100
|
+
<style>
|
|
101
|
+
</style>
|