Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unseen performance #54

Draft
wants to merge 25 commits into
base: immers-integration
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
79e4aa7
use greenscreen shader in webcam avatars
wmurphyrd Jul 22, 2021
bd4ffce
change chroma key to black
wmurphyrd Jul 23, 2021
92fc033
Model animation sync system
wmurphyrd Jul 24, 2021
56b460a
bloom action keybinding
wmurphyrd Jul 24, 2021
4e5d6e1
Merge branch 'immers-integration' of github.com:immers-space/hubs int…
wmurphyrd Jul 25, 2021
2262fe9
restore spectate mode
wmurphyrd Jul 25, 2021
5c91754
always hide nametags
wmurphyrd Jul 25, 2021
61c127d
fix webgl1 compat for ios
wmurphyrd Jul 27, 2021
2768456
apply greenscreen to webcam share because avatar cams dont work on io…
wmurphyrd Jul 28, 2021
4615c03
add remaining actions, change from animation to visibility
wmurphyrd Jul 29, 2021
5a25d60
crossfade animation on flower models
wmurphyrd Jul 29, 2021
5940bd5
sound actions
wmurphyrd Jul 29, 2021
33231a4
fix flower transparency issues
wmurphyrd Aug 27, 2021
288184e
animation fixes and stages
wmurphyrd Aug 27, 2021
a185d4f
fix networking of advanced actions, fix buttom mashing breaking state
wmurphyrd Aug 30, 2021
7b04488
buttery smooth slow transitions
wmurphyrd Aug 30, 2021
105fc3b
do sequencing logic on the sender's local so that any state desyncs a…
wmurphyrd Aug 30, 2021
5934fd7
hide/show performer on begin/end
wmurphyrd Aug 30, 2021
4d4311b
add blur shader and transition on blur commands
wmurphyrd Aug 30, 2021
e18afc0
Merge branch 'immers-integration' of github.com:immers-space/hubs int…
wmurphyrd Sep 30, 2021
8c31b18
Merge branch 'late-registration' of github.com:immers-space/hubs into…
wmurphyrd Sep 30, 2021
6a21a2b
Merge branch 'safari-15-hotfixes' of github.com:immers-space/hubs int…
wmurphyrd Sep 30, 2021
f2c81bb
Merge branch 'late-registration' of github.com:immers-space/hubs into…
wmurphyrd Sep 30, 2021
e4a1ed6
Merge branch 'immers-integration' of github.com:immers-space/hubs int…
wmurphyrd Oct 1, 2021
1218dcf
fix for new enforced unique names in spoke
wmurphyrd Oct 26, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .defaults.env
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,4 @@ DEFAULT_SCENE_SID="JGLt8DP"

