Closed samepant closed 2 years ago
This issue touches on the question on how we bring randomness into the SVG rendering.
So far we're using the token ID as the seed for randomness used for placing the sparkles, deriving the wand name, as well as for generating the stone textures. Using the token ID is convenient for the following reasons:
However, now that we've folded minting and building into a single call, the tokenID is not predictable anymore, since you're in a race with other users. So if you spend too much time in the minting app for fine-tuning the wand visuals someone else might mint that token ID in the meanwhile and you'd end up getting a wand with different name, sparkles and slightly different stone texture than in the preview.
We could maybe create the randomness seed as a combination of the address of the user and the minting block number. The app could then poll the latest block number and keep the preview updated. Of course there's no guarantee your tx will go through in currentBlock+1
, so the final wand might still look different.
Or we really send an extra seed
param as part of the mint
call.
However, now that we've folded minting and building into a single call, the tokenID is not predictable anymore, since you're in a race with other users. So if you spend too much time in the minting app for fine-tuning the wand visuals someone else might mint that token ID in the meanwhile and you'd end up getting a wand with different name, sparkles and slightly different stone texture than in the preview.
Right, and I think this is unpredictable enough that we should wait and only show the name and the sparkles on minted wands, and let them be blank in the UI. That way there are no surprises and the name and sparkles are signifiers that a wand image has been fully minted.
On reload all the sparkles stay in the same place, these should be randomly placed roughly within the diameter of the halo.