Skip to content

Commit 94c7c57

Browse files
committed
Fixed WebGL detection and code colour on Firefox.
1 parent ffd5ddc commit 94c7c57

3 files changed

Lines changed: 12 additions & 2 deletions

File tree

examples/_site/css/phaser-examples.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ ul.right-controls > li{margin:0;padding:0; display: inline-block; vertical-align
166166
.reset-button{width: 121px; height:52px; display:inline-block; background: url('../../_site/images/reset-button.png') no-repeat;}
167167
.pause-button:hover, .mute-button:hover, .reset-button:hover{cursor: pointer;}
168168
.filler{height: 720px;}
169-
.code-block{font-family: Courier; font-size: 12px; width:750px; height:auto; overflow: scroll; margin:0 auto; border-radius: 10px; background:#fdfdfd; border:0 !important; box-shadow: inset 0 5px 15px rgba(0,0,0,0.15), 0 0 10px rgba(106,200,248,0.5); padding: 25px !important;display: block; margin-bottom: 20px; margin-top: 30px;}
169+
.code-block{font-family: Courier; font-size: 12px; color: #fff; width:750px; height:auto; overflow: scroll; margin:0 auto; border-radius: 10px; background:#fdfdfd; border:0 !important; box-shadow: inset 0 5px 15px rgba(0,0,0,0.15), 0 0 10px rgba(106,200,248,0.5); padding: 25px !important;display: block; margin-bottom: 20px; margin-top: 30px;}
170170
.px800{width:800px; clear:both; display: block; margin:0 auto; line-height: 1.5em;}
171171
.gradient p{color:#333;}
172172

examples/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
<li class="link-home"><a href="http://phaser.io">Phaser Home</a></li>
2525
<li class="link-latest"><a href="https://github.com/photonstorm/phaser">Download Latest</a></li>
2626
<li class="link-forum"><a href="http://www.html5gamedevs.com/forum/14-phaser/">Support Forum</a></li>
27-
<li class="link-docs"><a href="../docs/out/">Documentation</a></li>
27+
<li class="link-docs"><a href="../docs/">Documentation</a></li>
2828
<li class="link-twitter"><a href="https://twitter.com/photonstorm">Twitter</a></li>
2929
</ul>
3030
</div>

src/system/Device.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -324,6 +324,16 @@ Phaser.Device.prototype = {
324324
this.file = !!window['File'] && !!window['FileReader'] && !!window['FileList'] && !!window['Blob'];
325325
this.fileSystem = !!window['requestFileSystem'];
326326
this.webGL = ( function () { try { var canvas = document.createElement( 'canvas' ); return !! window.WebGLRenderingContext && ( canvas.getContext( 'webgl' ) || canvas.getContext( 'experimental-webgl' ) ); } catch( e ) { return false; } } )();
327+
328+
if (this.webGL === null)
329+
{
330+
this.webGL = false;
331+
}
332+
else
333+
{
334+
this.webGL = true;
335+
}
336+
327337
this.worker = !!window['Worker'];
328338

329339
if ('ontouchstart' in document.documentElement || window.navigator.msPointerEnabled) {

0 commit comments

Comments
 (0)