Add music
This commit is contained in:
parent
194c0bf846
commit
bd97945e66
14 changed files with 82 additions and 20 deletions
|
@ -28,8 +28,9 @@ function renderParticle(particle) {
|
|||
function renderEntity(entity) {
|
||||
context.save();
|
||||
context.translate(...entity.com);
|
||||
if (graphics.perspective.zoom < 2 && graphics.markers) {
|
||||
context.globalAlpha = 0.7 / graphics.perspective.zoom;
|
||||
let alpha = Math.max(1 - ((graphics.perspective.zoom - 1) / 2), 0) ** 2;
|
||||
if (alpha > 0 && graphics.markers) {
|
||||
context.globalAlpha = alpha;
|
||||
context.beginPath();
|
||||
context.arc(0, 0, 4, 0, 2 * Math.PI);
|
||||
context.lineWidth = 1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue