diff --git a/art/alley.json b/art/alley.json index dd3e801..21c6f17 100644 --- a/art/alley.json +++ b/art/alley.json @@ -1,4 +1,5 @@ { "date": "2018", - "title": "Alley" + "title": "Alley", + "tags": ["3D"] } diff --git a/art/city-train.json b/art/city-train.json index 57051f3..eb50a97 100644 --- a/art/city-train.json +++ b/art/city-train.json @@ -1,4 +1,5 @@ { "date": "2018", - "title": "City Train" + "title": "City Train", + "tags": ["3D"] } diff --git a/art/glass.json b/art/glass.json index e1920f2..3584fa4 100644 --- a/art/glass.json +++ b/art/glass.json @@ -1,4 +1,5 @@ { "date": "2018", - "title": "Glass" + "title": "Glass", + "tags": ["3D"] } diff --git a/art/hallway.json b/art/hallway.json index 50fc047..17f8e6a 100644 --- a/art/hallway.json +++ b/art/hallway.json @@ -1,4 +1,5 @@ { "date": "2018", - "title": "Hallway" + "title": "Hallway", + "tags": ["3D"] } diff --git a/art/lemon.json b/art/lemon.json index 7654dfc..c841081 100644 --- a/art/lemon.json +++ b/art/lemon.json @@ -1,4 +1,5 @@ { "date": "2018", - "title": "Lemon" + "title": "Lemon", + "tags": ["3D"] } diff --git a/art/production-monitor.json b/art/production-monitor.json index 1d3061c..88f7ec3 100644 --- a/art/production-monitor.json +++ b/art/production-monitor.json @@ -1,4 +1,5 @@ { "date": "2016", - "title": "Cool-looking Monitor" + "title": "Cool-looking Monitor", + "tags": ["3D"] } diff --git a/art/room.json b/art/room.json index a868fe6..2f266a5 100644 --- a/art/room.json +++ b/art/room.json @@ -1,4 +1,5 @@ { "date": "2018", - "title": "Classroom" + "title": "Classroom", + "tags": ["3D"] } diff --git a/art/samus.json b/art/samus.json index 27a54f0..f5a2212 100644 --- a/art/samus.json +++ b/art/samus.json @@ -1,4 +1,5 @@ { "date": "2017", - "title": "Unfinished Samus Wallpaper" + "title": "Unfinished Samus Wallpaper", + "tags": ["3D"] } diff --git a/art/sniper-girl.json b/art/sniper-girl.json index 7a5ac66..0c619e7 100644 --- a/art/sniper-girl.json +++ b/art/sniper-girl.json @@ -4,5 +4,6 @@ ], "date": "2019", "nsfw": false, - "title": "Sniper Girl" + "title": "Sniper Girl", + "tags": ["3D"] } diff --git a/art/sniper-rifle.json b/art/sniper-rifle.json index 3a6e5a4..4762c67 100644 --- a/art/sniper-rifle.json +++ b/art/sniper-rifle.json @@ -1,4 +1,5 @@ { "date": "2016", - "title": "Sniper Rifle" + "title": "Sniper Rifle", + "tags": ["3D"] } diff --git a/art/space.json b/art/space.json index b8efab6..0b64b99 100644 --- a/art/space.json +++ b/art/space.json @@ -1,4 +1,5 @@ { "date": "2016", - "title": "Spaceship" + "title": "Spaceship", + "tags": ["3D"] } diff --git a/art/tv.json b/art/tv.json index 63f5442..a2523d4 100644 --- a/art/tv.json +++ b/art/tv.json @@ -1,4 +1,5 @@ { "date": "2018", - "title": "TV" + "title": "TV", + "tags": ["3D"] } diff --git a/assets/art/headsculpt.webp b/assets/art/headsculpt.webp deleted file mode 100644 index 81ad84a..0000000 Binary files a/assets/art/headsculpt.webp and /dev/null differ diff --git a/config.yaml b/config.yaml index 5d24906..b9bfb24 100644 --- a/config.yaml +++ b/config.yaml @@ -57,30 +57,27 @@ menu: - name: 'Art' url: '/art' weight: 2 - - name: '3D' - url: '/3D' - weight: 3 - name: 'Music' url: '/music' - weight: 4 + weight: 3 - name: 'Software' url: '/software' - weight: 5 + weight: 4 - name: 'Videos' url: 'https://tube.ryne.moe/@redchannel' - weight: 6 + weight: 5 - name: 'Downloads' url: '/downloads' - weight: 7 + weight: 6 - name: 'Links' url: '/links' - weight: 8 + weight: 7 - name: 'Guestbook' url: '/guestbook' - weight: 9 + weight: 8 - name: 'About' url: '/about' - weight: 10 + weight: 9 footer: - name: 'Blog Feed' url: '/blog/index.xml' diff --git a/content/art/2016/lantern.md b/content/art/2016/lantern.md index 4b12a9e..b03681d 100644 --- a/content/art/2016/lantern.md +++ b/content/art/2016/lantern.md @@ -3,6 +3,12 @@ title: Lantern date: 2016-01-01 excludefeed: true layout: art-detail -filename: /art/lantern.webp +filename: /3d/lantern.glb +orbit: 122.3deg 76deg 12.79m +alt_text: "A metal old-looking lantern." slug: lantern +threed: true +arttags: +- 3d +nsfw: false --- diff --git a/content/art/2016/production-monitor.md b/content/art/2016/production-monitor.md index b5ee306..1f2ca75 100644 --- a/content/art/2016/production-monitor.md +++ b/content/art/2016/production-monitor.md @@ -5,4 +5,6 @@ excludefeed: true layout: art-detail filename: /art/production-monitor.webp slug: production-monitor +arttags: +- 3d --- diff --git a/content/art/2016/sniper-rifle.md b/content/art/2016/sniper-rifle.md index 01a0cd8..396754f 100644 --- a/content/art/2016/sniper-rifle.md +++ b/content/art/2016/sniper-rifle.md @@ -5,4 +5,6 @@ excludefeed: true layout: art-detail filename: /art/sniper-rifle.webp slug: sniper-rifle +arttags: +- 3d --- diff --git a/content/art/2016/space.md b/content/art/2016/space.md index 8a72568..31f592b 100644 --- a/content/art/2016/space.md +++ b/content/art/2016/space.md @@ -5,4 +5,6 @@ excludefeed: true layout: art-detail filename: /art/space.webp slug: space +arttags: +- 3d --- diff --git a/content/art/2017/samus.md b/content/art/2017/samus.md index a72c717..8e7f982 100644 --- a/content/art/2017/samus.md +++ b/content/art/2017/samus.md @@ -5,4 +5,6 @@ excludefeed: true layout: art-detail filename: /art/samus.webp slug: samus +arttags: +- 3d --- diff --git a/content/art/2018/alley.md b/content/art/2018/alley.md index 62663ec..39890af 100644 --- a/content/art/2018/alley.md +++ b/content/art/2018/alley.md @@ -5,4 +5,6 @@ excludefeed: true layout: art-detail filename: /art/alley.webp slug: alley +arttags: +- 3d --- diff --git a/content/art/2018/city-train.md b/content/art/2018/city-train.md index 7c4d620..9a498f2 100644 --- a/content/art/2018/city-train.md +++ b/content/art/2018/city-train.md @@ -5,4 +5,6 @@ excludefeed: true layout: art-detail filename: /art/city-train.webp slug: city-train +arttags: +- 3d --- diff --git a/content/art/2018/glass.md b/content/art/2018/glass.md index b33d4b2..499627b 100644 --- a/content/art/2018/glass.md +++ b/content/art/2018/glass.md @@ -5,4 +5,6 @@ excludefeed: true layout: art-detail filename: /art/glass.webp slug: glass +arttags: +- 3d --- diff --git a/content/art/2018/hallway.md b/content/art/2018/hallway.md index 17c9073..b52577b 100644 --- a/content/art/2018/hallway.md +++ b/content/art/2018/hallway.md @@ -5,4 +5,6 @@ excludefeed: true layout: art-detail filename: /art/hallway.webp slug: hallway +arttags: +- 3d --- diff --git a/content/art/2018/lemon.md b/content/art/2018/lemon.md index c16c68c..068edab 100644 --- a/content/art/2018/lemon.md +++ b/content/art/2018/lemon.md @@ -5,4 +5,6 @@ excludefeed: true layout: art-detail filename: /art/lemon.webp slug: lemon +arttags: +- 3d --- diff --git a/content/art/2018/room.md b/content/art/2018/room.md index 45d4832..dfda1a6 100644 --- a/content/art/2018/room.md +++ b/content/art/2018/room.md @@ -5,4 +5,6 @@ excludefeed: true layout: art-detail filename: /art/room.webp slug: room +arttags: +- 3d --- diff --git a/content/art/2018/tv.md b/content/art/2018/tv.md index 17d93d1..5453efc 100644 --- a/content/art/2018/tv.md +++ b/content/art/2018/tv.md @@ -5,4 +5,6 @@ excludefeed: true layout: art-detail filename: /art/tv.webp slug: tv +arttags: +- 3d --- diff --git a/content/art/2019/sniper-girl.md b/content/art/2019/sniper-girl.md index e5fea8b..97fae1e 100644 --- a/content/art/2019/sniper-girl.md +++ b/content/art/2019/sniper-girl.md @@ -7,5 +7,7 @@ filename: /art/sniper-girl.webp slug: sniper-girl characters: - Sniper Girl +arttags: +- 3d nsfw: false --- diff --git a/content/art/2022/headsculpt.md b/content/art/2022/headsculpt.md index 3592a48..78417d3 100644 --- a/content/art/2022/headsculpt.md +++ b/content/art/2022/headsculpt.md @@ -2,9 +2,12 @@ title: Nomadsculpt test date: 2022-12-05 layout: art-detail -filename: /art/headsculpt.webp +filename: /3d/headsculpt.glb alt_text: "A 3d sculpt of a short, brown haired girl. It’s only a bust." slug: headsculpt +threed: true +arttags: +- 3d mastodon_url: https://mastodon.art/@redstrate/109459311625828312 program: Nomadsculpt --- diff --git a/content/art/_index.md b/content/art/_index.md index 44381e7..8f1280f 100644 --- a/content/art/_index.md +++ b/content/art/_index.md @@ -2,7 +2,7 @@ title: Art layout: art summary: My personal art gallery. -new_banner: You can now vote on artwork! +new_banner: You can now view select 3D pieces in your browser! commissions: true aliases: - /gallery diff --git a/content/art/stats/_index.md b/content/art/stats/_index.md index 6b2a976..c65018a 100644 --- a/content/art/stats/_index.md +++ b/content/art/stats/_index.md @@ -1,21 +1,21 @@ --- title: Stats layout: art-stats -total: 183 +total: 187 years: - year: 2019 num: 60 - year: 2022 - num: 44 + num: 46 - year: 2020 num: 29 - year: 2021 - num: 27 + num: 28 - year: 2023 num: 8 -- year: 2018 - num: 7 - year: 2016 + num: 8 +- year: 2018 num: 7 - year: 2017 num: 1 @@ -26,12 +26,12 @@ characters: num: 9 - name: Merume num: 7 +- name: Sakura + num: 5 - name: Mari num: 5 - name: Asuka num: 5 -- name: Sakura - num: 4 - name: Mythra num: 4 - name: Elisanne @@ -47,4 +47,6 @@ tags: num: 7 - name: drawpile num: 8 +- name: 3d + num: 16 --- diff --git a/data/art-config.json b/data/art-config.json index bf19c11..d4dcb3e 100644 --- a/data/art-config.json +++ b/data/art-config.json @@ -4,6 +4,6 @@ "goinghome", "orbit-correction" ], - "new-banner": "You can now vote on artwork!", + "new-banner": "You can now view select 3D pieces in your browser!", "commissions": true } diff --git a/scripts/gen_art.py b/scripts/gen_art.py index af93001..99ad6a6 100644 --- a/scripts/gen_art.py +++ b/scripts/gen_art.py @@ -7,7 +7,7 @@ def write_field(f, key, value): f.write(key + ": " + value + "\n") -def parse_art_json(output_directory, filename, json_file): +def parse_art_json(output_directory, filename, json_file, threed = False): json_data = json.load(json_file) year = None @@ -36,7 +36,17 @@ def parse_art_json(output_directory, filename, json_file): write_field(f, 'excludefeed', "true") write_field(f, 'layout', 'art-detail') - write_field(f, 'filename', '/art/' + filename + '.webp') + + if threed: + write_field(f, 'filename', '/3d/' + filename + '.glb') + if "camera-orbit" in json_data: + write_field(f, 'orbit', json_data["camera-orbit"]) + if "camera-target" in json_data: + write_field(f, 'target', json_data["camera-target"]) + if "camera-fov" in json_data: + write_field(f, 'fov', json_data["camera-fov"]) + else: + write_field(f, 'filename', '/art/' + filename + '.webp') if "alt_text" in json_data: write_field(f, 'alt_text', @@ -44,6 +54,9 @@ def parse_art_json(output_directory, filename, json_file): write_field(f, 'slug', filename) + if threed: + write_field(f, 'threed', 'true') + characters = [] if "characters" in json_data: f.write("characters:\n") @@ -83,6 +96,7 @@ def parse_art_json(output_directory, filename, json_file): art_data_directory = '../art' +threed_data_directory = '../3d' art_output_directory = '../content/art' shutil.rmtree(art_output_directory) @@ -125,6 +139,35 @@ for filename in os.listdir(art_data_directory): collected_years.add(year) total_art += 1 +for filename in os.listdir(threed_data_directory): + f = os.path.join(threed_data_directory, filename) + + if os.path.isfile(f): + filename_without_ext = os.path.splitext(filename)[0] + + with open(f, "r") as file: + year, characters, tags = parse_art_json(art_output_directory, filename_without_ext, file, True) + + if year in year_stats: + year_stats[year] += 1 + else: + year_stats[year] = 1 + + for character in characters: + if character in character_stats: + character_stats[character] += 1 + else: + character_stats[character] = 1 + + for tag in tags: + if tag in tag_stats: + tag_stats[tag] += 1 + else: + tag_stats[tag] = 1 + + collected_years.add(year) + total_art += 1 + for year in collected_years: with open(os.path.join(art_output_directory, str(year), '_index.md'), 'w') as f: f.write('---\n') diff --git a/themes/red/assets/css/site.css b/themes/red/assets/css/site.css index 8d45bae..51cf026 100644 --- a/themes/red/assets/css/site.css +++ b/themes/red/assets/css/site.css @@ -433,6 +433,8 @@ pre { } model-viewer { - width: 640px; - height: 480px; + height: 100vh; + width: 100%; + margin-left: auto; + margin-right: auto; } diff --git a/themes/red/layouts/_default/art-detail.html b/themes/red/layouts/_default/art-detail.html index 8145ea3..12da995 100644 --- a/themes/red/layouts/_default/art-detail.html +++ b/themes/red/layouts/_default/art-detail.html @@ -4,7 +4,14 @@