mirror of
https://github.com/netbymatt/ws4kp.git
synced 2026-04-18 09:39:30 -07:00
Compare commits
19 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
68a6bae3a7 | ||
|
|
5f0f0d9000 | ||
|
|
9d9cf4b0f3 | ||
|
|
9e500143c0 | ||
|
|
71da682660 | ||
|
|
1b9a1dcb22 | ||
|
|
095761ee81 | ||
|
|
21e528aaa3 | ||
|
|
a92c632937 | ||
|
|
6073fd1733 | ||
|
|
5da8185633 | ||
|
|
cf5c818ee3 | ||
|
|
97cec114f6 | ||
|
|
7efd2e8db7 | ||
|
|
8c28f41d54 | ||
|
|
e9d603fbfc | ||
|
|
32aa43c5b1 | ||
|
|
dbc56f014a | ||
|
|
3161a03797 |
@@ -31,7 +31,7 @@ To run via Node locally:
|
|||||||
git clone https://github.com/netbymatt/ws4kp.git
|
git clone https://github.com/netbymatt/ws4kp.git
|
||||||
cd ws4kp
|
cd ws4kp
|
||||||
npm i
|
npm i
|
||||||
node index.js
|
node index.mjs
|
||||||
```
|
```
|
||||||
|
|
||||||
To run via Docker:
|
To run via Docker:
|
||||||
|
|||||||
@@ -99,8 +99,11 @@ const server = app.listen(port, () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// graceful shutdown
|
// graceful shutdown
|
||||||
process.on('SIGINT', () => {
|
const gracefulShutdown = () => {
|
||||||
server.close(() => {
|
server.close(() => {
|
||||||
console.log('Server closed');
|
console.log('Server closed');
|
||||||
});
|
});
|
||||||
});
|
};
|
||||||
|
|
||||||
|
process.on('SIGINT', gracefulShutdown);
|
||||||
|
process.on('SIGTERM', gracefulShutdown);
|
||||||
|
|||||||
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "ws4kp",
|
"name": "ws4kp",
|
||||||
"version": "5.21.2",
|
"version": "5.21.8",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "ws4kp",
|
"name": "ws4kp",
|
||||||
"version": "5.21.2",
|
"version": "5.21.8",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"dotenv": "^16.5.0",
|
"dotenv": "^16.5.0",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "ws4kp",
|
"name": "ws4kp",
|
||||||
"version": "5.21.2",
|
"version": "5.21.8",
|
||||||
"description": "Welcome to the WeatherStar 4000+ project page!",
|
"description": "Welcome to the WeatherStar 4000+ project page!",
|
||||||
"main": "index.mjs",
|
"main": "index.mjs",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
|
|||||||
BIN
server/images/nav/ic_scanlines_off_white_24dp_2x.png
Normal file
BIN
server/images/nav/ic_scanlines_off_white_24dp_2x.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 893 B |
BIN
server/images/nav/ic_scanlines_on_white_24dp_2x.png
Normal file
BIN
server/images/nav/ic_scanlines_on_white_24dp_2x.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 367 B |
@@ -38,6 +38,7 @@ const init = () => {
|
|||||||
document.querySelector('#NavigateNext').addEventListener('click', btnNavigateNextClick);
|
document.querySelector('#NavigateNext').addEventListener('click', btnNavigateNextClick);
|
||||||
document.querySelector('#NavigatePrevious').addEventListener('click', btnNavigatePreviousClick);
|
document.querySelector('#NavigatePrevious').addEventListener('click', btnNavigatePreviousClick);
|
||||||
document.querySelector('#NavigatePlay').addEventListener('click', btnNavigatePlayClick);
|
document.querySelector('#NavigatePlay').addEventListener('click', btnNavigatePlayClick);
|
||||||
|
document.querySelector('#ToggleScanlines').addEventListener('click', btnNavigateToggleScanlines);
|
||||||
document.querySelector(TOGGLE_FULL_SCREEN_SELECTOR).addEventListener('click', btnFullScreenClick);
|
document.querySelector(TOGGLE_FULL_SCREEN_SELECTOR).addEventListener('click', btnFullScreenClick);
|
||||||
const btnGetGps = document.querySelector(BNT_GET_GPS_SELECTOR);
|
const btnGetGps = document.querySelector(BNT_GET_GPS_SELECTOR);
|
||||||
btnGetGps.addEventListener('click', btnGetGpsClick);
|
btnGetGps.addEventListener('click', btnGetGpsClick);
|
||||||
@@ -294,6 +295,8 @@ const updateFullScreenNavigate = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const documentKeydown = (e) => {
|
const documentKeydown = (e) => {
|
||||||
|
// don't trigger on ctrl/alt/shift modified key
|
||||||
|
if (e.altKey || e.ctrlKey || e.shiftKey) return false;
|
||||||
const { key } = e;
|
const { key } = e;
|
||||||
|
|
||||||
if (document.fullscreenElement || document.activeElement === document.body) {
|
if (document.fullscreenElement || document.activeElement === document.body) {
|
||||||
@@ -344,6 +347,11 @@ const btnNavigatePlayClick = () => {
|
|||||||
return false;
|
return false;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const btnNavigateToggleScanlines = () => {
|
||||||
|
settings.scanLines.value = !settings.scanLines.value;
|
||||||
|
return false;
|
||||||
|
};
|
||||||
|
|
||||||
// post a message to the iframe
|
// post a message to the iframe
|
||||||
const postMessage = (type, myMessage = {}) => {
|
const postMessage = (type, myMessage = {}) => {
|
||||||
navMessage({ type, message: myMessage });
|
navMessage({ type, message: myMessage });
|
||||||
|
|||||||
@@ -50,6 +50,8 @@ class CurrentWeather extends WeatherDisplay {
|
|||||||
stillWaiting: () => this.stillWaiting(),
|
stillWaiting: () => this.stillWaiting(),
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (observations.features.length === 0) throw new Error(`No features returned for station: ${station.properties.stationIdentifier}, trying next station`);
|
||||||
|
|
||||||
// test data quality
|
// test data quality
|
||||||
if (observations.features[0].properties.temperature.value === null
|
if (observations.features[0].properties.temperature.value === null
|
||||||
|| observations.features[0].properties.windSpeed.value === null
|
|| observations.features[0].properties.windSpeed.value === null
|
||||||
@@ -59,10 +61,11 @@ class CurrentWeather extends WeatherDisplay {
|
|||||||
|| observations.features[0].properties.dewpoint.value === null
|
|| observations.features[0].properties.dewpoint.value === null
|
||||||
|| observations.features[0].properties.barometricPressure.value === null) {
|
|| observations.features[0].properties.barometricPressure.value === null) {
|
||||||
observations = undefined;
|
observations = undefined;
|
||||||
throw new Error(`Unable to get observations: ${station.properties.stationIdentifier}, trying next station`);
|
throw new Error(`Incomplete data set for: ${station.properties.stationIdentifier}, trying next station`);
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(error);
|
console.error(error);
|
||||||
|
observations = undefined;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// test for data received
|
// test for data received
|
||||||
|
|||||||
@@ -126,6 +126,7 @@ const regexList = [
|
|||||||
[/chance /gi, ''],
|
[/chance /gi, ''],
|
||||||
[/very /gi, ''],
|
[/very /gi, ''],
|
||||||
[/patchy /gi, ''],
|
[/patchy /gi, ''],
|
||||||
|
[/Areas Of /gi, ''],
|
||||||
[/areas /gi, ''],
|
[/areas /gi, ''],
|
||||||
[/dense /gi, ''],
|
[/dense /gi, ''],
|
||||||
[/Thunderstorm/g, 'T\'Storm'],
|
[/Thunderstorm/g, 'T\'Storm'],
|
||||||
|
|||||||
@@ -39,9 +39,6 @@ class Radar extends WeatherDisplay {
|
|||||||
{ time: 1, si: 4 },
|
{ time: 1, si: 4 },
|
||||||
{ time: 12, si: 5 },
|
{ time: 12, si: 5 },
|
||||||
];
|
];
|
||||||
|
|
||||||
// get some web workers started
|
|
||||||
this.workers = (new Array(this.dopplerRadarImageMax)).fill(null).map(() => radarWorker());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async getData(weatherParameters, refresh) {
|
async getData(weatherParameters, refresh) {
|
||||||
@@ -53,6 +50,12 @@ class Radar extends WeatherDisplay {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// get the workers started
|
||||||
|
if (!this.workers) {
|
||||||
|
// get some web workers started
|
||||||
|
this.workers = (new Array(this.dopplerRadarImageMax)).fill(null).map(() => radarWorker());
|
||||||
|
}
|
||||||
|
|
||||||
const baseUrl = `https://${RADAR_HOST}/archive/data/`;
|
const baseUrl = `https://${RADAR_HOST}/archive/data/`;
|
||||||
const baseUrlEnd = '/GIS/uscomp/?F=0&P=n0r*.png';
|
const baseUrlEnd = '/GIS/uscomp/?F=0&P=n0r*.png';
|
||||||
const baseUrls = [];
|
const baseUrls = [];
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import { json } from './utils/fetch.mjs';
|
|||||||
import { temperature as temperatureUnit } from './utils/units.mjs';
|
import { temperature as temperatureUnit } from './utils/units.mjs';
|
||||||
import { getSmallIcon } from './icons.mjs';
|
import { getSmallIcon } from './icons.mjs';
|
||||||
import { preloadImg } from './utils/image.mjs';
|
import { preloadImg } from './utils/image.mjs';
|
||||||
import { DateTime } from '../vendor/auto/luxon.mjs';
|
import { DateTime, Interval } from '../vendor/auto/luxon.mjs';
|
||||||
import WeatherDisplay from './weatherdisplay.mjs';
|
import WeatherDisplay from './weatherdisplay.mjs';
|
||||||
import { registerDisplay } from './navigation.mjs';
|
import { registerDisplay } from './navigation.mjs';
|
||||||
import * as utils from './regionalforecast-utils.mjs';
|
import * as utils from './regionalforecast-utils.mjs';
|
||||||
@@ -77,6 +77,9 @@ class RegionalForecast extends WeatherDisplay {
|
|||||||
// get a unit converter
|
// get a unit converter
|
||||||
const temperatureConverter = temperatureUnit();
|
const temperatureConverter = temperatureUnit();
|
||||||
|
|
||||||
|
// get now as DateTime for calculations below
|
||||||
|
const now = DateTime.now();
|
||||||
|
|
||||||
// get regional forecasts and observations (the two are intertwined due to the design of api.weather.gov)
|
// get regional forecasts and observations (the two are intertwined due to the design of api.weather.gov)
|
||||||
const regionalDataAll = await Promise.all(regionalCities.map(async (city) => {
|
const regionalDataAll = await Promise.all(regionalCities.map(async (city) => {
|
||||||
try {
|
try {
|
||||||
@@ -110,14 +113,24 @@ class RegionalForecast extends WeatherDisplay {
|
|||||||
preloadImg(getSmallIcon(regionalObservation.icon, !regionalObservation.daytime));
|
preloadImg(getSmallIcon(regionalObservation.icon, !regionalObservation.daytime));
|
||||||
|
|
||||||
// return a pared-down forecast
|
// return a pared-down forecast
|
||||||
// 0th object is the current conditions
|
// 0th object should contain the current conditions, but when WFOs go offline or otherwise don't post
|
||||||
// first object is the next period i.e. if it's daytime then it's the "tonight" forecast
|
// an updated forecast it's possible that the 0th object is in the past.
|
||||||
// second object is the following period
|
// so we go on a search for the current time in the start/end times provided in the forecast periods
|
||||||
// always skip the first forecast index because it's what's going on right now
|
const { periods } = forecast.properties;
|
||||||
|
const currentPeriod = periods.reduce((prev, period, index) => {
|
||||||
|
const start = DateTime.fromISO(period.startTime);
|
||||||
|
const end = DateTime.fromISO(period.endTime);
|
||||||
|
const interval = Interval.fromDateTimes(start, end);
|
||||||
|
if (interval.contains(now)) {
|
||||||
|
return index;
|
||||||
|
}
|
||||||
|
return prev;
|
||||||
|
}, 0);
|
||||||
|
// group together the current observation and next two periods
|
||||||
return [
|
return [
|
||||||
regionalObservation,
|
regionalObservation,
|
||||||
utils.buildForecast(forecast.properties.periods[1], city, cityXY),
|
utils.buildForecast(forecast.properties.periods[currentPeriod + 1], city, cityXY),
|
||||||
utils.buildForecast(forecast.properties.periods[2], city, cityXY),
|
utils.buildForecast(forecast.properties.periods[currentPeriod + 2], city, cityXY),
|
||||||
];
|
];
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(`No regional forecast data for '${city.name ?? city.city}'`);
|
console.log(`No regional forecast data for '${city.name ?? city.city}'`);
|
||||||
|
|||||||
@@ -33,6 +33,12 @@ const init = () => {
|
|||||||
[1.5, 'Very Slow'],
|
[1.5, 'Very Slow'],
|
||||||
],
|
],
|
||||||
});
|
});
|
||||||
|
settings.scanLines = new Setting('scanLines', {
|
||||||
|
name: 'Scan Lines',
|
||||||
|
defaultValue: false,
|
||||||
|
changeAction: scanLineChange,
|
||||||
|
sticky: true,
|
||||||
|
});
|
||||||
settings.units = new Setting('units', {
|
settings.units = new Setting('units', {
|
||||||
name: 'Units',
|
name: 'Units',
|
||||||
type: 'select',
|
type: 'select',
|
||||||
@@ -85,6 +91,18 @@ const kioskChange = (value) => {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const scanLineChange = (value) => {
|
||||||
|
const container = document.getElementById('container');
|
||||||
|
const navIcons = document.getElementById('ToggleScanlines');
|
||||||
|
if (value) {
|
||||||
|
container.classList.add('scanlines');
|
||||||
|
navIcons.classList.add('on');
|
||||||
|
} else {
|
||||||
|
container.classList.remove('scanlines');
|
||||||
|
navIcons.classList.remove('on');
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
const unitChange = () => {
|
const unitChange = () => {
|
||||||
// reload the data at the top level to refresh units
|
// reload the data at the top level to refresh units
|
||||||
// after the initial load
|
// after the initial load
|
||||||
|
|||||||
@@ -5,6 +5,11 @@ const text = (url, params) => fetchAsync(url, 'text', params);
|
|||||||
const blob = (url, params) => fetchAsync(url, 'blob', params);
|
const blob = (url, params) => fetchAsync(url, 'blob', params);
|
||||||
|
|
||||||
const fetchAsync = async (_url, responseType, _params = {}) => {
|
const fetchAsync = async (_url, responseType, _params = {}) => {
|
||||||
|
// add user agent header to json request at api.weather.gov
|
||||||
|
const headers = {};
|
||||||
|
if (_url.toString().match(/api\.weather\.gov/)) {
|
||||||
|
headers['user-agent'] = 'Weatherstar 4000+; weatherstar@netbymatt.com';
|
||||||
|
}
|
||||||
// combine default and provided parameters
|
// combine default and provided parameters
|
||||||
const params = {
|
const params = {
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
@@ -12,6 +17,7 @@ const fetchAsync = async (_url, responseType, _params = {}) => {
|
|||||||
type: 'GET',
|
type: 'GET',
|
||||||
retryCount: 0,
|
retryCount: 0,
|
||||||
..._params,
|
..._params,
|
||||||
|
headers,
|
||||||
};
|
};
|
||||||
// store original number of retries
|
// store original number of retries
|
||||||
params.originalRetries = params.retryCount;
|
params.originalRetries = params.retryCount;
|
||||||
|
|||||||
@@ -189,7 +189,7 @@ class Setting {
|
|||||||
break;
|
break;
|
||||||
case 'checkbox':
|
case 'checkbox':
|
||||||
default:
|
default:
|
||||||
this.element.checked = newValue;
|
this.element.querySelector('input').checked = newValue;
|
||||||
}
|
}
|
||||||
this.storeToLocalStorage(this.myValue);
|
this.storeToLocalStorage(this.myValue);
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -23,6 +23,8 @@ body {
|
|||||||
|
|
||||||
&.kiosk {
|
&.kiosk {
|
||||||
margin: 0px;
|
margin: 0px;
|
||||||
|
overflow: hidden;
|
||||||
|
width: 100vw;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -141,6 +143,10 @@ body {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.kiosk #divTwc {
|
||||||
|
max-width: unset;
|
||||||
|
}
|
||||||
|
|
||||||
#divTwcLeft {
|
#divTwcLeft {
|
||||||
display: none;
|
display: none;
|
||||||
text-align: right;
|
text-align: right;
|
||||||
@@ -322,10 +328,6 @@ body {
|
|||||||
transform-origin: unset;
|
transform-origin: unset;
|
||||||
}
|
}
|
||||||
|
|
||||||
.kiosk #divTwc #container {
|
|
||||||
transform-origin: 0 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
#loading {
|
#loading {
|
||||||
width: 640px;
|
width: 640px;
|
||||||
height: 480px;
|
height: 480px;
|
||||||
@@ -426,10 +428,6 @@ body {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.kiosk #divTwc {
|
|
||||||
justify-content: unset;
|
|
||||||
}
|
|
||||||
|
|
||||||
#divTwc:fullscreen #display,
|
#divTwc:fullscreen #display,
|
||||||
.kiosk #divTwc #display {
|
.kiosk #divTwc #display {
|
||||||
position: relative;
|
position: relative;
|
||||||
@@ -458,6 +456,30 @@ body {
|
|||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ToggleScanlines {
|
||||||
|
display: inline-block;
|
||||||
|
|
||||||
|
.on {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.off {
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
&.on {
|
||||||
|
.on {
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.off {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.visible {
|
.visible {
|
||||||
visibility: visible;
|
visibility: visible;
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
@@ -750,6 +772,7 @@ body {
|
|||||||
|
|
||||||
#divQuery,
|
#divQuery,
|
||||||
>.info,
|
>.info,
|
||||||
|
>.related-links,
|
||||||
>.heading,
|
>.heading,
|
||||||
#enabledDisplays,
|
#enabledDisplays,
|
||||||
#settings,
|
#settings,
|
||||||
|
|||||||
@@ -14,3 +14,4 @@
|
|||||||
@use 'hazards';
|
@use 'hazards';
|
||||||
@use 'media';
|
@use 'media';
|
||||||
@use 'spc-outlook';
|
@use 'spc-outlook';
|
||||||
|
@use 'shared/scanlines';
|
||||||
106
server/styles/scss/shared/_scanlines.scss
Normal file
106
server/styles/scss/shared/_scanlines.scss
Normal file
@@ -0,0 +1,106 @@
|
|||||||
|
/* REGULAR SCANLINES SETTINGS */
|
||||||
|
|
||||||
|
// width of 1 scanline (min.: 1px)
|
||||||
|
$scan-width: 1px;
|
||||||
|
|
||||||
|
// emulates a damage-your-eyes bad pre-2000 CRT screen ♥ (true, false)
|
||||||
|
$scan-crt: false;
|
||||||
|
|
||||||
|
// frames-per-second (should be > 1), only applies if $scan-crt: true;
|
||||||
|
$scan-fps: 20;
|
||||||
|
|
||||||
|
// scanline-color (rgba)
|
||||||
|
$scan-color: rgba(#000, .3);
|
||||||
|
|
||||||
|
// set z-index on 8, like in ♥ 8-bits ♥, or…
|
||||||
|
// set z-index on 2147483648 or more to enable scanlines on Chrome fullscreen (doesn't work in Firefox or IE);
|
||||||
|
$scan-z-index: 2147483648;
|
||||||
|
|
||||||
|
/* MOVING SCANLINE SETTINGS */
|
||||||
|
|
||||||
|
// moving scanline (true, false)
|
||||||
|
$scan-moving-line: true;
|
||||||
|
|
||||||
|
// opacity of the moving scanline
|
||||||
|
$scan-opacity: .75;
|
||||||
|
|
||||||
|
/* MIXINS */
|
||||||
|
|
||||||
|
// apply CRT animation: @include scan-crt($scan-crt);
|
||||||
|
@mixin scan-crt($scan-crt) {
|
||||||
|
@if $scan-crt==true {
|
||||||
|
animation: scanlines 1s steps($scan-fps) infinite;
|
||||||
|
}
|
||||||
|
|
||||||
|
@else {
|
||||||
|
animation: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// apply CRT animation: @include scan-crt($scan-crt);
|
||||||
|
@mixin scan-moving($scan-moving-line) {
|
||||||
|
@if $scan-moving-line==true {
|
||||||
|
animation: scanline 6s linear infinite;
|
||||||
|
}
|
||||||
|
|
||||||
|
@else {
|
||||||
|
animation: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* CSS .scanlines CLASS */
|
||||||
|
|
||||||
|
.scanlines {
|
||||||
|
position: relative;
|
||||||
|
overflow: hidden; // only to animate the unique scanline
|
||||||
|
|
||||||
|
&:before,
|
||||||
|
&:after {
|
||||||
|
display: block;
|
||||||
|
pointer-events: none;
|
||||||
|
content: '';
|
||||||
|
position: absolute;
|
||||||
|
}
|
||||||
|
|
||||||
|
// unique scanline travelling on the screen
|
||||||
|
&:before {
|
||||||
|
// position: absolute;
|
||||||
|
// bottom: 100%;
|
||||||
|
width: 100%;
|
||||||
|
height: $scan-width * 1;
|
||||||
|
z-index: $scan-z-index + 1;
|
||||||
|
background: $scan-color;
|
||||||
|
opacity: $scan-opacity;
|
||||||
|
// animation: scanline 6s linear infinite;
|
||||||
|
@include scan-moving($scan-moving-line);
|
||||||
|
}
|
||||||
|
|
||||||
|
// the scanlines, so!
|
||||||
|
&:after {
|
||||||
|
top: 0;
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
|
left: 0;
|
||||||
|
z-index: $scan-z-index;
|
||||||
|
background: linear-gradient(to bottom,
|
||||||
|
transparent 50%,
|
||||||
|
$scan-color 51%);
|
||||||
|
background-size: 100% $scan-width*2;
|
||||||
|
@include scan-crt($scan-crt);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ANIMATE UNIQUE SCANLINE */
|
||||||
|
@keyframes scanline {
|
||||||
|
0% {
|
||||||
|
transform: translate3d(0, 200000%, 0);
|
||||||
|
// bottom: 0%; // to have a continuous scanline move, use this line (here in 0% step) instead of transform and write, in &:before, { position: absolute; bottom: 100%; }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes scanlines {
|
||||||
|
0% {
|
||||||
|
background-position: 0 50%;
|
||||||
|
// bottom: 0%; // to have a continuous scanline move, use this line (here in 0% step) instead of transform and write, in &:before, { position: absolute; bottom: 100%; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -145,6 +145,10 @@
|
|||||||
<img class="navButton off" src="images/nav/ic_volume_off_white_24dp_2x.png" title="Unmute" />
|
<img class="navButton off" src="images/nav/ic_volume_off_white_24dp_2x.png" title="Unmute" />
|
||||||
<img class="navButton on" src="images/nav/ic_volume_on_white_24dp_2x.png" title="Mute" />
|
<img class="navButton on" src="images/nav/ic_volume_on_white_24dp_2x.png" title="Mute" />
|
||||||
</div>
|
</div>
|
||||||
|
<div id="ToggleScanlines">
|
||||||
|
<img class="navButton off" src="images/nav/ic_scanlines_off_white_24dp_2x.png" title="Scan lines on" />
|
||||||
|
<img class="navButton on" src="images/nav/ic_scanlines_on_white_24dp_2x.png" title="Scan lines off" />
|
||||||
|
</div>
|
||||||
<img id="ToggleFullScreen" class="navButton" src="images/nav/ic_fullscreen_white_24dp_2x.png" title="Enter Fullscreen" />
|
<img id="ToggleFullScreen" class="navButton" src="images/nav/ic_fullscreen_white_24dp_2x.png" title="Enter Fullscreen" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user