added padding for fisrt map item random positioning
This commit is contained in:
		@@ -223,9 +223,10 @@ export default {
 | 
				
			|||||||
      this.initMatterBody()
 | 
					      this.initMatterBody()
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    getRandomPos(){
 | 
					    getRandomPos(){
 | 
				
			||||||
 | 
					      let pad = 200;
 | 
				
			||||||
      return {
 | 
					      return {
 | 
				
			||||||
        x: this.ray/2 + Math.random()*(this.canvas.width - this.ray),
 | 
					        x: pad + this.ray/2 + Math.random()*(this.canvas.width - this.ray - pad),
 | 
				
			||||||
        y: this.ray/2 + Math.random()*(this.canvas.height - this.ray)
 | 
					        y: pad + this.ray/2 + Math.random()*(this.canvas.height - this.ray - pad)
 | 
				
			||||||
      };
 | 
					      };
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    initMatterBody (){
 | 
					    initMatterBody (){
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user