diff --git a/_framework/DotNetDevLottery.pdb.gz b/_framework/DotNetDevLottery.pdb.gz index aecf3f7..0eb99f1 100644 Binary files a/_framework/DotNetDevLottery.pdb.gz and b/_framework/DotNetDevLottery.pdb.gz differ diff --git a/_framework/DotNetDevLottery.wasm b/_framework/DotNetDevLottery.wasm index 5c53081..34b1de4 100644 Binary files a/_framework/DotNetDevLottery.wasm and b/_framework/DotNetDevLottery.wasm differ diff --git a/_framework/DotNetDevLottery.wasm.br b/_framework/DotNetDevLottery.wasm.br index bd5592e..3cc3594 100644 Binary files a/_framework/DotNetDevLottery.wasm.br and b/_framework/DotNetDevLottery.wasm.br differ diff --git a/_framework/DotNetDevLottery.wasm.gz b/_framework/DotNetDevLottery.wasm.gz index 3fb231e..79b3d15 100644 Binary files a/_framework/DotNetDevLottery.wasm.gz and b/_framework/DotNetDevLottery.wasm.gz differ diff --git a/_framework/blazor.boot.json b/_framework/blazor.boot.json index ee13b63..8557160 100644 --- a/_framework/blazor.boot.json +++ b/_framework/blazor.boot.json @@ -1,7 +1,7 @@ { "mainAssemblyName": "DotNetDevLottery", "resources": { - "hash": "sha256-+n3ZFOVIj1HDVq9iOgORxUKMi5/j57HM8NobKachEz0=", + "hash": "sha256-EJfUKBVFwj6GX37YtROHYcz6DAp0nyC79NsJTrUdD9A=", "jsModuleNative": { "dotnet.native.8.0.11.n1sf6xr5tz.js": "sha256-VdKq87/z5NIxZKmuM+fv38XF+RcEb/bg3jVBwQSfwP4=" }, @@ -18,7 +18,7 @@ }, "assembly": { "BouncyCastle.Cryptography.wasm": "sha256-tZxUz5R8To9wugB18BSeGE89A5lQ0IsnaCl5AkgKfnY=", - "DotNetDevLottery.wasm": "sha256-B8KnkwBr/bpklmBuY38yt2vfavCYhg5YiaklrgimEtA=", + "DotNetDevLottery.wasm": "sha256-cQAqudUApDQj5CcfFxRyq2+NrJ3HpOuPRSHceGvRUjA=", "Enums.NET.wasm": "sha256-pzL+j6B+0G6CnbVAo8dMnTeNxQqDDE6ubZNVym2/P7M=", "ICSharpCode.SharpZipLib.wasm": "sha256-N+B+aaiZzE1fHJnfuESjuouC3agz168HHdDcBj9kCPQ=", "MathNet.Numerics.wasm": "sha256-u8KPSyaPGoTkqmgb/133wPiFm81PWN6s85SKoxuhiWY=", diff --git a/_framework/blazor.boot.json.br b/_framework/blazor.boot.json.br index 7c70b4b..c32ed01 100644 Binary files a/_framework/blazor.boot.json.br and b/_framework/blazor.boot.json.br differ diff --git a/_framework/blazor.boot.json.gz b/_framework/blazor.boot.json.gz index 9f1eb15..447862a 100644 Binary files a/_framework/blazor.boot.json.gz and b/_framework/blazor.boot.json.gz differ diff --git a/js/Components/MachineAnimation.razor.js b/js/Components/MachineAnimation.razor.js index 03805e2..a82a11f 100644 --- a/js/Components/MachineAnimation.razor.js +++ b/js/Components/MachineAnimation.razor.js @@ -183,7 +183,7 @@ async function defineDrawMachineAnimation({ size }); const topCollider = sphere.find((part) => part.angle === Math.PI * 3 / 2).collider; - const renderedBallCount = count > 20 ? count : 20; + const renderedBallCount = count; let balls = addBallsToEngine({ engine, rapier, @@ -335,9 +335,9 @@ var Ball = class _Ball { this.#element.classList.add("ball"); this.#size = size; this.#ballSize = ballSize; - this.#element.style.setProperty(_Ball.BALL_SIZE_PROPERTY_NAME, String(this.#ballSize * 2)); + this.#element.style.setProperty(_Ball.BALL_SIZE_PROPERTY_NAME, String(this.#ballSize)); wrapperElement.appendChild(this.#element); - const rapierBallSize = coords.toRapier.length(ballSize); + const rapierBallSize = coords.toRapier.length(ballSize / 2); const bodyDesc = new rapier.RigidBodyDesc(rapier.RigidBodyType.Dynamic).setTranslation( ...coords.toRapier.vector(size.wrapper / 2 + index, size.wrapper / 2 + index) ).setCcdEnabled(true); @@ -350,7 +350,7 @@ var Ball = class _Ball { return false; } const [x, y] = coords.fromBody.vector(this.#body); - this.#element.style.transform = `translate(${x - this.#ballSize}px, ${y - this.#ballSize}px) scale(1)`; + this.#element.style.transform = `translate(${x - this.#ballSize / 2}px, ${y - this.#ballSize / 2}px) scale(1)`; return true; } destroy() { @@ -397,7 +397,7 @@ function addBallsToEngine(option) { element } = option; const balls = Array.from({ length: count }, (_, index) => { - const BALL_SIZE = size.machine / (count * 0.75); + const BALL_SIZE = size.machine / (Math.sqrt(count) * 1.5 + 2); const ball = new Ball({ engine, rapier,