Updated random render script.

Added a new render category (miku). Choice is currently hard-coded.

Added 50 renders for miku category.

Bumped v1 & v4 version strings.
safe.fiery.me
Bobby Wibowo 3 years ago
parent 63e26462ea
commit 72f58e6eec
No known key found for this signature in database
GPG Key ID: 51C3A1E1E22D26CF
  1. 114
      public/js/render.js
  2. BIN
      public/render/miku/001.png
  3. BIN
      public/render/miku/002.png
  4. BIN
      public/render/miku/003.png
  5. BIN
      public/render/miku/004.png
  6. BIN
      public/render/miku/005.png
  7. BIN
      public/render/miku/006.png
  8. BIN
      public/render/miku/007.png
  9. BIN
      public/render/miku/008.png
  10. BIN
      public/render/miku/009.png
  11. BIN
      public/render/miku/010.png
  12. BIN
      public/render/miku/011.png
  13. BIN
      public/render/miku/012.png
  14. BIN
      public/render/miku/013.png
  15. BIN
      public/render/miku/014.png
  16. BIN
      public/render/miku/015.png
  17. BIN
      public/render/miku/016.png
  18. BIN
      public/render/miku/017.png
  19. BIN
      public/render/miku/018.png
  20. BIN
      public/render/miku/019.png
  21. BIN
      public/render/miku/020.png
  22. BIN
      public/render/miku/021.png
  23. BIN
      public/render/miku/022.png
  24. BIN
      public/render/miku/023.png
  25. BIN
      public/render/miku/024.png
  26. BIN
      public/render/miku/025.png
  27. BIN
      public/render/miku/026.png
  28. BIN
      public/render/miku/027.png
  29. BIN
      public/render/miku/028.png
  30. BIN
      public/render/miku/029.png
  31. BIN
      public/render/miku/030.png
  32. BIN
      public/render/miku/031.png
  33. BIN
      public/render/miku/032.png
  34. BIN
      public/render/miku/033.png
  35. BIN
      public/render/miku/034.png
  36. BIN
      public/render/miku/035.png
  37. BIN
      public/render/miku/036.png
  38. BIN
      public/render/miku/037.png
  39. BIN
      public/render/miku/038.png
  40. BIN
      public/render/miku/039.png
  41. BIN
      public/render/miku/040.png
  42. BIN
      public/render/miku/041.png
  43. BIN
      public/render/miku/042.png
  44. BIN
      public/render/miku/043.png
  45. BIN
      public/render/miku/044.png
  46. BIN
      public/render/miku/045.png
  47. BIN
      public/render/miku/046.png
  48. BIN
      public/render/miku/047.png
  49. BIN
      public/render/miku/048.png
  50. BIN
      public/render/miku/049.png
  51. BIN
      public/render/miku/050.png
  52. 4
      views/_globals.njk

