Fixed Camera clipping ears

Removed elytra animation
This commit is contained in:
James Harrison 2020-11-24 09:26:19 +00:00
parent 69ca56c344
commit 9c80caaa3c
3 changed files with 3 additions and 5 deletions

View File

@ -162,7 +162,6 @@ export const WalkingAnimation: Animation = (player, time) => {
// Always add an angle for cape around the x axis
const basicCapeRotationX = Math.PI * 0.06;
player.cape.rotation.x = Math.sin(time / 1.5) * 0.06 + basicCapeRotationX;
player.elytra.rotation.x = player.cape.rotation.x
};
export const RunningAnimation: Animation = (player, time) => {
@ -193,7 +192,6 @@ export const RunningAnimation: Animation = (player, time) => {
// to cape when running.
const basicCapeRotationX = Math.PI * 0.3;
player.cape.rotation.x = Math.sin(time * 2) * 0.1 + basicCapeRotationX;
player.elytra.rotation.x = player.cape.rotation.x
// What about head shaking?
// You shouldn't glance right and left when running dude :P

View File

@ -7,7 +7,7 @@ export function createOrbitControls(skinViewer: SkinViewer): OrbitControls {
// default configuration
control.enablePan = false;
control.target = new Vector3(0, -8, 0);
control.target = new Vector3(0, -7.5, 0);
control.minDistance = 10;
control.maxDistance = 256;
control.update();

View File

@ -92,7 +92,7 @@ class SkinViewer {
// Use smaller fov to avoid distortion
this.camera = new PerspectiveCamera(40);
this.camera.position.y = -8;
this.camera.position.z = 63;
this.camera.position.z = 64;
this.renderer = new WebGLRenderer({
canvas: this.canvas,
@ -108,7 +108,7 @@ class SkinViewer {
this.playerObject.cape.visible = false;
this.playerObject.ears.visible = false;
this.scene.add(this.playerObject);
``
if (options.skin !== undefined) {
this.loadSkin(options.skin);
}