mirror of
https://github.com/TangentFoxy/memex.git
synced 2024-11-22 04:54:23 +00:00
Fixed page loading.
This commit is contained in:
parent
9bd3256c07
commit
eb53eec5ed
@ -130,13 +130,13 @@ DECIDE TO MAKE
|
|||||||
NOTE : Deciding what to make.
|
NOTE : Deciding what to make.
|
||||||
SEEN : false
|
SEEN : false
|
||||||
|
|
||||||
ALT WAD
|
ALT WAD EXPLAINED
|
||||||
PERS : Phil James
|
PERS : Phil James
|
||||||
LINK : https://unwinnable.com/2013/10/24/lost-worlds-a-l-t/
|
LINK : https://unwinnable.com/2013/10/24/lost-worlds-a-l-t/
|
||||||
TYPE : article
|
TYPE : article
|
||||||
DATE : 12018-07-03
|
DATE : 12018-07-03
|
||||||
TAGS : gamedev
|
TAGS : gamedev, game
|
||||||
NOTE : ALT explained.
|
NOTE : 'ALT' an original Doom level pack collab
|
||||||
SEEN : true
|
SEEN : true
|
||||||
PROG : Finish playing it. Level 7?
|
PROG : Finish playing it. Level 7?
|
||||||
|
|
||||||
@ -166,15 +166,17 @@ CYCLIC DUNGEON
|
|||||||
LINK : http://ctrl500.com/tech/handcrafted-feel-dungeon-generation-unexplored-explores-cyclic-dungeon-generation/
|
LINK : http://ctrl500.com/tech/handcrafted-feel-dungeon-generation-unexplored-explores-cyclic-dungeon-generation/
|
||||||
TYPE : article
|
TYPE : article
|
||||||
DATE : 12018-07-03
|
DATE : 12018-07-03
|
||||||
TAGS : gamedev
|
TAGS : gamedev, game
|
||||||
SEEN : false
|
SEEN : false
|
||||||
|
NOTE : 'Unexplored' game
|
||||||
|
|
||||||
GENERATE GREAT DUNGEONS
|
GENERATE GREAT DUNGEONS
|
||||||
LINK : https://www.rockpapershotgun.com/2017/03/10/how-unexplored-generates-great-roguelike-dungeons/
|
LINK : https://www.rockpapershotgun.com/2017/03/10/how-unexplored-generates-great-roguelike-dungeons/
|
||||||
TYPE : article
|
TYPE : article
|
||||||
DATE : 12018-07-03
|
DATE : 12018-07-03
|
||||||
TAGS : gamedev
|
TAGS : gamedev, game
|
||||||
SEEN : false
|
SEEN : false
|
||||||
|
NOTE : 'Unexplored' game
|
||||||
|
|
||||||
TECHNOLOGIST CLIMATE
|
TECHNOLOGIST CLIMATE
|
||||||
LINK : http://worrydream.com/ClimateChange/
|
LINK : http://worrydream.com/ClimateChange/
|
||||||
@ -230,9 +232,10 @@ SIGNAL TOLVA
|
|||||||
LINK : https://killscreen.com/articles/quick-look-landscape-art-signal-tolva/
|
LINK : https://killscreen.com/articles/quick-look-landscape-art-signal-tolva/
|
||||||
TYPE : article
|
TYPE : article
|
||||||
DATE : 12018-07-03
|
DATE : 12018-07-03
|
||||||
TAGS : gamedev
|
TAGS : gamedev, game
|
||||||
QOTE : 'I would have been even more cryptic if I thought I could get away with it'
|
QOTE : 'I would have been even more cryptic if I thought I could get away with it'
|
||||||
SEEN : false
|
SEEN : false
|
||||||
|
NOTE : 'Signal From Tolva'
|
||||||
|
|
||||||
FOLDED LEVEL DESIGN
|
FOLDED LEVEL DESIGN
|
||||||
LINK : http://critical-gaming.com/blog/2008/8/5/folded-level-design.html
|
LINK : http://critical-gaming.com/blog/2008/8/5/folded-level-design.html
|
||||||
@ -267,8 +270,9 @@ HYPER LIGHT DIFFICULTY
|
|||||||
LINK : https://www.gamasutra.com/view/news/269957/How_Hyper_Light_Drifter_balances_difficulty_with_fairness.php
|
LINK : https://www.gamasutra.com/view/news/269957/How_Hyper_Light_Drifter_balances_difficulty_with_fairness.php
|
||||||
TYPE : article
|
TYPE : article
|
||||||
DATE : 12018-07-03
|
DATE : 12018-07-03
|
||||||
TAGS : gamedev
|
TAGS : gamedev, game
|
||||||
SEEN : false
|
SEEN : false
|
||||||
|
NOTE : 'Hyper Light Drifter'
|
||||||
|
|
||||||
CAVE ALLEGORY
|
CAVE ALLEGORY
|
||||||
LINK : http://www.historyguide.org/intellect/allegory.html
|
LINK : http://www.historyguide.org/intellect/allegory.html
|
||||||
@ -509,6 +513,7 @@ OVERWHELM
|
|||||||
DATE : 12018-07-06
|
DATE : 12018-07-06
|
||||||
SEEN : true
|
SEEN : true
|
||||||
NOTE : Stylish pixel platformer
|
NOTE : Stylish pixel platformer
|
||||||
|
NOTE : 'Overwhelm'
|
||||||
|
|
||||||
COMPASS
|
COMPASS
|
||||||
PERS : faun
|
PERS : faun
|
||||||
@ -945,12 +950,12 @@ HELLO
|
|||||||
5till L1 Complex
|
5till L1 Complex
|
||||||
PERS : Phil James
|
PERS : Phil James
|
||||||
LINK : https://www.doomworld.com/idgames/levels/doom2/Ports/0-9/5l1c
|
LINK : https://www.doomworld.com/idgames/levels/doom2/Ports/0-9/5l1c
|
||||||
NOTE : Doom level
|
|
||||||
FILE : 12018-07-14_5l1c.zip
|
|
||||||
TYPE : game
|
TYPE : game
|
||||||
TAGS : gamedev
|
FILE : 12018-07-14_5l1c.zip
|
||||||
|
TAGS : gamedev, game
|
||||||
SEEN : false
|
SEEN : false
|
||||||
DATE : 12018-07-14
|
DATE : 12018-07-14
|
||||||
|
NOTE : '5till L1 Complex' a large custom Doom level.
|
||||||
|
|
||||||
BLADE RUNNER 2049 DESIGN
|
BLADE RUNNER 2049 DESIGN
|
||||||
LINK : https://www.engadget.com/2017/10/20/designing-the-technology-of-blade-runner-2049/
|
LINK : https://www.engadget.com/2017/10/20/designing-the-technology-of-blade-runner-2049/
|
||||||
@ -1117,15 +1122,16 @@ JIM CRAWFORD INTERVIEW
|
|||||||
TYPE : article
|
TYPE : article
|
||||||
DATE : 12018-07-15
|
DATE : 12018-07-15
|
||||||
SEEN : false
|
SEEN : false
|
||||||
TAGS : gamedev
|
TAGS : gamedev, game
|
||||||
|
NOTE : 'Frog Fractions 2'
|
||||||
|
|
||||||
TARN ADAMS INTERVIEW
|
TARN ADAMS INTERVIEW
|
||||||
LINK : https://www.pcgamer.com/dwarf-fortress-creator-tarn-adams-talks-about-simulating-the-most-complex-magic-system-ever/
|
LINK : https://www.pcgamer.com/dwarf-fortress-creator-tarn-adams-talks-about-simulating-the-most-complex-magic-system-ever/
|
||||||
TYPE : article
|
TYPE : article
|
||||||
DATE : 12018-07-15
|
DATE : 12018-07-15
|
||||||
SEEN : false
|
SEEN : false
|
||||||
TAGS : gamedev
|
TAGS : gamedev, game
|
||||||
NOTE : Dwarf Fortress
|
NOTE : 'Dwarf Fortress'
|
||||||
|
|
||||||
WHISTLE BLOWING
|
WHISTLE BLOWING
|
||||||
LINK : https://theintercept.com/2016/05/03/edward-snowden-whistleblowing-is-not-just-leaking-its-an-act-of-political-resistance/
|
LINK : https://theintercept.com/2016/05/03/edward-snowden-whistleblowing-is-not-just-leaking-its-an-act-of-political-resistance/
|
||||||
@ -1255,11 +1261,19 @@ PRODUCTIVE DISTORTIONS
|
|||||||
SEEN : false
|
SEEN : false
|
||||||
TAGS : psychology
|
TAGS : psychology
|
||||||
|
|
||||||
PRODUCTIVE DISTORTIONS
|
KILLED GREEN SCREEN
|
||||||
PERS : goldbuick
|
PERS : goldbuick
|
||||||
SRCE : Merveilles
|
SRCE : Merveilles
|
||||||
LINK : https://vimeo.com/264282403
|
LINK : https://vimeo.com/264282403
|
||||||
TYPE : video
|
TYPE : video
|
||||||
DATE : 12018-07-15
|
DATE : 12018-07-15
|
||||||
SEEN : false
|
SEEN : false
|
||||||
|
|
||||||
|
CLIENT SIDE ROUTING
|
||||||
|
LINK : https://blog.risingstack.com/writing-a-javascript-framework-client-side-routing/
|
||||||
|
TYPE : article
|
||||||
|
DATE : 12018-07-16
|
||||||
|
SEEN : false
|
||||||
|
NOTE : Research for memex
|
||||||
|
TAGS : web, code
|
||||||
`
|
`
|
@ -1,13 +1,18 @@
|
|||||||
function Main()
|
function Main()
|
||||||
{
|
{
|
||||||
|
// REFERENCE
|
||||||
this.database = null;
|
this.database = null;
|
||||||
this.keys = null;
|
this.keys = null;
|
||||||
this.page = 0;
|
// this.page = 0;
|
||||||
this.lastEntry = -1;
|
this.lastEntry = -1;
|
||||||
this.postPerPage = 1000;
|
|
||||||
this.msnry = null;
|
this.msnry = null;
|
||||||
this.grid = null;
|
this.grid = null;
|
||||||
|
|
||||||
|
// SETTINGS
|
||||||
|
this.useMasonry = true;
|
||||||
|
this.postPerPage = 1000;
|
||||||
|
|
||||||
|
// MAIN
|
||||||
this.install = function()
|
this.install = function()
|
||||||
{
|
{
|
||||||
this.database = new Indental(DATABASE).parse();
|
this.database = new Indental(DATABASE).parse();
|
||||||
@ -15,13 +20,17 @@ function Main()
|
|||||||
this.processDatabase();
|
this.processDatabase();
|
||||||
|
|
||||||
this.grid = document.getElementById("grid");
|
this.grid = document.getElementById("grid");
|
||||||
this.msnry = new Masonry( '.grid', {
|
|
||||||
|
if (this.useMasonry)
|
||||||
|
{
|
||||||
|
this.msnry = new Masonry( '.grid', {
|
||||||
itemSelector: '.grid-item',
|
itemSelector: '.grid-item',
|
||||||
columnWidth: 350,
|
columnWidth: 350,
|
||||||
gutter: 20,
|
gutter: 20,
|
||||||
fitWidth: true,
|
fitWidth: true,
|
||||||
transitionDuration: 0,
|
transitionDuration: 0,
|
||||||
});
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.start = function()
|
this.start = function()
|
||||||
@ -46,21 +55,23 @@ function Main()
|
|||||||
|
|
||||||
if (target == 'home')
|
if (target == 'home')
|
||||||
{
|
{
|
||||||
console.log('home');
|
console.log('Display \'home\'');
|
||||||
|
|
||||||
this.grid.innerHTML = '';
|
this.grid.innerHTML = '';
|
||||||
this.displayEntries(this.database);
|
this.displayEntries(this.database);
|
||||||
this.msnry.reloadItems();
|
|
||||||
this.msnry.layout();
|
|
||||||
|
|
||||||
console.log(this.database);
|
if (this.useMasonry)
|
||||||
|
{
|
||||||
|
this.msnry.reloadItems();
|
||||||
|
this.msnry.layout();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
var splitTarget = target.split("-");
|
var splitTarget = target.split("-");
|
||||||
if (splitTarget[0] == 'tag')
|
if (splitTarget[0] == 'tag')
|
||||||
{
|
{
|
||||||
console.log('tag-'+splitTarget[1]);
|
console.log('Display tag \'' + splitTarget[1] + '\'');
|
||||||
|
|
||||||
var tempDatabase = {}
|
var tempDatabase = {}
|
||||||
for (i = 0; i < this.keys.length; i++)
|
for (i = 0; i < this.keys.length; i++)
|
||||||
@ -77,12 +88,15 @@ function Main()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
console.log(tempDatabase);
|
|
||||||
|
|
||||||
this.grid.innerHTML = '';
|
this.grid.innerHTML = '';
|
||||||
this.displayEntries(tempDatabase);
|
this.displayEntries(tempDatabase);
|
||||||
this.msnry.reloadItems();
|
|
||||||
this.msnry.layout();
|
if (this.useMasonry)
|
||||||
|
{
|
||||||
|
this.msnry.reloadItems();
|
||||||
|
this.msnry.layout();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (splitTarget[0] == 'type')
|
else if (splitTarget[0] == 'type')
|
||||||
{
|
{
|
||||||
@ -111,6 +125,7 @@ function Main()
|
|||||||
this.database[dbKeys[i]].TAGS = tags;
|
this.database[dbKeys[i]].TAGS = tags;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
console.log(this.database);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.missing = function(target)
|
this.missing = function(target)
|
||||||
@ -121,6 +136,8 @@ function Main()
|
|||||||
|
|
||||||
this.touch = function(target)
|
this.touch = function(target)
|
||||||
{
|
{
|
||||||
|
console.log('touch');
|
||||||
|
|
||||||
var link = target.getAttribute("href") ? target.getAttribute("href") : target.parentNode.getAttribute("href")
|
var link = target.getAttribute("href") ? target.getAttribute("href") : target.parentNode.getAttribute("href")
|
||||||
|
|
||||||
if(!link){ return; }
|
if(!link){ return; }
|
||||||
@ -129,15 +146,17 @@ function Main()
|
|||||||
this.load(link.substr(1,link.length-1));
|
this.load(link.substr(1,link.length-1));
|
||||||
}
|
}
|
||||||
|
|
||||||
document.addEventListener('mouseup', (e)=>{ this.touch(e.target); e.preventDefault(); });
|
//document.addEventListener('mouseup', (e)=>{ this.touch(e.target); e.preventDefault(); });
|
||||||
|
|
||||||
this.displayEntries = function(db)
|
this.displayEntries = function(db)
|
||||||
{
|
{
|
||||||
var dbKeys = Object.keys(db);
|
var dbKeys = Object.keys(db);
|
||||||
|
|
||||||
this.page += this.postPerPage;
|
//this.page += this.postPerPage;
|
||||||
var i = this.lastEntry + 1;
|
//var i = this.lastEntry + 1;
|
||||||
while (i < Math.min(dbKeys.length, this.page))
|
var i = 0;
|
||||||
|
while (i < dbKeys.length)
|
||||||
|
// while (i < Math.min(dbKeys.length, this.page))
|
||||||
{
|
{
|
||||||
this.buildEntry(db, dbKeys[i]);
|
this.buildEntry(db, dbKeys[i]);
|
||||||
this.lastEntry = i;
|
this.lastEntry = i;
|
||||||
@ -262,7 +281,11 @@ function Main()
|
|||||||
entry += `</div>`;
|
entry += `</div>`;
|
||||||
|
|
||||||
this.grid.innerHTML += entry;
|
this.grid.innerHTML += entry;
|
||||||
// this.msnry.appended( entry );
|
|
||||||
|
// if (this.useMasonry)
|
||||||
|
// {
|
||||||
|
// this.msnry.appended( entry );
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
// this.doPagination = function()
|
// this.doPagination = function()
|
||||||
@ -360,4 +383,18 @@ function Main()
|
|||||||
// window.addEventListener("hashchange", detectBackOrForward(
|
// window.addEventListener("hashchange", detectBackOrForward(
|
||||||
// function() { console.log("back"); main.load(); },
|
// function() { console.log("back"); main.load(); },
|
||||||
// function() { console.log("forward"); main.load(); }
|
// function() { console.log("forward"); main.load(); }
|
||||||
// ));
|
// ));
|
||||||
|
|
||||||
|
// var doThing = function()
|
||||||
|
// {
|
||||||
|
// console.log('do thing');
|
||||||
|
// }
|
||||||
|
|
||||||
|
// window.addEventListener("hashchange", doThing());
|
||||||
|
|
||||||
|
window.addEventListener("hashchange", navigate );
|
||||||
|
|
||||||
|
function navigate()
|
||||||
|
{
|
||||||
|
main.load(window.document.location.hash);
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user