Skip to content

Commit 0eb96b1

Browse files
Omniperium Menu
1 parent 0a893f0 commit 0eb96b1

File tree

8 files changed

+166
-50
lines changed

8 files changed

+166
-50
lines changed

client/chunk_main_af9f4ef7.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

client/chunk_norris.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

service-worker.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@ var LOAD_FILES_USEFUL = ["/src/fonts/normative/index.css"].concat(["illusion.jpg
2727
var LOAD_FILES_STATIC = ["sfx/md/hero_decorative-celebration-02", "sfx/md/navigation_selection-complete-celebration", "sfx/md/navigation_transition-left", "sfx/md/state-change_confirm-down", "sfx/md/ui_lock", "sfx/md/ui_unlock", "sfx/md/ui_scan", "sfx/md/alert_high-intensity", "sfx/md/navigation_transition-right", "voice/cn/accessing_memory", "voice/cn/complete", "voice/cn/please_wait", "voice/cn/data_upload", "voice/cn/processing", "voice/cn/enhanced", "voice/cn/rewriting_deep_layer_protocols", "voice/cn/vision_activated", "voice/cn/vision_deactivated", "voice/cn/filtering", "music/redeclipse/track_09"].map(F_SND).concat(["presentation", "tutorial", "create", "enhanced", "pixelated", "upload", "share1", "joke1", "create", "enhanced", "pixelated", "presentation", "presentation2", "sponsors", "tutorial", "upload", "labintro", "share2", "share3", "share4", "share5", "share6", "share7", "joke2", "joke3", "joke4", "joke5", "joke6", "joke7", "joke8", "joke9", "joke10", "joke11"].map(F_VID));
2828

2929
// Cache names
30-
var REQUIRED_CACHE = "unless-update-cache-v1081-required";
31-
var USEFUL_CACHE = "unless-update-cache-v1081-useful";
32-
var STATIC_CACHE = "unless-update-cache-v1081-static";
33-
var OTHER_CACHE = "unless-update-cache-v1081-other";
30+
var REQUIRED_CACHE = "unless-update-cache-v1082-required";
31+
var USEFUL_CACHE = "unless-update-cache-v1082-useful";
32+
var STATIC_CACHE = "unless-update-cache-v1082-static";
33+
var OTHER_CACHE = "unless-update-cache-v1082-other";
3434

3535
// Regular expressions for chunk matching
3636
var MAIN_CHILD_CHUNK_REGEX = /chunk_(main_[a-z0-9]+)\.min\.js$/i;

src/js/components/AppDrawer.js

Lines changed: 8 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/js/components/AppToolbar.js

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -496,9 +496,10 @@ class AppToolbar extends React.PureComponent {
496496
this.setSt4te({_presentation_open: true}, () => {
497497

498498
this.forceUpdate(() => {
499-
500-
var video = document.getElementById("presentation-video");
501-
video.play();
499+
try {
500+
var video = document.getElementById("presentation-video");
501+
video.play();
502+
} catch (e) {}
502503
});
503504
});
504505
};
@@ -508,9 +509,10 @@ class AppToolbar extends React.PureComponent {
508509
this.setSt4te({_presentation_open: true}, () => {
509510

510511
this.forceUpdate(() => {
511-
512-
var video = document.getElementById("presentation-video-2");
513-
video.play();
512+
try {
513+
var video = document.getElementById("presentation-video-2");
514+
video.play();
515+
} catch (e) {}
514516
});
515517
});
516518
};

src/js/components/DrawerContent.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,10 @@ class DrawerContent extends React.PureComponent {
215215
}
216216
}
217217

218+
componentDidMount() {
219+
this.forceUpdate();
220+
}
221+
218222
_open_pixel_page = () => {
219223

220224
if(this.props){

src/js/components/NaviguateOmniperium.js

Lines changed: 140 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,29 @@ const styles = theme => ({
4141
animationIterationCount: "1",
4242
animationDelay: "750ms",
4343
},
44+
"@keyframes glitched": {
45+
"0%": { opacity: "1"},
46+
"60%": { opacity: "1"},
47+
"64%": { opacity: "0.72"},
48+
"68%": { opacity: "0.94"},
49+
"72%": { opacity: "1"},
50+
"76%": { opacity: "0.82"},
51+
"80%": { opacity: "1"},
52+
"84%": { opacity: "0.92"},
53+
"88%": { opacity: "0.84"},
54+
"92%": { opacity: "1"},
55+
"96%": { opacity: "0.90"},
56+
"100%": { opacity: "1"},
57+
},
58+
glitch: {
59+
animationFillMode: "both",
60+
animationName: "$glitched",
61+
animationDuration: "1250ms",
62+
animationTimingFunction: "linear",
63+
animationDirection: "alternate",
64+
animationIterationCount: "infinite",
65+
animationDelay: "0ms",
66+
},
4467
restrictedSVG: {
4568
animationFillMode: "both",
4669
animationName: "$glitchmenu",
@@ -69,7 +92,13 @@ class NavigateOmniperium extends React.PureComponent {
6992
classes: props.classes,
7093
hover: "welcome",
7194
video: {pause: function (){}},
72-
open: props.open
95+
open: props.open,
96+
_menu_pos: {},
97+
_menu_ref: {},
98+
_root_ref: {},
99+
_transform_rotate: "",
100+
_background_image: "",
101+
_filter: ""
73102
};
74103
};
75104

@@ -101,7 +130,9 @@ class NavigateOmniperium extends React.PureComponent {
101130
//this.st4te.video.pause();
102131
this.setSt4te({hover: path}, () => {
103132
this.forceUpdate(( ) => {
104-
document.getElementById("explanation-video").play();
133+
try {
134+
document.getElementById("explanation-video").play();
135+
}catch(e){}
105136
});
106137
});
107138
}
@@ -147,12 +178,93 @@ class NavigateOmniperium extends React.PureComponent {
147178
}catch(e){}
148179
};
149180

181+
setWrapperRef = (element) => {
182+
183+
if(typeof element === "undefined") {return}
184+
if(element === null) {return}
185+
this.setSt4te({_root_ref: element}, () => {
186+
this.st4te._root_ref.addEventListener("pointermove", this.computeRotation);
187+
});
188+
189+
}
190+
191+
setMenuRef = (element) => {
192+
193+
if(typeof element === "undefined") {return}
194+
if(element === null) {return}
195+
console.log(element)
196+
const rect = element.getBoundingClientRect();
197+
this.setSt4te({_menu_ref: element, _menu_pos: rect});
198+
199+
}
200+
201+
computeRotation = (event) => {
202+
"use strict";
203+
console.log(event)
204+
const pageX = parseInt(event.pageX);
205+
const pageY = parseInt(event.pageY);
206+
const rect = this.st4te._menu_pos;
207+
console.log(rect)
208+
const perspective = 1;
209+
const currentScale = 1.0;
210+
const pos_x_in_canvas_container = pageX - rect.left | 0;
211+
const pos_y_in_canvas_container = pageY - rect.top | 0;
212+
213+
const x = perspective * (pos_x_in_canvas_container - rect.width / 2) / (rect.width / 2);
214+
const y = -perspective * (pos_y_in_canvas_container - rect.height / 2) / (rect.height / 2);
215+
const p_x = x > perspective ? x : x * 2;
216+
const p_y = y < 0 ? y : 2 * y;
217+
const p_x_things = 255 - p_x / 2 * 255;
218+
const p_y_things = p_y / 2 * 255;
219+
220+
const rotate_y = (p_x * 1.25 / currentScale * 1000 | 0) / 1000;
221+
const rotate_x = (p_y * 1.25 / currentScale * 1000 | 0) / 1000;
222+
const any_rotation = Boolean(rotate_x || rotate_y);
223+
224+
const transform_rotate = any_rotation ? `rotateX(${rotate_x}deg) rotateY(${rotate_y}deg)`: ``
225+
const background_image = any_rotation ? `linear-gradient(to right, rgba(
226+
${p_x_things.toFixed(3)},
227+
${p_x_things.toFixed(3)},
228+
${p_x_things.toFixed(3)},
229+
${(Math.abs(p_x * 0.1) / (perspective*2)).toFixed(2)}
230+
), rgba(
231+
${p_x_things.toFixed(3)},
232+
${p_x_things.toFixed(3)},
233+
${p_x_things.toFixed(3)},
234+
${(Math.abs(p_x * 0.6) / (perspective*2)).toFixed(2)}
235+
)), linear-gradient(to top, rgba(
236+
${p_y_things.toFixed(3)},
237+
${p_y_things.toFixed(3)},
238+
${p_y_things.toFixed(3)},
239+
${(Math.abs(p_y * 0.75) / (perspective*2)).toFixed(2)}
240+
), rgba(
241+
${p_y_things.toFixed(3)},
242+
${p_y_things.toFixed(3)},
243+
${p_y_things.toFixed(3)},
244+
${(Math.abs(p_y * 0.25) / (perspective*2)).toFixed(2)}
245+
))`: ``;
246+
const filter_force = (1 + (-rotate_y + rotate_x) / 80).toFixed(2);
247+
const filter = any_rotation ? `brightness(${filter_force}) contrast(${filter_force})`: "";
248+
249+
console.log(transform_rotate)
250+
this.setSt4te({
251+
_transform_rotate: transform_rotate,
252+
_background_image: background_image,
253+
_filter: filter
254+
}, () => {
255+
this.forceUpdate();
256+
});
257+
}
258+
150259
render() {
151260

152261
const {
153262
classes,
154263
open,
155-
hover
264+
hover,
265+
_transform_rotate,
266+
_background_image,
267+
_filter
156268
} = this.st4te;
157269

158270
return (
@@ -162,24 +274,32 @@ class NavigateOmniperium extends React.PureComponent {
162274
maxWidth={"xl"}
163275
onClose={this.props.onClose}
164276
disablePortal={true}
165-
keepMounted={true}>
166-
<OmniperiumMenu onHoverPathChange={(path) => {this.omniperium_hover(path)}} onPathChange={(path) => {this.omniperium_naviguate(path)}} className={classes.activateSVG} style={{height: "min(75vh, 75vw)", width: "min(75vh, 75vw)", margin: "auto"}}/>
277+
keepMounted={true}
278+
ref={this.setWrapperRef}>
279+
<div style={{perspective: 200}} ref={this.setMenuRef} className={classes.glitch}>
280+
<OmniperiumMenu onHoverPathChange={(path) => {this.omniperium_hover(path)}} onPathChange={(path) => {this.omniperium_naviguate(path)}} className={classes.activateSVG} style={{height: "min(75vh, 75vw)", width: "min(75vh, 75vw)", margin: "auto", transform: _transform_rotate, filter: _filter}}/>
281+
</div>
167282
</Dialog>
168-
<img src="/src/videos/omniperium/poster.png" width="720" height="720" style={{display: open ? "inherit": "none", pointerEvents: "none", zIndex: "1400", cursor: "pointer", aspectRatio: "1 / 1", width: "min(360px, 30vh)", height: "min(360px, 30vh)", position: "fixed", left: "0%", bottom: "0%", mixBlendMode: "lighten"}}/>
169-
<img src="/src/videos/omniperium/poster.png" width="720" height="720" style={{display: open ? "inherit": "none", pointerEvents: "none", zIndex: "1401", cursor: "pointer", aspectRatio: "1 / 1", width: "min(360px, 30vh)", height: "min(360px, 30vh)", position: "fixed", left: "0%", bottom: "0%", mixBlendMode: "multiply"}}/>
170-
<video width="720" height="720" style={{display: open ? "inherit": "none", pointerEvents: "none", zIndex: "1500", cursor: "pointer", aspectRatio: "1 / 1", width: "min(360px, 30vh)", height: "min(360px, 30vh)", position: "fixed", left: "0%", bottom: "0%", mixBlendMode: "lighten"}} key={hover} autoPlay={open} id="explanation-video">
171-
<source src={"/src/videos/omniperium/"+hover+".mp4"} type="video/mp4"/>
172-
</video>
173-
<video width="1920" height="1080" style={{display: open ? "inherit": "none", zIndex: "1401", pointerEvents: "none", minWidth: "100vw", aspectRatio: "16 / 9", position: "fixed", left: "0", bottom: "0", mixBlendMode: "lighten"}} id="particles-video" loop={false}>
174-
<source src="/src/videos/omnintro.mp4" type="video/mp4"/>
175-
</video>
176-
<video width="1920" height="1080" style={{display: open ? "inherit": "none", zIndex: "1400", pointerEvents: "none", minWidth: "100vw", aspectRatio: "16 / 9", position: "fixed", left: "0", bottom: "0", mixBlendMode: "lighten"}} id="particles-background-video" key={open} autoPlay={open} loop={open}>
177-
<source src="/src/videos/particles.mp4" type="video/mp4"/>
178-
</video>
179-
<img src="/src/images/omniperium/caution.svg" className={classes.restrictedSVG} style={{display: open ? "inherit": "none", pointerEvents: "none", zIndex: "1501", cursor: "pointer", aspectRatio: "340 / 23", width: "95vw", position: "fixed", left: "2.5vw", bottom: "5vh"}}/>
180-
<IconButton style={{position: "absolute", top: 16, right: 16, color: "white", zIndex: "1402",}} onClick={() => {this.omniperium_hover("explanation")}}>
181-
<InfoIcon style={{color: "currentColor"}}/>
182-
</IconButton>
283+
{
284+
open &&
285+
<React.Fragment>
286+
<img src="/src/videos/omniperium/poster.png" width="720" height="720" style={{display: open ? "inherit": "none", userSelect: "none", pointerEvents: "none", zIndex: "1400", cursor: "pointer", aspectRatio: "1 / 1", width: "min(360px, 30vh)", height: "min(360px, 30vh)", position: "fixed", left: "0%", bottom: "0%", mixBlendMode: "inherit"}}/>
287+
<img src="/src/videos/omniperium/poster.png" width="720" height="720" style={{display: open ? "inherit": "none", userSelect: "none", pointerEvents: "none", zIndex: "1401", cursor: "pointer", aspectRatio: "1 / 1", width: "min(360px, 30vh)", height: "min(360px, 30vh)", position: "fixed", left: "0%", bottom: "0%", mixBlendMode: "saturation"}}/>
288+
<video width="720" height="720" style={{display: open ? "inherit": "none", pointerEvents: "none", userSelect: "none", zIndex: "1500", cursor: "pointer", aspectRatio: "1 / 1", width: "min(360px, 30vh)", height: "min(360px, 30vh)", position: "fixed", left: "0%", bottom: "0%", mixBlendMode: "lighten"}} key={hover} autoPlay={open} id="explanation-video">
289+
<source src={"/src/videos/omniperium/"+hover+".mp4"} type="video/mp4"/>
290+
</video>
291+
<video width="1920" height="1080" style={{display: open ? "inherit": "none", zIndex: "1401", userSelect: "none", pointerEvents: "none", minWidth: "100vw", aspectRatio: "16 / 9", position: "fixed", left: "0", bottom: "0", mixBlendMode: "lighten"}} id="particles-video" loop={false}>
292+
<source src="/src/videos/particles3.mp4" type="video/mp4"/>
293+
</video>
294+
<video width="1920" height="1080" style={{display: open ? "inherit": "none", zIndex: "1250", userSelect: "none", pointerEvents: "none", minWidth: "100vw", aspectRatio: "16 / 9", position: "fixed", left: "0", bottom: "0", mixBlendMode: "lighten"}} id="particles-background-video" key={open} autoPlay={open} loop={open}>
295+
<source src="/src/videos/particles.mp4" type="video/mp4"/>
296+
</video>
297+
<img src="/src/images/omniperium/caution.svg" className={classes.restrictedSVG} style={{display: open ? "inherit": "none", userSelect: "none", pointerEvents: "none", zIndex: "1501", cursor: "pointer", aspectRatio: "340 / 23", width: "95vw", position: "fixed", left: "2.5vw", bottom: "5vh"}}/>
298+
<IconButton style={{position: "fixed", left: 16, right: 16, color: "white", zIndex: "1402",}} onClick={() => {this.omniperium_hover("explanation")}}>
299+
<InfoIcon style={{color: "currentColor"}}/>
300+
</IconButton>
301+
</React.Fragment>
302+
}
183303
</React.Fragment>
184304
);
185305
}

src/js/icons/OmniperiumMenu.js

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -741,20 +741,6 @@ export default class OmniperiumMenu extends React.PureComponent {
741741
vectorEffect="non-scaling-stroke"
742742
/>
743743
</g>
744-
<clipPath id="s">
745-
<path fill="#FFF" d="M424.786 504.919h235.738v72.834H424.786z" />
746-
</clipPath>
747-
<g clipPath="url(#s)">
748-
<path
749-
fill="#FFF"
750-
fillRule="evenodd"
751-
stroke="#FFF"
752-
strokeOpacity={100}
753-
strokeWidth={1.085}
754-
d="M465.42 535.897h3.945v-3.506c0-5.206-2.466-7.674-7.672-7.674h-10.632c-5.207 0-7.673 2.468-7.673 7.674v4c0 5.755 3.618 6.851 7.892 7.837l10.743 2.466c2.684.603 3.945 1.535 3.945 4.439v4.604c0 2.85-1.096 3.946-3.945 3.946H451.17c-2.85 0-3.945-1.096-3.945-3.946v-4.22h-3.946v3.892c0 5.206 2.466 7.672 7.672 7.672h11.29c5.207 0 7.673-2.466 7.673-7.672v-4.714c0-5.755-3.617-6.851-7.891-7.837l-10.743-2.466c-2.685-.603-3.946-1.535-3.946-4.439v-3.892c0-2.85 1.096-3.946 3.946-3.946h10.194c2.85 0 3.946 1.096 3.946 3.946v3.836zm25.922 27.184V549.49l13.647-24.773h-4.164l-11.401 20.772-11.4-20.772h-4.274l13.647 24.773v13.591h3.945zm39.624-27.184h3.947v-3.506c0-5.206-2.467-7.674-7.674-7.674h-10.632c-5.206 0-7.672 2.468-7.672 7.674v4c0 5.755 3.617 6.851 7.891 7.837l10.743 2.466c2.685.603 3.946 1.535 3.946 4.439v4.604c0 2.85-1.096 3.946-3.946 3.946h-10.852c-2.85 0-3.946-1.096-3.946-3.946v-4.22h-3.946v3.892c0 5.206 2.466 7.672 7.673 7.672h11.29c5.206 0 7.673-2.466 7.673-7.672v-4.714c0-5.755-3.618-6.851-7.892-7.837l-10.743-2.466c-2.685-.603-3.945-1.535-3.945-4.439v-3.892c0-2.85 1.095-3.946 3.945-3.946h10.194c2.85 0 3.946 1.096 3.946 3.946v3.836zm36.939-7.563v-3.617h-27.512v3.617h11.783v34.747h3.947v-34.747h11.782zm7.016-3.617v38.364h24.278v-3.617h-20.333V545.27h17.155v-3.617h-17.155v-13.319h20.333v-3.617h-24.278zm68.012 0h-4.932l-12.823 28.061-12.77-28.061h-4.934v38.364h3.727v-32.5l12.167 26.965h3.562l12.167-26.965v32.5h3.836v-38.364z"
755-
vectorEffect="non-scaling-stroke"
756-
/>
757-
</g>
758744
<clipPath id="t">
759745
<path fill="#FFF" d="M721.898 342.904h235.738v52.95H721.898z" />
760746
</clipPath>

0 commit comments

Comments
 (0)