changed some stuff - moving project off of 'code-server'
This commit is contained in:
parent
c2d7333228
commit
7b33b35315
22
.vscode/launch.json
vendored
22
.vscode/launch.json
vendored
|
@ -1,22 +0,0 @@
|
||||||
{
|
|
||||||
"version": "0.0.1",
|
|
||||||
"configurations": [
|
|
||||||
{
|
|
||||||
"type": "node-terminal",
|
|
||||||
"request": "launch",
|
|
||||||
"name": "debug",
|
|
||||||
"command": "yarn serve"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "chrome",
|
|
||||||
"request": "launch",
|
|
||||||
"name": "vuejs: chrome",
|
|
||||||
"url": "http://ws-dso:8080",
|
|
||||||
"webRoot": "${workspaceFolder}/src",
|
|
||||||
"breakOnLoad": true,
|
|
||||||
"sourceMapPathOverrides": {
|
|
||||||
"webpack:///src/*": "${webRoot}/*"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
]
|
|
||||||
}
|
|
22
.vscode/tasks.json
vendored
Normal file
22
.vscode/tasks.json
vendored
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
{
|
||||||
|
"version": "2.0.0",
|
||||||
|
"tasks": [
|
||||||
|
{
|
||||||
|
"label": "build",
|
||||||
|
"type": "shell",
|
||||||
|
"command": "yarn",
|
||||||
|
"args": [
|
||||||
|
"build"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "serve",
|
||||||
|
"type": "shell",
|
||||||
|
"command": "yarn",
|
||||||
|
"args": [
|
||||||
|
"run",
|
||||||
|
"serve"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
|
@ -9,7 +9,7 @@
|
||||||
"url": "https://git.velvettear.de/velvettear/autoscroll.git"
|
"url": "https://git.velvettear.de/velvettear/autoscroll.git"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"serve": "vue-cli-service serve",
|
"serve": "vue-cli-service serve --host 0.0.0.0 --port 9000",
|
||||||
"build": "vue-cli-service build"
|
"build": "vue-cli-service build"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
@ -19,7 +19,7 @@
|
||||||
"vue-router": "^3.5.3"
|
"vue-router": "^3.5.3"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@vue/cli-service": "^4.5.0",
|
"@vue/cli-service": "^3.12.1",
|
||||||
"vue-template-compiler": "^2.6.11"
|
"vue-template-compiler": "^2.6.11"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,5 +3,5 @@
|
||||||
"title": "Funeralopolis",
|
"title": "Funeralopolis",
|
||||||
"bass": "Electric Wizard - Funeralopolis_inverted.png",
|
"bass": "Electric Wizard - Funeralopolis_inverted.png",
|
||||||
"media": "Electric Wizard - Funeralopolis.mp3",
|
"media": "Electric Wizard - Funeralopolis.mp3",
|
||||||
"duration": 140
|
"duration": 532
|
||||||
}
|
}
|
|
@ -49,42 +49,50 @@ export default {
|
||||||
var pageLeft = pageEnd - this.getViewPortMax();
|
var pageLeft = pageEnd - this.getViewPortMax();
|
||||||
|
|
||||||
var percentagePageLeft = pageLeft / (pageEnd / 100);
|
var percentagePageLeft = pageLeft / (pageEnd / 100);
|
||||||
var percentageDurationLeft = ((this.entry.duration * 1000) / 100) * percentagePageLeft;
|
var percentageDurationLeft =
|
||||||
|
((this.entry.duration * 1000) / 100) * percentagePageLeft;
|
||||||
|
|
||||||
console.log("DURATION LEFT " + this.entry.duration * (percentagePageLeft / 100))
|
console.log("pixels left: " + pageLeft);
|
||||||
|
var durationLeft = this.entry.duration * (percentagePageLeft / 100);
|
||||||
|
console.log("duration left: " + durationLeft + " seconds");
|
||||||
|
var pixelsPerSec = pageLeft / durationLeft;
|
||||||
|
console.log("need to scroll " + pixelsPerSec + " pixels / sec");
|
||||||
|
|
||||||
|
var scroll = pixelsPerSec / 100;
|
||||||
|
console.log("need to scroll " + scroll + " pixels / 100 ms");
|
||||||
|
|
||||||
|
console.log("estimated scrolls: " + (pageLeft / scroll))
|
||||||
|
|
||||||
var sleep = 10;
|
var sleep = 10;
|
||||||
var sleeps = percentageDurationLeft / sleep;
|
|
||||||
|
|
||||||
var scrollHeight = pageLeft / sleeps;
|
|
||||||
var heightDiff = 1 - scrollHeight;
|
|
||||||
if (heightDiff >= 0) {
|
|
||||||
scrollHeight = 1;
|
|
||||||
console.log("FIX HEIGHT BY: " + heightDiff)
|
|
||||||
sleep = sleep * (1 + heightDiff);
|
|
||||||
console.log("NEW SLEEP: " + sleep)
|
|
||||||
}
|
|
||||||
|
|
||||||
var scrolls = 0;
|
var scrolls = 0;
|
||||||
var start = new Date();
|
var start = new Date();
|
||||||
|
var timediff = 0;
|
||||||
while (this.scrolling) {
|
while (this.scrolling) {
|
||||||
var scrollTarget = this.getViewPortMax() + scrollHeight;
|
var startPrec = window.performance.now();
|
||||||
|
var scrollTarget = this.getViewPortMax() + scroll;
|
||||||
if (scrollTarget >= pageEnd) {
|
if (scrollTarget >= pageEnd) {
|
||||||
window.scrollTo(0, pageEnd);
|
window.scrollTo(0, pageEnd);
|
||||||
this.scrolling = false;
|
this.scrolling = false;
|
||||||
var time = new Date().getTime() - start.getTime();
|
var time = new Date().getTime() - start.getTime();
|
||||||
console.log(
|
console.log(
|
||||||
"end of page reached after " +
|
"end of page reached after " +
|
||||||
time +
|
time / 1000 +
|
||||||
"ms - scrolls: " +
|
" seconds - scrolls: " +
|
||||||
scrolls +
|
scrolls +
|
||||||
" times"
|
" times"
|
||||||
);
|
);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
scrolls++;
|
scrolls++;
|
||||||
window.scrollBy(0, scrollHeight);
|
window.scrollBy(0, scroll);
|
||||||
await this.sleep(sleep);
|
timediff += window.performance.now() - startPrec;
|
||||||
|
if (timediff >= 2) {
|
||||||
|
await this.sleep(sleep - timediff);
|
||||||
|
timediff = 0
|
||||||
|
} else {
|
||||||
|
await this.sleep(sleep);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.scrolling = false;
|
this.scrolling = false;
|
||||||
|
|
|
@ -1,3 +1,14 @@
|
||||||
module.exports = {
|
module.exports = {
|
||||||
runtimeCompiler: true
|
runtimeCompiler: true,
|
||||||
|
chainWebpack: (config) => {
|
||||||
|
config
|
||||||
|
.plugin('html')
|
||||||
|
.tap((args) => {
|
||||||
|
args[0].title = "tabber";
|
||||||
|
return args;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
configureWebpack: {
|
||||||
|
devtool: 'source-map'
|
||||||
|
}
|
||||||
}
|
}
|
Loading…
Reference in a new issue