adding more thumbs
|
After Width: | Height: | Size: 344 KiB |
BIN
03/time.png
|
Before Width: | Height: | Size: 40 KiB After Width: | Height: | Size: 40 KiB |
|
Before Width: | Height: | Size: 46 KiB After Width: | Height: | Size: 47 KiB |
|
Before Width: | Height: | Size: 40 KiB After Width: | Height: | Size: 40 KiB |
|
Before Width: | Height: | Size: 40 KiB After Width: | Height: | Size: 40 KiB |
|
After Width: | Height: | Size: 581 KiB |
|
After Width: | Height: | Size: 48 KiB |
|
After Width: | Height: | Size: 42 KiB |
|
After Width: | Height: | Size: 87 KiB |
|
After Width: | Height: | Size: 40 KiB |
|
After Width: | Height: | Size: 42 KiB |
|
After Width: | Height: | Size: 40 KiB |
|
After Width: | Height: | Size: 108 KiB |
|
After Width: | Height: | Size: 46 KiB |
|
After Width: | Height: | Size: 104 KiB |
|
|
@ -7,7 +7,20 @@ def injectShaderBlocks( _folder, _text ):
|
|||
rta = ""
|
||||
lines = _text.split('\n');
|
||||
for line in lines:
|
||||
if line.find('<div class=\"codeAndCanvas\"') >= 0:
|
||||
if line.find('<canvas id=\"custom\" class=\"canvas\"') >= 0:
|
||||
shaderFile = re.search("<canvas id=\"custom\" class=\"canvas\" data-fragment-url=\"(.*?)\"", line.rstrip(), re.S).group(1)
|
||||
shaderName, shaderExt = os.path.splitext(shaderFile)
|
||||
|
||||
shaderPath = folder+"/"+shaderFile;
|
||||
|
||||
shaderString = open(shaderPath, 'r').read()
|
||||
shaderImage = folder+"/"+shaderName+".png"
|
||||
shaderCommand = "glslViewer " + shaderPath + " " + \
|
||||
" -s 0.5 -o " + shaderImage
|
||||
print shaderCommand
|
||||
returnCode = subprocess.call(shaderCommand, shell=True)
|
||||
|
||||
elif line.find('<div class=\"codeAndCanvas\"') >= 0:
|
||||
shaderTextureResults = re.findall(r'<div class=\"codeAndCanvas\" data=\".*\" data-imgs=\"(.*)\"></div>', line.rstrip())
|
||||
shaderFile = re.sub(r'<div class=\"codeAndCanvas\" data=\"(.*?)\"(>| .+>)</div>', r'\1', line.rstrip())
|
||||
|
||||
|
|
|
|||