IMMERS_SERVER="https://localhost:8081"
IMMERS_SCOPE="modAdditive"
IMMERS_ALLOW_GUESTS="true"
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/images/sprites/action/immers-bg.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -285,157 +285,173 @@
"spriteSourceSize": {"x":0,"y":0,"w":64,"h":64},
"sourceSize": {"w":64,"h":64}
},
"inspect-action.png":
"immers-bg-hover.png":
{
"frame": {"x":328,"y":738,"w":64,"h":64},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":64,"h":64},
"sourceSize": {"w":64,"h":64}
},
"mute-action.png":
"immers-bg.png":
{
"frame": {"x":408,"y":738,"w":64,"h":64},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":64,"h":64},
"sourceSize": {"w":64,"h":64}
},
"next.png":
"inspect-action.png":
{
"frame": {"x":488,"y":738,"w":64,"h":64},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":64,"h":64},
"sourceSize": {"w":64,"h":64}
},
"pin-action.png":
"mute-action.png":
{
"frame": {"x":568,"y":738,"w":64,"h":64},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":64,"h":64},
"sourceSize": {"w":64,"h":64}
},
"prev.png":
"next.png":
{
"frame": {"x":648,"y":738,"w":64,"h":64},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":64,"h":64},
"sourceSize": {"w":64,"h":64}
},
"recenter-action.png":
"pin-action.png":
{
"frame": {"x":728,"y":738,"w":64,"h":64},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":64,"h":64},
"sourceSize": {"w":64,"h":64}
},
"record-action-alpha.png":
"prev.png":
{
"frame": {"x":882,"y":8,"w":64,"h":64},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":64,"h":64},
"sourceSize": {"w":64,"h":64}
},
"record-action.png":
"recenter-action.png":
{
"frame": {"x":882,"y":88,"w":64,"h":64},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":64,"h":64},
"sourceSize": {"w":64,"h":64}
},
"remove-action.png":
"record-action-alpha.png":
{
"frame": {"x":882,"y":168,"w":64,"h":64},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":64,"h":64},
"sourceSize": {"w":64,"h":64}
},
"rotate-action.png":
"record-action.png":
{
"frame": {"x":882,"y":248,"w":64,"h":64},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":64,"h":64},
"sourceSize": {"w":64,"h":64}
},
"scale-action.png":
"remove-action.png":
{
"frame": {"x":882,"y":328,"w":64,"h":64},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":64,"h":64},
"sourceSize": {"w":64,"h":64}
},
"serialize-action.png":
"rotate-action.png":
{
"frame": {"x":882,"y":408,"w":64,"h":64},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":64,"h":64},
"sourceSize": {"w":64,"h":64}
},
"snap-page.png":
"scale-action.png":
{
"frame": {"x":882,"y":488,"w":64,"h":64},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":64,"h":64},
"sourceSize": {"w":64,"h":64}
},
"spawn_message.png":
"serialize-action.png":
{
"frame": {"x":882,"y":568,"w":64,"h":64},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":64,"h":64},
"sourceSize": {"w":64,"h":64}
},
"spawn_message_dark-hover.png":
"snap-page.png":
{
"frame": {"x":882,"y":648,"w":64,"h":64},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":64,"h":64},
"sourceSize": {"w":64,"h":64}
},
"spawn_message_dark.png":
"spawn_message.png":
{
"frame": {"x":882,"y":728,"w":64,"h":64},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":64,"h":64},
"sourceSize": {"w":64,"h":64}
},
"stop-action.png":
"spawn_message_dark-hover.png":
{
"frame": {"x":8,"y":818,"w":64,"h":64},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":64,"h":64},
"sourceSize": {"w":64,"h":64}
},
"undo-action.png":
"spawn_message_dark.png":
{
"frame": {"x":88,"y":818,"w":64,"h":64},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":64,"h":64},
"sourceSize": {"w":64,"h":64}
},
"unmute-action.png":
"stop-action.png":
{
"frame": {"x":168,"y":818,"w":64,"h":64},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":64,"h":64},
"sourceSize": {"w":64,"h":64}
},
"undo-action.png":
{
"frame": {"x":248,"y":818,"w":64,"h":64},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":64,"h":64},
"sourceSize": {"w":64,"h":64}
},
"unmute-action.png":
{
"frame": {"x":328,"y":818,"w":64,"h":64},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":64,"h":64},
"sourceSize": {"w":64,"h":64}
}
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 12 additions & 1 deletion src/components/block-button.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,19 @@ AFRAME.registerComponent("block-button", {
this.el.emit("immers-block", { clientId: this.owner });
};
this.onScopeChange = () => {
if (this.el.sceneEl.states.includes("immers-scope-addBlocks")) {
if (
this.playerEl?.getAttribute("player-info").immersId &&
this.el.sceneEl.states.includes("immers-scope-addBlocks")
) {
this.textEl.setAttribute("text", "value", "Block");
} else {
this.textEl.setAttribute("text", "value", "Hide");
}
};
NAF.utils.getNetworkedEntity(this.el).then(networkedEl => {
this.playerEl = networkedEl;
this.owner = networkedEl.components.networked.data.owner;
this.playerEl.addEventListener("immers-id-changed", this.onScopeChange);
});
this.onScopeChange();
},
Expand All @@ -27,11 +32,17 @@ AFRAME.registerComponent("block-button", {
this.el.object3D.addEventListener("interact", this.onClick);
this.el.sceneEl.addEventListener("stateadded", this.onScopeChange);
this.el.sceneEl.addEventListener("stateremoved", this.onScopeChange);
if (this.playerEl) {
this.playerEl.addEventListener("immers-id-changed", this.onScopeChange);
}
},

pause() {
this.el.object3D.removeEventListener("interact", this.onClick);
this.el.sceneEl.removeEventListener("stateremoved", this.onScopeChange);
if (this.playerEl) {
this.playerEl.removeEventListener("immers-id-changed", this.onScopeChange);
}
},

block(clientId) {
Expand Down
7 changes: 7 additions & 0 deletions src/components/immers/immers-follow-button.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
AFRAME.registerComponent("immers-follow-button", {
schema: { relation: { type: "string", default: "none", oneOf: ["none", "request", "friend", "pending"] } },
init() {
this.showIfLoggedIn = () => {
this.el.object3D.visible = !!this.playerEl?.getAttribute("player-info").immersId;
};
NAF.utils.getNetworkedEntity(this.el).then(networkedEl => {
this.playerEl = networkedEl;
this.playerEl.addEventListener("stateadded", this.onState);
Expand All @@ -14,6 +17,8 @@ AFRAME.registerComponent("immers-follow-button", {
} else if (this.playerEl.is("immers-follow-request")) {
this.el.setAttribute("immers-follow-button", { relation: "request" });
}
this.showIfLoggedIn();
this.playerEl.addEventListener("immers-id-changed", this.showIfLoggedIn);
});
this.textEl = this.el.querySelector("[text]");
// avoid accidental double clicks
Expand Down Expand Up @@ -48,6 +53,7 @@ AFRAME.registerComponent("immers-follow-button", {
this.el.object3D.addEventListener("interact", this.onClick);
if (this.playerEl) {
this.playerEl.addEventListener("stateadded", this.onState);
this.playerEl.addEventListener("immers-id-changed", this.showIfLoggedIn);
}
},

Expand All @@ -73,6 +79,7 @@ AFRAME.registerComponent("immers-follow-button", {
this.el.object3D.removeEventListener("interact", this.onClick);
if (this.playerEl) {
this.playerEl.removeEventListener("stateadded", this.onState);
this.playerEl.removeEventListener("immers-id-changed", this.showIfLoggedIn);
}
},

Expand Down
8 changes: 8 additions & 0 deletions src/components/in-world-hud.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ AFRAME.registerComponent("in-world-hud", {
this.spawn = this.el.querySelector(".spawn");
this.pen = this.el.querySelector(".penhud");
this.cameraBtn = this.el.querySelector(".camera-btn");
this.immersBtn = this.el.querySelector(".immers-btn");
this.inviteBtn = this.el.querySelector(".invite-btn");
this.background = this.el.querySelector(".bg");
this.notificationText = this.el.querySelector("#hud-presence-notification");
Expand All @@ -24,6 +25,7 @@ AFRAME.registerComponent("in-world-hud", {
this.pen.setAttribute("icon-button", "disabled", !window.APP.hubChannel.can("spawn_drawing"));
this.cameraBtn.setAttribute("icon-button", "disabled", !window.APP.hubChannel.can("spawn_camera"));
}
this.immersBtn.object3D.visible = !this.el.sceneEl.is("immers-connected");
};

this.onStateChange = evt => {
Expand Down Expand Up @@ -52,6 +54,10 @@ AFRAME.registerComponent("in-world-hud", {
this.el.emit("action_toggle_camera");
};

this.onImmersClick = () => {
this.el.emit("action_immers_register");
};

this.onInviteClick = () => {
this.el.emit("action_invite");
};
Expand All @@ -73,6 +79,7 @@ AFRAME.registerComponent("in-world-hud", {
this.pen.object3D.addEventListener("interact", this.onPenClick);
this.cameraBtn.object3D.addEventListener("interact", this.onCameraClick);
this.inviteBtn.object3D.addEventListener("interact", this.onInviteClick);
this.immersBtn.object3D.addEventListener("interact", this.onImmersClick);
},

pause() {
Expand All @@ -86,5 +93,6 @@ AFRAME.registerComponent("in-world-hud", {
this.pen.object3D.removeEventListener("interact", this.onPenClick);
this.cameraBtn.object3D.removeEventListener("interact", this.onCameraClick);
this.inviteBtn.object3D.removeEventListener("interact", this.onInviteClick);
this.immersBtn.object3D.removeEventListener("interact", this.onImmersClick);
}
});
7 changes: 4 additions & 3 deletions src/components/media-views.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import { applyPersistentSync } from "../utils/permissions-utils";
import { refreshMediaMirror, getCurrentMirroredMedia } from "../utils/mirror-utils";
import { detect } from "detect-browser";
import semver from "semver";
import { makeChromaKeyMaterial } from "./unseen/chroma-key-material";

import qsTruthy from "../utils/qs_truthy";

Expand Down Expand Up @@ -297,7 +298,7 @@ AFRAME.registerComponent("media-video", {
this.isSnapping = false;
this.videoIsLive = null; // value null until we've determined if the video is live or not.
this.onSnapImageLoaded = () => (this.isSnapping = false);

/*
this.el.setAttribute("hover-menu__video", { template: "#video-hover-menu", isFlat: true });
this.el.components["hover-menu__video"].getHoverMenu().then(menu => {
// If we got removed while waiting, do nothing.
Expand Down Expand Up @@ -327,7 +328,7 @@ AFRAME.registerComponent("media-video", {
this.updateHoverMenu();
this.updatePlaybackState();
});

*/
NAF.utils
.getNetworkedEntity(this.el)
.then(networkedEl => {
Expand Down Expand Up @@ -660,7 +661,7 @@ AFRAME.registerComponent("media-video", {
const projection = this.data.projection;

if (!this.mesh || projection !== oldData.projection) {
const material = new THREE.MeshBasicMaterial();
const material = src.startsWith("hubs://") ? makeChromaKeyMaterial(texture) : new THREE.MeshBasicMaterial();

let geometry;

Expand Down
Loading