@@ -78,8 +78,9 @@ var ValueToColor = require('../display/color/ValueToColor');
7878 * @property {boolean } [pixelArt=false] - [description]
7979 * @property {boolean } [autoResize=false] - [description]
8080 * @property {boolean } [roundPixels=false] - [description]
81- * @property {boolean } [transparent=true ] - [description]
81+ * @property {boolean } [transparent=false ] - [description]
8282 * @property {boolean } [clearBeforeRender=true] - [description]
83+ * @property {boolean } [premultipliedAlpha=true] - [description]
8384 * @property {boolean } [preserveDrawingBuffer=false] - [description]
8485 * @property {boolean } [failIfMajorPerformanceCaveat=false] - [description]
8586 * @property {boolean } [powerPreference='default'] - "high-performance", "low-power" or "default"
@@ -186,15 +187,20 @@ var Config = new Class({
186187 this . fps = GetValue ( config , 'fps' , null ) ;
187188
188189 // Renderer Settings
189- this . antialias = GetValue ( config , 'antialias' , true ) ;
190- this . pixelArt = GetValue ( config , 'pixelArt' , false ) ;
191- this . autoResize = GetValue ( config , 'autoResize' , false ) ;
192- this . roundPixels = GetValue ( config , 'roundPixels' , false ) ;
193- this . transparent = GetValue ( config , 'transparent' , true ) ;
194- this . clearBeforeRender = GetValue ( config , 'clearBeforeRender' , true ) ;
195- this . preserveDrawingBuffer = GetValue ( config , 'preserveDrawingBuffer' , false ) ;
196- this . failIfMajorPerformanceCaveat = GetValue ( config , 'failIfMajorPerformanceCaveat' , false ) ;
197- this . powerPreference = GetValue ( config , 'powerPreference' , 'default' ) ;
190+ // These can either be in a `render` object within the Config, or specified on their own
191+
192+ var renderConfig = GetValue ( config , 'render' , config ) ;
193+
194+ this . antialias = GetValue ( renderConfig , 'antialias' , true ) ;
195+ this . pixelArt = GetValue ( renderConfig , 'pixelArt' , false ) ;
196+ this . autoResize = GetValue ( renderConfig , 'autoResize' , false ) ;
197+ this . roundPixels = GetValue ( renderConfig , 'roundPixels' , false ) ;
198+ this . transparent = GetValue ( renderConfig , 'transparent' , false ) ;
199+ this . clearBeforeRender = GetValue ( renderConfig , 'clearBeforeRender' , true ) ;
200+ this . premultipliedAlpha = GetValue ( renderConfig , 'premultipliedAlpha' , true ) ;
201+ this . preserveDrawingBuffer = GetValue ( renderConfig , 'preserveDrawingBuffer' , false ) ;
202+ this . failIfMajorPerformanceCaveat = GetValue ( renderConfig , 'failIfMajorPerformanceCaveat' , false ) ;
203+ this . powerPreference = GetValue ( renderConfig , 'powerPreference' , 'default' ) ;
198204
199205 var bgc = GetValue ( config , 'backgroundColor' , 0 ) ;
200206
@@ -216,6 +222,7 @@ var Config = new Class({
216222 // gravity: 0,
217223 // cellSize: 64
218224 // }
225+
219226 this . physics = GetValue ( config , 'physics' , { } ) ;
220227 this . defaultPhysicsSystem = GetValue ( this . physics , 'default' , false ) ;
221228
0 commit comments