WIP 3D
This commit is contained in:
parent
cbed3a91e8
commit
6fd782c676
9 changed files with 1194 additions and 7 deletions
BIN
assets/3d/lantern.glb
Normal file
BIN
assets/3d/lantern.glb
Normal file
Binary file not shown.
BIN
assets/3d/planet-express-ship.glb
Normal file
BIN
assets/3d/planet-express-ship.glb
Normal file
Binary file not shown.
BIN
assets/3d/sakura.glb
Normal file
BIN
assets/3d/sakura.glb
Normal file
Binary file not shown.
17
config.yaml
17
config.yaml
|
@ -57,27 +57,30 @@ menu:
|
|||
- name: 'Art'
|
||||
url: '/art'
|
||||
weight: 2
|
||||
- name: '3D'
|
||||
url: '/3D'
|
||||
weight: 3
|
||||
- name: 'Music'
|
||||
url: '/music'
|
||||
weight: 3
|
||||
weight: 4
|
||||
- name: 'Software'
|
||||
url: '/software'
|
||||
weight: 4
|
||||
weight: 5
|
||||
- name: 'Videos'
|
||||
url: 'https://tube.ryne.moe/@redchannel'
|
||||
weight: 5
|
||||
weight: 6
|
||||
- name: 'Downloads'
|
||||
url: '/downloads'
|
||||
weight: 6
|
||||
weight: 7
|
||||
- name: 'Links'
|
||||
url: '/links'
|
||||
weight: 7
|
||||
weight: 8
|
||||
- name: 'Guestbook'
|
||||
url: '/guestbook'
|
||||
weight: 8
|
||||
weight: 9
|
||||
- name: 'About'
|
||||
url: '/about'
|
||||
weight: 9
|
||||
weight: 10
|
||||
footer:
|
||||
- name: 'Blog Feed'
|
||||
url: '/blog/index.xml'
|
||||
|
|
6
content/3d/_index.md
Normal file
6
content/3d/_index.md
Normal file
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
title: 3D
|
||||
layout: 3d-gallery
|
||||
summary: My personal art gallery.
|
||||
json: "3d"
|
||||
---
|
37
data/3d.json
Normal file
37
data/3d.json
Normal file
|
@ -0,0 +1,37 @@
|
|||
{
|
||||
"categories": [
|
||||
{
|
||||
"name": "Uncategorized",
|
||||
"description": "Test",
|
||||
"years": [
|
||||
{
|
||||
"year": 2016,
|
||||
"pieces": [
|
||||
{
|
||||
"title": "Lantern",
|
||||
"filename": "lantern.glb"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"year": 2022,
|
||||
"pieces": [
|
||||
{
|
||||
"title": "Sakura",
|
||||
"filename": "sakura.glb"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"year": 2023,
|
||||
"pieces": [
|
||||
{
|
||||
"title": "Planet Express Ship",
|
||||
"filename": "planet-express-ship.glb"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
|
@ -431,3 +431,8 @@ pre {
|
|||
margin-left: 5px;
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
model-viewer {
|
||||
width: 640px;
|
||||
height: 480px;
|
||||
}
|
||||
|
|
1102
themes/red/assets/js/model-viewer.min.js
vendored
Normal file
1102
themes/red/assets/js/model-viewer.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
34
themes/red/layouts/_default/3d-gallery.html
Normal file
34
themes/red/layouts/_default/3d-gallery.html
Normal file
|
@ -0,0 +1,34 @@
|
|||
{{ define "main" }}
|
||||
<h2>{{ .Title }}</h2>
|
||||
|
||||
<hr>
|
||||
|
||||
{{ .Content }}
|
||||
|
||||
{{ $art := (index site.Data ($.Param "json")) }}
|
||||
{{ $newgrounds_icon := resources.Get "newgrounds.webp" }}
|
||||
|
||||
{{ range $art.categories }}
|
||||
<h3>{{ .name }}</h3>
|
||||
<p>{{ .description }}</p>
|
||||
{{ range sort .years "year" "desc" }}
|
||||
<h4>{{ .year }}</h4>
|
||||
|
||||
<div class="gallery">
|
||||
{{ range .pieces }}
|
||||
{{ $full := resources.Get (printf "%s/%s" ($.Param "json") .filename) }}
|
||||
|
||||
{{ with resources.Get $full }}
|
||||
<model-viewer src="{{ .RelPermalink }}" shadow-intensity="1" camera-controls touch-action="pan-y"></model-viewer>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ $site := resources.Get "js/model-viewer.min.js" }}
|
||||
{{ if hugo.IsProduction }}
|
||||
{{ $site = $site | minify | fingerprint | resources.PostProcess }}
|
||||
{{ end }}
|
||||
<script type="module" src="{{ $site.RelPermalink }}" integrity="{{ $site.Data.Integrity }}"></script>
|
||||
{{ end }}
|
Loading…
Add table
Reference in a new issue