8 |
pap = ThePaperMill().getPaper(seed) |
pap = ThePaperMill().getPaper(seed) |
9 |
paperquad = GLRen.createPaperQuad(pap, -2, -2, 2, 2, 0) |
paperquad = GLRen.createPaperQuad(pap, -2, -2, 2, 2, 0) |
10 |
|
|
11 |
texture = "sawnoise" |
textures = [ ("sawnoise", |
12 |
params = "bias,0.5,scale,0.15,freq,1,df,2,scale2,0.25,freq2,10,df2,.5" |
"bias,0.5,scale,0.15,freq,1,df,2,scale2,0.25,freq2,10,df2,.5"), |
13 |
|
("fnoise", |
14 |
|
"scale,0.2,freq,4,df,4,bias,0.5"), |
15 |
|
] |
16 |
|
|
17 |
ripple_scale = 0.25 |
ripple_scale = 0.25 |
|
texRGBA = getCachedTexture( |
|
|
[128, 128, 0, 4, "RGBA", "RGBA", "irregu", |
|
|
[ "texture", texture, |
|
|
"params", params, |
|
|
"ripple_scale", str(ripple_scale), |
|
|
"radius", "2", |
|
|
"angle", "0", |
|
|
"angles", "3", |
|
|
"eps", ".125", |
|
|
"scaling", "const"]], |
|
|
shade_all_levels = 1) |
|
|
|
|
|
texINTENSITY = getCachedTexture( |
|
|
[128, 128, 0, 1, "INTENSITY", "LUMINANCE", "irregu", |
|
|
[ "texture", texture, |
|
|
"params", params, |
|
|
"ripple_scale", str(ripple_scale), |
|
|
]], |
|
|
shade_all_levels = 1) |
|
18 |
|
|
19 |
|
def inittex(): |
20 |
|
global texRGBA, texINTENSITY |
21 |
|
|
22 |
|
texRGBA = getCachedTexture( |
23 |
|
[128, 128, 0, 4, "RGBA", "RGBA", "irregu", |
24 |
|
[ "texture", textures[0][0], |
25 |
|
"params", textures[0][1], |
26 |
|
"ripple_scale", str(ripple_scale), |
27 |
|
"radius", "2", |
28 |
|
"angle", "0", |
29 |
|
"angles", "3", |
30 |
|
"eps", ".125", |
31 |
|
"scaling", "const"]], |
32 |
|
shade_all_levels = 1) |
33 |
|
|
34 |
|
texINTENSITY = getCachedTexture( |
35 |
|
[128, 128, 0, 1, "INTENSITY", "LUMINANCE", "irregu", |
36 |
|
[ "texture", textures[0][0], |
37 |
|
"params", textures[0][1], |
38 |
|
"ripple_scale", str(ripple_scale), |
39 |
|
]], |
40 |
|
shade_all_levels = 1) |
41 |
|
|
42 |
|
inittex() |
43 |
|
|
44 |
class IrreguScene: |
class IrreguScene: |
45 |
def __init__(self): |
def __init__(self): |
46 |
self.bg = background((0.7,0.7,1.0)) |
self.bg = background((0.7,0.7,1.0)) |
376 |
elif "F1" <= k <= "F9": |
elif "F1" <= k <= "F9": |
377 |
self.shape = int(k[1:]) - 1 |
self.shape = int(k[1:]) - 1 |
378 |
self.initcode() |
self.initcode() |
379 |
|
elif k == "t": |
380 |
|
global textures |
381 |
|
textures = textures[1:] + textures[:1] |
382 |
|
inittex() |
383 |
|
self.initcode() |
384 |
|
|
385 |
|
|
386 |
currentScene = IrreguScene() |
currentScene = IrreguScene() |