mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-26 22:49:01 +08:00
[ts][pixi-v8] Fixed physics2 example.
This commit is contained in:
parent
417d7c2239
commit
5cc203b772
@ -76,12 +76,10 @@
|
|||||||
const buttonContainer = new PIXI.Container();
|
const buttonContainer = new PIXI.Container();
|
||||||
buttonContainer.position.set(0, 0);
|
buttonContainer.position.set(0, 0);
|
||||||
|
|
||||||
const buttonBackground = new PIXI.Graphics();
|
const buttonBackground = new PIXI.Graphics()
|
||||||
buttonBackground.beginFill(0x000000); // Button background color
|
.roundRect(0, 0, 140, 100, 5)
|
||||||
buttonBackground.drawRoundedRect(0, 0, 140, 100, 5); // Button dimensions
|
.fill({ color: 0x000000, alpha: .7 });
|
||||||
buttonBackground.endFill();
|
|
||||||
buttonContainer.addChild(buttonBackground);
|
buttonContainer.addChild(buttonBackground);
|
||||||
buttonContainer.alpha = 0.7;
|
|
||||||
|
|
||||||
const fontStyle = {
|
const fontStyle = {
|
||||||
fill: 0xdddddd,
|
fill: 0xdddddd,
|
||||||
@ -116,7 +114,7 @@
|
|||||||
document.exitFullscreen();
|
document.exitFullscreen();
|
||||||
textButton.text = "Fullscreen";
|
textButton.text = "Fullscreen";
|
||||||
} else {
|
} else {
|
||||||
app.renderer.view.requestFullscreen();
|
app.renderer.canvas.requestFullscreen();
|
||||||
textButton.text = "Windowed";
|
textButton.text = "Windowed";
|
||||||
}
|
}
|
||||||
fsEnabled = !fsEnabled;
|
fsEnabled = !fsEnabled;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user