Skip to content

Commit

Permalink
new splats
Browse files Browse the repository at this point in the history
  • Loading branch information
chritoto committed Feb 16, 2024
1 parent 8c243cc commit 54305f0
Show file tree
Hide file tree
Showing 7 changed files with 35 additions and 7 deletions.
Binary file modified .DS_Store
Binary file not shown.
Binary file added splats/algues_mod.ply
Binary file not shown.
Binary file added splats/groupe_mod.ply
Binary file not shown.
42 changes: 35 additions & 7 deletions splats/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
if (document.getElementById('G2').getAttribute('visible') == true) {
gaussian = "G2"
}
if (document.getElementById('G3').getAttribute('visible') == true) {
gaussian = "G3"
}
console.log(eventData.key.toUpperCase());
if (eventData.key.toUpperCase() == "L")
{
Expand Down Expand Up @@ -72,19 +75,29 @@
}

if (eventData.key.toUpperCase() == "1")
{2
{
document.getElementById('master').setAttribute('scene', '1');
document.getElementById('G2').setAttribute('visible', 'false');
document.getElementById('G1').setAttribute('visible', 'true');
document.getElementById('G3').setAttribute('visible', 'false');
document.getElementById('sky').setAttribute('src', '#sky1');
}
if (eventData.key.toUpperCase() == "2")
else if (eventData.key.toUpperCase() == "2")
{
document.getElementById('master').setAttribute('scene', '2');
document.getElementById('G1').setAttribute('visible', 'false');
document.getElementById('G2').setAttribute('visible', 'true');
document.getElementById('G3').setAttribute('visible', 'false');
document.getElementById('sky').setAttribute('src', '#sky2');
}
else if (eventData.key.toUpperCase() == "3")
{
document.getElementById('master').setAttribute('scene', '3');
document.getElementById('G1').setAttribute('visible', 'false');
document.getElementById('G2').setAttribute('visible', 'false');
document.getElementById('G3').setAttribute('visible', 'true');
document.getElementById('sky').setAttribute('src', '#sky3');
}
}
);

Expand All @@ -98,12 +111,21 @@
document.getElementById('master').setAttribute('scene', '2');
document.getElementById('G1').setAttribute('visible', 'false');
document.getElementById('G2').setAttribute('visible', 'true');
document.getElementById('G3').setAttribute('visible', 'false');
document.getElementById('sky').setAttribute('src', '#sky2');
}
if (scene == "2") {
else if (scene == "2") {
document.getElementById('master').setAttribute('scene', '3');
document.getElementById('G2').setAttribute('visible', 'false');
document.getElementById('G1').setAttribute('visible', 'false');
document.getElementById('G3').setAttribute('visible', 'true');
document.getElementById('sky').setAttribute('src', '#sky3');
}
else if (scene == "3") {
document.getElementById('master').setAttribute('scene', '1');
document.getElementById('G2').setAttribute('visible', 'false');
document.getElementById('G1').setAttribute('visible', 'true');
document.getElementById('G3').setAttribute('visible', 'false');
document.getElementById('sky').setAttribute('src', '#sky1');
}
}
Expand All @@ -115,16 +137,22 @@
<a-assets>
<img id="sky1" src="sky1_mod.png">
<img id="sky2" src="sky2_mod.png">
<img id="sky3" src="sky3_mod.png">
<img id="sky4" src="sky4_mod.png">
<img id="sky5" src="sky5_mod.png">
<img id="sky6" src="sky6_mod.png">
</a-assets>
<a-sky id="sky" src="#sky1"></a-sky>
<a-entity camera="active: true" look-controls position="0 1.6 0" ></a-entity>
<a-entity position="0 0 0" >
<!-- <a-sphere position="0 0 0" radius="41" color="#EF2D5E"></a-sphere>
<a-box color="tomato" depth="2" height="0.1" width="10"></a-box> -->
<!-- <a-sphere position="0 0 0" radius="41" color="#EF2D5E"></a-sphere> -->
<!-- <a-box color="tomato" depth="2" height="0.1" width="10"></a-box> -->
</a-entity>
<!--<a-entity gaussian_splatting="src: https://huggingface.co/cakewalk/splat-data/resolve/main/train.splat;" rotation="0 0 0" position="0 1.5 -2"></a-entity>-->
<a-entity id="G1" gaussian_splatting="src: topo_mod.ply;" rotation="0 0 0" position="-3.4 2.3 1.8" scale="48 48 48"></a-entity>
<a-entity id="G2" gaussian_splatting="src: G2_mod.ply;" rotation="0 0 0" position="-1.1 -1 -2.2" scale="10 10 10" visible="false"></a-entity>
<!-- <a-entity id="G1" gaussian_splatting="src: topo_mod.ply;" rotation="0 0 0" position="-3.4 2.3 1.8" scale="48 48 48"></a-entity> -->
<a-entity id="G2" gaussian_splatting="src: penguin_mod.ply;" rotation="0 0 0" position="1 -2.2 -2.1" scale="22 22 22" visible="false"></a-entity>
<a-entity id="G3" gaussian_splatting="src: algues_mod.ply;" rotation="0 0 0" position="2.2 -0.3 3.1" scale="10.2 10.2 10.2" visible="false"></a-entity>
<a-entity id="G1" gaussian_splatting="src: groupe_mod.ply;" rotation="0 0 0" position="1.2 0.8 1.3" scale="1 1 1" visible="true"></a-entity>
</a-scene>

</body>
Expand Down
Binary file added splats/penguin_mod.ply
Binary file not shown.
File renamed without changes
Binary file modified splats/topo_mod.ply
Binary file not shown.

0 comments on commit 54305f0

Please sign in to comment.