120 |
pap = PaperHanger() |
pap = PaperHanger() |
121 |
pap.reg = Registry() |
pap.reg = Registry() |
122 |
|
|
123 |
|
rng = java.util.Random(pap.reg.get(regseed, "seed", seed)) |
124 |
|
for foo in range(0,20): # eat bad beginning (Java's bad PRNG) |
125 |
|
rng.nextInt() |
126 |
|
|
127 |
|
colors = Colors(rng.nextInt(), colors = numcolors, minlum = minlum, |
128 |
|
blend = blend) |
129 |
|
textures = Textures(rng.nextInt()) |
130 |
|
rootrep = TexGenXYRepeatUnit(rng, scale = 0.3 * scaleFactor, vecs = vecs) |
131 |
passes = [ { "trans" : 0, "emboss" : 0 }, |
passes = [ { "trans" : 0, "emboss" : 0 }, |
132 |
{ "trans" : .5, "emboss" : 0 }, |
{ "trans" : .5, "emboss" : 0 }, |
133 |
{ "trans" : .9375, "emboss" : 0 }, |
{ "trans" : .9375, "emboss" : 0 }, |
134 |
#{ "trans" : 0, "emboss" : 1 }, |
#{ "trans" : 0, "emboss" : 1 }, |
135 |
][0:numpasses] |
][0:numpasses] |
|
|
|
|
rng = java.util.Random(pap.reg.get(regseed, "seed", seed)) |
|
|
for foo in range(0,20): # eat bad beginning (Java's bad PRNG) |
|
|
rng.nextInt() |
|
136 |
seeds = [rng.nextInt(2000000000) for foo in passes] |
seeds = [rng.nextInt(2000000000) for foo in passes] |
137 |
|
|
138 |
# XXX: TODO: these could be passed inside the paper object |
# XXX: TODO: these could be passed inside the paper object |
139 |
# (and then the textures, too, would be protected from gc) |
# (and then the textures, too, would be protected from gc) |
|
colors = Colors(rng.nextInt(), colors = numcolors, minlum = minlum, |
|
|
blend = blend) |
|
|
textures = Textures(rng.nextInt()) |
|
|
rootrep = TexGenXYRepeatUnit(rng, scale = 0.3 * scaleFactor, vecs = vecs) |
|
140 |
|
|
141 |
pap.setNPasses(len(passes)) |
pap.setNPasses(len(passes)) |
142 |
|
|