From 5cc203b772b14f4880e362f30f44afe00c77e642 Mon Sep 17 00:00:00 2001 From: Davide Tantillo Date: Wed, 13 Nov 2024 12:33:55 +0100 Subject: [PATCH] [ts][pixi-v8] Fixed physics2 example. --- spine-ts/spine-pixi-v8/example/physics2.html | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/spine-ts/spine-pixi-v8/example/physics2.html b/spine-ts/spine-pixi-v8/example/physics2.html index 08dfb0a64..4c4ffca65 100644 --- a/spine-ts/spine-pixi-v8/example/physics2.html +++ b/spine-ts/spine-pixi-v8/example/physics2.html @@ -76,12 +76,10 @@ const buttonContainer = new PIXI.Container(); buttonContainer.position.set(0, 0); - const buttonBackground = new PIXI.Graphics(); - buttonBackground.beginFill(0x000000); // Button background color - buttonBackground.drawRoundedRect(0, 0, 140, 100, 5); // Button dimensions - buttonBackground.endFill(); + const buttonBackground = new PIXI.Graphics() + .roundRect(0, 0, 140, 100, 5) + .fill({ color: 0x000000, alpha: .7 }); buttonContainer.addChild(buttonBackground); - buttonContainer.alpha = 0.7; const fontStyle = { fill: 0xdddddd, @@ -116,7 +114,7 @@ document.exitFullscreen(); textButton.text = "Fullscreen"; } else { - app.renderer.view.requestFullscreen(); + app.renderer.canvas.requestFullscreen(); textButton.text = "Windowed"; } fsEnabled = !fsEnabled;