Open peteashworth opened 9 months ago
@peteashworth I'm not the maintainer but you should be able to generate a config w/ only the details that you know, and the rest should be randomized.
const config = genConfig({ sex: "man", hairStyle: "mohawk" })
Edit: I missed the point about the seed, though. My apologies.
If I'm not mistaken you should be able to do something like this:
const initialConfig = genConfig("hi@dapi.to")
const config = genConfig({ ...initialConfig, sex: "woman" })
Thank you @jzombie ; that worked perfectly.
Almost; ran it through some tests and found out there is more to selecting the sex as it drives some of the other styling props such as hair style. Which is the need to be able to set some of the props before generating the seed. Short term; ill manually adjust but just a feature idea.
"sex": "man",
"faceColor": "#AC6651",
"earSize": "big",
"eyeStyle": "smile",
"noseStyle": "round",
"mouthStyle": "peace",
"shirtStyle": "polo",
"glassesStyle": "none",
"hairColor": "#F48150",
"hairStyle": "womanShort",
"hatStyle": "none",
"hatColor": "#fff",
"eyeBrowStyle": "upWoman",
"shirtColor": "#F4D150",
"bgColor": "#FC909F"
}```
Thank you @jzombie and @peteashworth I agree with that, I actually noticed this issue after viewed some use cases. Usually they only have the user's email so I didn't know how to handle such case, let me think more about it and let this issue keep opened at the moment.
Almost; ran it through some tests and found out there is more to selecting the sex as it drives some of the other styling props such as hair style. Which is the need to be able to set some of the props before generating the seed. Short term; ill manually adjust but just a feature idea.
"sex": "man", "faceColor": "#AC6651", "earSize": "big", "eyeStyle": "smile", "noseStyle": "round", "mouthStyle": "peace", "shirtStyle": "polo", "glassesStyle": "none", "hairColor": "#F48150", "hairStyle": "womanShort", "hatStyle": "none", "hatColor": "#fff", "eyeBrowStyle": "upWoman", "shirtColor": "#F4D150", "bgColor": "#FC909F" }```
Can you drop in your manual config for female + seed?
quick question, can we make an avatar config save in the database for us to keep that for a user ?
@swapnil-sudhir Yes the config object returned by getConfig can be saved to a database and retrieved later to be passed to the Avatar component
Is there currently a solution to pass in sex + seed. I want to create an avatar off a unique seed but I know the sex. That way the avatar will be sex proper (as I have that info) but then use unique id to generate the other appearance props.