Closed dcsan closed 2 years ago
There's no PRNG, the generator cycles through the token's DNA passed in.
You are probably changing the value and calling the render code with a different value.
There's no PRNG, the generator cycles through the token's DNA passed in.
is it expecting a set number of characters? I'm passing 12 nums now eg 176661098459
it's triggered by the transfer events coming in
put the token in now lets see:
so the top left one, token is consistent at 176661098459
but the images are changing.
if it's rotating through what's the goal of that? or you mean it just iterates over the data passed in?
ok i think perhaps tokenId and metadata are getting shifted somehow
ok finally figured this out. the code inside grapheme was mutating the passed in react state variables. so each render was indeed rot
ating the dna, causing the letter to change on each redraw.
fix
const cloneDna = [...itemSig.dna]
renderLetter(grid, makeRng(cloneDna));
I'm not changing anything but the image data is updating on UI refresh.
I think cos there's still some random number entropy stuff inside the
grapheme
renderer. not sure if its good for me to dig into that code...btw I'm just taking a slice off the numbers - first 12 hex digits to use to render with.