create-exo-app 0.19.0 → 0.20.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,208 +1,382 @@
1
- import type { RenderingContext, Seconds, SpritesheetData } from '@codexo/exojs';
2
- import { Asset, Color, Container, Graphics, Keyboard, Label, Rectangle, Scene, Sprite, Spritesheet, SystemOrder, Vector, View } from '@codexo/exojs';
3
- import { GridSpace, Pathfinder } from '@codexo/exojs-pathfinding';
4
- import { BoxShape, PhysicsBody, PhysicsWorld } from '@codexo/exojs-physics';
5
-
6
- import { cellCost, COLUMNS, findMarker, isWall, ROWS, TILE, tileCenter } from '../level';
7
-
8
- const ACTOR_SPEED = 260;
9
- /** How close to a waypoint counts as having reached it, in pixels. */
10
- const ARRIVE_RADIUS = 6;
1
+ import type { PointLike, RenderingContext, Seconds, SpritesheetData } from '@codexo/exojs';
2
+ import {
3
+ ActionMap,
4
+ BehaviorComponent,
5
+ ButtonAction,
6
+ Color,
7
+ Container,
8
+ Graphics,
9
+ Keyboard,
10
+ Label,
11
+ Rectangle,
12
+ Scene,
13
+ SceneState,
14
+ Spritesheet,
15
+ SystemOrder,
16
+ Texture,
17
+ VectorAction,
18
+ View,
19
+ } from '@codexo/exojs';
20
+ import { type NavigationStatus, TileNavigationSpace } from '@codexo/exojs/pathfinding';
21
+ import { BoxShape, PhysicsWorld } from '@codexo/exojs/physics';
22
+ import { type ResolvedTile, type TileLayer, type TileMap, TileMapNode } from '@codexo/exojs/tilemap';
23
+ import { TileColliderStreamer } from '@codexo/exojs/tilemap-physics';
24
+
25
+ import { type Actor, type ActorOptions, spawnActor } from '../actor';
26
+
27
+ /** The player's collision radius: room to turn in a one-tile corridor. */
28
+ export const PLAYER_RADIUS = 22;
29
+ const PLAYER_SPEED = 260;
30
+ /** How far from a door's centre the player can reach it, in pixels. */
31
+ const DOOR_REACH = 100;
32
+
33
+ const PLAYER_STATUS_TEXT: Partial<Record<NavigationStatus, string>> = {
34
+ navigating: 'Walking...',
35
+ arrived: 'Arrived.',
36
+ unreachable: 'There is no way there.',
37
+ blocked: 'Something is in the way.',
38
+ };
11
39
 
12
40
  const PATH_COLOR = new Color(90, 200, 255);
13
41
  const GOAL_COLOR = new Color(255, 170, 80);
14
42
 
