Skip to content

Instantly share code, notes, and snippets.

View yakumo-proj's full-sized avatar

Yakumo Sayo yakumo-proj

View GitHub Profile
@yakumo-proj
yakumo-proj / DotVRoidMaterialReducer.rb
Last active March 13, 2021 21:59
.vroidのヘアマテリアル削減ツール(ruby)
#!/usr/bin/ruby
# Copyright (C) 2020 Yakumo Sayo, Susanoo Lab. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
@yakumo-proj
yakumo-proj / clothing_info.rb
Created August 8, 2020 09:36
*.vroidの中身の衣装プリセットの一覧を作成するツール
#!/usr/bin/ruby -Ku
=begin
-----------------------------------------------------------------------
BSD-2-Clause
Copyright (c)2020, Yakumo Sayo, Susanoo Lab. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
@yakumo-proj
yakumo-proj / png_decode.rb
Created April 9, 2020 15:57
前にPNGファイルのチャンク構造調べるために作った突貫スクリプト
#!/usr/bin/ruby -Ks
buf = File.open(ARGV[0], "rb")
header = buf.read(8)
p header
return 1 if header.bytes != "\x89PNG\r\n\x1A\n".bytes
chunk_reader = ->(buffer) {
length = buffer.read(4).bytes.inject(0){|s,i| s*256 + i}
tags = buffet.read(4)