Merge branch 'Codixer:master' into master

This commit is contained in:
ash 2022-04-04 19:02:50 +01:00 committed by GitHub
commit 2e5ebe5124
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 369 additions and 421 deletions

2
.gitignore vendored
View file

@ -9,4 +9,4 @@ users.html
oldusers.html
web/_js/minified.js
allCharacters.txt
combined.js
combined.js

File diff suppressed because one or more lines are too long

View file

@ -1,6 +1,3 @@
/*
========================================================================
The /r/place Atlas
@ -23,9 +20,6 @@
========================================================================
*/
window.addEventListener("error", function (e) {
console.log(e);
var errorMessage = "<p class=\"error\">An error has occurred:</p>";
@ -36,22 +30,21 @@ window.addEventListener("error", function (e) {
});
function pointIsInPolygon (point, polygon) {
// ray-casting algorithm based on
// http://www.ecse.rpi.edu/Homepages/wrf/Research/Short_Notes/pnpoly.html
var x = point[0], y = point[1];
var inside = false;
for (var i = 0, j = polygon.length - 1; i < polygon.length; j = i++) {
var xi = polygon[i][0], yi = polygon[i][1];
var xj = polygon[j][0], yj = polygon[j][1];
var intersect = ((yi > y) != (yj > y))
&& (x < (xj - xi) * (y - yi) / (yj - yi) + xi);
if (intersect) inside = !inside;
}
return inside;
// ray-casting algorithm based on
// http://www.ecse.rpi.edu/Homepages/wrf/Research/Short_Notes/pnpoly.html
var x = point[0], y = point[1];
var inside = false;
for (var i = 0, j = polygon.length - 1; i < polygon.length; j = i++) {
var xi = polygon[i][0], yi = polygon[i][1];
var xj = polygon[j][0], yj = polygon[j][1];
var intersect = ((yi > y) != (yj > y))
&& (x < (xj - xi) * (y - yi) / (yj - yi) + xi);
if (intersect) inside = !inside;
}
return inside;
};
var atlas = [
@ -209,13 +202,32 @@ var atlas = [
{"id": 151, "submitted_by": "F-L-A-R-E", "name": "Karlsruhe Institute of Technology (KIT)", "description": "University of Karlsruhe (Germany)", "website": "kit.edu", "subreddit": "/r/KaIT", "center": [796.5, 534.5], "path": [[760.5, 521.5], [760.5, 547.5], [832.5, 547.5], [832.5, 521.5]]},
{"id": 152, "submitted_by": "Powaza", "name": "Chick (Powi)", "description": "The Chick from the MEA (Middle Eastern Alliance). Idea from 'Powi Club's Discord server and other helpers.", "website": "https://discord.gg/EyNsdbU", "subreddit": "/r/PowiTeam", "center": [ 1777.5, 949.5 ], "path": [ [ 1784.5, 940.5 ], [ 1773.5, 940.5 ], [ 1773.5, 946.5 ], [ 1768.5, 947.5 ], [ 1768.5, 957.5 ], [ 1784.5, 957.5 ], [ 1784.5, 952.5 ] ] },
{"id": 153, "submitted_by": "horsewhips", "name": "The Ohio State University", "description": "The Ohio State University (OSU) is located in Columbus, Ohio, USA. OSU's school colors are scarlet and gray which can be seen around their famous Block O - located towards the bottom left of the artwork. The Block 'O' together with the Buckeye nut is the logo for The Ohio State University. OSU (not to be confused with the rhythm game 'osu!') is famous for it's rivalry with the University of Michigan with the 15-2 representing the current streak of 15 wins against UofM's 2. The Ohio flag is on the top right, representing the state of Ohio, USA. The bottom right has the famous 'Script Ohio' - a long-time Ohio State tradition from the school's Marching Band where members of the band will form the word 'Ohio' in script during football games. A second block 'O' is situated next to Purdue University & Rutgers University elsewhere on r/place.", "website": "[https://www.osu.edu](https://www.osu.edu)", "subreddit": "r/osu", "center": [ 1347.5, 813.5 ], "path": [ [ 1331.5, 795.5 ], [ 1331.5, 830.5 ], [ 1363.5, 831.5 ], [ 1363.5, 795.5 ], [ 1363.5, 795.5 ], [ 1363.5, 795.5 ] ] },
{"id":154,"name":"EVE Online","description":"The logo for Eve Online, an economy-based space MMORPG.","website":"eveonline.com","subreddit":"r/Eve","center":[38.5,44.5],"path":[[13.5,34.5],[62.5,34.5],[62.5,53.5],[13.5,53.5]]},
{"id":155,"name":"o7","description":"An emoticon depicting a person saluting.","website":"","subreddit":"","center":[7.5,46.5],"path":[[12.5,35.5],[12.5,53.5],[0.5,53.5],[0.5,46.5],[12.5,35.5]]},
{"id":156,"name":"SS13 clown","description":"The clown, a playable character in the game Space Station 13.","website":"spacestation13.com","subreddit":"r/SS13","center":[70.5,103.5],"path":[[61.5,91.5],[79.5,91.5],[79.5,116.5],[68.5,116.5],[68.5,111.5],[61.5,111.5]]},
{"id":157,"name":"Dota 2","description":"The logo for Dota 2, a MOBA developed by Valve.","website":"dota2.com","subreddit":"r/DotA2","center":[14.5,160.5],"path":[[0.5,143.5],[27.5,143.5],[27.5,177.5],[0.5,177.5]]},
{"id":159,"name":"Flag of Egypt","description":"","website":"","subreddit":"r/Egypt","center":[66.5,156.5],"path":[[28.5,144.5],[28.5,169.5],[108.5,169.5],[108.5,148.5],[74.5,148.5],[74.5,138.5],[52.5,138.5],[47.5,144.5],[28.5,144.5]]},
{"id":160,"name":"Pyramids of Giza","description":"","website":"","subreddit":"","center":[66.5,157.5],"path":[[52.5,160.5],[80.5,160.5],[74.5,154.5],[72.5,155.5],[68.5,152.5],[66.5,154.5],[62.5,150.5]]},
{"id":161,"name":"Homestuck","description":"A webcomic by Andrew Hussie that ran from 2009 to 2016.","website":"homestuck.com","subreddit":"r/homestuck","center":[248.5,145.5],"path":[[221.5,126.5],[266.5,126.5],[275.5,135.5],[275.5,164.5],[221.5,164.5]]},
{"id":162,"name":"Hiveswap","description":"An adventure game set in the same multiverse as Homestuck.","website":"hiveswap.com","subreddit":"r/hiveswap","center":[262.5,168.5],"path":[[247.5,165.5],[247.5,171.5],[276.5,171.5],[276.5,165.5]]},
{"id":163,"name":"Flag of Taiwan","description":"","website":"","subreddit":"","center":[286.5,165.5],"path":[[276.5,158.5],[295.5,158.5],[295.5,172.5],[276.5,172.5]]},
{"id":164,"name":"Flag of South Korea","description":"","website":"","subreddit":"","center":[306.5,165.5],"path":[[295.5,158.5],[316.5,158.5],[316.5,172.5],[295.5,172.5]]},
{"id":165,"name":"Flag of Japan","description":"","website":"","subreddit":"","center":[327.5,165.5],"path":[[316.5,158.5],[337.5,158.5],[337.5,172.5],[316.5,172.5]]},
{"id":166,"name":"John Egbert","description":"A major character from Homestuck.","website":"","subreddit":"","center":[251.5,112.5],"path":[[243.5,102.5],[258.5,102.5],[258.5,121.5],[243.5,121.5]]},
{"id":167,"name":"Nepeta Leijon","description":"A character from Homestuck.","website":"","subreddit":"","center":[180.5,153.5],"path":[[171.5,141.5],[188.5,141.5],[188.5,165.5],[171.5,165.5]]},
{"id":168,"name":"Faroe Islands","description":"","website":"","subreddit":"","center":[437.5,120.5],"path":[[412.5,103.5],[461.5,103.5],[461.5,136.5],[412.5,136.5]]},
{"id":169,"name":"Flag of Norway","description":"","website":"","subreddit":"","center":[352.5,72.5],"path":[[493.5,36.5],[215.5,36.5],[215.5,95.5],[231.5,95.5],[231.5,100.5],[259.5,100.5],[259.5,124.5],[268.5,125.5],[334.5,124.5],[334.5,78.5],[400.5,78.5],[400.5,124.5],[412.5,124.5],[412.5,103.5],[461.5,103.5],[461.5,119.5],[475.5,119.5],[475.5,103.5],[495.5,102.5],[494.5,79.5]]},
{"id":170,"name":"The Scream","description":"A painting by Norwegian artist Edvard Munch.","website":"","subreddit":"","center":[274.5,66.5],"path":[[247.5,40.5],[300.5,40.5],[300.5,91.5],[247.5,91.5]]},
{"id":171,"name":"Flag of Ukraine","description":"","website":"","subreddit":"","center":[205.5,213.5],"path":[[0.5,170.5],[337.5,171.5],[337.5,193.5],[433.5,193.5],[433.5,252.5],[237.5,251.5],[237.5,249.5],[-1.5,251.5]]},
{"id":172,"name":"Gnome Child","description":"An NPC from the MMORPG Runescape.","website":"","subreddit":"","center":[152.5,63.5],"path":[[146.5,34.5],[137.5,57.5],[146.5,71.5],[135.5,83.5],[138.5,86.5],[144.5,82.5],[168.5,84.5],[168.5,77.5],[161.5,71.5],[164.5,65.5],[164.5,54.5],[155.5,43.5],[151.5,43.5],[150.5,34.5]]},
{"id":173,"name":"Big Floppa","description":"The one and only.","website":"","subreddit":"r/bigfloppa","center":[1937.5,465.5],"path":[[1954.5,491.5],[1918.5,490.5],[1925.5,465.5],[1924.5,448.5],[1923.5,436.5],[1928.5,440.5],[1934.5,436.5],[1939.5,435.5],[1947.5,440.5],[1954.5,434.5],[1954.5,442.5],[1950.5,450.5],[1951.5,465.5]]}
];
//console.log("There are "+atlas.length+" entries in the Atlas.");
/*
atlas.sort(function(a, b){
atlas.sort(function(a, b) {
if (a.id < b.id) {
return -1;
}
@ -226,9 +238,9 @@ atlas.sort(function(a, b){
return 0;
});
for(var i = 0; i < atlas.length; i++){
for(var i = 0; i < atlas.length; i++) {
if(atlas[i-1]){
if(atlas[i-1].id == atlas[i].id){
if(atlas[i-1].id == atlas[i].id) {
console.log(atlas[i-1].id + ": "+ atlas[i-1].name);
console.log(atlas[i ].id + ": "+ atlas[i ].name);
}
@ -238,13 +250,12 @@ for(var i = 0; i < atlas.length; i++){
console.log("biggest id: "+atlas[atlas.length-1].id + ", " + atlas[atlas.length-1].name);
*/
/*
for(var i = 0; i < atlas.length; i++){
if(typeof atlas[i].website == "undefined"){
for(var i = 0; i < atlas.length; i++) {
if(typeof atlas[i].website == "undefined") {
console.log(atlas[i].name);
} else if(atlas[i].website.trim() != ""){
if(atlas[i].website.trim().substring(0, 4) != "http"){
} else if(atlas[i].website.trim() != "") {
if(atlas[i].website.trim().substring(0, 4) != "http") {
console.log(atlas[i].name + ": " + atlas[i].website);
}
}
@ -263,19 +274,16 @@ atlas.sort(function (a, b) {
return 0;
});
/*
// Populate with test data
for(var i = 0; i < 10000; i++){
for(var i = 0; i < 10000; i++) {
var x = ~~(Math.random() * 1000)+0.5;
var y = ~~(Math.random() * 1000)+0.5;
var w = ~~(Math.random()*100);
var h = ~~(Math.random()*100);
atlas.push({
atlas.push( {
"id": 5,
"name": "test"+(i+3),
"website": "",
@ -290,5 +298,4 @@ for(var i = 0; i < 10000; i++){
});
}
*/
*/

View file

@ -1,4 +1,3 @@
<!--
========================================================================
The /r/place Atlas
@ -21,23 +20,20 @@
========================================================================
-->
<!doctype html>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>
The /r/place Atlas
</title>
<meta charset="UTF-8">
<title>The /r/place Atlas</title>
<meta name="description" content="An Atlas of Reddit's /r/place, with information to each artwork of the canvas.">
<meta name="author" content="Roland Rytz">
<meta name="keywords" content="reddit, /r/place, april">
<meta name="application-name" content="/r/place Atlas">
<meta name="robots" content="index, follow">
<meta name="viewport" content="width=device-width, height=device-height, initial-scale=1">
<link href="./_css/style.css?version=1.0.32" rel="stylesheet" type="text/css" media="all">
</head>
<body>
@ -53,11 +49,11 @@ <h1>The /r/place Atlas</h1>
<a id="aboutLink" href="./about.html">About</a>
</nav-->
</header>
<div id="author" style="right: 25px;">
Code by <a href="/" target="_blank" rel="author">Roland Rytz</a>. Source on <a target="_blank" href="https://github.com/RolandR/place-atlas">GitHub</a>.
<div id="author" style="right:25px">
Code by <a href="https://draemm.li/various/place-atlas/" target="_blank" rel="author">Roland Rytz</a>. Source on <a target="_blank" href="https://github.com/RolandR/place-atlas">GitHub</a> (<a target="_blank" href="https://github.com/Codixer/place-atlas">2022 Version Github</a>).
</div>
<div class="overlay" id="bitcoinOverlay">
<div id="bitcoinWindow">
<h2>My Bitcoin Address</h2>
@ -67,7 +63,7 @@ <h2>My Bitcoin Address</h2>
<button id="closeBitcoinButton">Close</button>
</div>
</div>
<div id="aboutContainer">
<a id="aboutBackButton" href="./">&lt; Back to the Atlas</a>
<div id="about">
@ -75,8 +71,8 @@ <h2 id="abouth2">The /r/place Atlas</h2>
<p>This is an Atlas aiming to chart all the artworks created during the <a href="https://www.reddit.com/r/place/">/r/place</a> April's fools event on <a href="https://www.reddit.com/" target="_blank">Reddit</a> in 2022.</p>
<p>The code was developed by <a href="/" target="_blank" rel="author">Roland Rytz</a> (<a href="mailto:roland.rytz@gmail.com" target="_blank">mail</a>, <a href="https://reddit.com/user/draemmli/" target="_blank">reddit</a>) and is available under the free <a href="https://www.gnu.org/licenses/agpl-3.0.en.html" target="_blank">AGPL license</a> on <a target="_blank" href="https://github.com/RolandR/place-atlas">GitHub</a>. (<a target="_blank" href="https://github.com/Codixer/place-atlas">Modified GitHub for 2022 version</a>) | Image's provided by <a target="_blank" href="https://place.thatguyalex.com/">Alex Tsernoh</a></p>
<br>
<p>Roland Rytz has worked on the Atlas full-time (and more!) for over two weeks.</p>
<p>If you'd like to support him, you can do so by <a target="_blank" href="https://paypal.me/draemmli">PayPal</a> or <a title="Click to see his address." id="bitcoinButton" role="button">Bitcoin</a>.</p>
<p>Roland Rytz worked on the Atlas full-time (and more!) for over two weeks.</p>
<p>If you'd like to support Roland, you can do so by <a target="_blank" href="https://paypal.me/draemmli">PayPal</a> or via <a title="Click to see his address." id="bitcoinButton" role="button">Bitcoin</a>.</p>
<p>If you donate more than 10(€/$/CHF/mBTC), He'll (hopefully) send you a nice sticker of the Place canvas! (2017 one)</p>
<p id="bitcoinNotice">If you donate by Bitcoin and want a 2017 sticker, please send him a<br>message with your Bitcoin address <i>before</i> you make the transaction!</a>
<h2>How to contribute</h2>
@ -88,7 +84,10 @@ <h2>r/placeAtlas2 (Current) Contributors</h2>
<p>Thank you to everyone who submitted new entries, amended existing ones, reported bugs and just supported the project in general.</p>
<div id="contributors">
<a href="https://reddit.com/user/TCOOfficiall" target="_blank">TCOOfficiall (Current Maintainer)</a>
<a href="https://reddit.com/user/TCOOfficiall" target="_blank">prosto_sanja (Provided Images)</a> - <a href="https://place.thatguyalex.com/" target="_blank">Website</a>
<a href="https://reddit.com/user/prosto_sanja" target="_blank">prosto_sanja (Provided Images)</a> - <a href="https://place.thatguyalex.com/" target="_blank">Website</a>
<a href="https://reddit.com/user/electric-blue" target="_blank">electric-blue</a>
<a href="https://reddit.com/user/m654zy" target="_blank">m654zy</a>
<a href="https://reddit.com/user/xXLInkster17Xx" target="_blank">xXLInkster17Xx</a>
<h2>r/placeAtlas Contributors</h2>
<p>The (original) Atlas would not have been possible without the help of the following 775 reddit users.</p>
@ -873,21 +872,14 @@ <h2>r/placeAtlas Contributors</h2>
</div>
</div>
</div>
<script type="text/javascript">
document.getElementById("closeBitcoinButton").addEventListener("click", function(e){
document.getElementById("closeBitcoinButton").addEventListener("click", function(e) {
document.getElementById("bitcoinOverlay").style.display = "none";
});
document.getElementById("bitcoinButton").addEventListener("click", function(e){
document.getElementById("bitcoinButton").addEventListener("click", function(e) {
document.getElementById("bitcoinOverlay").style.display = "flex";
});
</script>
</body>
</html>
</html>

View file

@ -1,4 +1,3 @@
<!--
========================================================================
The /r/place Atlas
@ -21,28 +20,25 @@
========================================================================
-->
<!doctype html>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>
The /r/place Atlas
</title>
<meta charset="UTF-8">
<title>The /r/place Atlas</title>
<meta name="description" content="An interactive map of Reddit's /r/place, with information to each artwork of the canvas.">
<meta name="author" content="Roland Rytz (2022 by Stefano#7366)">
<meta name="keywords" content="reddit, /r/place 2022">
<meta name="application-name" content="The /r/place Atlas 2022">
<meta name="robots" content="index, follow">
<meta name="google-site-verification" content="gZGHpBSMzffAbIn0qB8b00We6EwSGkDTfDoQVv-NWss" />
<!-- <meta name="google-site-verification" content="gZGHpBSMzffAbIn0qB8b00We6EwSGkDTfDoQVv-NWss"/> -->
<meta name="viewport" content="width=device-width, height=device-height, initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no, shrink-to-fit=no">
<meta name="mobile-web-app-capable" content="yes">
<link href="./_css/style.css?version=1.0.32" rel="stylesheet" type="text/css" media="all">
<script type="application/ld+json">
{
"@context": "http://schema.org",
@ -73,7 +69,6 @@
"description": "An interactive map of Reddit's /r/place, with information to each artwork of the canvas. Originally created by Roland Rytz (2022 by Stefano#7366)..",
}
</script>
</head>
<body>
<div id="wrapper">
@ -176,33 +171,31 @@ <h1 id="title">The /r/place Atlas</h1>
<p>Click anywhere on the image to start drawing a shape.
When you're happy with the result, click the "Finish" button above or press the Enter key.</p>
<p>You can then add more information about your object.</p>
<div style="background-color: #666666; padding:20px">
<div style="background-color:#666; padding:20px">
<p><b>Handy with GitHub?</b></p>
<p>You can contribute directly with a Pull Request <a href="https://github.com/Codixer/place-atlas/blob/master/web/_js/atlas.js">here!</a></p>
</div>
</div>
</div>
<button class="hidden" id="closeObjectsListButton"></button>
<div id="objectsList">
</div>
<div id="exportOverlay" class="overlay">
<div id="exportWindow">
<p>Please copy the text below and submit it as a<br>
new text post to <a target="_blank" href="https://www.reddit.com/r/placeAtlas2/">/r/placeAtlas2</a> on Reddit.</p>
<p>I will then check it and add it to the atlas.</p>
<div style="background-color: #666666; padding:5px">
<div style="background-color:#666; padding:5px">
<p><b>Handy with GitHub?</b></p>
<p>You can contribute directly with a Pull Request <a href="https://github.com/Codixer/place-atlas/blob/master/web/_js/atlas.js">here!</a></p>
</div>
<textarea cols="50" rows="5" id="exportString"></textarea>
<div style="display:flex;flex-direction:column;align-items: center;">
<div style="display:flex; flex-direction:column;align-items:center">
<a href="_blank" id="exportDirectPost">Post Direct to Reddit</a>
<button id="exportCloseButton">Done</button>
</div>
</div>
</div>
@ -223,27 +216,18 @@ <h2>His Bitcoin Address</h2>
<br>
<button id="closeBitcoinButton">Close</button>
<br>
</div>
</div>
<div id="author">
Code by <a href="/" target="_blank" rel="author">Roland Rytz</a>. Source on <a target="_blank" href="https://github.com/RolandR/place-atlas">GitHub</a> (<a target="_blank" href="https://github.com/Codixer/place-atlas">2022 Version Github</a>). Image's provided by <a target="_blank" href="https://place.thatguyalex.com/">Alex Tsernoh</a>.
Code by <a href="https://draemm.li/various/place-atlas/" target="_blank" rel="author">Roland Rytz</a>. Source on <a target="_blank" href="https://github.com/RolandR/place-atlas">GitHub</a> (<a target="_blank" href="https://github.com/Codixer/place-atlas">2022 Version Github</a>). Image's provided by <a target="_blank" href="https://place.thatguyalex.com/">Alex Tsernoh</a>.
</div>
</div>
<script type="text/javascript" src="./_js/pointInPolygon.js?version=1.0"></script>
<script type="text/javascript" src="./_js/atlas.js?version=1.0.50"></script>
<script type="text/javascript" src="./_js/view.js?version=1.0.4"></script>
<script type="text/javascript" src="./_js/overlap.js?version=1.0.4"></script>
<script type="text/javascript" src="./_js/draw.js?version=1.0.3"></script>
<script type="text/javascript" src="./_js/main.js?version=1.0.3"></script>
<!--
<script type="text/javascript" src="./_js/stats.js?version=1.0.0"></script>
@ -251,8 +235,4 @@ <h2>His Bitcoin Address</h2>
<script type="text/javascript" src="./_js/minified.js?version=1.0.102"></script>
-->
</body>
</html>
</html>