diff --git a/src/App.js b/src/App.js index b814e080d4e1df7ae5f6dbe7649d2548211f4c42..1f425e82d19b5ebb08852e71235904849d52b1ea 100644 --- a/src/App.js +++ b/src/App.js @@ -15,7 +15,6 @@ export class App { this.quality = quality; if (this.scene) { - console.log("quality-changed", quality); this.scene.dispatchEvent(new CustomEvent("quality-changed", { detail: quality })); } diff --git a/src/avatar-selector.html b/src/avatar-selector.html index 531a7e15f8ba2bbd479273d0af8332f3b3c836e1..96dd9c67463ec3ddda58956463b2b136b005ed27 100644 --- a/src/avatar-selector.html +++ b/src/avatar-selector.html @@ -6,9 +6,9 @@ <title>avatar selector</title> <link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons"> <% if(NODE_ENV === "production") { %> - <script src="https://cdn.rawgit.com/brianpeiris/aframe/845825ae694449524c185c44a314d361eead4680/dist/aframe-master.min.js"></script> + <script src="https://cdn.rawgit.com/aframevr/aframe/3e7a4b3/dist/aframe-master.min.js" integrity="sha384-LQXa4VjhYucs9sVd5yQ3OhBXRea0jrvbHJA8CYLgTnvzxF5uvyhabSo1mX4tT2c6" crossorigin="anonymous"></script> <% } else { %> - <script src="https://cdn.rawgit.com/brianpeiris/aframe/845825ae694449524c185c44a314d361eead4680/dist/aframe-master.js"></script> + <script src="https://cdn.rawgit.com/aframevr/aframe/3e7a4b3/dist/aframe-master.js" integrity="sha384-EaMOuyBOi9ERV/lVDwQgz/yFWBDWPsIju5Co6oCZZHXuvbLBO81yPWn80q0BbBn3" crossorigin="anonymous"></script> <% } %> </head> diff --git a/src/components/bone-mute-state-indicator.js b/src/components/bone-mute-state-indicator.js index 2d79b3f9c37feee028b89afbe6eaffe7bbd654d8..92a2590e2cda9c2d0c048b0849d1e7bdcab35849 100644 --- a/src/components/bone-mute-state-indicator.js +++ b/src/components/bone-mute-state-indicator.js @@ -14,7 +14,6 @@ AFRAME.registerComponent("bone-mute-state-indicator", { this.el.addEventListener("model-loaded", () => { this.unmutedBone = this.el.object3D.getObjectByName(this.data.unmutedBoneName); this.mutedBone = this.el.object3D.getObjectByName(this.data.mutedBoneName); - console.log(this.unmutedBone, this.mutedBone); this.modelLoaded = true; this.updateMuteState(); diff --git a/src/components/controls-shape-offset.js b/src/components/controls-shape-offset.js index 7ce8764332f0e8b7b6116add6a8e8178a84121f6..7f47c498bc287a0dbd5c8f8126b724d320c95ca7 100644 --- a/src/components/controls-shape-offset.js +++ b/src/components/controls-shape-offset.js @@ -2,7 +2,7 @@ import { CONTROLLER_OFFSETS } from "./hand-controls2.js"; AFRAME.registerComponent("controls-shape-offset", { schema: { - additionalOffset: { default: { x: 0, y: -0.03, z: -0.04 } } + additionalOffset: { type: "vec3", default: { x: 0, y: -0.03, z: -0.04 } } }, init: function() { this.controller = null; diff --git a/src/components/hand-controls2.js b/src/components/hand-controls2.js index a5f212453d00a4dd6d7fdeb001dd36dc545c5057..d21ca60d98775dc6d2a3450380a6649e9b463f9c 100644 --- a/src/components/hand-controls2.js +++ b/src/components/hand-controls2.js @@ -110,7 +110,7 @@ AFRAME.registerComponent("hand-controls2", { const controlConfiguration = { hand: hand, model: false, - rotationOffset: 0 + orientationOffset: { x: 0, y: 0, z: 0 } }; if (hand !== prevData) { diff --git a/src/components/hide-when-quality.js b/src/components/hide-when-quality.js index e09d3ae90db3ce48e7afb815b5e0fcf22aa79fc3..93e238d61b74eff66d3becdabca314d13641a97c 100644 --- a/src/components/hide-when-quality.js +++ b/src/components/hide-when-quality.js @@ -17,7 +17,6 @@ AFRAME.registerComponent("hide-when-quality", { }, updateComponentState(quality) { - console.log(quality); this.el.setAttribute("visible", quality !== this.data); } }); diff --git a/src/components/hud-controller.js b/src/components/hud-controller.js index d2439b3765d0272ae5b113fa174b1738ab213c2b..67f9c4616285d38efe31e84e63475879463d84fb 100644 --- a/src/components/hud-controller.js +++ b/src/components/hud-controller.js @@ -21,6 +21,8 @@ AFRAME.registerComponent("hud-controller", { init() { this.isYLocked = false; this.lockedHeadPositionY = 0; + this.lookDir = new THREE.Vector3(); + this.lookEuler = new THREE.Euler(); }, pause() { @@ -62,12 +64,14 @@ AFRAME.registerComponent("hud-controller", { // Reorient the hud only if the user is looking away from the hud, for right now this arbitrarily means the hud is 1/2 way animated away // TODO: come up with better huristics for this that maybe account for the user turning away from the hud "too far", also animate the position so that it doesnt just snap. if (yawDif >= yawCutoff || pitch < lookCutoff - animRange / 2) { - const lookDir = new THREE.Vector3(0, 0, -1); - lookDir.applyQuaternion(head.quaternion); - lookDir.add(head.position); - hud.position.x = lookDir.x; - hud.position.z = lookDir.z; - hud.setRotationFromEuler(new THREE.Euler(0, head.rotation.y, 0)); + this.lookDir.set(0, 0, -1); + this.lookDir.applyQuaternion(head.quaternion); + this.lookDir.add(head.position); + hud.position.x = this.lookDir.x; + hud.position.z = this.lookDir.z; + hud.rotation.copy(head.rotation); + hud.rotation.x = 0; + hud.rotation.z = 0; } hud.position.y = (this.isYLocked ? this.lockedHeadPositionY : head.position.y) + offset + (1 - t) * offset; hud.rotation.x = (1 - t) * THREE.Math.DEG2RAD * 90; diff --git a/src/components/offset-relative-to.js b/src/components/offset-relative-to.js index f940b687284b34677c579e931557fc9671631f41..39361022488971c5b41a160520594020d81f36ac 100644 --- a/src/components/offset-relative-to.js +++ b/src/components/offset-relative-to.js @@ -18,12 +18,6 @@ AFRAME.registerComponent("offset-relative-to", { const offsetVector = new THREE.Vector3().copy(this.data.offset); this.data.target.object3D.localToWorld(offsetVector); this.el.setAttribute("position", offsetVector); - - const headWorldRotation = this.data.target.object3D.getWorldRotation(); - this.el.setAttribute("rotation", { - x: headWorldRotation.x * THREE.Math.RAD2DEG, - y: headWorldRotation.y * THREE.Math.RAD2DEG, - z: headWorldRotation.z * THREE.Math.RAD2DEG - }); + this.data.target.object3D.getWorldQuaternion(this.el.object3D.quaternion); } }); diff --git a/src/components/scene-shadow.js b/src/components/scene-shadow.js index 72d77cf36b36c80279b0683531f4682f1f5b7a47..14b2e23cc6bbfc4b0a3e930cba4bfab65e74977d 100644 --- a/src/components/scene-shadow.js +++ b/src/components/scene-shadow.js @@ -1,21 +1,9 @@ // For use in environment gltf bundles to set scene shadow properties. AFRAME.registerComponent("scene-shadow", { schema: { - autoUpdate: { - type: "boolean", - default: true - }, type: { type: "string", default: "pcf" - }, - renderReverseSided: { - type: "boolean", - default: true - }, - renderSingleSided: { - type: "boolean", - default: true } }, init() { diff --git a/src/components/water.js b/src/components/water.js index cfa33e4b166eea99f5af30d5c5fa36d0075c7378..52d9c01da3b086aa0bccecc4dd9a6074d43be1c9 100644 --- a/src/components/water.js +++ b/src/components/water.js @@ -89,7 +89,7 @@ function MobileWater(geometry, options) { ${THREE.ShaderChunk["common"]} ${THREE.ShaderChunk["packing"]} ${THREE.ShaderChunk["bsdfs"]} - ${THREE.ShaderChunk["lights_pars"]} + ${THREE.ShaderChunk["lights_pars_begin"]} void main() { vec4 noise = getNoise( worldPosition.xz * size ); diff --git a/src/hub.html b/src/hub.html index 366f9209d6af533436d358b04dde248798defe86..76fb7230c3135468f4b10392a5269f20a65bfb88 100644 --- a/src/hub.html +++ b/src/hub.html @@ -13,9 +13,9 @@ <link href="https://fonts.googleapis.com/css?family=Zilla+Slab:300,300i,400,400i,700" rel="stylesheet"> <% if(NODE_ENV === "production") { %> - <script src="https://cdn.rawgit.com/brianpeiris/aframe/845825ae694449524c185c44a314d361eead4680/dist/aframe-master.min.js"></script> + <script src="https://cdn.rawgit.com/aframevr/aframe/3e7a4b3/dist/aframe-master.min.js" integrity="sha384-LQXa4VjhYucs9sVd5yQ3OhBXRea0jrvbHJA8CYLgTnvzxF5uvyhabSo1mX4tT2c6" crossorigin="anonymous"></script> <% } else { %> - <script src="https://cdn.rawgit.com/brianpeiris/aframe/845825ae694449524c185c44a314d361eead4680/dist/aframe-master.js"></script> + <script src="https://cdn.rawgit.com/aframevr/aframe/3e7a4b3/dist/aframe-master.js" integrity="sha384-EaMOuyBOi9ERV/lVDwQgz/yFWBDWPsIju5Co6oCZZHXuvbLBO81yPWn80q0BbBn3" crossorigin="anonymous"></script> <% } %> </head> diff --git a/src/hub.js b/src/hub.js index feb07c11faff1a700d1fe3262cbd32bf204f1729..c27582465bc110be4d0e7a3e986de30bfcad407c 100644 --- a/src/hub.js +++ b/src/hub.js @@ -9,7 +9,7 @@ patchWebGLRenderingContext(); import "aframe-xr"; import "./vendor/GLTFLoader"; -import "networked-aframe"; +import "networked-aframe/src/index"; import "naf-janus-adapter"; import "aframe-teleport-controls"; import "aframe-input-mapping-component"; diff --git a/src/react-components/avatar-selector.js b/src/react-components/avatar-selector.js index 4495819a83aca79aaddaf63deb66efecb4f49dcb..e4b27897e839eb53f99267b8b3bc70e2c81f8206 100644 --- a/src/react-components/avatar-selector.js +++ b/src/react-components/avatar-selector.js @@ -131,7 +131,7 @@ class AvatarSelector extends Component { <a-entity key={avatar.id} rotation={`0 ${360 * -i / this.props.avatars.length} 0`}> <a-entity position="0 0 5" gltf-model-plus={`src: #${avatar.id}`} inflate="true"> <template data-selector=".RootScene"> - <a-entity animation-mixer /> + <a-entity animation-mixer="" /> </template> <a-animation @@ -168,7 +168,7 @@ class AvatarSelector extends Component { </a-entity> <a-entity position="0 1.5 -5.6" rotation="-10 180 0"> - <a-entity camera /> + <a-entity camera="" /> </a-entity> <a-entity diff --git a/src/vendor/Water.js b/src/vendor/Water.js index a3160a754e0b41ba59e9219350f988ae6e03901f..4d1800b918d7473ebe9eeee8a4ba817284726073 100644 --- a/src/vendor/Water.js +++ b/src/vendor/Water.js @@ -159,7 +159,7 @@ THREE.Water = function(geometry, options) { THREE.ShaderChunk["packing"], THREE.ShaderChunk["bsdfs"], THREE.ShaderChunk["fog_pars_fragment"], - THREE.ShaderChunk["lights_pars"], + THREE.ShaderChunk["lights_pars_begin"], THREE.ShaderChunk["shadowmap_pars_fragment"], THREE.ShaderChunk["shadowmask_pars_fragment"], diff --git a/yarn.lock b/yarn.lock index 40dadfe4e0a41475dc6ec1ed54b394736c0959df..1870294edb1ff4ced007f90eb5a2145b788b0ce9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -194,7 +194,7 @@ aframe-slice9-component@^1.0.0: "aframe-teleport-controls@https://github.com/mozillareality/aframe-teleport-controls#hubs/master": version "0.3.2" - resolved "https://github.com/mozillareality/aframe-teleport-controls#9e2ef7da57144c4a615eba40a945d4cfa105a092" + resolved "https://github.com/mozillareality/aframe-teleport-controls#b241e71b256450cdd7a2331d0ab02cf401029493" "aframe-xr@github:brianpeiris/aframe-xr#3162aed": version "0.0.9" @@ -2012,8 +2012,8 @@ colormin@^1.0.5: has "^1.0.1" colors@*: - version "1.2.1" - resolved "https://registry.yarnpkg.com/colors/-/colors-1.2.1.tgz#f4a3d302976aaf042356ba1ade3b1a2c62d9d794" + version "1.2.3" + resolved "https://registry.yarnpkg.com/colors/-/colors-1.2.3.tgz#1b152a9c4f6c9f74bc4bb96233ad0b7983b79744" colors@1.0.3: version "1.0.3" @@ -5448,7 +5448,7 @@ neo-async@^2.5.0: "networked-aframe@https://github.com/mozillareality/networked-aframe#mr-social-client/master": version "0.6.1" - resolved "https://github.com/mozillareality/networked-aframe#3e690e113052a7ebf8e2b0a89785843690ba7c7b" + resolved "https://github.com/mozillareality/networked-aframe#641b5e44b8514d02925e3efb4289ca36a41c1006" dependencies: easyrtc "1.1.0" express "^4.10.7"