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

Enhancement: Tunnel Vision #450

Merged
merged 38 commits into from
Sep 7, 2018
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
99adaa7
added tunnel effect into hub
tony056 Jun 27, 2018
0bd5a32
working tunnel effect for 2d, but needs to modify to work in VR
tony056 Jun 27, 2018
ea6f19e
image version of tunnel vision
tony056 Jul 2, 2018
aa824ac
moved tunnel-effect to 'systems' folder.
tony056 Jul 3, 2018
682f89f
removed image approach for tunnel vision.
tony056 Jul 3, 2018
3b84442
added fadingEffect for entering/exiting tunnel vision.
tony056 Jul 3, 2018
661d0c0
changed the path of 'tunnel-effect'.
tony056 Jul 3, 2018
9988451
included post processing essential files.
tony056 Jul 3, 2018
c0d6d55
applied vignetteShader to two eyes.
tony056 Jul 3, 2018
22bcc2f
detect the movement by the change of the camera's position.
tony056 Jul 4, 2018
c834cdf
moved two tunnels closer to each other and combined left and right vi…
tony056 Jul 6, 2018
6e7f751
used the character's velocity to trigger tunnel effect.
tony056 Jul 6, 2018
690d0c5
renamed the func name.
tony056 Jul 6, 2018
6e56358
Adjusted the offset dynamically to make sure two tunnels won't overla…
tony056 Jul 6, 2018
912139a
cleaned up the event listener.
tony056 Jul 6, 2018
4bb5b0f
moved postprocessing & shader files to utils.
tony056 Jul 6, 2018
bdb4b36
deleted unused images.
tony056 Jul 6, 2018
009f802
added comments at some unclear parts.
tony056 Jul 6, 2018
76813ee
Merge branch 'master' into enhancement/locomotion
tony056 Jul 6, 2018
41e267e
style modification.
tony056 Jul 6, 2018
25f0d9c
Merge branch 'enhancement/locomotion' of github.com:mozilla/hubs into…
tony056 Jul 6, 2018
8e0f561
added missing parameters.
tony056 Jul 6, 2018
31914e6
checkout back to previous one commit to undo teleport parameter changes.
tony056 Aug 3, 2018
a5eb72a
enabled the effect while it's in vr mode.
tony056 Aug 6, 2018
d3414d9
Merge branch 'master' of github.com:mozilla/hubs into enhancement/loc…
tony056 Aug 6, 2018
7f19a1d
avoid creating a new function everytime we switched to the postproces…
tony056 Aug 8, 2018
8cdab8b
removed unused var.
tony056 Aug 8, 2018
da5d4bc
disabled tunnel while exit vr.
tony056 Aug 8, 2018
d9c195d
fading out when the v is 0.
tony056 Aug 8, 2018
c3f1976
renamed unit to ratio.
tony056 Aug 8, 2018
08d4470
added disableTunnel parameter to disable the effect with qs_truthy.
tony056 Aug 9, 2018
7a6090b
Add some information about where the effect code came from.
johnshaughnessy Aug 16, 2018
a8203ac
Minor edits. Only call _initComposer once.
johnshaughnessy Aug 16, 2018
a304b8a
init deltaR & deltaS. added disableTuneel param in README.
tony056 Aug 17, 2018
7b1fe60
moved deltaR and deltaS init to the init func.
tony056 Aug 20, 2018
487ae33
deltaR should be TARGET_RADIUS - value of the radius while the user s…
tony056 Aug 20, 2018
c2440b8
Merge branch 'master' into enhancement/locomotion
johnshaughnessy Sep 7, 2018
b52512d
Fix issue where tunnel would "pop" at the end
johnshaughnessy Sep 7, 2018
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 README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ This will allow the CSP checks to pass that are served up by Reticulum so you ca
- `disable_telemetry` - If `true` disables Sentry telemetry.
- `log_filter` - A `debug` style filter for setting the logging level.
- `debug` - If `true` performs verbose logging of Janus and NAF traffic.
- `disableTunnel` - Tunnel vision is on by default. Disable the tunnel vision by this parameter.

## Additional Resources

Expand Down
2 changes: 1 addition & 1 deletion src/systems/tunnel-effect.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ AFRAME.registerSystem("tunneleffect", {
Math.abs(r - TARGET_RADIUS) > CLAMP_RADIUS &&
Math.abs(softness - TARGET_SOFTNESS) > CLAMP_SOFTNESS
) {
if (this.deltaR !== 0 && this.deltaS !== 0) {
if (!this.deltaR && !this.deltaS) {
this.deltaR = TARGET_RADIUS - r;
this.deltaS = softness - TARGET_SOFTNESS;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am still confused about why these are set once with some particular value for r and softness. Are deltaR and deltaS supposed to be constants? Do they need to be on this? Given their names, I expected them to change whenever r or softness changed, but perhaps they're better understood to be fixed increments by which we will change r or softness every frame. In that case, should these constants be defined above with CLAMP_SPEED, etc?

Copy link
Contributor Author

@tony056 tony056 Aug 20, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the deltaR is defined by the value of TARGET_RADIUS and minRadius. Since we define the minRadius value in schema, I don't think it should be defined as a constant like CLAMP_SPEED, but I init those delta values in init in the latest commit.

}
Expand Down