Skip to content

Commit

Permalink
clean.
Browse files Browse the repository at this point in the history
  • Loading branch information
gonnavis committed May 29, 2022
1 parent 9385a58 commit 583528f
Show file tree
Hide file tree
Showing 8 changed files with 2 additions and 143 deletions.
3 changes: 1 addition & 2 deletions ai/lore/lore-model.js
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
// export * from '../../lore/lore-model.js';
export * from 'http://localhost/lib/webaverse_resource/lore/lore-model.js';
export * from '../../lore/lore-model.js';
1 change: 0 additions & 1 deletion avatars/animationHelpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,6 @@ async function loadAnimations() {
for (const animation of animations) {
animations.index[animation.name] = animation;
}
window.animations = animations;

/* const animationIndices = animationStepIndices.find(i => i.name === 'Fast Run.fbx');
for (let i = 0; i < animationIndices.leftFootYDeltas.length; i++) {
Expand Down
71 changes: 0 additions & 71 deletions avatars/avatars.js
Original file line number Diff line number Diff line change
Expand Up @@ -1902,77 +1902,6 @@ class Avatar {


_updateHmdPosition();
if (this === window.localPlayer.avatar) {
/*
${window.logNum(localPlayer.characterPhysics.velocity.length())}
*/
window.domInfo.innerHTML = `
<div style="display:;">actions: --- ${localPlayer.getActionsArray().map(n=>n.type)}</div>
<div style="display:;">idleWalkFactor: --- ${window.logNum(moveFactors.idleWalkFactor)}</div>
<div style="display:;">pickUpState: --- ${this.pickUpState}</div>
<div style="display:;">holdState: --- ${this.holdState}</div>
<div style="display:;">---</div>
<div style="display:;">keysDirection: --- ${window.logVector3(window.ioManager?.keysDirection)}</div>
<div style="display:;">velocity: --- ${window.logVector3(localPlayer.characterPhysics.velocity)} of characterPhysics ( correct )</div>
<div style="display:;">velocity: --- ${window.logVector3(this.velocity)} of avatar</div>
<div style="display:;">currentPosition: --- ${window.logVector3(this.inputs.hmd.position)}</div>
<div style="display:;">currentQuaternion: --- ${window.logVector4(this.inputs.hmd.quaternion)}</div>
<div style="display:;">localPlayer.quate: --- ${window.logVector4(localPlayer.quaternion)}</div>
<div style="display:;">avatar.direction: --- ${window.logVector3(this.direction)}</div>
<div style="display:;">---</div>
<div style="display:;">localPlayer.direction: --- ${window.logVector3(localPlayer.getWorldDirection(localVector))}</div>
<div style="display:;">angle: --- ${window.logNum(this.getAngle())}</div>
<div style="display:;">idleWalkFactor: --- ${moveFactors.idleWalkFactor.toFixed(2)}</div>
<div style="display:;">walkRunFactor: --- ${moveFactors.walkRunFactor.toFixed(2)}</div>
<div style="display:;">crouchFactor: --- ${moveFactors.crouchFactor.toFixed(2)}</div>
<div style="display:;">jumpState: --- ${this.jumpState}</div>
<div style="display:;">jumpTime: --- ${Math.floor(this.jumpTime)}</div>
<div style="display:;">idleFactor: --- ${moveFactors.idleFactor?.toFixed(2)}</div>
<div style="display:;">flyState: --- ${this.flyState}</div>
<div style="display:;">flyFactor: --- ${moveFactors.flyFactor?.toFixed(2)}</div>
<div style="display:none;">flyTransitionTime: --- ${Math.floor(this.flyTransitionTime)}</div>
<div style="display:;">landState: --- ${this.landState}</div>
<div style="display:;">landFactor: --- ${moveFactors.landFactor?.toFixed(2)}</div>
<div style="display:none;">landTime: --- ${Math.floor(this.landTime)}</div>
<div style="display:none;">landTransitionTime: --- ${Math.floor(this.landTransitionTime)}</div>
<div style="display:;">sitState: --- ${this.sitState}</div>
<div style="display:;">sitFactor: --- ${moveFactors.sitFactor?.toFixed(2)}</div>
<div style="display:none;">sitTime: --- ${Math.floor(this.sitTime)}</div>
<div style="display:;">chargeJumpState: --- ${this.chargeJumpState}</div>
<div style="display:;">danceState: --- ${this.danceState}</div>
<div style="display:;">fallLoopState: --- ${this.fallLoopState}</div>
<div style="display:;">narutoRunState: --- ${this.narutoRunState}</div>
<div style="display:;">sitState: --- ${this.sitState}</div>
<div style="display:;">aimAnimation: --- ${this.aimAnimation}</div>
<div style="display:;">danceAnimation: --- ${this.danceAnimation}</div>
<div style="display:;">hurtAnimation: --- ${this.hurtAnimation}</div>
<div style="display:;">poseAnimation: --- ${this.poseAnimation}</div>
<div style="display:;">sitAnimation: --- ${this.sitAnimation}</div>
<div style="display:;">useFactor: --- ${moveFactors.useFactor?.toFixed(2)}</div>
<div style="display:;">useTransitionTime: --- ${Math.floor(this.useTransitionTime)}</div>
<div style="display:;">useTime: --- ${Math.floor(this.useTime)}</div>
<div style="display:;">useAnimation: --- ${this.useAnimation}</div>
<div style="display:;">useAnimationCombo: --- </div>
<div style="display:;">${this.useAnimationCombo}&nbsp;</div>
<div style="display:;">useAnimationEnvelope: --- ${this.useAnimationEnvelope}</div>
<div style="display:;">useAnimationIndex: --- ${this.useAnimationIndex}</div>
<div style="display:;">unuseFactor: --- ${this.unuseFactor?.toFixed(2)}</div>
<div style="display:;">unuseAnimation: --- ${this.unuseAnimation}</div>
<div style="display:;">activateTime: --- ${Math.floor(this.activateTime)}</div>
<div style="display:;">aimTime: --- ${Math.floor(this.aimTime)}</div>
<div style="display:none;">chargeJumpTime: --- ${Math.floor(this.chargeJumpTime)}</div>
<div style="display:none;">crouchTime: --- ${Math.floor(this.crouchTime)}</div>
<div style="display:;">danceTime: --- ${Math.floor(this.danceTime)}</div>
<div style="display:none;">fallLoopTime: --- ${Math.floor(this.fallLoopTime)}</div>
<div style="display:;">hurtTime: --- ${Math.floor(this.hurtTime)}</div>
<div style="display:;">unjumpTime: --- ${Math.floor(this.unjumpTime)}</div>
<div style="display:;">lastEyeTargetTime: --- ${Math.floor(this.lastEyeTargetTime)}</div>
<div style="display:;">lastMoveTime: --- ${Math.floor(this.lastMoveTime)}</div>
<div style="display:;">narutoRunTime: --- ${Math.floor(this.narutoRunTime)}</div>
<div style="display:;">blendList.length: --- ${this.blendList?.length}</div>
<div s tyle="display:;">blendList: --- ${this.blendList?.map(applyFn=>applyFn.name.slice('applyFn'.length))}</div>
`
}
_applyAnimation(this, now, moveFactors);

