This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import bpy | |
bl_info = { | |
'name': 'Vertex Data Map', | |
'author': 'Tamas Kemenczy', | |
'version': (0, 1), | |
'blender': (2, 6, 3), | |
'location': 'View3D > Specials > Vertex Data Map', | |
'description': 'Generate vertex data map UV texture', | |
'category': 'Mesh' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import bpy | |
import mathutils | |
bl_info = { | |
'name': 'Set Loose Vertex Colors', | |
'author': 'Tamas Kemenczy', | |
'version': (0, 1), | |
'blender': (2, 6, 3), | |
'location': 'View3D > Specials > Set Loose Vertex Colors', | |
'description': 'Store loose vertex colors via vertex groups', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import bpy | |
bl_info = { | |
'name': 'Map Loose Vertex Colors', | |
'author': 'Tamas Kemenczy', | |
'version': (0, 1), | |
'blender': (2, 6, 3), | |
'location': 'View3D > Specials > Map Loose Vertex Colors', | |
'description': 'Bake vertex colors to active uv texture image', | |
'category': 'Mesh' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function arc(x, y, rx, ry, from, to) { | |
var ar = from * Math.PI / 180; | |
var ax = x + rx * Math.cos(ar); | |
var ay = y + ry * Math.sin(ar); | |
var br = to * Math.PI / 180; | |
var bx = x + rx * Math.cos(br); | |
var by = y + ry * Math.sin(br); | |
var sweep = (to - from) > 180 ? 1 : 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import re | |
import sys | |
import json | |
import math | |
from lxml import etree | |
# TODO | |
# - text nodes | |
# - image nodes | |
# - transforms |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Preloader = function(sources, oncomplete, onload) { | |
this.init(sources, oncomplete, onload); | |
} | |
Preloader.prototype = { | |
init: function(sources, oncomplete, onload) { | |
this.sources = sources; | |
this.oncomplete = oncomplete | |
this.onload = onload; | |
this.images = []; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Boxfill = function(el) { | |
this.init(el); | |
}; | |
Boxfill.prototype = { | |
init: function(el) { | |
this.el = el; | |
this.el.style.overflow = 'hidden'; | |
if (!this.el.style.position) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('.art').each(function() { | |
var el, im, width, height, paper; | |
width = $(this).data('width'); | |
if (width) | |
width += 'px'; | |
height = $(this).data('height'); | |
if (height) | |
height += 'px'; | |
if (window.Raphael && (Raphael.svg || Raphael.vml)) { | |
el = $('<div>').addClass('svg'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Vector2.prototype = { | |
init: function(x, y) { | |
this.x = x; | |
this.y = y; | |
}, | |
copy: function() { | |
return new Vector2(this.x, this.y); | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import sys | |
last = '' | |
punc = ',' | |
while True: | |
c = sys.stdin.read(1) | |
if c: |