update
This commit is contained in:
parent
e74e8643b6
commit
62615a6e07
|
|
@ -108,7 +108,7 @@
|
|||
|
||||
<div>
|
||||
<h4>Skin</h4>
|
||||
<select id="skin_url" onchange="hotReloadTextures()">
|
||||
<select id="skin_url" onchange="reloadTextures()">
|
||||
<option value="img/1_8_texturemap_redux.png">Texture Map (64x64)</option>
|
||||
<option value="img/Hacksore.png">Hacksore (64x32)</option>
|
||||
<option value="img/haka.png">Haka (64x64)</option>
|
||||
|
|
@ -119,7 +119,7 @@
|
|||
</div>
|
||||
<div>
|
||||
<h4>Cape</h4>
|
||||
<select id="cape_url" onchange="hotReloadTextures()">
|
||||
<select id="cape_url" onchange="reloadTextures()">
|
||||
<option value="">None</option>
|
||||
<option value="img/cape.png">Mojang Legacy</option>
|
||||
<option value="img/mojang_cape.png">Mojang</option>
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
0118d38a645a1f057358d2928a447219e3e97417
|
||||
34e2a3f24344c05cd33d974bffcdf118b0d66772
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -18,13 +18,11 @@ function initSkinViewer() {
|
|||
// Reset animation speed
|
||||
el('speed').value = globalAnimationSpeed = 1;
|
||||
|
||||
skinViewer = new skinview3d.SkinViewer({
|
||||
domElement: el("skin_container"),
|
||||
skinViewer = new skinview3d.SkinViewer(el("skin_container"), {
|
||||
width: el('width').value,
|
||||
height: el('height').value,
|
||||
skinUrl: el('skin_url').value,
|
||||
capeUrl: el('cape_url').value || null
|
||||
height: el('height').value
|
||||
});
|
||||
reloadTextures();
|
||||
|
||||
skinViewer.camera.position.z = 70;
|
||||
|
||||
|
|
@ -50,20 +48,11 @@ function initSkinViewer() {
|
|||
|
||||
}
|
||||
|
||||
function hotReloadTextures() {
|
||||
var capeObject = skinViewer.playerObject.cape;
|
||||
var capeUrl = el('cape_url').value;
|
||||
function reloadTextures() {
|
||||
var skinUrl = el('skin_url').value;
|
||||
|
||||
// I've noted there is not a good way to set the cape to null
|
||||
// so we hide it as work around but need to raise an issue
|
||||
if (capeUrl === "") {
|
||||
capeObject.visible = false;
|
||||
} else {
|
||||
skinViewer.capeUrl = capeUrl;
|
||||
}
|
||||
|
||||
skinViewer.skinUrl = skinUrl;
|
||||
var capeUrl = el('cape_url').value;
|
||||
skinViewer.loadSkin(skinUrl === "" ? null : skinUrl);
|
||||
skinViewer.loadCape(capeUrl === "" ? null : capeUrl);
|
||||
}
|
||||
|
||||
function resizeSkinViewer() {
|
||||
|
|
|
|||
Loading…
Reference in New Issue