Skip to content

Instantly share code, notes, and snippets.

@mieki256
mieki256 / graphicsrubberband2.py
Last active April 16, 2022 06:19
PySideでCGツール用ラバーバンドを試しに書いてみる
#!python
# -*- mode: python; Encoding: utf-8; coding: utf-8 -*-
# Last updated: <2016/12/07 20:37:05 +0900>
u"""
PySideを使って、CGツール用を前提としたRubberBandを実装.
蟻の行進(Marching ant)を表示、
かつ、境界線のドラッグでリサイズできる仕様を入れてみた。
動作確認環境 : Windows10 x64 + Python 2.7.12 + PySide 1.2.4
@mieki256
mieki256 / about.png
Last active August 1, 2020 05:34
Shoeboxで生成したBMFont(ビットマップフォント)テクスチャを等幅フォントのように配置し直すPythonスクリプト
about.png
@mieki256
mieki256 / crt_test05_readobj.rb
Created March 18, 2017 13:02
DXRubyのCustomRenderTargetの動作確認。Wavefront形式(.obj)の3Dモデルデータを直接読み込んで描画してみる。
#!ruby -Ku
# -*- mode: ruby; coding: utf-8 -*-
# Last updated: <2017/03/18 21:20:19 +0900>
#
# DXRuby 1.5.21dev以降で追加された CustomRenderTarget の動作確認
# 公式サンプル spheretest.rb を改造
# テクスチャ描画もしてみる
# uv指定されてない3Dモデルデータには非対応
# tinywavefrontobj.rb を使って Wavefront形式(.obj) を直接読んで使ってみる
#
@mieki256
mieki256 / stgsample6.lua
Last active November 23, 2018 11:01
TIC-80 shoot 'em up example No.6
-- title: WCQ No.6 - Worst Cheap Quality Shoot 'em up exapmle No.6 -
-- author: mieki256
-- desc: short description
-- script: lua
scrw,scrh=240,136
-- --------------------
-- sprite class
@mieki256
mieki256 / stgsample5.lua
Created November 16, 2018 14:02
TIC-80 shoot 'em up sample
-- title: stg sample 5
-- author: mieki256
-- desc: short description
-- script: lua
scrw,scrh=240,136
-- --------------------
-- Player class
@mieki256
mieki256 / night-building-tex.py
Last active July 17, 2018 11:25
Night Building Texture : GIMPで夜景のビルのテクスチャっぽい画像を生成するPython-fuスクリプト。GIMP (2.8.10|2.10.2) Portbale + Windows(7|10) x64 で動作確認。
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# -*- mode: python; Encoding: utf8n -*-
# Last updated: <2018/07/17 20:20:07 +0900>
"""
Make night building texture
Author ; mieki256
License : CC0 / Public Domain
@mieki256
mieki256 / image-oblique.py
Last active July 17, 2018 11:17
GIMP Python で画像を斜めにするスクリプト
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# -*- mode: python; Encoding: utf8n -*-
# Last updated: <2018/07/16 07:25:31 +0900>
u"""
Make oblique image.
usage: Filters -> Distorts -> Image Oblique ...
@mieki256
mieki256 / tinypixelartgen.py
Created April 28, 2017 07:51
Generate Tiny Pixelart with GIMP + Python-Fu
#!/usr/bin/env python
# -*- mode: python; Encoding: utf-8; coding: utf-8 -*-
# Last updated: <2017/04/28 16:43:08 +0900>
u"""
Python-Fu : Generate tiny pixelart.
usage: Filter -> Render -> Tiny Pixelart
Author : mieki256
@mieki256
mieki256 / gosu_opengl_15.rb
Created March 12, 2017 02:00
Ruby+gosu+openglでVBOを使って描画する例。OpenGL 1.5風。
#!ruby -Ku
# -*- mode: ruby; coding: utf-8 -*-
# Last updated: <2017/03/12 10:27:17 +0900>
#
# Ruby + gosu + opengl の動作確認
# gosu-examples の opengl_integration.rb を弄ってOpenGL絡みの部分だけを列挙
#
# OpenGL 1.5風、VBOを使って書いてみるテスト
#
# 算譜記録帳: OpenGLでの頂点データの扱いの変化
@mieki256
mieki256 / bg.jpg
Last active January 16, 2018 06:29
PySide+QGraphicsViewでズーム表示する例。マウスホイールを回すか、ステータスバー上のボタンを押すと倍率が変わる。
bg.jpg