From 74bb4a4a84a4b444eb6d3e223f869e7bade38160 Mon Sep 17 00:00:00 2001 From: gonnavis Date: Fri, 27 May 2022 04:17:20 +0800 Subject: [PATCH 1/5] del one click. --- game.js | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/game.js b/game.js index bf0f1731e3..a40b741361 100644 --- a/game.js +++ b/game.js @@ -1645,18 +1645,6 @@ class GameManager extends EventTarget { downloadFile(blob, 'scene.json'); // console.log('got scene', scene); } - handleAnimationEnd() { - _endUse(); - - const localPlayer = getLocalPlayer(); - if (localPlayer.needContinueCombo) { - localPlayer.needContinueCombo = false; - localPlayer.actionInterpolants.use.reset(); - _startUse(); - } else { - lastUseIndex = 0; - } - } update = _gameUpdate; pushAppUpdates = _pushAppUpdates; pushPlayerUpdates = _pushPlayerUpdates; From fb95331e56dd2d1f8d1eee89cafaee71c1b37f24 Mon Sep 17 00:00:00 2001 From: gonnavis Date: Mon, 30 May 2022 04:31:57 +0800 Subject: [PATCH 2/5] dev --- ai/lore/lore-model.js | 3 ++- scenes/test.scn | 40 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 scenes/test.scn diff --git a/ai/lore/lore-model.js b/ai/lore/lore-model.js index a06c898781..c8c8429831 100644 --- a/ai/lore/lore-model.js +++ b/ai/lore/lore-model.js @@ -1 +1,2 @@ -export * from '../../lore/lore-model.js'; \ No newline at end of file +// export * from '../../lore/lore-model.js'; +export * from 'http://localhost/lib/webaverse_resource/lore/lore-model.js'; \ No newline at end of file diff --git a/scenes/test.scn b/scenes/test.scn new file mode 100644 index 0000000000..94240017d1 --- /dev/null +++ b/scenes/test.scn @@ -0,0 +1,40 @@ +{ + "objects": [ + { + "type": "application/light", + "content": { + "lightType": "ambient", + "args": [[255, 255, 255], 2] + } + }, + { + "type": "application/light", + "content": { + "lightType": "directional", + "args": [[255, 255, 255], 2], + "position": [1, 2, 3] + } + }, + { + "position": [ + 0, + 0, + 0 + ], + "start_url": "http://localhost/lib/webaverse_resource/street/" + }, + { + "position": [-30, 0, -30], + "quaternion": [0, 0, 0, 1], + "start_url": "http://localhost/lib/webaverse_resource/plants/" + }, + { "position": [ 0, 1, -5 ], "start_url": "http://localhost/lib/webaverse_resource/bow/" }, + { "position": [ 1.5, 1, -5 ], "start_url": "http://localhost/lib/webaverse_resource/pistol/" }, + { "position": [ 3, 1, -5 ], "start_url": "http://localhost/lib/webaverse_resource/rifle/" }, + { "position": [ -20, 0, 5 ], "scale": [7, 7, 7], "start_url": "http://localhost/lib/webaverse_resource/ramp/index.js" }, + { "position": [-1.5, 1, -5], "quaternion": [0, 0.7071067811865475, 0, 0.7071067811865476], "start_url": "http://localhost/lib/webaverse_resource/sword/" }, + { "position": [-3, 1, -5], "quaternion": [0, 0.7071067811865475, 0, 0.7071067811865476], "start_url": "http://localhost/lib/webaverse_resource/silsword/" }, + { "position": [-3, 3, -5], "quaternion": [0, 0.7071067811865475, 0, 0.7071067811865476], "start_url": "http://localhost/lib/webaverse_resource/silsword/" }, + { "position": [-5, 0, 5], "quaternion": [0, 0, 0, 1], "start_url": "http://localhost/lib/webaverse_resource/hovercraft/" } + ] +} From c9e53c6e7d0005ed722560dc98b6c899a0b4fad7 Mon Sep 17 00:00:00 2001 From: gonnavis Date: Mon, 30 May 2022 04:40:31 +0800 Subject: [PATCH 3/5] dev --- avatars/avatars.js | 71 ++++++++++++++++++++++++++++++++++++++++++++++ index.html | 1 + pre.js | 15 +++++++++- webaverse.js | 12 ++++++++ 4 files changed, 98 insertions(+), 1 deletion(-) diff --git a/avatars/avatars.js b/avatars/avatars.js index 2f0198ad38..6aebb60b7f 100644 --- a/avatars/avatars.js +++ b/avatars/avatars.js @@ -1902,6 +1902,77 @@ class Avatar { _updateHmdPosition(); + if (this === window.localPlayer.avatar) { + /* + ${window.logNum(localPlayer.characterPhysics.velocity.length())} + */ + window.domInfo.innerHTML = ` +
actions: --- ${localPlayer.getActionsArray().map(n=>n.type)}
+
idleWalkFactor: --- ${window.logNum(moveFactors.idleWalkFactor)}
+
pickUpState: --- ${this.pickUpState}
+
holdState: --- ${this.holdState}
+
---
+
keysDirection: --- ${window.logVector3(window.ioManager?.keysDirection)}
+
velocity: --- ${window.logVector3(localPlayer.characterPhysics.velocity)} of characterPhysics ( correct )
+
velocity: --- ${window.logVector3(this.velocity)} of avatar
+
currentPosition: --- ${window.logVector3(this.inputs.hmd.position)}
+
currentQuaternion: --- ${window.logVector4(this.inputs.hmd.quaternion)}
+
localPlayer.quate: --- ${window.logVector4(localPlayer.quaternion)}
+
avatar.direction: --- ${window.logVector3(this.direction)}
+
---
+
localPlayer.direction: --- ${window.logVector3(localPlayer.getWorldDirection(localVector))}
+
angle: --- ${window.logNum(this.getAngle())}
+
idleWalkFactor: --- ${moveFactors.idleWalkFactor.toFixed(2)}
+
walkRunFactor: --- ${moveFactors.walkRunFactor.toFixed(2)}
+
crouchFactor: --- ${moveFactors.crouchFactor.toFixed(2)}
+
jumpState: --- ${this.jumpState}
+
jumpTime: --- ${Math.floor(this.jumpTime)}
+
idleFactor: --- ${moveFactors.idleFactor?.toFixed(2)}
+
flyState: --- ${this.flyState}
+
flyFactor: --- ${moveFactors.flyFactor?.toFixed(2)}
+
flyTransitionTime: --- ${Math.floor(this.flyTransitionTime)}
+
landState: --- ${this.landState}
+
landFactor: --- ${moveFactors.landFactor?.toFixed(2)}
+
landTime: --- ${Math.floor(this.landTime)}
+
landTransitionTime: --- ${Math.floor(this.landTransitionTime)}
+
sitState: --- ${this.sitState}
+
sitFactor: --- ${moveFactors.sitFactor?.toFixed(2)}
+
sitTime: --- ${Math.floor(this.sitTime)}
+
chargeJumpState: --- ${this.chargeJumpState}
+
danceState: --- ${this.danceState}
+
fallLoopState: --- ${this.fallLoopState}
+
narutoRunState: --- ${this.narutoRunState}
+
sitState: --- ${this.sitState}
+
aimAnimation: --- ${this.aimAnimation}
+
danceAnimation: --- ${this.danceAnimation}
+
hurtAnimation: --- ${this.hurtAnimation}
+
poseAnimation: --- ${this.poseAnimation}
+
sitAnimation: --- ${this.sitAnimation}
+
useFactor: --- ${moveFactors.useFactor?.toFixed(2)}
+
useTransitionTime: --- ${Math.floor(this.useTransitionTime)}
+
useTime: --- ${Math.floor(this.useTime)}
+
useAnimation: --- ${this.useAnimation}
+
useAnimationCombo: ---
+
${this.useAnimationCombo} 
+
useAnimationEnvelope: --- ${this.useAnimationEnvelope}
+
useAnimationIndex: --- ${this.useAnimationIndex}
+
unuseFactor: --- ${this.unuseFactor?.toFixed(2)}
+
unuseAnimation: --- ${this.unuseAnimation}
+
activateTime: --- ${Math.floor(this.activateTime)}
+
aimTime: --- ${Math.floor(this.aimTime)}
+
chargeJumpTime: --- ${Math.floor(this.chargeJumpTime)}
+
crouchTime: --- ${Math.floor(this.crouchTime)}
+
danceTime: --- ${Math.floor(this.danceTime)}
+
fallLoopTime: --- ${Math.floor(this.fallLoopTime)}
+
hurtTime: --- ${Math.floor(this.hurtTime)}
+
unjumpTime: --- ${Math.floor(this.unjumpTime)}
+
lastEyeTargetTime: --- ${Math.floor(this.lastEyeTargetTime)}
+
lastMoveTime: --- ${Math.floor(this.lastMoveTime)}
+
narutoRunTime: --- ${Math.floor(this.narutoRunTime)}
+
blendList.length: --- ${this.blendList?.length}
+
blendList: --- ${this.blendList?.map(applyFn=>applyFn.name.slice('applyFn'.length))}
+ ` + } _applyAnimation(this, now, moveFactors); if (this.poseAnimation) { diff --git a/index.html b/index.html index 6a44166b8d..c98f7550bd 100644 --- a/index.html +++ b/index.html @@ -18,6 +18,7 @@
+
diff --git a/pre.js b/pre.js index 404fddbd6c..c497050c0e 100644 --- a/pre.js +++ b/pre.js @@ -1 +1,14 @@ -window.global = window.globalThis; \ No newline at end of file +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); +} \ No newline at end of file diff --git a/webaverse.js b/webaverse.js index 1287c54161..2387f282f4 100644 --- a/webaverse.js +++ b/webaverse.js @@ -377,6 +377,18 @@ 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, From df5ee56d7276b2187d3bf7532b2f26e70484b0d2 Mon Sep 17 00:00:00 2001 From: gonnavis Date: Mon, 30 May 2022 05:27:54 +0800 Subject: [PATCH 4/5] use `isMouseUp`, `_updateUse` and `throwAnimationDuration` to achieve one click. --- avatars/animationHelpers.js | 1 + constants.js | 1 + game.js | 25 +++++++++++++++++++++++-- 3 files changed, 25 insertions(+), 2 deletions(-) diff --git a/avatars/animationHelpers.js b/avatars/animationHelpers.js index 85cf1a55d8..07d3c04d75 100644 --- a/avatars/animationHelpers.js +++ b/avatars/animationHelpers.js @@ -180,6 +180,7 @@ 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++) { diff --git a/constants.js b/constants.js index 65061f0f40..b347b63716 100644 --- a/constants.js +++ b/constants.js @@ -92,6 +92,7 @@ export const activateMaxTime = 750; export const useMaxTime = 750; export const aimMaxTime = 1000; export const throwReleaseTime = 220; +export const throwAnimationDuration = 1.4166666269302368; export const minFov = 60; export const maxFov = 120; export const midFov = 90; diff --git a/game.js b/game.js index 9f141e2284..3c5c78300d 100644 --- a/game.js +++ b/game.js @@ -14,7 +14,7 @@ import {world} from './world.js'; import {buildMaterial, highlightMaterial, selectMaterial, hoverMaterial, hoverEquipmentMaterial} from './shaders.js'; import {getRenderer, sceneLowPriority, camera} from './renderer.js'; import {downloadFile, snapPosition, getDropUrl, handleDropJsonItem} from './util.js'; -import {maxGrabDistance, throwReleaseTime, storageHost, minFov, maxFov} from './constants.js'; +import {maxGrabDistance, throwReleaseTime, storageHost, minFov, maxFov, throwAnimationDuration} from './constants.js'; import metaversefileApi from './metaversefile-api.js'; import * as metaverseModules from './metaverse-modules.js'; import loadoutManager from './loadout-manager.js'; @@ -42,6 +42,8 @@ const localMatrix3 = new THREE.Matrix4(); // const localBox = new THREE.Box3(); const localRay = new THREE.Ray(); +let isMouseUp = false; + // const zeroVector = new THREE.Vector3(0, 0, 0); // const oneVector = new THREE.Vector3(1, 1, 1); // const cubicBezier = easing(0, 1, 0, 1); @@ -433,7 +435,8 @@ const _mousedown = () => { _startUse(); }; const _mouseup = () => { - _endUse(); + isMouseUp = true; + // _endUse(); }; const _grab = object => { @@ -998,6 +1001,24 @@ const _gameUpdate = (timestamp, timeDiff) => { !_getGrabbedObject(0); crosshairEl.style.visibility = visible ? null : 'hidden'; } + + const _updateUse = () => { + const useAction = localPlayer.getAction('use'); + if (useAction) { + if (useAction.animation === 'pickUpThrow') { + const useTime = localPlayer.actionInterpolants.use.get(); + if (useTime / 1000 >= throwAnimationDuration) { + _endUse(); + } + } else if (isMouseUp) { + _endUse(); + } + + } + isMouseUp = false; + }; + _updateUse(); + console.log(isMouseUp); }; const _pushAppUpdates = () => { world.appManager.pushAppUpdates(); From 04da35a7ffd5c860824b7c0627265e68173802c2 Mon Sep 17 00:00:00 2001 From: gonnavis Date: Mon, 30 May 2022 05:33:08 +0800 Subject: [PATCH 5/5] clean. --- ai/lore/lore-model.js | 3 +- avatars/animationHelpers.js | 1 - avatars/avatars.js | 71 ------------------------------------- game.js | 2 -- index.html | 1 - pre.js | 15 +------- scenes/test.scn | 40 --------------------- webaverse.js | 12 ------- 8 files changed, 2 insertions(+), 143 deletions(-) delete mode 100644 scenes/test.scn diff --git a/ai/lore/lore-model.js b/ai/lore/lore-model.js index c8c8429831..a06c898781 100644 --- a/ai/lore/lore-model.js +++ b/ai/lore/lore-model.js @@ -1,2 +1 @@ -// export * from '../../lore/lore-model.js'; -export * from 'http://localhost/lib/webaverse_resource/lore/lore-model.js'; \ No newline at end of file +export * from '../../lore/lore-model.js'; \ No newline at end of file diff --git a/avatars/animationHelpers.js b/avatars/animationHelpers.js index 07d3c04d75..85cf1a55d8 100644 --- a/avatars/animationHelpers.js +++ b/avatars/animationHelpers.js @@ -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++) { diff --git a/avatars/avatars.js b/avatars/avatars.js index 6aebb60b7f..2f0198ad38 100644 --- a/avatars/avatars.js +++ b/avatars/avatars.js @@ -1902,77 +1902,6 @@ class Avatar { _updateHmdPosition(); - if (this === window.localPlayer.avatar) { - /* - ${window.logNum(localPlayer.characterPhysics.velocity.length())} - */ - window.domInfo.innerHTML = ` -
actions: --- ${localPlayer.getActionsArray().map(n=>n.type)}
-
idleWalkFactor: --- ${window.logNum(moveFactors.idleWalkFactor)}
-
pickUpState: --- ${this.pickUpState}
-
holdState: --- ${this.holdState}
-
---
-
keysDirection: --- ${window.logVector3(window.ioManager?.keysDirection)}
-
velocity: --- ${window.logVector3(localPlayer.characterPhysics.velocity)} of characterPhysics ( correct )
-
velocity: --- ${window.logVector3(this.velocity)} of avatar
-
currentPosition: --- ${window.logVector3(this.inputs.hmd.position)}
-
currentQuaternion: --- ${window.logVector4(this.inputs.hmd.quaternion)}
-
localPlayer.quate: --- ${window.logVector4(localPlayer.quaternion)}
-
avatar.direction: --- ${window.logVector3(this.direction)}
-
---
-
localPlayer.direction: --- ${window.logVector3(localPlayer.getWorldDirection(localVector))}
-
angle: --- ${window.logNum(this.getAngle())}
-
idleWalkFactor: --- ${moveFactors.idleWalkFactor.toFixed(2)}
-
walkRunFactor: --- ${moveFactors.walkRunFactor.toFixed(2)}
-
crouchFactor: --- ${moveFactors.crouchFactor.toFixed(2)}
-
jumpState: --- ${this.jumpState}
-
jumpTime: --- ${Math.floor(this.jumpTime)}
-
idleFactor: --- ${moveFactors.idleFactor?.toFixed(2)}
-
flyState: --- ${this.flyState}
-
flyFactor: --- ${moveFactors.flyFactor?.toFixed(2)}
-
flyTransitionTime: --- ${Math.floor(this.flyTransitionTime)}
-
landState: --- ${this.landState}
-
landFactor: --- ${moveFactors.landFactor?.toFixed(2)}
-
landTime: --- ${Math.floor(this.landTime)}
-
landTransitionTime: --- ${Math.floor(this.landTransitionTime)}
-
sitState: --- ${this.sitState}
-
sitFactor: --- ${moveFactors.sitFactor?.toFixed(2)}
-
sitTime: --- ${Math.floor(this.sitTime)}
-
chargeJumpState: --- ${this.chargeJumpState}
-
danceState: --- ${this.danceState}
-
fallLoopState: --- ${this.fallLoopState}
-
narutoRunState: --- ${this.narutoRunState}
-
sitState: --- ${this.sitState}
-
aimAnimation: --- ${this.aimAnimation}
-
danceAnimation: --- ${this.danceAnimation}
-
hurtAnimation: --- ${this.hurtAnimation}
-
poseAnimation: --- ${this.poseAnimation}
-
sitAnimation: --- ${this.sitAnimation}
-
useFactor: --- ${moveFactors.useFactor?.toFixed(2)}
-
useTransitionTime: --- ${Math.floor(this.useTransitionTime)}
-
useTime: --- ${Math.floor(this.useTime)}
-
useAnimation: --- ${this.useAnimation}
-
useAnimationCombo: ---
-
${this.useAnimationCombo} 
-
useAnimationEnvelope: --- ${this.useAnimationEnvelope}
-
useAnimationIndex: --- ${this.useAnimationIndex}
-
unuseFactor: --- ${this.unuseFactor?.toFixed(2)}
-
unuseAnimation: --- ${this.unuseAnimation}
-
activateTime: --- ${Math.floor(this.activateTime)}
-
aimTime: --- ${Math.floor(this.aimTime)}
-
chargeJumpTime: --- ${Math.floor(this.chargeJumpTime)}
-
crouchTime: --- ${Math.floor(this.crouchTime)}
-
danceTime: --- ${Math.floor(this.danceTime)}
-
fallLoopTime: --- ${Math.floor(this.fallLoopTime)}
-
hurtTime: --- ${Math.floor(this.hurtTime)}
-
unjumpTime: --- ${Math.floor(this.unjumpTime)}
-
lastEyeTargetTime: --- ${Math.floor(this.lastEyeTargetTime)}
-
lastMoveTime: --- ${Math.floor(this.lastMoveTime)}
-
narutoRunTime: --- ${Math.floor(this.narutoRunTime)}
-
blendList.length: --- ${this.blendList?.length}
-
blendList: --- ${this.blendList?.map(applyFn=>applyFn.name.slice('applyFn'.length))}
- ` - } _applyAnimation(this, now, moveFactors); if (this.poseAnimation) { diff --git a/game.js b/game.js index 3c5c78300d..5297257915 100644 --- a/game.js +++ b/game.js @@ -436,7 +436,6 @@ const _mousedown = () => { }; const _mouseup = () => { isMouseUp = true; - // _endUse(); }; const _grab = object => { @@ -1018,7 +1017,6 @@ const _gameUpdate = (timestamp, timeDiff) => { isMouseUp = false; }; _updateUse(); - console.log(isMouseUp); }; const _pushAppUpdates = () => { world.appManager.pushAppUpdates(); diff --git a/index.html b/index.html index c98f7550bd..6a44166b8d 100644 --- a/index.html +++ b/index.html @@ -18,7 +18,6 @@
-
diff --git a/pre.js b/pre.js index c497050c0e..404fddbd6c 100644 --- a/pre.js +++ b/pre.js @@ -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); -} \ No newline at end of file +window.global = window.globalThis; \ No newline at end of file diff --git a/scenes/test.scn b/scenes/test.scn deleted file mode 100644 index 94240017d1..0000000000 --- a/scenes/test.scn +++ /dev/null @@ -1,40 +0,0 @@ -{ - "objects": [ - { - "type": "application/light", - "content": { - "lightType": "ambient", - "args": [[255, 255, 255], 2] - } - }, - { - "type": "application/light", - "content": { - "lightType": "directional", - "args": [[255, 255, 255], 2], - "position": [1, 2, 3] - } - }, - { - "position": [ - 0, - 0, - 0 - ], - "start_url": "http://localhost/lib/webaverse_resource/street/" - }, - { - "position": [-30, 0, -30], - "quaternion": [0, 0, 0, 1], - "start_url": "http://localhost/lib/webaverse_resource/plants/" - }, - { "position": [ 0, 1, -5 ], "start_url": "http://localhost/lib/webaverse_resource/bow/" }, - { "position": [ 1.5, 1, -5 ], "start_url": "http://localhost/lib/webaverse_resource/pistol/" }, - { "position": [ 3, 1, -5 ], "start_url": "http://localhost/lib/webaverse_resource/rifle/" }, - { "position": [ -20, 0, 5 ], "scale": [7, 7, 7], "start_url": "http://localhost/lib/webaverse_resource/ramp/index.js" }, - { "position": [-1.5, 1, -5], "quaternion": [0, 0.7071067811865475, 0, 0.7071067811865476], "start_url": "http://localhost/lib/webaverse_resource/sword/" }, - { "position": [-3, 1, -5], "quaternion": [0, 0.7071067811865475, 0, 0.7071067811865476], "start_url": "http://localhost/lib/webaverse_resource/silsword/" }, - { "position": [-3, 3, -5], "quaternion": [0, 0.7071067811865475, 0, 0.7071067811865476], "start_url": "http://localhost/lib/webaverse_resource/silsword/" }, - { "position": [-5, 0, 5], "quaternion": [0, 0, 0, 1], "start_url": "http://localhost/lib/webaverse_resource/hovercraft/" } - ] -} diff --git a/webaverse.js b/webaverse.js index 2387f282f4..1287c54161 100644 --- a/webaverse.js +++ b/webaverse.js @@ -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,