Merge branch 'remaster' into interface

This commit is contained in:
mxdanger 2022-04-25 16:56:23 -07:00
commit 332684c604
19 changed files with 223 additions and 203 deletions

View file

@ -1,22 +1,22 @@
# Contributing
This project is open source. You may contribute to the project by submitting a Pull Request on the GitHub repo.
This project is open source. You may contribute to the project by submitting a Pull Request on the GitHub repo or send your submissions through Reddit. Other than than, you cau use Discord or Reddit for help.
## Map Contributions
<h3><b>WE ONLY ACCEPT NEW CONTRIBUTIONS ON REDDIT</b></h3>
**WE ONLY ACCEPT NEW CONTRIBUTIONS ON REDDIT!**
To contribute to the map, we require a certain format for artwork region and labels. This can be generated on the [contributing page](https://place-atlas.stefanocoding.me/index.html?mode=draw) on the website.
### Reddit Submission
### Reddit
1. Follow the instructions on the [contributing page](https://place-atlas.stefanocoding.me/index.html?mode=draw), then click "Post Direct to Reddit".
1. Follow the instructions on the [contributing page](https://place-atlas.stefanocoding.me/index.html?mode=draw), then post it to Reddit by clicking "Post Direct to Reddit".
2. Flair your post with the "New Entry" tag.
3. A moderator will accept your contribution shortly.
<!--
### GitHub Submission
### GitHub
1. Create a fork of our repo.
2. Enter your data into the `web/atlas.json` file, with the correct format and ID number.
@ -26,10 +26,18 @@ To contribute to the map, we require a certain format for artwork region and lab
## Map Edits
### Reddit
1. Click "Edit" on a entry and follow the instructions there, then post it to Reddit by clicking "Post Direct to Reddit".
2. Flair your post with the "Edit Entry" tag.
3. A moderator will accept your contribution shortly.
### GitHub
1. Create a fork of our repo.
2. Enter your data into the `web/atlas.json` file, with the correct format and ID number.
3. Create a Pull Request against the `/cleanup` branch.
3. Create a Pull Request against the `cleanup` branch.
## Cleaning Contributions
If you spot a duplicate, please PR against `/cleanup`. To help find duplicates, append `?mode=overlap` to the url: [`https://place-atlas.stefanocoding.me?mode=overlap`](https://place-atlas.stefanocoding.me?mode=overlap).
If you spot a duplicate, please PR against the `cleanup` branch. To help find duplicates, [use the Overlap mode](https://place-atlas.stefanocoding.me?mode=overlap).

View file

@ -6,18 +6,21 @@
[![Subreddit subscribers](https://img.shields.io/reddit/subreddit-subscribers/placeAtlas2?color=%23FF4500&label=r%2FplaceAtlas2&logo=reddit&logoColor=white)](https://www.reddit.com/r/placeAtlas2/)
[![Website](https://img.shields.io/static/v1?label=website&message=place-atlas.stefanocoding.me&color=blue)](https://place-atlas.stefanocoding.me/)
# The 2022 Place Atlas
# The 2022 /r/place Atlas
The /r/place Atlas is a project aiming to catalog all the artworks created during Reddit's 2022 /r/place event.
This project was created by Roland Rytz and is licensed under the GNU Affero General Public License v3.0.
The 2022 /r/place Atlas is a project aiming to catalog all the artworks created during Reddit's 2022 /r/place event.
---
This project was established by Roland Rytz for the event in 2017, and further developed by Place Atlas team and contributors.
*You can check out the website by clicking [here](https://place-atlas.stefanocoding.me/).*
This project is licensed under the GNU Affero General Public License v3.0.
You can check out the website by clicking [here](https://place-atlas.stefanocoding.me/).
If you don't know GitHub and wanted to submit new entries or request changes to existing ones, please visit [/r/placeAtlas2](https://www.reddit.com/r/placeAtlas2/).
## How To Contribute
## Contributing
This project is open source. You may contribute to the project by submitting a Pull Request on the GitHub repo or send your submissions through Reddit. Other than than, you cau use Discord or Reddit for help.
### Map Contributions
@ -25,15 +28,15 @@ If you don't know GitHub and wanted to submit new entries or request changes to
To contribute to the map, we require a certain format for artwork region and labels. This can be generated on the [contributing page](https://place-atlas.stefanocoding.me/index.html?mode=draw) on the website.
#### Reddit Submission
#### Reddit
1. Follow the instructions on the [contributing page](https://place-atlas.stefanocoding.me/index.html?mode=draw), then click "Post Direct to Reddit".
1. Follow the instructions on the [contributing page](https://place-atlas.stefanocoding.me/index.html?mode=draw), then post it to Reddit by clicking "Post Direct to Reddit".
2. Flair your post with the "New Entry" tag.
3. A moderator will accept your contribution shortly.
<!--
#### GitHub Submission
#### GitHub
1. Create a fork of our repo.
2. Enter your data into the `web/_js/atlas.js` file, with the correct format and ID number.
@ -43,10 +46,18 @@ To contribute to the map, we require a certain format for artwork region and lab
### Map Edits
#### Reddit
1. Click "Edit" on a entry and follow the instructions there, then post it to Reddit by clicking "Post Direct to Reddit".
2. Flair your post with the "Edit Entry" tag.
3. A moderator will accept your contribution shortly.
#### GitHub
1. Create a fork of our repo.
2. Enter your data into the `web/atlas.json` file, with the correct format and ID number.
3. Create a Pull Request against the `cleanup` branch.
### Cleaning Contributions
If you spot a duplicate, please PR against the `cleanup` branch. To help find duplicates, append `?mode=overlap` to the url: [`https://place-atlas.stefanocoding.me?mode=overlap`](https://place-atlas.stefanocoding.me?mode=overlap).
If you spot a duplicate, please PR against the `cleanup` branch. To help find duplicates, [use the Overlap mode](https://place-atlas.stefanocoding.me?mode=overlap).

View file

@ -462,7 +462,7 @@ def go(path):
if not (i % 200):
print(f"{i} checked.")
print(f"{len(entries)} checked.")
print(f"{len(entries)} checked. Writing...")
with open(path, "w", encoding='utf-8', newline='\n') as f2:
f2.write(per_line_entries(entries))

View file

@ -1,24 +1,14 @@
import os
import json
import re
#!/usr/bin/python
'''
"""
Migrator script from old atlas format to remastered atlas format.
- center and path: single -> time-specific
- website and subreddit: single strings -> links object
- submitted_by -> contributors
'''
#
"""
# Migrates the old atlas format (single center/path) to the remastered atlas format (time-boxed centers/paths)
def per_line_entries(entries: list):
out = '[\n'
for entry in entries:
out += json.dumps(entry, ensure_ascii=False) + ',\n'
return out[:-2] + '\n]'
file_path = os.path.join('..', 'web', 'atlas.json')
import re
import json
END_IMAGE = 166
INIT_CANVAS_RANGE = (1, END_IMAGE)
@ -28,78 +18,97 @@ def per_line_entries(entries: list):
COMMATIZATION = re.compile(r'(?: *(?:,+ +|,+ |,+)| +)(?:and|&|;)(?: *(?:,+ +|,+ |,+)| +)|, *$| +')
FS_REGEX = re.compile(r'(?:(?:(?:(?:https?:\/\/)?(?:(?:www|old|new|np)\.)?)?reddit\.com)?\/)?[rR]\/([A-Za-z0-9][A-Za-z0-9_]{2,20})(?:\/[^" ]*)*')
with open(file_path, 'r+', encoding='UTF-8') as file:
entries = json.loads(file.read())
def migrate_atlas_format(entry: dict):
new_entry = {
"id": "",
"name": "",
"description": "",
"links": {},
"center": {},
"path": {},
"contributors": []
}
index = 0
center = entry['center']
path = entry['path']
for entry in entries:
new_entry = {
"id": "",
"name": "",
"description": "",
"links": {},
"center": {},
"path": {},
"contributors": []
}
if isinstance(center, list):
# Use the center to figure out which canvas expansion the entry is in.
if center[1] > 1000:
time_range = EXPANSION_2_RANGE
elif center[0] > 1000:
time_range = EXPANSION_1_RANGE
else:
time_range = INIT_CANVAS_RANGE
center = entry['center']
path = entry['path']
time_key = '%d-%d, T:0' % time_range
if isinstance(center, list):
# Use the center to figure out which canvas expansion the entry is in.
if center[1] > 1000:
time_range = EXPANSION_2_RANGE
elif center[0] > 1000:
time_range = EXPANSION_1_RANGE
else:
time_range = INIT_CANVAS_RANGE
new_entry = {
**new_entry,
"center": {
time_key: center
},
"path": {
time_key: path
}
}
time_key = '%d-%d, T:0-2' % time_range
del entry['center']
del entry['path']
new_entry = {
**new_entry,
"center": {
time_key: center
},
"path": {
time_key: path
}
}
if "website" in entry:
if isinstance(entry["website"], str) and entry["website"]:
new_entry['links']['website'] = [entry['website']]
del entry['website']
del entry['center']
del entry['path']
if "subreddit" in entry:
if isinstance(entry["subreddit"], str) and entry["subreddit"]:
new_entry['links']['subreddit'] = list(map(lambda x: FS_REGEX.sub(r"\1", x), COMMATIZATION.split(entry['subreddit'])))
del entry['subreddit']
if "website" in entry:
if isinstance(entry["website"], str) and entry["website"]:
new_entry['links']['website'] = [entry['website']]
del entry['website']
if "submitted_by" in entry:
new_entry['contributors'].append(entry['submitted_by'])
del entry['submitted_by']
toreturn = {
**new_entry,
**entry
}
if "subreddit" in entry:
if isinstance(entry["subreddit"], str) and entry["subreddit"]:
new_entry['links']['subreddit'] = list(map(lambda x: FS_REGEX.sub(r"\1", x), COMMATIZATION.split(entry['subreddit'])))
del entry['subreddit']
return toreturn
if "submitted_by" in entry:
new_entry['contributors'].append(entry['submitted_by'])
del entry['submitted_by']
entries[index] = {
**new_entry,
**entry
}
def per_line_entries(entries: list):
"""
Returns a string of all the entries, with every entry in one line.
"""
out = "[\n"
for entry in entries:
if entry:
out += json.dumps(entry, ensure_ascii=False) + ",\n"
out = out[:-2] + "\n]"
return out
index += 1
if __name__ == '__main__':
if not (index % 1000):
print(f"{index} checked.")
def go(path):
print(f"{len(entries)} checked.")
print("Writing...")
print(f"Formatting {path}...")
with open(file_path, 'w', encoding='utf-8', newline='\n') as f2:
f2.write(per_line_entries(entries))
with open(path, "r+", encoding='UTF-8') as f1:
entries = json.loads(f1.read())
print("All done!")
for i in range(len(entries)):
entry_formatted = migrate_atlas_format(entries[i])
entries[i] = entry_formatted
if not (i % 1000):
print(f"{i} checked.")
print(f"{len(entries)} checked. Writing...")
with open(path, "w", encoding='utf-8', newline='\n') as f2:
f2.write(per_line_entries(entries))
print("Writing completed. All done.")
go("../web/atlas.json")

View file

@ -29,6 +29,7 @@
import re
import traceback
from formatter import format_all
from migrate_atlas_format import migrate_atlas_format
OUT_FILE = open('temp_atlas.json', 'w', encoding='utf-8')
READ_IDS_FILE = open('read-ids-temp.txt', 'w')
@ -147,6 +148,8 @@ def set_flair(submission, flair):
assert validation_status < 3, \
"Submission invalid after validation. This may be caused by not enough points on the path."
submission_json = migrate_atlas_format(submission_json)
OUT_FILE_LINES[len(OUT_FILE_LINES) - 2].replace('\n', ',\n')
OUT_FILE_LINES.insert(len(OUT_FILE_LINES) - 1, json.dumps(submission_json, ensure_ascii=False) + '\n')

View file

@ -7,7 +7,7 @@
artwork of the canvas provided by the community.
Copyright (c) 2017 Roland Rytz <roland@draemm.li>
Copyright (c) 2022 r/placeAtlas2 contributors
Copyright (c) 2022 Place Atlas contributors
Licensed under the GNU Affero General Public License Version 3
https://place-atlas.stefanocoding.me/license.txt

View file

@ -6,7 +6,7 @@
artwork of the canvas provided by the community.
Copyright (c) 2017 Roland Rytz <roland@draemm.li>
Copyright (c) 2022 r/placeAtlas2 contributors
Copyright (c) 2022 Place Atlas contributors
Licensed under the GNU Affero General Public License Version 3
https://place-atlas.stefanocoding.me/license.txt
@ -179,6 +179,7 @@ #image {
image-rendering: -webkit-optimize-contrast;
image-rendering: pixelated;
-ms-interpolation-mode: nearest-neighbor;
font-size: 0
}
#highlightCanvas {
@ -402,4 +403,18 @@ .period-group[data-active=true][data-status=error] {
.period-group[data-status=error] {
box-shadow: 0 0 0 .1rem rgba(var(--bs-danger-rgb), .5);
}
}
/* #periods .period-visible {
margin-bottom: 0;
} */
#periods #periodsStatus:empty {
display: none;
}
#timeControls.no-time-slider,
.period-group.no-time-slider input,
.period-group.no-time-slider label {
display: none;
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 913 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 912 KiB

View file

@ -6,7 +6,7 @@
artwork of the canvas provided by the community.
Copyright (c) 2017 Roland Rytz <roland@draemm.li>
Copyright (c) 2022 r/placeAtlas2 contributors
Copyright (c) 2022 Place Atlas contributors
Licensed under the GNU Affero General Public License Version 3
https://place-atlas.stefanocoding.me/license.txt

View file

@ -6,7 +6,7 @@
artwork of the canvas provided by the community.
Copyright (c) 2017 Roland Rytz <roland@draemm.li>
Copyright (c) 2022 r/placeAtlas2 contributors
Copyright (c) 2022 Place Atlas contributors
Licensed under the GNU Affero General Public License Version 3
https://place-atlas.stefanocoding.me/license.txt
@ -250,10 +250,6 @@ function initDraw() {
const pathWithPeriodsTemp = pathWithPeriods.concat()
// console.log(pathWithPeriodsTemp)
// calculateCenter(path)
for (let i = pathWithPeriodsTemp.length - 1; i > 0; i--) {
for (let j = 0; j < i; j++) {
if (JSON.stringify(pathWithPeriodsTemp[i][1]) === JSON.stringify(pathWithPeriodsTemp[j][1])) {
@ -359,6 +355,11 @@ function initDraw() {
addSubredditFields("", 0, [0]);
addDiscordFields("", 0, [0]);
addWikiFields("", 0, [0]);
// Resets periods
pathWithPeriods = []
pathWithPeriods.push([defaultPeriod, []])
initPeriodGroups()
} else {
resetButton.textContent = "Confirm Reset";
resetButton.className = "btn btn-danger";
@ -725,14 +726,13 @@ function initDraw() {
periodsAdd.addEventListener('click', () => {
pathWithPeriods.push([defaultPeriod, []])
// console.log(JSON.stringify(pathWithPeriods))
initPeriodGroups()
})
}
function calculateCenter(path) {
let result = polylabel(path)
const result = polylabel(path)
return [Math.floor(result[0]) + 0.5, Math.floor(result[1]) + 0.5]
}
@ -741,8 +741,6 @@ function initPeriodGroups() {
periodGroupElements = []
periodGroups.textContent = ''
// console.log(pathWithPeriods)
pathWithPeriods.forEach(([period, path], index) => {
const periodGroupEl = periodGroupTemplate.cloneNode(true)
periodGroupEl.id = "periodGroup" + index
@ -756,7 +754,6 @@ function initPeriodGroups() {
const periodCopyEl = periodGroupEl.querySelector('.period-copy')
const [start, end, variation] = parsePeriod(period)
// console.log(period, start, end, variation)
startPeriodEl.id = "periodStart" + index
startPeriodEl.previousElementSibling.htmlFor = startPeriodEl.id
@ -770,16 +767,16 @@ function initPeriodGroups() {
endPeriodEl.max = variationsConfig[variation].versions.length - 1
startPeriodEl.value = start
endPeriodEl.value = end
if (startPeriodEl.max == 0) periodGroupEl.classList.add('no-time-slider')
else periodGroupEl.classList.remove('no-time-slider')
startPeriodEl.addEventListener('input', event => {
timelineSlider.value = parseInt(event.target.value)
updateTime(parseInt(event.target.value), variation)
// console.log(parseInt(event.target.value))
})
endPeriodEl.addEventListener('input', event => {
timelineSlider.value = parseInt(event.target.value)
updateTime(parseInt(event.target.value), variation)
// console.log(parseInt(event.target.value))
})
periodDeleteEl.addEventListener('click', () => {
if (pathWithPeriods.length === 1) return
@ -798,8 +795,9 @@ function initPeriodGroups() {
endPeriodEl.value = newVariationConfig.default
endPeriodEl.max = newVariationConfig.versions.length - 1
periodVariationEl.previousElementSibling.innerHTML = newVariationConfig.icon;
if (startPeriodEl.max == 0) periodGroupEl.classList.add('no-time-slider')
else periodGroupEl.classList.remove('no-time-slider')
updateTime(newVariationConfig.default, newVariation)
// console.log(parseInt(event.target.value))
})
periodCopyEl.addEventListener("click", event => {
@ -822,7 +820,6 @@ function initPeriodGroups() {
updatePeriodGroups()
} else if (event.target.textContent === " Paste") {
pathWithPeriods[index][1] = [...periodClipboard.path]
// console.log(pathWithPeriods[index])
if (pathWithPeriods.length > 2) console.log(pathWithPeriods[2])
initPeriodGroups()
}
@ -849,13 +846,11 @@ function initPeriodGroups() {
periodCopyEl
})
})
// console.log(periodGroupTemplate)
updatePeriodGroups()
}
function updatePeriodGroups() {
// console.log('updatePeriodGroups')
let pathToActive = []
let lastActivePathIndex
let currentActivePathIndex
@ -896,9 +891,6 @@ function updatePeriodGroups() {
if (periodClipboard.index !== null) {
if (index !== periodClipboard.index) {
periodCopyEl.innerHTML = '<i class="bi bi-clipboard-plus" aria-hidden="true"></i> Paste'
// console.log(JSON.stringify(pathWithPeriods[index][1]))
// console.log(JSON.stringify(periodClipboard.path))
// console.log(JSON.stringify(pathWithPeriods[index][1]) === JSON.stringify(periodClipboard.path))
if (JSON.stringify(pathWithPeriods[index][1]) === JSON.stringify(periodClipboard.path)) {
periodCopyEl.innerHTML = '<i class="bi bi-clipboard-check" aria-hidden="true"></i> Paste'
periodCopyEl.disabled = true
@ -916,19 +908,8 @@ function updatePeriodGroups() {
}
})
// console.log('updatePeriodGroups searcher', pathToActive, lastActivePathIndex, currentActivePathIndex, period)
periodsStatus.textContent = ""
// if (currentActivePathIndexes.length > 1) {
// periodsStatus.textContent = "Collision detected! Please resolve it."
// currentActivePathIndexes.forEach(index => {
// periodGroupElements[index].periodGroupEl.dataset.status = "error"
// })
// currentActivePathIndex = undefined
// }
// console.log(lastActivePathIndex)
if (lastActivePathIndex !== undefined) {
if (lastActivePathIndex === currentActivePathIndex) {
// just update the path
@ -956,7 +937,6 @@ function updatePeriodGroups() {
}
} else {
// console.log('direct active', pathToActive)
updatePath(pathToActive)
}
@ -973,9 +953,7 @@ function formatPeriod(start, end, variation) {
}
function updatePath(newPath) {
// console.log('updatePath', path, newPath)
if (newPath) path = newPath
// console.log('updatePath', path, newPath)
if (path.length > 3) center = calculateCenter(path)
render(path)
undoButton.disabled = path.length == 0; // Maybe make it undo the cancel action in the future

View file

@ -6,7 +6,7 @@
artwork of the canvas provided by the community.
Copyright (c) 2017 Roland Rytz <roland@draemm.li>
Copyright (c) 2022 r/placeAtlas2 contributors
Copyright (c) 2022 Place Atlas contributors
Licensed under the GNU Affero General Public License Version 3
https://place-atlas.stefanocoding.me/license.txt

View file

@ -6,7 +6,7 @@
artwork of the canvas provided by the community.
Copyright (c) 2017 Roland Rytz <roland@draemm.li>
Copyright (c) 2022 r/placeAtlas2 contributors
Copyright (c) 2022 Place Atlas contributors
Licensed under the GNU Affero General Public License Version 3
https://place-atlas.stefanocoding.me/license.txt
@ -143,7 +143,6 @@ async function init() {
const liveResp = await fetch("https://place-atlas.stefanocoding.me/atlas.json");
let liveJson = await liveResp.json();
liveJson = updateAtlasAll(liveJson)
// console.log(liveJson)
const liveAtlasReduced = liveJson.reduce(function (a, c) {
a[c.id] = c;

View file

@ -6,7 +6,7 @@
artwork of the canvas provided by the community.
Copyright (c) 2017 Roland Rytz <roland@draemm.li>
Copyright (c) 2022 r/placeAtlas2 contributors
Copyright (c) 2022 Place Atlas contributors
Licensed under the GNU Affero General Public License Version 3
https://place-atlas.stefanocoding.me/license.txt

View file

@ -6,7 +6,7 @@
artwork of the canvas provided by the community.
Copyright (c) 2017 Roland Rytz <roland@draemm.li>
Copyright (c) 2022 r/placeAtlas2 contributors
Copyright (c) 2022 Place Atlas contributors
Licensed under the GNU Affero General Public License Version 3
https://place-atlas.stefanocoding.me/license.txt

View file

@ -6,7 +6,7 @@
artwork of the canvas provided by the community.
Copyright (c) 2017 Roland Rytz <roland@draemm.li>
Copyright (c) 2022 r/placeAtlas2 contributors
Copyright (c) 2022 Place Atlas contributors
Licensed under the GNU Affero General Public License Version 3
https://place-atlas.stefanocoding.me/license.txt
@ -24,16 +24,8 @@ const variationsConfig = {
tfc: {
name: "The Final Clean",
code: "T",
default: 2,
default: 0,
versions: [
{
timestamp: "Draft 1",
url: "./_img/canvas/tfc/draft1.png",
},
{
timestamp: "Draft 2",
url: "./_img/canvas/tfc/draft2.png",
},
{
timestamp: "Final",
url: "./_img/canvas/tfc/final.png",
@ -90,16 +82,6 @@ variantsEl.addEventListener("input", (event) => {
updateTime(currentPeriod, event.target.value)
})
// document.querySelector('#period-group .period-start').oninput = (event) => {
// slider.value = parseInt(event.target.value)
// updateTime(parseInt(event.target.value))
// };
// document.querySelector('#period-group .period-end').oninput = (event) => {
// slider.value = parseInt(event.target.value)
// updateTime(parseInt(event.target.value))
// };
const dispatchTimeUpdateEvent = (period = timelineSlider.value, atlas = atlas) => {
const timeUpdateEvent = new CustomEvent('timeupdate', {
detail: {
@ -116,13 +98,15 @@ async function updateBackground(newPeriod = currentPeriod, newVariation = curren
currentUpdateIndex++
const myUpdateIndex = currentUpdateIndex
currentPeriod = newPeriod
// console.log(newPeriod, newVariation)
const variationConfig = variationsConfig[newVariation]
if (currentVariation !== newVariation) {
currentVariation = newVariation
timelineSlider.max = variationConfig.versions.length - 1;
currentPeriod = variationConfig.default;
newPeriod = currentPeriod
if (variationConfig.versions.length === 1) timelineSlider.parentElement.classList.add('no-time-slider')
else timelineSlider.parentElement.classList.remove('no-time-slider')
}
timelineSlider.value = currentPeriod
@ -161,11 +145,9 @@ async function updateBackground(newPeriod = currentPeriod, newVariation = curren
}))
for await (const url of configObject.url) {
const imageLayer = new Image()
// console.log(imageCache[url])
await new Promise(resolve => {
imageLayer.onload = () => {
context.drawImage(imageLayer, 0, 0)
// console.log("image done")
resolve()
}
imageLayer.src = imageCache[url]
@ -174,7 +156,6 @@ async function updateBackground(newPeriod = currentPeriod, newVariation = curren
if (currentUpdateIndex !== myUpdateIndex) return [configObject, newPeriod, newVariation]
const blob = await new Promise(resolve => canvas.toBlob(resolve))
// console.log(URL.createObjectURL(blob))
image.src = URL.createObjectURL(blob)
}
@ -189,19 +170,15 @@ async function updateTime(newPeriod = currentPeriod, newVariation = currentVaria
atlas = []
for (const atlasIndex in atlasAll) {
let pathChosen, centerChosen, chosenIndex
let chosenIndex
const validPeriods2 = Object.keys(atlasAll[atlasIndex].path)
// console.log(chosenIndex)
for (const i in validPeriods2) {
const validPeriods = validPeriods2[i].split(', ')
for (const j in validPeriods) {
const [start, end, variation] = parsePeriod(validPeriods[j])
// console.log(start, end, variation, newPeriod, newVariation)
if (isOnPeriod(start, end, variation, newPeriod, newVariation)) {
// console.log("match", start, end, variation, newPeriod, newVariation, i)
chosenIndex = i
break
}
@ -209,24 +186,18 @@ async function updateTime(newPeriod = currentPeriod, newVariation = currentVaria
if (chosenIndex !== undefined) break
}
// console.log(testMatches)
// console.log(chosenIndex)
if (chosenIndex === undefined) continue
pathChosen = Object.values(atlasAll[atlasIndex].path)[chosenIndex]
centerChosen = Object.values(atlasAll[atlasIndex].center)[chosenIndex]
const pathChosen = Object.values(atlasAll[atlasIndex].path)[chosenIndex]
const centerChosen = Object.values(atlasAll[atlasIndex].center)[chosenIndex]
if (pathChosen === undefined) continue
// console.log(123)
atlas.push({
...atlasAll[atlasIndex],
path: pathChosen,
center: centerChosen,
})
}
// console.log(atlas)
dispatchTimeUpdateEvent(newPeriod, atlas)
document.body.dataset.canvasLoading = false
@ -252,7 +223,6 @@ function isOnPeriod(start, end, variation, currentPeriod, currentVariation) {
}
function parsePeriod(periodString) {
// console.log(periodString)
let variation = "default"
periodString = periodString + ""
if (periodString.split(':').length > 1) {

View file

@ -6,7 +6,7 @@
artwork of the canvas provided by the community.
Copyright (c) 2017 Roland Rytz <roland@draemm.li>
Copyright (c) 2022 r/placeAtlas2 contributors
Copyright (c) 2022 Place Atlas contributors
Licensed under the GNU Affero General Public License Version 3
https://place-atlas.stefanocoding.me/license.txt
@ -401,8 +401,6 @@ function buildObjectsList(filter = null, sort = null) {
break;
}
// console.log(sortedAtlas[i])
const element = createInfoBlock(sortedAtlas[i]);
element.entry = sortedAtlas[i];

View file

@ -6,7 +6,7 @@
artwork of the canvas provided by the community.
Copyright (c) 2017 Roland Rytz <roland@draemm.li>
Copyright (c) 2022 r/placeAtlas2 contributors
Copyright (c) 2022 Place Atlas contributors
Licensed under the GNU Affero General Public License Version 3
https://place-atlas.stefanocoding.me/license.txt
@ -69,7 +69,7 @@
<div class="container py-4">
<div class="row g-5">
<div class="col-md-7 col-xl-8">
<h1 class="display-5 fw-bold">The 2022 /r/place Atlas</h2>
<h1 class="display-5 fw-bold">The 2022 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 Fools event on Reddit in 2022.</p>
<p>The original code was developed by <a href="https://draemm.li/various/place-atlas/" target="_blank" rel="noopener noreferrer">Roland Rytz</a> (<a href="mailto:roland.rytz@gmail.com">mail</a>, <a href="https://reddit.com/user/draemmli/" target="_blank" rel="noopener noreferrer">reddit</a>) and is available under the free <a href="https://www.gnu.org/licenses/agpl-3.0.en.html" target="_blank" rel="noopener noreferrer">AGPL license</a> on <a href="https://github.com/RolandR/place-atlas" target="_blank" rel="noopener noreferrer">GitHub</a>.</p>
<hr>
@ -77,8 +77,8 @@ <h1 class="display-5 fw-bold">The 2022 /r/place Atlas</h2>
<p>Maintaining and updating the website takes work, but I enjoy doing it for free and giving this to people. But if you would like to support me, or the people who helped me with contributions to this project. You're free to support us though <a href="https://paypal.me/placeAtlas/5" target="_blank" rel="noopener noreferrer">PayPal</a>, <a href="https://www.patreon.com/placeAtlas" target="_blank" rel="noopener noreferrer">Patreon</a>, or <a href="https://ko-fi.com/placeatlas" target="_blank" rel="noopener noreferrer">Ko-Fi</a>.</p>
<p>To maintain the same tradition, I will also be offering stickers to anyone donating more then 20$ (Due to the size increase). But, you're not forced to do anything! This only shows appreciation to us and the people who've worked on this project</p>
<p>Roland Rytz worked on the Atlas full-time (and more!) for over two weeks during the 2017 r/place event. If you'd like to support Roland, you can do so by <a href="https://paypal.me/draemmli" target="_blank" rel="noopener noreferrer">PayPal</a>. If you donate more than 10(€/$/CHF/mBTC), He'll (hopefully) send you a nice sticker of the 2017 Place canvas!</p>
<h2>How to contribute</h2>
<p>The /r/place Atlas project relies on user contributions.</p>
<h2>Contributing</h2>
<p>The Atlas relies on user contributions.</p>
<p>To contribute a label for an artwork, please read <a href="https://www.reddit.com/r/placeAtlas2/comments/tu203o/how_to_contribute/" target="_blank" rel="noopener noreferrer">this post on Reddit</a> to learn how to submit a new entry. Alternatively, contributions can be made directly on <a href="https://github.com/placeAtlas/atlas/blob/master/CONTRIBUTING.md">GitHub</a>.</p>
<p>The <a href="https://reddit.com/r/placeAtlas2/" target="_blank" rel="noopener noreferrer">/r/placeAtlas2</a> subreddit is also the place to submit all bug reports, feature requests or questions.</p>
@ -90,7 +90,7 @@ <h2>Contributors and Maintainers</h2>
<li>Contributor: <a href="https://reddit.com/user/m654zy" target="_blank" rel="noopener noreferrer">m654zy</a></li>
<li>Contributor: <a href="https://reddit.com/user/xXLInkster17Xx" target="_blank" rel="noopener noreferrer">xXLInkster17Xx</a></li>
</ul>
<p>The 2022 Atlas would not have been possible without the help of our reddit contributors. This section will be updated with all of the contributor's usernames.</p>
<p>The 2022 Atlas would not have been possible without the help of our Reddit contributors. This section will be updated with all of the contributor's usernames.</p>
<p>Thank you to everyone who submitted new entries, amended existing ones, reported bugs and just supported the project in general.</p>
</div>
<div class="col-md-5 col-xl-4">

View file

@ -6,7 +6,7 @@
artwork of the canvas provided by the community.
Copyright (c) 2017 Roland Rytz <roland@draemm.li>
Copyright (c) 2022 r/placeAtlas2 contributors
Copyright (c) 2022 Place Atlas contributors
Licensed under the GNU Affero General Public License Version 3
https://place-atlas.stefanocoding.me/license.txt
@ -52,32 +52,61 @@
<script type="text/javascript" src="./_js/favicon.js" defer></script>
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@context": "https://schema.org",
"@type": "WebSite",
"name": "The 2022 /r/place Atlas",
"url": "http://place-atlas.stefanocoding.me/",
"author": {
"@type": "Person",
"@id": "#Codixer",
"name": "Stefano Haagmans",
"email": "stefano@stefanocoding.me",
"url": "https://stefanocoding.me/",
"sameAs": "https://stefanocoding.me/",
"familyName": "Haagmans",
"givenName": "Stefano",
"alternateName": "Codixer",
"gender": "Male",
"nationality": "Netherlands"
},
"copyrightHolder": { "@id": "#RolandRytz" },
"url": "https://place-atlas.stefanocoding.me/",
"author": [
{
"@type": "Person",
"name": "Roland Rytz",
"email": "roland.rytz@gmail.com",
"url": "https://draemm.li",
"familyName": "Rytz",
"givenName": "Roland",
"alternateName": "draemmli",
"gender": "Male",
"nationality": "Switzerland"
},
{
"@type": "Person",
"name": "Stefano Haagmans",
"email": "stefano@stefanocoding.me",
"url": "https://stefanocoding.me/",
"familyName": "Haagmans",
"givenName": "Stefano",
"alternateName": "Codixer",
"gender": "Male",
"nationality": "Netherlands"
},
{
"@type": "Organization",
"name": "Place Atlas",
"alternateName": "r/placeatlas2",
"url": "https://github.com/placeAtlas",
"image": "http://place-atlas.stefanocoding.me/_img/logo.png",
"founder": {
"@type": "Person",
"@id": "#Codixer",
"name": "Stefano Haagmans",
"email": "stefano@stefanocoding.me",
"url": "https://stefanocoding.me/",
"familyName": "Haagmans",
"givenName": "Stefano",
"alternateName": "Codixer",
"gender": "Male",
"nationality": "Netherlands"
}
}
],
"copyrightYear": 2017,
"license": "https://place-atlas.stefanocoding.me/license.txt",
"inLanguage": "English",
"isAccessibleForFree": true,
"keywords": "reddit, /r/place",
"thumbnailUrl": "http://place-atlas.stefanocoding.me/_img/logo.png",
"logo": "http://place-atlas.stefanocoding.me/_img/logo.png",
"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)..",
"keywords": "reddit, /r/place, place, experiment",
"thumbnailUrl": "https://place-atlas.stefanocoding.me/_img/logo.png",
"image": "https://place-atlas.stefanocoding.me/_img/logo.png",
"description": "An interactive map of Reddit's 2022 /r/place, with information to each artwork of the canvas."
}
</script>
</head>