Skip to content

Commit

Permalink
Merge pull request #16 from muonlineph/lowres-textures
Browse files Browse the repository at this point in the history
Use low-resolution textures
  • Loading branch information
weaponsforge authored Feb 23, 2022
2 parents e34850e + 4822dd4 commit df81fc6
Show file tree
Hide file tree
Showing 8 changed files with 10,598 additions and 26,949 deletions.
49 changes: 46 additions & 3 deletions public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,43 @@
.selection {
display: block;
}

.spinner {
display: inline-block;
position: relative;
width: 80px;
height: 80px;
}
.spinner div {
display: inline-block;
position: absolute;
left: 8px;
width: 16px;
background: #dfc;
animation: spin 1.2s cubic-bezier(0, 0.5, 0.5, 1) infinite;
}
.spinner div:nth-child(1) {
left: 8px;
animation-delay: -0.24s;
}
.spinner div:nth-child(2) {
left: 32px;
animation-delay: -0.12s;
}
.spinner div:nth-child(3) {
left: 56px;
animation-delay: 0;
}
@keyframes spin {
0% {
top: 8px;
height: 64px;
}
50%, 100% {
top: 24px;
height: 32px;
}
}
</style>
<script src="js/three.min.js" type="text/javascript"></script>
<script src="js/DDSLoader.js" type="text/javascript"></script>
Expand All @@ -58,7 +95,9 @@
loadModel('objects/gunblade-lowres/', 'gunblade.mtl', 'gunblade.obj', {
scale: { x: 3, y: 3, z: 3 }
}),
loadModel('objects/wolfsgravestone/', 'wolfsgravestone.mtl', 'wolfsgravestone.obj'),
loadModel('objects/wolfsgravestone/', 'wolfsgravestone.mtl', 'wolfsgravestone.obj', {
scale: { x: 128, y: 128, z: 128 }
}),
loadModel('objects/mistsplitter/', 'mistsplitter.mtl', 'mistsplitter.obj', {
scale: { x: 2, y: 2, z: 2 }
}),
Expand All @@ -74,14 +113,15 @@
weapons.wgs = response[5]
weapons.mist = response[6]
weapons.rsword = response[7]
document.querySelector('.spinner').style.display = 'none'
})

// Set 3d model attribution
Object.keys(weapons).forEach((item) => {
attribution[item] = ''
switch (item) {
case 'wgs':
attribution.wgs = '"Genshin Impact Wolf\'s Gravestone" (https://skfb.ly/6ZvA8) by Le Ryan is licensed under Creative Commons Attribution (http://creativecommons.org/licenses/by/4.0/).'
attribution.wgs = '"Genshin Impact Wolf\'s Gravestone" 3D model rip by Ailephi.'
break
case 'gb':
attribution.gb = '"Gunblade from FFVIII" (https://skfb.ly/6YZp8) by nikexz is licensed under Creative Commons Attribution (http://creativecommons.org/licenses/by/4.0/).'
Expand Down Expand Up @@ -126,7 +166,10 @@ <h1>Weapons</h1>
<input type="radio" id="rsword" name="weapon" value="rsword" onclick="change('rsword')"/> Raiden's Sword

<!-- Attribution/credits -->
<div id="attribution">
<div id="attribution"></div>

<div class="spinner">
<div></div><div></div><div></div>
</div>
</div>

Expand Down
Binary file modified public/objects/gunblade-lowres/phong1_Base_Color.tga.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified public/objects/raidensword/Material1_baseColor.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
13 changes: 2 additions & 11 deletions public/objects/wolfsgravestone/wolfsgravestone.mtl
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,11 @@
# wolfsgravestone.mtl
#

newmtl bottom_base
newmtl Material01
illum 2
Kd 0.800000 0.800000 0.800000
Ka 0.200000 0.200000 0.200000
Ks 0.000000 0.000000 0.000000
Ke 0.000000 0.000000 0.000000
Ns 0.000000
map_Kd wgs_bottom_base_color.png

newmtl top_base
illum 2
Kd 0.800000 0.800000 0.800000
Ka 0.200000 0.200000 0.200000
Ks 0.000000 0.000000 0.000000
Ke 0.000000 0.000000 0.000000
Ns 0.000000
map_Kd wgs_top_base_color.png
map_Kd wolfsgravestone.png
Loading

0 comments on commit df81fc6

Please sign in to comment.