Skip to content

Commit 423be53

Browse files
committed
[update]
1 parent 7f3f985 commit 423be53

File tree

2 files changed

+60
-48
lines changed

2 files changed

+60
-48
lines changed

src/components/sections/GaussianSplats3D.vue

Lines changed: 33 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -43,22 +43,45 @@ onMounted(() => {
4343
<a href="https://github.com/mkkellogg/GaussianSplats3D" target="_blank">GaussianSplats3D</a>,
4444
we can visualize 3DGS models here.
4545
</p>
46-
<el-row justify="center">
47-
<el-col :xs="20" :sm="24" >
48-
<div id="gs"></div>
49-
</el-col>
50-
</el-row>
51-
46+
<el-col :xs="16" :sm="21" style="margin: 0px auto;">
47+
<div id="gs" class="gs-container"></div>
48+
</el-col>
5249
</el-col>
5350
</el-row>
5451
</div>
5552
</template>
5653

5754

58-
<style scoped>
55+
<style>
5956
60-
#gs {
61-
height: 350px;
57+
.gs-container {
58+
width: 100%;
59+
aspect-ratio: 16 / 9;
6260
}
6361
64-
</style>
62+
.spinnerPrimary0 {
63+
display: none !important;
64+
}
65+
66+
.spinnerOuterContainer0 {
67+
height: 100% !important;
68+
margin: 0 auto !important;
69+
top: 0 !important;
70+
left: 0 !important;
71+
}
72+
73+
.spinnerContainerPrimary0 {
74+
padding-top: 0% !important;
75+
position: relative !important;
76+
transform: none !important;
77+
width: fit-content !important;
78+
margin: 0 auto !important;
79+
left: 0 !important;
80+
padding: 10px 20px !important;
81+
}
82+
83+
.messageContainerPrimary0 {
84+
padding-top: 0% !important;
85+
}
86+
87+
</style>
Lines changed: 27 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,6 @@
11
<script lang="ts" setup>
22
import { vue3dLoader } from "vue-3d-loader";
3-
import { ref } from "vue";
4-
const filePath = ref();
5-
filePath.value = [
6-
"./model3d/fbx/Samba Dancing.fbx",
7-
"./model3d/collada/pump/pump.dae",
8-
"./model3d/ply/Lucy100k.ply",
9-
];
10-
const position = ref();
11-
position.value = [
12-
{ x: 100, y: 100, z: 100 },
13-
{ x: 300, y: 300, z: 300 },
14-
];
15-
const rotation = ref();
16-
rotation.value = [
17-
{ x: 0, y: 0, z: 0 },
18-
{ x: 10, y: 1, z: 1 },
19-
];
20-
const scale = ref();
21-
scale.value = [
22-
{ x: 5, y: 5, z: 5 },
23-
{ x: 3, y: 3, z: 3 },
24-
];
3+
254
</script>
265

276
<template>
@@ -39,26 +18,32 @@ scale.value = [
3918
<a href="https://github.com/king2088/vue-3d-loader" target="_blank">vue-3d-loader</a>,
4019
we can visualize these 3D models here. It supports dae, fbx, gltf(glb), obj, ply, stl models.
4120
</p>
42-
<el-row justify="center">
43-
<el-col :xs="20" :sm="12" >
44-
<vue3dLoader
45-
filePath="./model3d/collada/stormtrooper/stormtrooper.dae"
46-
:cameraPosition="{ x: -8, y: 10, z: -10 }"
47-
:height="350"
21+
<el-row justify="space-evenly">
22+
<el-col :xs="16" :sm="10" >
23+
<div class="threed-container">
24+
<vue3dLoader
25+
filePath="./model3d/obj/male02.obj"
26+
mtlPath="./model3d/obj/male02.mtl"
27+
outputEncoding="sRGB"
28+
:cameraPosition="{ x: 0, y: 0, z: 300 }"
29+
:scale="{ x: 1, y: 1, z: 1 }"
30+
:position="{ x: 0, y: 0, z: 0 }"
31+
:rotation="{ x: 0, y: 0, z: 0 }"
4832
:enableDamping="true"
4933
:dampingFactor="0.05"
50-
:backgroundColor="0xccddff"
34+
:backgroundColor="'#f2f2f2'"
5135
/>
36+
</div>
5237
</el-col>
53-
<el-col :xs="20" :sm="12" >
38+
<el-col :xs="16" :sm="10" >
5439
<vue3dLoader
55-
:filePath="filePath"
56-
:scale="scale"
57-
:position="position"
58-
:rotation="rotation"
40+
filePath="./model3d/ply/Lucy100k.ply"
5941
:cameraPosition="{ x: 100, y: 200, z: 3000 }"
60-
:parallelLoad="true"
61-
:height="350"
42+
:scale="{ x: 1, y: 1, z: 1 }"
43+
:position="{ x: 100, y: 100, z: 100 }"
44+
:rotation="{ x: 0, y: 3, z: 0 }"
45+
:enableDamping="true"
46+
:dampingFactor="0.05"
6247
:backgroundColor="0xeeeeee"
6348
></vue3dLoader>
6449
</el-col>
@@ -70,6 +55,10 @@ scale.value = [
7055
</div>
7156
</template>
7257

73-
<style scoped>
74-
58+
<style>
59+
.viewer-canvas {
60+
width: 100% !important;
61+
height: auto !important;
62+
aspect-ratio: 1 / 1 !important;
63+
}
7564
</style>

0 commit comments

Comments
 (0)