Skip to content

Commit 36f5ca4

Browse files
committed
Added new config values
* Game.Config.preserveDrawingBuffer is now passed to the WebGL Renderer (default `false`). * Game.Config.failIfMajorPerformanceCaveat is now passed to the WebGL Renderer (default `false`). * Game.Config.powerPreference is now passed to the WebGL Renderer (default `default`). * Game.Config.pixelArt is now passed to the WebGL Renderer as the antialias context property (default `false`).
1 parent d286a93 commit 36f5ca4

2 files changed

Lines changed: 12 additions & 0 deletions

File tree

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,18 @@
55
### New Features
66

77
* TextStyle has two new properties: `baselineX` and `baselineY` which allow you to customize the 'magic' value used in calculating the text metrics.
8+
* Game.Config.preserveDrawingBuffer is now passed to the WebGL Renderer (default `false`).
9+
* Game.Config.failIfMajorPerformanceCaveat is now passed to the WebGL Renderer (default `false`).
10+
* Game.Config.powerPreference is now passed to the WebGL Renderer (default `default`).
11+
* Game.Config.pixelArt is now passed to the WebGL Renderer as the antialias context property (default `false`).
12+
813

914
### Bug Fixes
1015

1116
### Updates
1217

1318
* The Text testString has changed from `|MÉqgy` to `|MÉqgy`.
19+
* The WebGLRenderer width and height values are now floored when multiplied by the resolution.
1420

1521

1622

src/boot/Config.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,11 +181,17 @@ var Config = new Class({
181181

182182
this.fps = GetValue(config, 'fps', null);
183183

184+
// Renderer Settings
184185
this.pixelArt = GetValue(config, 'pixelArt', false);
185186
this.autoResize = GetValue(config, 'autoResize', false);
186187
this.roundPixels = GetValue(config, 'roundPixels', false);
187188
this.transparent = GetValue(config, 'transparent', false);
188189
this.clearBeforeRender = GetValue(config, 'clearBeforeRender', true);
190+
this.preserveDrawingBuffer = GetValue(config, 'preserveDrawingBuffer', false);
191+
this.failIfMajorPerformanceCaveat = GetValue(config, 'failIfMajorPerformanceCaveat', false);
192+
193+
// "high-performance", "low-power" or "default".
194+
this.powerPreference = GetValue(config, 'powerPreference', 'default');
189195

190196
var bgc = GetValue(config, 'backgroundColor', 0);
191197

0 commit comments

Comments
 (0)