Skip to content

Commit

Permalink
more work
Browse files Browse the repository at this point in the history
  • Loading branch information
jeromeetienne committed Aug 16, 2012
1 parent 2f402a2 commit a368fd4
Show file tree
Hide file tree
Showing 11 changed files with 1,008 additions and 124 deletions.
61 changes: 2 additions & 59 deletions Makefile
@@ -1,5 +1,4 @@
# makefile to automatize simple operations # makefile to automatize simple operations

server: server:
python -m SimpleHTTPServer python -m SimpleHTTPServer


Expand Down Expand Up @@ -50,7 +49,7 @@ boilerplateBuild:
################################################################################# #################################################################################


BANNER="// tquery.js - https://github.com/jeromeetienne/tquery - MIT License" BANNER="// tquery.js - https://github.com/jeromeetienne/tquery - MIT License"
build: minifyCore minifyBundle minifyAll build: minifyCore minifyBundle minifyBundleRequire


buildCore: buildCore:
echo $(BANNER) > build/tquery.js echo $(BANNER) > build/tquery.js
Expand Down Expand Up @@ -110,60 +109,4 @@ minifyBundleRequire: buildBundleRequire
>> build/tquery-bundle-require.min.js >> build/tquery-bundle-require.min.js
@echo size minified + gzip is `gzip -c build/tquery-bundle-require.min.js | wc -c` byte @echo size minified + gzip is `gzip -c build/tquery-bundle-require.min.js | wc -c` byte


buildAll: buildBundle
echo $(BANNER) > build/tquery-all.js
cat build/tquery-bundle.js >> build/tquery-all.js
cat plugins/requirejs/tquery.norequirejs.js >> build/tquery-all.js
# plugins/keyboard
cat vendor/threex/THREEx.KeyboardState.js >> build/tquery-all.js
cat plugins/keyboard/tquery.keyboard.js >> build/tquery-all.js
# plugins/shape
cat plugins/shape/tquery.shape.js >> build/tquery-all.js
cat plugins/shape/tquery.shape.create.js >> build/tquery-all.js
# plugins/dollar3d
cat plugins/dollar3d/tquery.dollar3d.js >> build/tquery-all.js
# plugins/deviceOrientation
#cat vendor/threex/THREEx.DeviceOrientationState.js >> build/tquery-all.js
#cat plugins/deviceorientation/tquery.deviceorientation.js >> build/tquery-all.js
# plugins/wobble
cat vendor/threex/THREEx.GeometryWobble.js >> build/tquery-all.js
cat plugins/wobble/tquery.geometry.wobble.js >> build/tquery-all.js
# plugins/terrainGenerator
cat vendor/three.js/ImprovedNoise.js >> build/tquery-all.js
cat plugins/terrainGenerator/tquery.terrainGenerator.js >> build/tquery-all.js
# plugins/domevent
#cat plugins/domevent/threex.domevent.js >> build/tquery-all.js
#cat plugins/domevent/tquery.object3d.domevent.js >> build/tquery-all.js
# plugins/csg
cat plugins/csg/csg.js >> build/tquery-all.js
cat plugins/csg/ThreeCSG.js >> build/tquery-all.js
cat plugins/csg/tquery.geometry.csg.js >> build/tquery-all.js
cat plugins/csg/tquery.object3d.csg.js >> build/tquery-all.js
# plugins/fireball
cat plugins/fireball/tquery.fireballmaterial.js >> build/tquery-all.js
# plugins/fireball
cat plugins/checkerboard/tquery.checkerboard.js >> build/tquery-all.js
# plugins/videos
cat plugins/videos/*.js >> build/tquery-all.js
# plugins/text
cat plugins/text/fonts/droid/droid_serif_bold.typeface.js >> build/tquery-all.js
cat plugins/text/tquery.text.js >> build/tquery-all.js
# plugins/linkify
cat plugins/linkify/tquery.mesh.linkify.js >> build/tquery-all.js
# plugins/lights
cat plugins/light/*.js >> build/tquery-all.js
# plugins/materials
cat plugins/materials/*.js >> build/tquery-all.js
# plugins/minecraft
cat plugins/minecraft/*.js >> build/tquery-all.js


minifyAll: buildAll
echo $(BANNER) > build/tquery-all.min.js
curl --data-urlencode "js_code@build/tquery-all.js" \
-d "output_format=text&output_info=compiled_code&compilation_level=SIMPLE_OPTIMIZATIONS" \
http://closure-compiler.appspot.com/compile \
>> build/tquery-all.min.js
@echo size minified + gzip is `gzip -c build/tquery-all.min.js | wc -c` byte

.PHONY: docs buildCore buildBundle minifyCore minifyBundle .PHONY: docs buildCore buildBundle minifyCore minifyBundle
24 changes: 16 additions & 8 deletions build/tquery-bundle-require.js
Expand Up @@ -2986,19 +2986,27 @@ tQuery.World.prototype.destroy = function(){
/** /**
* true if webgl is available, false otherwise * true if webgl is available, false otherwise
*/ */
tQuery.World._hasWebGL = (function(){ // tQuery.World._hasWebGL = (function(){
// test from Detector.js // // test from Detector.js
try{ // try{
return !! window.WebGLRenderingContext && !! document.createElement( 'canvas' ).getContext( 'experimental-webgl' ); // return !! window.WebGLRenderingContext && !! document.createElement( 'canvas' ).getContext( 'experimental-webgl' );
} catch( e ){ // } catch( e ){
return false; // return false;
} // }
})(); // })();