@ -1,46 +1,63 @@
/* global page, swal */
page.renderRoot = 'render/al/'
page.renderArray = [
'admiral_graf_spee_1.png',
'admiral_hipper_1.png',
'akagi_1.png',
'akashi_1.png',
'akashi_2.png',
'atago_1.png',
'atago_3.png',
'atago_4.png',
'atago_5.png',
'belfast_2.png',
'choukai_1.png',
'deutschland_1.png',
'enterprise_1.png',
'glorious_1.png',
'hammann_1.png',
'hammann_2.png',
'hammann_3.png',
'hatsuharu_1.png',
'kaga_1.png',
'kaga_2.png',
'kaga_3.png',
'laffey_1.png',
'laffey_2.png',
'laffey_3.png',
'prinz_eugen_3.png',
'san_diego_1.png',
'takao_3.png',
'unicorn_1.png',
'unicorn_2.png',
'unicorn_3.png',
'unicorn_4.png',
'unicorn_6.png',
'unicorn_7.png',
'unicorn_8.png',
'yamashiro_1.png',
'yamashiro_2.png',
'yamashiro_3.png',
'yukikaze_1.png'
]
page.renderType = 'miku'
page.renderConfig = {
al: {
name: 'ship waifu~',
root: 'render/al/',
array: [
'admiral_graf_spee_1.png',
'admiral_hipper_1.png',
'akagi_1.png',
'akashi_1.png',
'akashi_2.png',
'atago_1.png',
'atago_3.png',
'atago_4.png',
'atago_5.png',
'belfast_2.png',
'choukai_1.png',
'deutschland_1.png',
'enterprise_1.png',
'glorious_1.png',
'hammann_1.png',
'hammann_2.png',
'hammann_3.png',
'hatsuharu_1.png',
'kaga_1.png',
'kaga_2.png',
'kaga_3.png',
'laffey_1.png',
'laffey_2.png',
'laffey_3.png',
'prinz_eugen_3.png',
'san_diego_1.png',
'takao_3.png',
'unicorn_1.png',
'unicorn_2.png',
'unicorn_3.png',
'unicorn_4.png',
'unicorn_6.png',
'unicorn_7.png',
'unicorn_8.png',
'yamashiro_1.png',
'yamashiro_2.png',
'yamashiro_3.png',
'yukikaze_1.png'
]
},
miku: {
name: 'miku ❤~',
root: 'render/miku/',
array: []
}
}
// miku: Generate an array of file names from 001.png to 050.png
for (let i = 1; i <= 50; i++)
page.renderConfig.miku.array.push(`${('00' + i).slice(-3)}.png`)
page.config = null
page.render = null
page.doRenderSwal = function () {
@ -50,7 +67,7 @@ page.doRenderSwal = function () {
<div class="control">
<label class="checkbox">
<input id="swalRender" type="checkbox" ${localStorage.render === '0' ? '' : 'checked'}>
Enable random render of ship waifu~
Enable random render of ${page.config.name}
</label>
</div>
<p class="help">If disabled, you will still be able to see a small button on the bottom right corner of the screen to re-enable it.</p>
@ -67,7 +84,7 @@ page.doRenderSwal = function () {
const newValue = div.querySelector('#swalRender').checked ? undefined : '0'
if (newValue !== localStorage.render) {
newValue ? localStorage.render = newValue : localStorage.removeItem('render')
swal('Success!', `Render is now ${newValue ? 'disabled' : 'enabled'}.`, 'success')
swal('Success!', `Random render is now ${newValue ? 'disabled' : 'enabled'}.`, 'success')
const element = document.querySelector('body > .render')
element.remove()
page.doRender()
@ -83,21 +100,22 @@ page.getRenderVersion = function () {
}
page.doRender = function () {
if (!page.renderRoot || !page.renderArray || !page.renderArray.length) return
page.config = page.renderConfig[page.renderType]
if (!page.config || !page.config.array.length) return
let element
if (localStorage.render === '0') {
element = document.createElement('a')
element.className = 'button is-breeze is-hidden-mobile'
element.title = 'ship waifu~'
element.title = page.config.name
element.innerHTML = '<i class="icon-picture-1"></i>'
} else {
// Let us just allow people to get new render when toggling the option
page.render = page.renderArray[Math.floor(Math.random() * page.renderArray.length)]
page.render = page.config.array[Math.floor(Math.random() * page.config.array.length)]
element = document.createElement('img')
element.alt = element.title = 'ship waifu~'
element.alt = element.title = page.config.name
element.className = 'is-hidden-mobile'
element.src = `${page.renderRoot}${page.render}${page.getRenderVersion()}`
element.src = `${page.config.root}${page.render}${page.getRenderVersion()}`
}
element.classList.add('render')

Binary file not shown.

After

Width:  |  Height:  |  Size: 128 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 131 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 169 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 168 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 119 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 120 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 126 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 136 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 90 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 111 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 170 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 148 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 170 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 92 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 154 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 145 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 124 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 152 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 104 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 78 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 111 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 140 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 131 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 122 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 144 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 118 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 79 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 102 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 103 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 131 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 100 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 135 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 135 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 118 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 132 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 144 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 118 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 98 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 95 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 123 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 175 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 128 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 158 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 113 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 117 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 156 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 108 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 158 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 156 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 145 KiB

@ -16,10 +16,10 @@
v3: CSS and JS files (libs such as bulma, lazyload, etc).
v4: Renders in /public/render/* directories (to be used by render.js).
#}
{% set v1 = "eM2nmzS5jf" %}
{% set v1 = "S3TAWpPeFS" %}
{% set v2 = "hiboQUzAzp" %}
{% set v3 = "RpD2narcvz" %}
{% set v4 = "43gxmxi7v8" %}
{% set v4 = "S3TAWpPeFS" %}
{#
These will be the links in the homepage and the No-JS uploader.

Loading…
Cancel
Save