parent
69ca56c344
commit
9c80caaa3c
|
@ -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
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue