Skip to content
This repository
Browse code

more work

  • Loading branch information...
commit 8eae489cee77586f182f93ca49ce7974005928cf 1 parent 64b8edc
Jerome Etienne authored September 01, 2012
4  plugins/requirejs/build/all.confrequire.js
@@ -24,7 +24,9 @@ requirejs.config({
24 24
 			"tquery.text": "plugins/text/tquery.text",
25 25
 			"tquery.text.allfonts": "plugins/text/fonts/droid/droid_serif_bold.typeface",
26 26
 			"tquery.tweenjs": "plugins/tweenjs/tquery.tween",
27  
-			"tquery.videos": "plugins/videos/tquery.createvideotexture"
  27
+			"tquery.videos": "plugins/videos/tquery.createvideotexture",
  28
+			"webgl-inspector": "http://benvanik.github.com/WebGL-Inspector/core/embed.js",
  29
+			"domReady": "https://raw.github.com/requirejs/domReady/latest/domReady.js"
28 30
 		}
29 31
 	},
30 32
 	"shim": {
12  plugins/requirejs/confrequire/webglinspector.confrequire.js
... ...
@@ -0,0 +1,12 @@
  1
+requirejs.config({
  2
+	map	: {
  3
+		// NOTE: require(['webgl-inspector', 'domReady!'], function(){})
  4
+		// - the 'domReady!' wait for the dom to be ready, it is required by webgl-inspector
  5
+		// TODO: is that possible to make 'domReady!' as a kind of dependancy
  6
+		// - i tried and failed up to know
  7
+		"*"	: {
  8
+			'webgl-inspector'	: 'http://benvanik.github.com/WebGL-Inspector/core/embed.js',
  9
+			'domReady'		: 'https://raw.github.com/requirejs/domReady/latest/domReady.js',
  10
+		}
  11
+	},
  12
+});
17  plugins/requirejs/examples/index-dev.html
@@ -3,20 +3,6 @@
3 3
 <script src="../../../plugins/requirejs/vendor/require.js"></script>
4 4
 <script src="../../../plugins/requirejs/build/all.confrequire.js"></script>
5 5
 <body><script>
6  
-	requirejs.config({
7  
-		map	: {
8  
-			"*"	: {
9  
-				'webgl-inspector'	: 'http://benvanik.github.com/WebGL-Inspector/core/embed.js',
10  
-				'domReady'		: 'https://raw.github.com/requirejs/domReady/latest/domReady.js',
11  
-			}
12  
-		},
13  
-		shim	: {
14  
-			'http://benvanik.github.com/WebGL-Inspector/core/embed.js'	: [
15  
-				//'domReady!',
16  
-			]
17  
-		}
18  
-	});
19  
-
20 6
 	require([
21 7
 			'tquery.createplanet','tquery.keyboard',
22 8
 			'tquery.minecraft', 'tquery.skymap',
@@ -29,8 +15,7 @@
29 15
 			'tquery.lensflare',
30 16
 			'tquery.datguituner',
31 17
 			'tquery.csg',
32  
-			'webgl-inspector',
33  
-			'domReady!'
  18
+			'webgl-inspector'//, 'domReady!'
34 19
 		], function(){
35 20
 		var world	= tQuery.createWorld().boilerplate().start();
36 21
 
18  plugins/statsplus/examples/testwebglinspector.html
... ...
@@ -0,0 +1,18 @@
  1
+<!doctype html>
  2
+<script src='http://benvanik.github.com/WebGL-Inspector/core/embed.js'></script>
  3
+<body><script>
  4
+	// This is from Detector.js
  5
+	// see https://github.com/mrdoob/three.js/blob/master/examples/js/Detector.js#L9
  6
+	// It will display 
  7
+	// $ gotFunction true
  8
+	// $ gotContext false 
  9
+	//
  10
+	// So no context, aka WebGL not available... 
  11
+	// remove webgl inspector embed.js and webgl is available
  12
+
  13
+	var gotFunction	= !! window.WebGLRenderingContext;
  14
+	console.log('gotFunction', gotFunction)
  15
+
  16
+	var gotContext	= !! document.createElement( 'canvas' ).getContext( 'experimental-webgl' );
  17
+	console.log('gotContext', gotContext)
  18
+</script></body>

0 notes on commit 8eae489

Please sign in to comment.
Something went wrong with that request. Please try again.