43
+ /** A tile whose definition carries a collision shape blocks walking. */
44
+ const isSolid = (tile: ResolvedTile | null): boolean => tile?.tileset.getTileDefinition(tile.localTileId)?.collision !== undefined;
45
+
46
+ const isDoor = (tile: ResolvedTile | null): boolean => tile?.tileset.getTileDefinition(tile.localTileId)?.properties?.['door'] === true;
47
+
48
+ /** A door cell of the `Walls` layer, open or closed. */
49
+ export interface Door {
50
+ readonly column: number;
51
+ readonly row: number;
52
+ /** The closed door, as the map authored it. */
53
+ readonly closedTile: ResolvedTile;
54
+ readonly open: boolean;
55
+ }
56
+
57
+ interface DoorState extends Door {
58
+ open: boolean;
59
+ }
60
+
61
+ /**
62
+ * Moves the player while a direction is held, taking over from click-to-move.
63
+ *
64
+ * A navigation agent expects to be its movement's only source of commands.
65
+ * This component stops navigation before it commands the movement itself, and
66
+ * it has to be added after the navigation agent, so that in the step where the
67
+ * route still steered, its own command is the later one and wins.
68
+ */
69
+ class DirectControl extends BehaviorComponent {
70
+ public constructor(
71
+ private readonly _actor: Actor,
72
+ private readonly _direction: VectorAction,
73
+ ) {
74
+ super();
75
+ }
76
+
77
+ public override fixedUpdate(): void {
78
+ const direction = this._direction.value;
79
+
80
+ if (direction.x === 0 && direction.y === 0) {
81
+ return;
82
+ }
83
+
84
+ if (this._actor.agent.status !== 'idle') {
85
+ this._actor.agent.stop();
86
+ }
87
+
88
+ this._actor.movement.move(direction);
89
+ }
90
+ }
91
+
15
92
  /**
16
- * Everything a top-down scene needs except the map itself: a physics world for
17
- * the walls and the actor, a navigation grid, click-to-move pathfinding, and a
18
- * camera.
93
+ * Everything a top-down scene needs except where its map comes from: a physics
94
+ * world, wall colliders and a navigation grid derived from the map, a player
95
+ * that walks by click or by keys, a door, and a camera.
96
+ *
97
+ * `ProceduralMapScene` builds the `TileMap` in code; `TiledMapScene` loads it
98
+ * from `town-square.tmj`. Everything below reads only that map:
19
99
  *
20
- * The map is the only difference between the two scenes in this template, so it
21
- * is the only thing left abstract. `ProceduralMapScene` builds a `TileMap` in
22
- * code; `TiledMapScene` loads the same level from `town-square.tmj`. Both hand
23
- * back a node to render, and neither touches anything below.
100
+ * - The map's `Walls` layer is the single source of truth for what blocks. A
101
+ * tile whose tileset definition carries a collision shape is solid - the
102
+ * `TileColliderStreamer` turns those shapes into static bodies, and the
103
+ * `TileNavigationSpace` routes around the same cells.
104
+ * - A `Walls` tile with a `door` property is a door. Opening it removes the
105
+ * tile, closing it puts the tile back; both consumers see the edit through
106
+ * the layer's revision.
107
+ * - The spawn point is the `spawn` object of the map's `Markers` layer.
24
108
  *
25
- * Note what does NOT vary: the navigation grid and the wall colliders are built
26
- * from `level.ts` in both cases. Pathfinding and physics never read the tilemap
27
- * - a grid of costs and a set of bodies are the whole input, which is why
28
- * swapping the map format changes nothing here.
109
+ * Collision and navigation update at different points, so the scene names
110
+ * them: the collider bridge syncs before every frame's fixed steps and again
111
+ * straight after a door edit, so no step runs against stale walls; the
112
+ * navigation space resamples when an agent next reads it. A walking agent
113
+ * notices the edit and replans within its repath interval; until then the
114
+ * synced collider is what stops it at a door that just closed.
29
115
  */