if (this.poseAnimation) {
Expand Down
2 changes: 0 additions & 2 deletions game.js
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,6 @@ const _mousedown = () => {
};
const _mouseup = () => {
isMouseUp = true;
// _endUse();
};

const _grab = object => {
Expand Down Expand Up @@ -1018,7 +1017,6 @@ const _gameUpdate = (timestamp, timeDiff) => {
isMouseUp = false;
};
_updateUse();
console.log(isMouseUp);
};
const _pushAppUpdates = () => {
world.appManager.pushAppUpdates();
Expand Down
1 change: 0 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
<body>
<div id=iframe-container></div>
<div id="root"></div>
<div id="domInfo" style="position: fixed; left: 0; top: 100px; background: rgba(0,0,0,.5); color: white; padding: 5px; width: 600px; pointer-events: none; font-family: Consolas,'Courier New',Courier,FreeMono,monospace;z-index: 999999; display: ;"></div>
<script type=module src="/pre.js"></script>
<script type=module src="/src/main.jsx"></script>
</body>
Expand Down
15 changes: 1 addition & 14 deletions pre.js
Original file line number Diff line number Diff line change
@@ -1,14 +1 @@
window.global = window.globalThis;

window.logNum = function(n) {
const nStr = n.toFixed(2);
return (n < 0 ? '' : '+') + nStr;
}

window.logVector3 = function(v) {
return window.logNum(v.x) + ' ' + window.logNum(v.y) + ' ' + window.logNum(v.z);
}

window.logVector4 = function(v) {
return window.logNum(v.x) + ' ' + window.logNum(v.y) + ' ' + window.logNum(v.z) + ' ' + window.logNum(v.w);
}
window.global = window.globalThis;
40 changes: 0 additions & 40 deletions scenes/test.scn

This file was deleted.

12 changes: 0 additions & 12 deletions webaverse.js
Original file line number Diff line number Diff line change
Expand Up @@ -377,18 +377,6 @@ const _startHacks = webaverse => {
const localPlayer = metaversefileApi.useLocalPlayer();
const vpdAnimations = Avatar.getAnimations().filter(animation => animation.name.endsWith('.vpd'));

window.localPlayer = localPlayer;
window.THREE = THREE;
window.physicsManager = physicsManager;
window.physx = physx;
window.metaversefileApi = metaversefileApi;
window.rootScene = rootScene;
window.loadoutManager = loadoutManager;
window.game = game;
window.cameraManager = cameraManager;
window.camera = camera;
window.ioManager = ioManager;

// let playerDiorama = null;
const lastEmotionKey = {
key: -1,
Expand Down

0 comments on commit 583528f

Please sign in to comment.