fix: deterministic behaviour for radar by storing the random fractions when generating rd.json (#372)
* Store the random blip positions when generating rd.json Fixes: https://github.com/AOEpeople/aoe_technology_radar/issues/148 Simple solution to creating stable blips is to store the randomly generated angle and radius in rg.json. Attempted a few hash functions but found it hard to spread blips 'nicely' (they tended to clump into groups or sections of the radar). * distribute points within .1 and .9 of the arc --------- Co-authored-by: Bastian Ike <bastian.ike@bare.id>
This commit is contained in:
@@ -146,6 +146,8 @@ const addRevisionToItem = (
|
||||
quadrant: "",
|
||||
body: "",
|
||||
info: "",
|
||||
angleFraction: Math.random(),
|
||||
radiusFraction: Math.random()
|
||||
},
|
||||
revision: Revision
|
||||
): Item => {
|
||||
|
||||
Reference in New Issue
Block a user