30
116
  export abstract class TopDownScene extends Scene {
31
- protected readonly world = new PhysicsWorld({ gravity: { x: 0, y: 0 } });
32
-
33
- private readonly _pathfinder = new Pathfinder();
34
- private readonly _grid = GridSpace.from(COLUMNS, ROWS, cellCost, { cellSize: TILE });
35
- private readonly _scenery = new Container();
36
- private readonly _overlay = new Graphics();
37
- private _actor!: Sprite;
38
- private _body!: PhysicsBody;
117
+ /** The ActionMap the scene reads: held directions move the player, a door press toggles the nearest door. */
118
+ public readonly controls = new ActionMap({
119
+ move: new VectorAction([
120
+ { up: Keyboard.W, down: Keyboard.S, left: Keyboard.A, right: Keyboard.D },
121
+ { up: Keyboard.Up, down: Keyboard.Down, left: Keyboard.Left, right: Keyboard.Right },
122
+ ]),
123
+ door: new ButtonAction([Keyboard.E]),
124
+ cancel: new ButtonAction([Keyboard.Escape]),
125
+ });
126
+
127
+ private _map!: TileMap;
128
+ private _walls!: TileLayer;
129
+ private _world!: PhysicsWorld;
130
+ private _colliders!: TileColliderStreamer;
131
+ private _navigation!: TileNavigationSpace<ResolvedTile>;
132
+ private _player!: Actor;
39
133
  private _camera!: View;
40
134
  private _status!: Label;
41
- private _waypoints: readonly Vector[] = [];
42
- private _waypoint = 0;
43
135
  private _characterData!: SpritesheetData;
136
+ private readonly _charactersTexture = new Texture('characters.png');
137
+ private _doorProbe!: BoxShape;
138
+ private readonly _doors: DoorState[] = [];
139
+ private readonly _scenery = new Container();
140
+ private readonly _overlay = new Graphics();
141
+
142
+ /** Loads the map this scene plays on. Called from `load()`, after the actor art. */
143
+ protected abstract loadMap(): Promise<TileMap>;
144
+
145
+ public get map(): TileMap {
146
+ return this._map;
147
+ }
148
+
149
+ public get world(): PhysicsWorld {
150
+ return this._world;
151
+ }
152
+
153
+ public get colliders(): TileColliderStreamer {
154
+ return this._colliders;
155
+ }
44
156
 
45
- /** The node that draws the map. Called once, after the scene's assets have loaded. */
46
- protected abstract buildMap(): Container;
157
+ public get navigation(): TileNavigationSpace<ResolvedTile> {
158
+ return this._navigation;
159
+ }
160
+
161
+ public get player(): Actor {
162
+ return this._player;
163
+ }
47
164
 
48
- /** Assets the concrete scene needs on top of the actor spritesheet. */
49
- protected async loadMap(): Promise<void> {
50
- return Promise.resolve();
165
+ public get doors(): readonly Door[] {
166
+ return this._doors;
51
167
  }
52
168
 
53
169
  public override async load(): Promise<void> {
54
- this._characterData = (await this.loader.load(Asset.type('json', 'characters.json'))) as SpritesheetData;
170
+ this._characterData = (await this.loader.load({ type: 'json', source: 'characters.json' })) as SpritesheetData;
55
171
 
56
- await this.loader.load(Asset.type('texture', 'characters.png'));
57
- await this.loadMap();
172
+ await this.assets.load(this._charactersTexture);
173
+ this._map = await this.loadMap();
58
174
  }
59
175
 
60
176
  public override init(): void {
61
- this.systems.add(this.world, { order: SystemOrder.Physics });
177
+ const map = this._map;
178
+ const walls = map.getTileLayer('Walls');
179
+ const spawn = map.getObjectLayer('Markers')?.query({ name: 'spawn' })[0];
62
180
 
63
- this._buildWalls();
64
-
65
- const spawn = findMarker('S');
66
- const spawnPoint = tileCenter(spawn.column, spawn.row);
67
- const characters = new Spritesheet(this.loader.get('characters.png'), this._characterData);
181
+ if (walls === undefined || spawn === undefined) {
182
+ throw new Error('TopDownScene: the map needs a "Walls" tile layer and a "spawn" object in a "Markers" layer.');
183
+ }
68
184
 
69
- this._actor = characters.getFrameSprite('character_green_front').setAnchor(0.5);
70
- this._actor.width = TILE * 0.7;
71
- this._actor.height = TILE * 0.9;
185
+ this._walls = walls;
186
+ // The host clock steps the world, so the world has to step at the host's rate.
187
+ this._world = new PhysicsWorld({ gravity: { x: 0, y: 0 }, fixedDelta: this.app.fixedTimeStep });
188
+ this.systems.add(this._world, { order: SystemOrder.Physics });
72
189
 
73
- this._body = this.world.attach(this._actor, {
74
- type: 'dynamic',
75
- position: spawnPoint,
76
- shape: new BoxShape(TILE * 0.5, TILE * 0.5),
77
- fixedRotation: true,
78
- });
190
+ // Registered after the world, so it is destroyed first and removes its bodies from a live world.
191
+ this._colliders = new TileColliderStreamer(this._world, walls);
192
+ this._colliders.sync();
193
+ this.systems.add({ preFrame: () => this._colliders.sync(), destroy: () => this._colliders.destroy() });
79
194
 
80
- // The actor is driven by velocity, not by momentum: damping stops it the
81
- // moment the path runs out instead of letting it drift into a wall.
82
- this._body.linearDamping = 12;
195
+ this._navigation = new TileNavigationSpace(walls, { cost: tile => (isSolid(tile) ? 0 : 1) });
196
+ this._doorProbe = new BoxShape(walls.tileWidth, walls.tileHeight);
197
+ this._findDoors();
83
198
 
84
- this._scenery.addChild(this.buildMap(), this._overlay, this._actor);
199
+ this._scenery.addChild(new TileMapNode(map), this._overlay);
85
200
  this.addChild(this._scenery);
86
201
 
87
- this._camera = new View(spawnPoint.x, spawnPoint.y, this.app.width, this.app.height);
88
- this._camera.follow(this._actor, { lerp: 0.12 });
89
- this._camera.setBounds(new Rectangle(0, 0, COLUMNS * TILE, ROWS * TILE));
202
+ this._player = this.spawnActor({ position: spawn, radius: PLAYER_RADIUS, speed: PLAYER_SPEED });
203
+ this._player.node.addComponent(new DirectControl(this._player, this.controls.move));
204
+ this._player.agent.onStatusChange.add(this._onPlayerStatus);
205
+ this._dressPlayer();
90
206
 
91
- this._status = new Label('Click a floor tile to walk there.', { fontSize: 18 });
207
+ this._camera = new View(spawn.x, spawn.y, this.app.width, this.app.height);
208
+ this._camera.follow(this._player.node, { lerp: 0.12 });
209
+ this._camera.setBounds(new Rectangle(0, 0, map.pixelWidth ?? 0, map.pixelHeight ?? 0));
210
+
211
+ this._status = new Label('Click a floor tile to walk there, or use WASD. E opens and closes doors.', { fontSize: 18 });
92
212
  this._status.anchorIn(this.ui, 'top-left', 24, 20);
93
213
  this.ui.addChild(this._status);
94
214
 
95
- this.app.input.onPointerTap.add(pointer => {
96
- // Pointer coordinates are in screen space; the world is drawn through a
97
- // camera, so they have to come back through it before they mean anything
98
- // to the grid.
99
- const world = this._camera.screenToWorld(pointer.x, pointer.y);
100
-
101
- this._planPath(world.x, world.y);
102
- });
215
+ this.inputs.attach(this.controls);
216
+ // A global signal: removed with the scene, and ignored while the scene is
217
+ // paused or suspended so a click never queues a walk for later.
218
+ this.app.input.onPointerTap.add(this._onTap);
219
+ this.track({ destroy: () => this.app.input.onPointerTap.remove(this._onTap) });
220
+ }
103
221
 
104
- this.inputs.onTrigger(Keyboard.Escape, () => this._clearPath());
222
+ /** Adds an {@link Actor} to the level, colliding with its walls and routing around them. */
223
+ public spawnActor(options: ActorOptions): Actor {
224
+ return spawnActor(this._scenery, this._world, this._navigation, options);
105
225
  }
106
226
 
107
- // The world integrates on its own fixed step, so steering is all this hook
108
- // has to do and the frame delta never enters the calculation.
109
- public override update(_delta: Seconds): void {
110
- if (this._waypoint >= this._waypoints.length) {
111
- this._body.linearVelocityX = 0;
112
- this._body.linearVelocityY = 0;
227
+ /**
228
+ * Opens or closes `door`. Refuses, returning `false`, to close a door on any
229
+ * body of the world that reaches into the doorway.
230
+ */
231
+ public setDoor(door: Door, open: boolean): boolean {
232
+ const state = this._doors.find(candidate => candidate === door);
113
233
 
114
- return;
234
+ if (state === undefined) {
235
+ throw new Error('TopDownScene.setDoor(): not a door of this scene.');
115
236
  }
116
237
 
117
- const target = this._waypoints[this._waypoint]!;
118
- const dx = target.x - this._body.x;
119
- const dy = target.y - this._body.y;
120
- const distance = Math.hypot(dx, dy);
238
+ if (state.open === open) {
239
+ return true;
240
+ }
121
241
 
122
- if (distance < ARRIVE_RADIUS) {
123
- this._waypoint++;
242
+ if (!open && this._isOccupied(door)) {
243
+ return false;
244
+ }
124
245
 
125
- if (this._waypoint >= this._waypoints.length) {
126
- this._status.text = 'Arrived. Click somewhere else.';
127
- this._clearPath();
128
- }
246
+ if (open) {
247
+ this._walls.clearTileAt(door.column, door.row);
248
+ } else {
249
+ this._walls.setTileAt(door.column, door.row, door.closedTile);
250
+ }
129
251
 
130
- return;
252
+ state.open = open;
253
+ // The edit lands mid-frame; without this the remaining fixed steps of the
254
+ // frame would still collide with the door as it was.
255
+ this._colliders.sync();
256
+
257
+ return true;
258
+ }
259
+
260
+ public override fixedUpdate(): void {
261
+ if (this.controls.cancel.tick.pressed) {
262
+ this._player.agent.stop();
263
+ }
264
+
265
+ if (this.controls.door.tick.pressed) {
266
+ const door = this._nearestDoor();
267
+
268
+ if (door !== null) {
269
+ this._status.text = this.setDoor(door, !door.open) ? `Door ${door.open ? 'opened' : 'closed'}.` : 'Something is in the way.';
270
+ }
131
271
  }
272
+ }
132
273
 
133
- this._body.linearVelocityX = (dx / distance) * ACTOR_SPEED;
134
- this._body.linearVelocityY = (dy / distance) * ACTOR_SPEED;
274
+ public override update(_delta: Seconds): void {
275
+ this._drawPath();
135
276
  }
136
277
 
137
278
  public override draw(context: RenderingContext): void {
138
279
  context.render(this._scenery, { view: this._camera });
139
280
  }
140
281
 
141
- private _buildWalls(): void {
142
- // Merged per row, so a straight wall is one body rather than one per tile.
143
- for (let row = 0; row < ROWS; row++) {
144
- let start = -1;
282
+ private readonly _onTap = (pointer: PointLike): void => {
283
+ if (this.state !== SceneState.Active || this.paused) {
284
+ return;
285
+ }
286
+
287
+ // Pointer coordinates are in screen space; the world is drawn through a
288
+ // camera, so they have to come back through it first.
289
+ const target = this._camera.screenToWorld(pointer.x, pointer.y);
290
+
291
+ this._player.moveTo(target);
292
+ };
293
+
294
+ private readonly _onPlayerStatus = (status: NavigationStatus): void => {
295
+ const text = PLAYER_STATUS_TEXT[status];
145
296
 
146
- for (let column = 0; column <= COLUMNS; column++) {
147
- const solid = column < COLUMNS && isWall(column, row);
297
+ if (text !== undefined) {
298
+ this._status.text = text;
299
+ }
300
+ };
148
301
 
149
- if (solid && start === -1) {
150
- start = column;
151
- } else if (!solid && start !== -1) {
152
- const length = column - start;
302
+ private _findDoors(): void {
303
+ const walls = this._walls;
153
304
 
154
- this.world.add(
155
- new PhysicsBody({
156
- type: 'static',
157
- position: { x: (start + length / 2) * TILE, y: (row + 0.5) * TILE },
158
- colliders: [{ shape: new BoxShape(length * TILE, TILE) }],
159
- }),
160
- );
305
+ for (let row = 0; row < (walls.height ?? 0); row++) {
306
+ for (let column = 0; column < (walls.width ?? 0); column++) {
307
+ const tile = walls.getTileAt(column, row);
161
308
 
162
- start = -1;
309
+ if (tile !== null && isDoor(tile)) {
310
+ this._doors.push({ column, row, closedTile: tile, open: false });
163
311
  }
164
312
  }
165
313
  }
166
314
  }
167
315
 
168
- private _planPath(x: number, y: number): void {
169
- const result = this._pathfinder.findPathBetween(this._grid, this._body.x, this._body.y, x, y, { smooth: true });
316
+ private _nearestDoor(): DoorState | null {
317
+ const { body } = this._player;
318
+ let nearest: DoorState | null = null;
319
+ let nearestDistance = DOOR_REACH;
170
320
 
171
- if (result.status !== 'found') {
172
- this._status.text = `No route there (${result.status}).`;
173
- this._clearPath();
321
+ for (const door of this._doors) {
322
+ const center = this._walls.tileToPixel(door.column, door.row);
323
+ const distance = Math.hypot(center.x + this._walls.tileWidth / 2 - body.x, center.y + this._walls.tileHeight / 2 - body.y);
174
324
 
175
- return;
325
+ if (distance <= nearestDistance) {
326
+ nearest = door;
327
+ nearestDistance = distance;
328
+ }
176
329
  }
177
330
 
178
- // The first point is the cell the actor already stands in; walking to it
179
- // first would make it step backwards before setting off.
180
- this._waypoints = result.points.slice(1);
181
- this._waypoint = 0;
182
- this._status.text = `${this._waypoints.length} waypoints, cost ${result.cost.toFixed(1)}.`;
331
+ return nearest;
332
+ }
183
333
 
184
- this._drawPath();
334
+ private _isOccupied(door: Door): boolean {
335
+ const { tileWidth, tileHeight } = this._walls;
336
+ const corner = this._walls.tileToPixel(door.column, door.row);
337
+ const center = { x: corner.x + tileWidth / 2, y: corner.y + tileHeight / 2 };
338
+
339
+ // The walls beside the doorway touch it along its edges; only a body that
340
+ // can move is in the way.
341
+ return this._world.overlapShape(this._doorProbe, center).some(collider => collider.body.type !== 'static');
185
342
  }
186
343
 
187
- private _clearPath(): void {
188
- this._waypoints = [];
189
- this._waypoint = 0;
190
- this._overlay.clear();
344
+ private _dressPlayer(): void {
345
+ const characters = new Spritesheet(this._charactersTexture, this._characterData);
346
+ const sprite = characters.getFrameSprite('character_green_front').setAnchor(0.5);
347
+
348
+ sprite.width = PLAYER_RADIUS * 2;
349
+ sprite.height = PLAYER_RADIUS * 2.6;
350
+ this._player.node.addChild(sprite);
191
351
  }
192
352
 
193
353
  private _drawPath(): void {
354
+ const { agent, body, offset } = this._player;
355
+ const points = agent.path?.points ?? [];
356
+
194
357
  this._overlay.clear();
358
+
359
+ if (agent.status !== 'navigating' || points.length <= agent.waypointIndex) {
360
+ return;
361
+ }
362
+
195
363
  this._overlay.lineWidth = 4;
196
364
  this._overlay.lineColor = PATH_COLOR;
197
365
 
198
- let previous = { x: this._body.x, y: this._body.y };
366
+ let previousX = body.x;
367
+ let previousY = body.y;
368
+
369
+ // Route points are in navigation space; see Actor.offset.
370
+ for (let index = agent.waypointIndex; index < points.length; index++) {
371
+ const x = points[index]!.x + offset;
372
+ const y = points[index]!.y + offset;
199
373
 
200
- for (const point of this._waypoints) {
201
- this._overlay.drawLine(previous.x, previous.y, point.x, point.y);
202
- previous = point;
374
+ this._overlay.drawLine(previousX, previousY, x, y);
375
+ previousX = x;
376
+ previousY = y;
203
377
  }
204
378
 
205
379
  this._overlay.fillColor = GOAL_COLOR;
206
- this._overlay.drawCircle(previous.x, previous.y, 8);
380
+ this._overlay.drawCircle(previousX, previousY, 8);
207
381
  }
208
382
  }
@@ -12,6 +12,8 @@ Nothing reads a value back out of a widget. Each control writes into a draft obj
12
12
 
13
13
  That separation is what lets you add a control without touching anything that consumes the settings, and it is what makes `Revert` a two-line method instead of a walk over every widget on screen.
14
14
 
15
+ For a smaller form with Button, TextInput, shared validation, keyboard focus and explicit gamepad Confirm, see the [name-form recipe](https://exoridus.github.io/ExoJS/en/guide/runtime/ui-and-widgets/#a-name-form-with-one-submit-rule). The [font recipe](https://exoridus.github.io/ExoJS/en/guide/rendering/text/#system-web-and-bitmap-fonts-in-one-scene) compares system, web and bitmap fonts with their supported effects.
16
+
15
17
  ## Theming
16
18
 
17
19
  Every widget resolves its colours from the inherited `UITheme` and its own interaction state. `createUITheme` and `defaultUITheme` are exported from core: patch the roles you care about and pass the result down, rather than styling widgets one at a time.
@@ -127,7 +127,12 @@ export class SettingsScene extends Scene {
127
127
  private _refreshSummary(): void {
128
128
  const { playerName, volume, difficulty, fullscreen } = this._applied;
129
129
 
130
- this._summary.text = [`Name: ${playerName}`, this._volumeText(volume), `Difficulty: ${difficulty}`, `Fullscreen: ${fullscreen ? 'on' : 'off'}`].join('\n');
130
+ this._summary.text = [
131
+ `Name: ${playerName}`,
132
+ this._volumeText(volume),
133
+ `Difficulty: ${difficulty}`,
134
+ `Fullscreen: ${fullscreen ? 'on' : 'off'}`,
135
+ ].join('\n');
131
136
  }
132
137
 
133
138
  private _volumeText(value: number): string {