/** /**
* @returns {Boolean} true if webgl is available, false otherwise * @returns {Boolean} true if webgl is available, false otherwise
*/ */
tQuery.World.hasWebGL = function(){ tQuery.World.hasWebGL = function(){
if( tQuery.World._hasWebGL !== undefined ) return tQuery.World._hasWebGL;

// test from Detector.js
try{
tQuery.World._hasWebGL = !! window.WebGLRenderingContext && !! document.createElement( 'canvas' ).getContext( 'experimental-webgl' );
} catch( e ){
tQuery.World._hasWebGL = false;
}
return tQuery.World._hasWebGL; return tQuery.World._hasWebGL;
}; };


Expand Down
854 changes: 854 additions & 0 deletions build/tquery-bundle-require.min.js

Large diffs are not rendered by default.

24 changes: 16 additions & 8 deletions build/tquery-bundle.js
Expand Up @@ -2986,19 +2986,27 @@ tQuery.World.prototype.destroy = function(){
/** /**
* true if webgl is available, false otherwise * true if webgl is available, false otherwise
*/ */
tQuery.World._hasWebGL = (function(){ // tQuery.World._hasWebGL = (function(){
// test from Detector.js // // test from Detector.js
try{ // try{
return !! window.WebGLRenderingContext && !! document.createElement( 'canvas' ).getContext( 'experimental-webgl' ); // return !! window.WebGLRenderingContext && !! document.createElement( 'canvas' ).getContext( 'experimental-webgl' );
} catch( e ){ // } catch( e ){
return false; // return false;
} // }
})(); // })();


/** /**
* @returns {Boolean} true if webgl is available, false otherwise * @returns {Boolean} true if webgl is available, false otherwise
*/ */
tQuery.World.hasWebGL = function(){ tQuery.World.hasWebGL = function(){
if( tQuery.World._hasWebGL !== undefined ) return tQuery.World._hasWebGL;

// test from Detector.js
try{
tQuery.World._hasWebGL = !! window.WebGLRenderingContext && !! document.createElement( 'canvas' ).getContext( 'experimental-webgl' );
} catch( e ){
tQuery.World._hasWebGL = false;
}
return tQuery.World._hasWebGL; return tQuery.World._hasWebGL;
}; };


Expand Down

0 comments on commit a368fd4

Please sign in to comment.