jax 0.0.0.9 → 0.0.0.10
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +6 -0
- data/jax.gemspec +6 -2
- data/lib/jax/generators/app/templates/public/javascripts/jax.js +1 -1
- data/lib/jax/version.rb +1 -1
- metadata +3 -533
- data/guides/assets/images/book_icon.gif +0 -0
- data/guides/assets/images/bullet.gif +0 -0
- data/guides/assets/images/chapters_icon.gif +0 -0
- data/guides/assets/images/check_bullet.gif +0 -0
- data/guides/assets/images/credits_pic_blank.gif +0 -0
- data/guides/assets/images/edge_badge.png +0 -0
- data/guides/assets/images/feature_tile.gif +0 -0
- data/guides/assets/images/footer_tile.gif +0 -0
- data/guides/assets/images/getting_started/clean_passing_jasmine_suite.png +0 -0
- data/guides/assets/images/getting_started/dungeon-complete.png +0 -0
- data/guides/assets/images/getting_started/dungeon-normal-map.png +0 -0
- data/guides/assets/images/getting_started/dungeon-rainbow-textured.png +0 -0
- data/guides/assets/images/getting_started/dungeon-rainbow.png +0 -0
- data/guides/assets/images/getting_started/dungeon-textured-lighting.png +0 -0
- data/guides/assets/images/getting_started/dungeon-textured.png +0 -0
- data/guides/assets/images/getting_started/rock.png +0 -0
- data/guides/assets/images/getting_started/rock_normal.png +0 -0
- data/guides/assets/images/getting_started/teapot-red-directional-point.png +0 -0
- data/guides/assets/images/getting_started/teapot-red-directional.png +0 -0
- data/guides/assets/images/getting_started/teapot-red-nolight.png +0 -0
- data/guides/assets/images/getting_started/teapot-red-spot-point-directional.png +0 -0
- data/guides/assets/images/getting_started/teapot-white.png +0 -0
- data/guides/assets/images/getting_started/teapot-with-model.png +0 -0
- data/guides/assets/images/grey_bullet.gif +0 -0
- data/guides/assets/images/header_backdrop.png +0 -0
- data/guides/assets/images/header_tile.gif +0 -0
- data/guides/assets/images/icons/README +0 -5
- data/guides/assets/images/icons/callouts/1.png +0 -0
- data/guides/assets/images/icons/callouts/10.png +0 -0
- data/guides/assets/images/icons/callouts/11.png +0 -0
- data/guides/assets/images/icons/callouts/12.png +0 -0
- data/guides/assets/images/icons/callouts/13.png +0 -0
- data/guides/assets/images/icons/callouts/14.png +0 -0
- data/guides/assets/images/icons/callouts/15.png +0 -0
- data/guides/assets/images/icons/callouts/2.png +0 -0
- data/guides/assets/images/icons/callouts/3.png +0 -0
- data/guides/assets/images/icons/callouts/4.png +0 -0
- data/guides/assets/images/icons/callouts/5.png +0 -0
- data/guides/assets/images/icons/callouts/6.png +0 -0
- data/guides/assets/images/icons/callouts/7.png +0 -0
- data/guides/assets/images/icons/callouts/8.png +0 -0
- data/guides/assets/images/icons/callouts/9.png +0 -0
- data/guides/assets/images/icons/caution.png +0 -0
- data/guides/assets/images/icons/example.png +0 -0
- data/guides/assets/images/icons/home.png +0 -0
- data/guides/assets/images/icons/important.png +0 -0
- data/guides/assets/images/icons/next.png +0 -0
- data/guides/assets/images/icons/note.png +0 -0
- data/guides/assets/images/icons/prev.png +0 -0
- data/guides/assets/images/icons/tip.png +0 -0
- data/guides/assets/images/icons/up.png +0 -0
- data/guides/assets/images/icons/warning.png +0 -0
- data/guides/assets/images/nav_arrow.gif +0 -0
- data/guides/assets/images/tab_grey.gif +0 -0
- data/guides/assets/images/tab_info.gif +0 -0
- data/guides/assets/images/tab_note.gif +0 -0
- data/guides/assets/images/tab_red.gif +0 -0
- data/guides/assets/images/tab_yellow.gif +0 -0
- data/guides/assets/images/tab_yellow.png +0 -0
- data/guides/assets/javascripts/guides.js +0 -7
- data/guides/assets/javascripts/syntaxhighlighter/shBrushAS3.js +0 -59
- data/guides/assets/javascripts/syntaxhighlighter/shBrushAppleScript.js +0 -75
- data/guides/assets/javascripts/syntaxhighlighter/shBrushBash.js +0 -59
- data/guides/assets/javascripts/syntaxhighlighter/shBrushCSharp.js +0 -65
- data/guides/assets/javascripts/syntaxhighlighter/shBrushColdFusion.js +0 -100
- data/guides/assets/javascripts/syntaxhighlighter/shBrushCpp.js +0 -125
- data/guides/assets/javascripts/syntaxhighlighter/shBrushCss.js +0 -91
- data/guides/assets/javascripts/syntaxhighlighter/shBrushDelphi.js +0 -55
- data/guides/assets/javascripts/syntaxhighlighter/shBrushDiff.js +0 -41
- data/guides/assets/javascripts/syntaxhighlighter/shBrushErlang.js +0 -52
- data/guides/assets/javascripts/syntaxhighlighter/shBrushGroovy.js +0 -67
- data/guides/assets/javascripts/syntaxhighlighter/shBrushJScript.js +0 -52
- data/guides/assets/javascripts/syntaxhighlighter/shBrushJava.js +0 -57
- data/guides/assets/javascripts/syntaxhighlighter/shBrushJavaFX.js +0 -58
- data/guides/assets/javascripts/syntaxhighlighter/shBrushPerl.js +0 -72
- data/guides/assets/javascripts/syntaxhighlighter/shBrushPhp.js +0 -88
- data/guides/assets/javascripts/syntaxhighlighter/shBrushPlain.js +0 -33
- data/guides/assets/javascripts/syntaxhighlighter/shBrushPowerShell.js +0 -74
- data/guides/assets/javascripts/syntaxhighlighter/shBrushPython.js +0 -64
- data/guides/assets/javascripts/syntaxhighlighter/shBrushRuby.js +0 -55
- data/guides/assets/javascripts/syntaxhighlighter/shBrushSass.js +0 -94
- data/guides/assets/javascripts/syntaxhighlighter/shBrushScala.js +0 -51
- data/guides/assets/javascripts/syntaxhighlighter/shBrushSql.js +0 -66
- data/guides/assets/javascripts/syntaxhighlighter/shBrushVb.js +0 -56
- data/guides/assets/javascripts/syntaxhighlighter/shBrushXml.js +0 -69
- data/guides/assets/javascripts/syntaxhighlighter/shCore.js +0 -17
- data/guides/assets/stylesheets/fixes.css +0 -16
- data/guides/assets/stylesheets/main.css +0 -445
- data/guides/assets/stylesheets/print.css +0 -52
- data/guides/assets/stylesheets/reset.css +0 -43
- data/guides/assets/stylesheets/style.css +0 -13
- data/guides/assets/stylesheets/syntaxhighlighter/shCore.css +0 -226
- data/guides/assets/stylesheets/syntaxhighlighter/shCoreDefault.css +0 -328
- data/guides/assets/stylesheets/syntaxhighlighter/shCoreDjango.css +0 -331
- data/guides/assets/stylesheets/syntaxhighlighter/shCoreEclipse.css +0 -339
- data/guides/assets/stylesheets/syntaxhighlighter/shCoreEmacs.css +0 -324
- data/guides/assets/stylesheets/syntaxhighlighter/shCoreFadeToGrey.css +0 -328
- data/guides/assets/stylesheets/syntaxhighlighter/shCoreMDUltra.css +0 -324
- data/guides/assets/stylesheets/syntaxhighlighter/shCoreMidnight.css +0 -324
- data/guides/assets/stylesheets/syntaxhighlighter/shCoreRDark.css +0 -324
- data/guides/assets/stylesheets/syntaxhighlighter/shThemeDefault.css +0 -117
- data/guides/assets/stylesheets/syntaxhighlighter/shThemeDjango.css +0 -120
- data/guides/assets/stylesheets/syntaxhighlighter/shThemeEclipse.css +0 -128
- data/guides/assets/stylesheets/syntaxhighlighter/shThemeEmacs.css +0 -113
- data/guides/assets/stylesheets/syntaxhighlighter/shThemeFadeToGrey.css +0 -117
- data/guides/assets/stylesheets/syntaxhighlighter/shThemeJaxGuides.css +0 -116
- data/guides/assets/stylesheets/syntaxhighlighter/shThemeMDUltra.css +0 -113
- data/guides/assets/stylesheets/syntaxhighlighter/shThemeMidnight.css +0 -113
- data/guides/assets/stylesheets/syntaxhighlighter/shThemeRDark.css +0 -113
- data/guides/jax_guides.rb +0 -41
- data/guides/jax_guides/common.rb +0 -7
- data/guides/jax_guides/generator.rb +0 -287
- data/guides/jax_guides/helpers.rb +0 -29
- data/guides/jax_guides/indexer.rb +0 -69
- data/guides/jax_guides/levenshtein.rb +0 -31
- data/guides/jax_guides/textile_extensions.rb +0 -61
- data/guides/partials/_top_nav.html.erb +0 -17
- data/guides/source/getting_started.textile +0 -1210
- data/guides/source/index.html.erb +0 -61
- data/guides/source/layout.html.erb +0 -147
- data/guides/source/lighting.textile +0 -5
- data/guides/source/materials.textile +0 -5
- data/guides/source/matrices.textile +0 -5
- data/guides/source/shaders.textile +0 -499
- data/guides/source/testing.textile +0 -5
- data/guides/w3c_validator.rb +0 -91
- data/public/images/brickwall.jpg +0 -0
- data/public/images/jacks.jpg +0 -0
- data/public/images/normal_map.jpg +0 -0
- data/public/images/rock.png +0 -0
- data/public/images/rockNormal.png +0 -0
- data/public/images/rss.png +0 -0
- data/public/webgl_not_supported.html +0 -26
- data/spec/example_app/Gemfile +0 -1
- data/spec/example_app/Rakefile +0 -15
- data/spec/example_app/app/controllers/application_controller.js +0 -5
- data/spec/example_app/app/controllers/courthouse_controller.js +0 -24
- data/spec/example_app/app/controllers/lighting_controller.js +0 -67
- data/spec/example_app/app/controllers/noise_controller.js +0 -50
- data/spec/example_app/app/controllers/picking_controller.js +0 -32
- data/spec/example_app/app/controllers/shadows_controller.js +0 -130
- data/spec/example_app/app/controllers/textures_controller.js +0 -52
- data/spec/example_app/app/helpers/application_helper.js +0 -3
- data/spec/example_app/app/helpers/noise_helper.js +0 -3
- data/spec/example_app/app/helpers/picking_helper.js +0 -3
- data/spec/example_app/app/helpers/textures_helper.js +0 -3
- data/spec/example_app/app/models/blob.js +0 -38
- data/spec/example_app/app/models/character.js +0 -23
- data/spec/example_app/app/models/door.js +0 -10
- data/spec/example_app/app/models/scene.js +0 -19
- data/spec/example_app/app/resources/blobs/default.yml +0 -2
- data/spec/example_app/app/resources/characters/judge.yml +0 -3
- data/spec/example_app/app/resources/doors/courthouse_door.yml +0 -5
- data/spec/example_app/app/resources/light_sources/directional_light.yml +0 -13
- data/spec/example_app/app/resources/light_sources/point_light.yml +0 -31
- data/spec/example_app/app/resources/light_sources/spot_light.yml +0 -15
- data/spec/example_app/app/resources/light_sources/sun.yml +0 -7
- data/spec/example_app/app/resources/light_sources/textures_point.yml +0 -34
- data/spec/example_app/app/resources/materials/blob.yml +0 -28
- data/spec/example_app/app/resources/materials/bricks.yml +0 -36
- data/spec/example_app/app/resources/materials/lighting_with_shadows.yml +0 -27
- data/spec/example_app/app/resources/scenes/courthouse.yml +0 -4
- data/spec/example_app/app/shaders/blob/common.ejs +0 -13
- data/spec/example_app/app/shaders/blob/fragment.ejs +0 -8
- data/spec/example_app/app/shaders/blob/manifest.yml +0 -15
- data/spec/example_app/app/shaders/blob/material.js +0 -51
- data/spec/example_app/app/shaders/blob/vertex.ejs +0 -40
- data/spec/example_app/app/views/courthouse/index.js +0 -4
- data/spec/example_app/app/views/lighting/index.js +0 -4
- data/spec/example_app/app/views/noise/index.js +0 -4
- data/spec/example_app/app/views/picking/index.js +0 -4
- data/spec/example_app/app/views/shadows/index.js +0 -6
- data/spec/example_app/app/views/textures/index.js +0 -4
- data/spec/example_app/config/application.rb +0 -6
- data/spec/example_app/config/boot.rb +0 -13
- data/spec/example_app/config/routes.rb +0 -8
- data/spec/example_app/public/images/185__normalmap.png +0 -0
- data/spec/example_app/public/images/face_norm.jpg +0 -0
- data/spec/example_app/public/images/rock.png +0 -0
- data/spec/example_app/public/images/rockNormal.png +0 -0
- data/spec/example_app/public/images/rss.png +0 -0
- data/spec/example_app/public/webgl_not_supported.html +0 -26
- data/spec/example_app/script/jax +0 -7
- data/spec/example_app/spec/javascripts/controllers/noise_controller_spec.js +0 -11
- data/spec/example_app/spec/javascripts/controllers/picking_controller_spec.js +0 -11
- data/spec/example_app/spec/javascripts/controllers/textures_controller_spec.js +0 -11
- data/spec/example_app/spec/javascripts/helpers/application_helper_spec.js +0 -12
- data/spec/example_app/spec/javascripts/helpers/noise_helper_spec.js +0 -12
- data/spec/example_app/spec/javascripts/helpers/picking_helper_spec.js +0 -12
- data/spec/example_app/spec/javascripts/models/blob_spec.js +0 -11
- data/spec/example_app/spec/javascripts/resources/directional_light_spec.js +0 -16
- data/spec/example_app/spec/javascripts/resources/point_light_spec.js +0 -17
- data/spec/example_app/spec/javascripts/resources/spot_light_spec.js +0 -18
- data/spec/example_app/spec/javascripts/shaders/blob_spec.js +0 -27
- data/spec/example_app/spec/javascripts/support/jasmine.yml +0 -89
- data/spec/example_app/spec/javascripts/support/jasmine_runner.rb +0 -32
- data/spec/example_app/spec/javascripts/support/spec_helpers/jax_spec_environment_helper.js +0 -33
- data/spec/example_app/spec/javascripts/support/spec_helpers/jax_spec_helper.js +0 -93
- data/spec/example_app/spec/javascripts/support/spec_layout.html.erb +0 -111
- data/spec/javascripts/helpers/jax_spec_environment_helper.js +0 -33
- data/spec/javascripts/helpers/jax_spec_helper.js +0 -216
- data/spec/javascripts/jax/builtin/meshes/cube_spec.js +0 -10
- data/spec/javascripts/jax/builtin/meshes/plane_spec.js +0 -8
- data/spec/javascripts/jax/builtin/meshes/quad_spec.js +0 -8
- data/spec/javascripts/jax/builtin/meshes/sphere_spec.js +0 -8
- data/spec/javascripts/jax/builtin/meshes/teapot_spec.js +0 -8
- data/spec/javascripts/jax/builtin/meshes/torus_spec.js +0 -8
- data/spec/javascripts/jax/compatibility_spec.js +0 -50
- data/spec/javascripts/jax/context_spec.js +0 -82
- data/spec/javascripts/jax/controller_spec.js +0 -145
- data/spec/javascripts/jax/core/delegation_spec.js +0 -48
- data/spec/javascripts/jax/core/events_spec.js +0 -17
- data/spec/javascripts/jax/core/matrix_stack_spec.js +0 -28
- data/spec/javascripts/jax/core/utils_spec.js +0 -275
- data/spec/javascripts/jax/helper_spec.js +0 -33
- data/spec/javascripts/jax/model_spec.js +0 -97
- data/spec/javascripts/jax/optimizations/material_limitations_spec.js +0 -87
- data/spec/javascripts/jax/optimizations/shaders/basic_spec.js +0 -68
- data/spec/javascripts/jax/prototype/extensions_spec.js +0 -34
- data/spec/javascripts/jax/route_set_spec.js +0 -67
- data/spec/javascripts/jax/view_manager_spec.js +0 -17
- data/spec/javascripts/jax/webgl/camera_spec.js +0 -159
- data/spec/javascripts/jax/webgl/framebuffer_spec.js +0 -46
- data/spec/javascripts/jax/webgl/lighting_spec.js +0 -61
- data/spec/javascripts/jax/webgl/material_spec.js +0 -118
- data/spec/javascripts/jax/webgl/mesh_spec.js +0 -86
- data/spec/javascripts/jax/webgl/shader/manifest_spec.js +0 -60
- data/spec/javascripts/jax/webgl/shader_chain_spec.js +0 -192
- data/spec/javascripts/jax/webgl/shader_spec.js +0 -276
- data/spec/javascripts/jax/webgl/tangent_space_spec.js +0 -142
- data/spec/javascripts/jax/webgl/texture_spec.js +0 -162
- data/spec/javascripts/jax/webgl_spec.js +0 -5
- data/spec/javascripts/jax/world_spec.js +0 -161
- data/spec/javascripts/jax_spec.js +0 -27
- data/spec/javascripts/shaders/core_materials_spec.js +0 -42
- data/spec/javascripts/shaders/fog_spec.js +0 -19
- data/spec/javascripts/shaders/lighting_spec.js +0 -19
- data/spec/javascripts/shaders/normal_map_spec.js +0 -19
- data/spec/javascripts/shaders/paraboloid_spec.js +0 -37
- data/spec/javascripts/shaders/preprocessor_spec.js +0 -50
- data/spec/javascripts/shaders/shadow_map_spec.js +0 -19
- data/spec/javascripts/shaders/texture_spec.js +0 -40
- data/src/constants.yml +0 -1
- data/src/constants.yml.erb +0 -1
- data/src/jax.js +0 -119
- data/src/jax/anim_frame.js +0 -51
- data/src/jax/builtin/all.js +0 -7
- data/src/jax/builtin/meshes/cube.js +0 -83
- data/src/jax/builtin/meshes/plane.js +0 -63
- data/src/jax/builtin/meshes/quad.js +0 -86
- data/src/jax/builtin/meshes/sphere.js +0 -65
- data/src/jax/builtin/meshes/teapot.js +0 -48
- data/src/jax/builtin/meshes/torus.js +0 -64
- data/src/jax/compatibility.js +0 -303
- data/src/jax/context.js +0 -420
- data/src/jax/core.js +0 -42
- data/src/jax/core/math.js +0 -55
- data/src/jax/core/matrix_stack.js +0 -311
- data/src/jax/core/util.js +0 -253
- data/src/jax/events.js +0 -234
- data/src/jax/geometry.js +0 -7
- data/src/jax/geometry/plane.js +0 -113
- data/src/jax/mvc/controller.js +0 -195
- data/src/jax/mvc/helper.js +0 -35
- data/src/jax/mvc/model.js +0 -302
- data/src/jax/mvc/route_set.js +0 -125
- data/src/jax/mvc/view.js +0 -43
- data/src/jax/mvc/view_manager.js +0 -47
- data/src/jax/noise.js +0 -206
- data/src/jax/prototype/class.js +0 -81
- data/src/jax/prototype/core.js +0 -112
- data/src/jax/prototype/extensions.js +0 -142
- data/src/jax/vendor/ejs.js +0 -4
- data/src/jax/vendor/glMatrix.js +0 -3
- data/src/jax/webgl.js +0 -98
- data/src/jax/webgl/camera.js +0 -526
- data/src/jax/webgl/core.js +0 -6
- data/src/jax/webgl/core/buffer.js +0 -161
- data/src/jax/webgl/core/edge.js +0 -6
- data/src/jax/webgl/core/events.js +0 -25
- data/src/jax/webgl/core/face.js +0 -8
- data/src/jax/webgl/core/framebuffer.js +0 -211
- data/src/jax/webgl/material.js +0 -392
- data/src/jax/webgl/mesh.js +0 -427
- data/src/jax/webgl/scene.js +0 -11
- data/src/jax/webgl/scene/frustum.js +0 -260
- data/src/jax/webgl/scene/light_manager.js +0 -136
- data/src/jax/webgl/scene/light_source.js +0 -294
- data/src/jax/webgl/shader.js +0 -296
- data/src/jax/webgl/shader/delegator.js +0 -13
- data/src/jax/webgl/shader/delegator/attribute.js +0 -53
- data/src/jax/webgl/shader/delegator/uniform.js +0 -71
- data/src/jax/webgl/shader/manifest.js +0 -64
- data/src/jax/webgl/shader/program.js +0 -140
- data/src/jax/webgl/shader_chain.js +0 -264
- data/src/jax/webgl/texture.js +0 -312
- data/src/jax/webgl/world.js +0 -240
- data/vendor/ejs/.svn/all-wcprops +0 -17
- data/vendor/ejs/.svn/entries +0 -114
- data/vendor/ejs/.svn/text-base/Eratta.txt.svn-base +0 -3
- data/vendor/ejs/.svn/text-base/license.txt.svn-base +0 -21
- data/vendor/ejs/Eratta.txt +0 -3
- data/vendor/ejs/example/.svn/all-wcprops +0 -29
- data/vendor/ejs/example/.svn/entries +0 -164
- data/vendor/ejs/example/.svn/prop-base/ejs.gif.svn-base +0 -5
- data/vendor/ejs/example/.svn/text-base/demo.html.svn-base +0 -54
- data/vendor/ejs/example/.svn/text-base/ejs.gif.svn-base +0 -0
- data/vendor/ejs/example/.svn/text-base/example.css.svn-base +0 -31
- data/vendor/ejs/example/.svn/text-base/example.js.svn-base +0 -88
- data/vendor/ejs/example/demo.html +0 -54
- data/vendor/ejs/example/ejs.gif +0 -0
- data/vendor/ejs/example/example.css +0 -31
- data/vendor/ejs/example/example.js +0 -88
- data/vendor/ejs/lib/.svn/all-wcprops +0 -11
- data/vendor/ejs/lib/.svn/entries +0 -62
- data/vendor/ejs/lib/.svn/text-base/ejs_fulljslint.js.svn-base +0 -3774
- data/vendor/ejs/lib/ejs_fulljslint.js +0 -3774
- data/vendor/ejs/license.txt +0 -21
- data/vendor/ejs/script/.svn/all-wcprops +0 -17
- data/vendor/ejs/script/.svn/entries +0 -96
- data/vendor/ejs/script/.svn/prop-base/yuicompressor-2.2.4.jar.svn-base +0 -5
- data/vendor/ejs/script/.svn/text-base/production.bat.svn-base +0 -4
- data/vendor/ejs/script/.svn/text-base/yuicompressor-2.2.4.jar.svn-base +0 -0
- data/vendor/ejs/script/production.bat +0 -4
- data/vendor/ejs/script/yuicompressor-2.2.4.jar +0 -0
- data/vendor/ejs/src/.svn/all-wcprops +0 -17
- data/vendor/ejs/src/.svn/entries +0 -96
- data/vendor/ejs/src/.svn/text-base/ejs.js.svn-base +0 -505
- data/vendor/ejs/src/.svn/text-base/view.js.svn-base +0 -200
- data/vendor/ejs/src/ejs.js +0 -505
- data/vendor/ejs/src/view.js +0 -200
- data/vendor/ejs/test/.svn/all-wcprops +0 -23
- data/vendor/ejs/test/.svn/entries +0 -139
- data/vendor/ejs/test/.svn/text-base/index.html.svn-base +0 -18
- data/vendor/ejs/test/.svn/text-base/setup_test.html.svn-base +0 -44
- data/vendor/ejs/test/.svn/text-base/sidebar.html.svn-base +0 -28
- data/vendor/ejs/test/included/.svn/all-wcprops +0 -23
- data/vendor/ejs/test/included/.svn/entries +0 -130
- data/vendor/ejs/test/included/.svn/text-base/prototype.js.svn-base +0 -4184
- data/vendor/ejs/test/included/.svn/text-base/test.css.svn-base +0 -44
- data/vendor/ejs/test/included/.svn/text-base/unittest.js.svn-base +0 -564
- data/vendor/ejs/test/included/prototype.js +0 -4184
- data/vendor/ejs/test/included/test.css +0 -44
- data/vendor/ejs/test/included/unittest.js +0 -564
- data/vendor/ejs/test/index.html +0 -18
- data/vendor/ejs/test/setup_test.html +0 -44
- data/vendor/ejs/test/sidebar.html +0 -28
- data/vendor/ejs/test/templates/.svn/all-wcprops +0 -11
- data/vendor/ejs/test/templates/.svn/entries +0 -62
- data/vendor/ejs/test/templates/.svn/text-base/test.ejs.svn-base +0 -3
- data/vendor/ejs/test/templates/test.ejs +0 -3
- data/vendor/ejs/test/tests/.svn/all-wcprops +0 -23
- data/vendor/ejs/test/tests/.svn/entries +0 -130
- data/vendor/ejs/test/tests/.svn/text-base/rendering.js.svn-base +0 -94
- data/vendor/ejs/test/tests/.svn/text-base/templating.js.svn-base +0 -43
- data/vendor/ejs/test/tests/.svn/text-base/views.js.svn-base +0 -100
- data/vendor/ejs/test/tests/rendering.js +0 -94
- data/vendor/ejs/test/tests/templating.js +0 -43
- data/vendor/ejs/test/tests/views.js +0 -100
- data/vendor/glmatrix/benchmark/js/CanvasMatrix.js +0 -722
- data/vendor/glmatrix/benchmark/js/EWGL_math.js +0 -742
- data/vendor/glmatrix/benchmark/js/mjs.js +0 -1230
- data/vendor/glmatrix/benchmark/matrix_benchmark.html +0 -419
- data/vendor/glmatrix/glMatrix-min.js +0 -32
- data/vendor/glmatrix/glMatrix.js +0 -1772
- data/vendor/glmatrix/unit tests/glMatrix-test.js +0 -74
- data/vendor/glmatrix/unit tests/qunit.css +0 -119
- data/vendor/glmatrix/unit tests/qunit.js +0 -1069
- data/vendor/glmatrix/unit tests/test_glMatrix.html +0 -21
- data/vendor/pdoc_template/html/assets/images/pdoc/alias.png +0 -0
- data/vendor/pdoc_template/html/assets/images/pdoc/class.png +0 -0
- data/vendor/pdoc_template/html/assets/images/pdoc/class_deprecated.png +0 -0
- data/vendor/pdoc_template/html/assets/images/pdoc/class_method.png +0 -0
- data/vendor/pdoc_template/html/assets/images/pdoc/class_property.png +0 -0
- data/vendor/pdoc_template/html/assets/images/pdoc/constant.png +0 -0
- data/vendor/pdoc_template/html/assets/images/pdoc/constructor.png +0 -0
- data/vendor/pdoc_template/html/assets/images/pdoc/deprecated.png +0 -0
- data/vendor/pdoc_template/html/assets/images/pdoc/description.png +0 -0
- data/vendor/pdoc_template/html/assets/images/pdoc/information.png +0 -0
- data/vendor/pdoc_template/html/assets/images/pdoc/instance_method.png +0 -0
- data/vendor/pdoc_template/html/assets/images/pdoc/instance_property.png +0 -0
- data/vendor/pdoc_template/html/assets/images/pdoc/method.png +0 -0
- data/vendor/pdoc_template/html/assets/images/pdoc/method_deprecated.png +0 -0
- data/vendor/pdoc_template/html/assets/images/pdoc/mixin.png +0 -0
- data/vendor/pdoc_template/html/assets/images/pdoc/namespace.png +0 -0
- data/vendor/pdoc_template/html/assets/images/pdoc/property.png +0 -0
- data/vendor/pdoc_template/html/assets/images/pdoc/related_to.png +0 -0
- data/vendor/pdoc_template/html/assets/images/pdoc/search-background.png +0 -0
- data/vendor/pdoc_template/html/assets/images/pdoc/section-background.png +0 -0
- data/vendor/pdoc_template/html/assets/images/pdoc/section.png +0 -0
- data/vendor/pdoc_template/html/assets/images/pdoc/selected-section-background.png +0 -0
- data/vendor/pdoc_template/html/assets/images/pdoc/subclass.png +0 -0
- data/vendor/pdoc_template/html/assets/images/pdoc/superclass.png +0 -0
- data/vendor/pdoc_template/html/assets/images/pdoc/utility.png +0 -0
- data/vendor/pdoc_template/html/assets/javascripts/pdoc/application.js +0 -478
- data/vendor/pdoc_template/html/assets/javascripts/pdoc/prototype.js +0 -4874
- data/vendor/pdoc_template/html/assets/javascripts/pdoc/tabs.js +0 -506
- data/vendor/pdoc_template/html/assets/stylesheets/jax.css +0 -30
- data/vendor/pdoc_template/html/assets/stylesheets/pdoc/api.css +0 -681
- data/vendor/pdoc_template/html/assets/stylesheets/pdoc/pygments.css +0 -62
- data/vendor/pdoc_template/html/helpers.rb +0 -35
- data/vendor/pdoc_template/html/index.erb +0 -18
- data/vendor/pdoc_template/html/item_index.js.erb +0 -6
- data/vendor/pdoc_template/html/layout.erb +0 -67
- data/vendor/pdoc_template/html/leaf.erb +0 -22
- data/vendor/pdoc_template/html/node.erb +0 -30
- data/vendor/pdoc_template/html/partials/class_relationships.erb +0 -19
- data/vendor/pdoc_template/html/partials/classes.erb +0 -7
- data/vendor/pdoc_template/html/partials/constructor.erb +0 -5
- data/vendor/pdoc_template/html/partials/description.erb +0 -5
- data/vendor/pdoc_template/html/partials/link_list.erb +0 -1
- data/vendor/pdoc_template/html/partials/method_signatures.erb +0 -14
- data/vendor/pdoc_template/html/partials/methodized_note.erb +0 -9
- data/vendor/pdoc_template/html/partials/mixins.erb +0 -7
- data/vendor/pdoc_template/html/partials/namespaces.erb +0 -7
- data/vendor/pdoc_template/html/partials/related_utilities.erb +0 -5
- data/vendor/pdoc_template/html/partials/relationships.erb +0 -11
- data/vendor/pdoc_template/html/partials/short_description_list.erb +0 -7
- data/vendor/pdoc_template/html/partials/title.erb +0 -24
- data/vendor/pdoc_template/html/section.erb +0 -18
- data/vendor/yuicompressor-2.4.2.jar +0 -0
@@ -1,50 +0,0 @@
|
|
1
|
-
describe("LCD Compatibility tests", function() {
|
2
|
-
var context;
|
3
|
-
beforeEach(function() { context = new Jax.Context('canvas-element'); });
|
4
|
-
afterEach(function() { context.dispose(); });
|
5
|
-
|
6
|
-
/* these tests verify that different aspects of Jax can perform on lowest-common-denominator machines */
|
7
|
-
|
8
|
-
/*
|
9
|
-
From the GL ES SL spec, section 7.8:
|
10
|
-
|
11
|
-
//
|
12
|
-
// Implementation dependent constants. The example values below
|
13
|
-
// are the minimum values allowed for these maximums.
|
14
|
-
//
|
15
|
-
|
16
|
-
So, the "basic" shader must define no more than at most the above
|
17
|
-
uniforms, varyings, etc. -- or else the basic shader itself may
|
18
|
-
fail on some implementations!
|
19
|
-
|
20
|
-
Jax will dynamically step back from other shader chain elements,
|
21
|
-
but if the 'basic' shader exceeds these limits then Jax is out of
|
22
|
-
the running entirely on some processors -- not good!
|
23
|
-
|
24
|
-
TODO add some tests to validate 'basic' shader against the following:
|
25
|
-
const mediump int gl_MaxVertexTextureImageUnits = 0;
|
26
|
-
const mediump int gl_MaxCombinedTextureImageUnits = 8;
|
27
|
-
const mediump int gl_MaxTextureImageUnits = 8;
|
28
|
-
const mediump int gl_MaxDrawBuffers = 1;
|
29
|
-
*/
|
30
|
-
describe("Basic shader", function() {
|
31
|
-
var matr, shader;
|
32
|
-
beforeEach(function() { matr = new Jax.Material(); shader = matr.prepareShader(); });
|
33
|
-
|
34
|
-
it("should not have more than 16 uniforms", function() {
|
35
|
-
// const mediump int gl_MaxVertexUniformVectors = 128;
|
36
|
-
// const mediump int gl_MaxFragmentUniformVectors = 16;
|
37
|
-
expect(shader.countUniforms(matr)).toBeLessThan(17);
|
38
|
-
});
|
39
|
-
|
40
|
-
it("should not have more than 8 varyings", function() {
|
41
|
-
// const mediump int gl_MaxVaryingVectors = 8;
|
42
|
-
expect(shader.countVaryings(matr)).toBeLessThan(9);
|
43
|
-
});
|
44
|
-
|
45
|
-
it("should not have more than 8 attribs", function() {
|
46
|
-
// const mediump int gl_MaxVertexAttribs = 8;
|
47
|
-
expect(shader.countAttributes(matr)).toBeLessThan(9);
|
48
|
-
});
|
49
|
-
});
|
50
|
-
});
|
@@ -1,82 +0,0 @@
|
|
1
|
-
describe("Jax.Canvas", function() {
|
2
|
-
var context;
|
3
|
-
|
4
|
-
describe("with no routes", function() {
|
5
|
-
beforeEach(function() {
|
6
|
-
Jax.routes.clear();
|
7
|
-
context = new Jax.Context(document.getElementById("canvas-element"));
|
8
|
-
});
|
9
|
-
afterEach(function() { context.dispose(); });
|
10
|
-
|
11
|
-
it("should keep a handle to canvas", function() {
|
12
|
-
expect(context.canvas.id).toEqual("canvas-element");
|
13
|
-
});
|
14
|
-
|
15
|
-
it("should not be rendering, because there's no root controller", function() {
|
16
|
-
expect(context.isRendering()).toBeFalsy();
|
17
|
-
});
|
18
|
-
});
|
19
|
-
|
20
|
-
describe("when redirecting", function() {
|
21
|
-
beforeEach(function() {
|
22
|
-
jasmine.Clock.useMock();
|
23
|
-
|
24
|
-
Jax.routes.clear();
|
25
|
-
|
26
|
-
Jax.views.push('one/index', function() { });
|
27
|
-
Jax.views.push('two/index', function() { });
|
28
|
-
|
29
|
-
var one = Jax.Controller.create("one", {index:function() {}});
|
30
|
-
var two = Jax.Controller.create("two", {
|
31
|
-
index:function() { this.world.addObject(new Jax.Model()); },
|
32
|
-
update: function(tc) { }
|
33
|
-
});
|
34
|
-
|
35
|
-
Jax.routes.map("/", one);
|
36
|
-
Jax.routes.map("two", two);
|
37
|
-
|
38
|
-
context = new Jax.Context(document.getElementById("canvas-element"));
|
39
|
-
});
|
40
|
-
|
41
|
-
afterEach(function() { context.dispose(); });
|
42
|
-
|
43
|
-
it("should dispose the world", function() {
|
44
|
-
spyOn(context.world, 'dispose').andCallThrough();
|
45
|
-
context.redirectTo("two");
|
46
|
-
expect(context.world.dispose).toHaveBeenCalled();
|
47
|
-
});
|
48
|
-
|
49
|
-
it("to a bad route should stop execution of current controller", function() {
|
50
|
-
context.redirectTo("two");
|
51
|
-
var two_instance = context.current_controller;
|
52
|
-
|
53
|
-
jasmine.Clock.tick(Jax.update_speed+1);
|
54
|
-
expect(function() { context.redirectTo("invalid"); }).toThrow("Route not recognized: 'invalid'");
|
55
|
-
expect(context.world.objects.length).toEqual(0);
|
56
|
-
|
57
|
-
spyOn(two_instance, "update"); // notice we can't do this earlier because it *does* get called above
|
58
|
-
jasmine.Clock.tick(Jax.update_speed+1);
|
59
|
-
expect(two_instance.update).not.toHaveBeenCalled();
|
60
|
-
});
|
61
|
-
});
|
62
|
-
|
63
|
-
describe("with routes", function() {
|
64
|
-
var controller;
|
65
|
-
var action_called = 0, view_called = 0;
|
66
|
-
|
67
|
-
beforeEach(function() {
|
68
|
-
Jax.routes.clear();
|
69
|
-
Jax.routes.root(Jax.Controller.create("welcome", {index: function() { action_called++; }}), "index");
|
70
|
-
Jax.views.push("welcome/index", function() {
|
71
|
-
this.glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
|
72
|
-
view_called++;
|
73
|
-
});
|
74
|
-
context = new Jax.Context(document.getElementById("canvas-element"));
|
75
|
-
});
|
76
|
-
afterEach(function() { context.dispose(); });
|
77
|
-
|
78
|
-
it("should be rendering, because there's a controller", function() {
|
79
|
-
expect(context.isRendering()).toBeTruthy();
|
80
|
-
});
|
81
|
-
});
|
82
|
-
});
|
@@ -1,145 +0,0 @@
|
|
1
|
-
describe("Jax.Controller", function() {
|
2
|
-
var klass;
|
3
|
-
var instance;
|
4
|
-
|
5
|
-
describe("with an update method", function() {
|
6
|
-
var context;
|
7
|
-
|
8
|
-
beforeEach(function() {
|
9
|
-
klass = Jax.Controller.create("welcome", { index: function() { }, update: function(tc) { } });
|
10
|
-
Jax.views.push("welcome/index", function() { });
|
11
|
-
Jax.routes.map("welcome", klass);
|
12
|
-
context = new Jax.Context(document.getElementById('canvas-element'));
|
13
|
-
instance = context.redirectTo("welcome");
|
14
|
-
spyOn(instance, 'update');
|
15
|
-
});
|
16
|
-
|
17
|
-
it("should be called when the context is updated", function() {
|
18
|
-
/*
|
19
|
-
we can't really register a callback to setTimeout and check that it was called automatically,
|
20
|
-
so we'll have to simulate it by calling Context#update() directly.
|
21
|
-
*/
|
22
|
-
context.update();
|
23
|
-
expect(instance.update).toHaveBeenCalled();
|
24
|
-
});
|
25
|
-
});
|
26
|
-
|
27
|
-
describe("which does not render or redirect", function() {
|
28
|
-
beforeEach(function() {
|
29
|
-
klass = Jax.Controller.create("welcome", { index: function() { } });
|
30
|
-
instance = new klass();
|
31
|
-
});
|
32
|
-
|
33
|
-
it("should produce the view named after the controller and action names", function() {
|
34
|
-
instance.fireAction("index");
|
35
|
-
expect(instance.view_key).toEqual("welcome/index");
|
36
|
-
});
|
37
|
-
|
38
|
-
it("should map the route automatically", function() {
|
39
|
-
expect(function() { Jax.routes.recognize_route("welcome/index") }).not.toThrow();
|
40
|
-
});
|
41
|
-
});
|
42
|
-
|
43
|
-
describe("with event actions", function() {
|
44
|
-
var evt;
|
45
|
-
|
46
|
-
function doMouseEvent(type) {
|
47
|
-
/* MouseEvents - click, mousedown, mousemove, mouseout, mouseover, mouseup */
|
48
|
-
/* initMouseEvent - type, bubbles, cancelable, windowObject, detail, screenX, screenY, clientX, clientY, ctrlKey,
|
49
|
-
* altKey, shiftKey, metaKey, button, relatedTarget */
|
50
|
-
evt = document.createEvent('MouseEvents');
|
51
|
-
evt.initMouseEvent(type, true, true, window, 1, 0, 0, 0, 0, false, false, false, false, 0, null);
|
52
|
-
document.getElementById('canvas-element').dispatchEvent(evt);
|
53
|
-
}
|
54
|
-
|
55
|
-
function doKeyEvent(type) {
|
56
|
-
/* UIEvents - DOMActivate, DOMFocusIn, DOMFocusOut */
|
57
|
-
/* KeyEvents / UIEvents - keydown, keypress, keyup */
|
58
|
-
/* initUIEvent - type, bubbles, cancelable windowObject, detail */
|
59
|
-
if (window.KeyEvent && !KeyEvent.fake) {
|
60
|
-
evt = document.createEvent('KeyEvents');
|
61
|
-
// type, bubbles, cancelable, windowObject, ctrlKey, altKey, shiftKey, metaKey, keyCode, charCode
|
62
|
-
evt.initKeyEvent(type, true, true, window, false, false, false, false, 13, 0);
|
63
|
-
} else {
|
64
|
-
evt = document.createEvent('UIEvents');
|
65
|
-
evt.initUIEvent(type, true, true, window, 1);
|
66
|
-
evt.keyCode = 13;
|
67
|
-
}
|
68
|
-
document.getElementById('canvas-element').dispatchEvent(evt);
|
69
|
-
}
|
70
|
-
|
71
|
-
var context;
|
72
|
-
|
73
|
-
beforeEach(function() {
|
74
|
-
var methods = {
|
75
|
-
mouse_clicked: function(evt) { },
|
76
|
-
mouse_moved: function(evt) { },
|
77
|
-
mouse_dragged: function(evt) { },
|
78
|
-
mouse_pressed: function(evt) { },
|
79
|
-
mouse_exited: function(evt) { },
|
80
|
-
mouse_entered: function(evt) { },
|
81
|
-
mouse_released: function(evt) { },
|
82
|
-
key_typed: function(evt) { },
|
83
|
-
key_pressed: function(evt) { },
|
84
|
-
key_released: function(evt) { }
|
85
|
-
};
|
86
|
-
klass.addMethods(methods);
|
87
|
-
expect(instance).toHaveMethod("mouse_clicked"); // verify methods were added
|
88
|
-
for (var method_name in methods) spyOn(instance, method_name);
|
89
|
-
Jax.routes.clear();
|
90
|
-
context = new Jax.Context(document.getElementById("canvas-element"));
|
91
|
-
context.current_controller = instance;
|
92
|
-
});
|
93
|
-
afterEach(function() { context.dispose(); });
|
94
|
-
|
95
|
-
it("should dispatch key pressed events", function() {
|
96
|
-
doKeyEvent('keypress');
|
97
|
-
expect(instance.key_typed).toHaveBeenCalled();
|
98
|
-
});
|
99
|
-
|
100
|
-
it("should dispatch key released events", function() {
|
101
|
-
doKeyEvent('keyup');
|
102
|
-
expect(instance.key_released).toHaveBeenCalled();
|
103
|
-
});
|
104
|
-
|
105
|
-
it("should dispatch key down events", function() {
|
106
|
-
doKeyEvent('keydown');
|
107
|
-
expect(instance.key_pressed).toHaveBeenCalled();
|
108
|
-
});
|
109
|
-
|
110
|
-
it("should dispatch mouse released events", function() {
|
111
|
-
doMouseEvent('mouseup');
|
112
|
-
expect(instance.mouse_released).toHaveBeenCalled();
|
113
|
-
});
|
114
|
-
it("should dispatch mouse entered events", function() {
|
115
|
-
doMouseEvent('mouseout');
|
116
|
-
expect(instance.mouse_exited).toHaveBeenCalled();
|
117
|
-
});
|
118
|
-
it("should dispatch mouse exited events", function() {
|
119
|
-
doMouseEvent('mouseover');
|
120
|
-
expect(instance.mouse_entered).toHaveBeenCalled();
|
121
|
-
});
|
122
|
-
|
123
|
-
it("should dispatch mouse pressed events", function() {
|
124
|
-
doMouseEvent('mousedown');
|
125
|
-
expect(instance.mouse_pressed).toHaveBeenCalled();
|
126
|
-
});
|
127
|
-
|
128
|
-
it("should dispatch mouse dragged events", function() {
|
129
|
-
doMouseEvent('mousedown');
|
130
|
-
doMouseEvent('mousemove');
|
131
|
-
doMouseEvent('mouseup');
|
132
|
-
expect(instance.mouse_dragged).toHaveBeenCalled();
|
133
|
-
});
|
134
|
-
|
135
|
-
it("should dispatch mouse moved events", function() {
|
136
|
-
doMouseEvent('mousemove');
|
137
|
-
expect(instance.mouse_moved).toHaveBeenCalled();
|
138
|
-
});
|
139
|
-
|
140
|
-
it("should dispatch mouse clicked events", function() {
|
141
|
-
doMouseEvent('click');
|
142
|
-
expect(instance.mouse_clicked).toHaveBeenCalled();
|
143
|
-
});
|
144
|
-
});
|
145
|
-
});
|
@@ -1,48 +0,0 @@
|
|
1
|
-
describe("Delegation", function() {
|
2
|
-
/* see src/jax/prototype/extensions.js */
|
3
|
-
var klass;
|
4
|
-
|
5
|
-
beforeEach(function() { klass = Jax.Class.create({initialize:function(){this.matrix_stack=new Jax.MatrixStack();}}); });
|
6
|
-
|
7
|
-
it("should delegate via string", function() {
|
8
|
-
klass.delegate("getProjectionMatrix", "loadModelMatrix").into("matrix_stack");
|
9
|
-
|
10
|
-
var src = new klass();
|
11
|
-
spyOn(src.matrix_stack, 'getProjectionMatrix');
|
12
|
-
spyOn(src.matrix_stack, 'loadModelMatrix');
|
13
|
-
|
14
|
-
src.getProjectionMatrix();
|
15
|
-
src.loadModelMatrix(mat4.create());
|
16
|
-
|
17
|
-
expect(src.matrix_stack.getProjectionMatrix).toHaveBeenCalled();
|
18
|
-
expect(src.matrix_stack.loadModelMatrix).toHaveBeenCalled();
|
19
|
-
});
|
20
|
-
|
21
|
-
it("should delegate via regexp with explicit klass", function() {
|
22
|
-
klass.delegate(/^(get|load|mult)(.*)Matrix$/).into("matrix_stack", Jax.MatrixStack);
|
23
|
-
|
24
|
-
var src = new klass();
|
25
|
-
spyOn(src.matrix_stack, 'getProjectionMatrix');
|
26
|
-
spyOn(src.matrix_stack, 'loadModelMatrix');
|
27
|
-
|
28
|
-
src.getProjectionMatrix();
|
29
|
-
src.loadModelMatrix(mat4.create());
|
30
|
-
|
31
|
-
expect(src.matrix_stack.getProjectionMatrix).toHaveBeenCalled();
|
32
|
-
expect(src.matrix_stack.loadModelMatrix).toHaveBeenCalled();
|
33
|
-
});
|
34
|
-
|
35
|
-
it("should delegate via regexp without explicit klass", function() {
|
36
|
-
klass.delegate(/^(get|load|mult)(.*)Matrix$/).into("matrix_stack");
|
37
|
-
|
38
|
-
var src = new klass();
|
39
|
-
spyOn(src.matrix_stack, 'getProjectionMatrix');
|
40
|
-
spyOn(src.matrix_stack, 'loadModelMatrix');
|
41
|
-
|
42
|
-
src.getProjectionMatrix();
|
43
|
-
src.loadModelMatrix(mat4.create());
|
44
|
-
|
45
|
-
expect(src.matrix_stack.getProjectionMatrix).toHaveBeenCalled();
|
46
|
-
expect(src.matrix_stack.loadModelMatrix).toHaveBeenCalled();
|
47
|
-
});
|
48
|
-
});
|
@@ -1,17 +0,0 @@
|
|
1
|
-
describe("Jax.Events", function() {
|
2
|
-
describe("Methods", function() {
|
3
|
-
var instance;
|
4
|
-
beforeEach(function() {
|
5
|
-
var klass = Jax.Class.create({});
|
6
|
-
klass.addMethods(Jax.Events.Methods);
|
7
|
-
instance = new klass();
|
8
|
-
});
|
9
|
-
|
10
|
-
it("should pass events to listeners", function() {
|
11
|
-
var result = false;
|
12
|
-
instance.addEventListener('evt', function(evt) { result = evt; });
|
13
|
-
instance.fireEvent('evt', 1);
|
14
|
-
expect(result).toBeTruthy();
|
15
|
-
});
|
16
|
-
});
|
17
|
-
});
|
@@ -1,28 +0,0 @@
|
|
1
|
-
describe("Jax.MatrixStack", function() {
|
2
|
-
var stack;
|
3
|
-
|
4
|
-
beforeEach(function() { stack = new Jax.MatrixStack(); });
|
5
|
-
|
6
|
-
it('should return a model matrix', function() { expect(stack.getModelMatrix()).not.toBeUndefined(); });
|
7
|
-
it('should return a view matrix', function() { expect(stack.getViewMatrix()).not.toBeUndefined(); });
|
8
|
-
it('should return a proj matrix', function() { expect(stack.getProjectionMatrix()).not.toBeUndefined(); });
|
9
|
-
|
10
|
-
describe("with a pushed matrix", function() {
|
11
|
-
beforeEach(function() { stack.push(); });
|
12
|
-
|
13
|
-
it('should return a model matrix', function() { expect(stack.getModelMatrix()).not.toBeUndefined(); });
|
14
|
-
it('should return a view matrix', function() { expect(stack.getViewMatrix()).not.toBeUndefined(); });
|
15
|
-
it('should return a proj matrix', function() { expect(stack.getProjectionMatrix()).not.toBeUndefined(); });
|
16
|
-
|
17
|
-
describe("translate", function() {
|
18
|
-
beforeEach(function() { stack.loadViewMatrix(mat4.translate(Jax.IDENTITY_MATRIX, [1,1,1], mat4.create())); });
|
19
|
-
|
20
|
-
it("should not be an identity matrix", function() { expect(stack.getViewMatrix()).not.toEqualMatrix(Jax.IDENTITY_MATRIX); });
|
21
|
-
|
22
|
-
it("should produce coords relative to eye", function() {
|
23
|
-
var vec = mat4.multiplyVec3(stack.getInverseViewMatrix(), [0,0,0]);
|
24
|
-
expect(vec).toEqualVector([-1,-1,-1]);
|
25
|
-
});
|
26
|
-
});
|
27
|
-
});
|
28
|
-
});
|
@@ -1,275 +0,0 @@
|
|
1
|
-
describe("Jax.Util", function() {
|
2
|
-
describe("vectorize", function() {
|
3
|
-
var data;
|
4
|
-
|
5
|
-
describe("2D", function() {
|
6
|
-
beforeEach(function() { data = [1, 2]; });
|
7
|
-
|
8
|
-
it("should have length 2", function() { expect(Jax.Util.vectorize({x:0,y:1})).toEqualVector([0,1]); });
|
9
|
-
it("should work", function() { expect(Jax.Util.vectorize(data)).toEqualVector([1,2]); });
|
10
|
-
});
|
11
|
-
|
12
|
-
describe("with array", function() {
|
13
|
-
beforeEach(function() { data = [1, 2, 3]; });
|
14
|
-
|
15
|
-
it("should return the original vector", function() { expect(Jax.Util.vectorize(data)).toEqualVector([1,2,3]); });
|
16
|
-
});
|
17
|
-
|
18
|
-
describe("with object with names", function() {
|
19
|
-
beforeEach(function() { data = {x:1,y:2,z:3}; });
|
20
|
-
it("should produce a vector", function() { expect(Jax.Util.vectorize(data)).toEqualVector([1,2,3]); });
|
21
|
-
});
|
22
|
-
|
23
|
-
describe("with string", function() {
|
24
|
-
describe("comma delimited", function() {
|
25
|
-
beforeEach(function() { data = "1,2,3"; });
|
26
|
-
it("should produce a vector", function() { expect(Jax.Util.vectorize(data)).toEqualVector([1,2,3]); });
|
27
|
-
});
|
28
|
-
describe("space delimited", function() {
|
29
|
-
beforeEach(function() { data = "1 2 3"; });
|
30
|
-
it("should produce a vector", function() { expect(Jax.Util.vectorize(data)).toEqualVector([1,2,3]); });
|
31
|
-
});
|
32
|
-
describe("comma-and-space delimited", function() {
|
33
|
-
beforeEach(function() { data = "1, 2, 3"; });
|
34
|
-
it("should produce a vector", function() { expect(Jax.Util.vectorize(data)).toEqualVector([1,2,3]); });
|
35
|
-
});
|
36
|
-
describe("tab delimited", function() {
|
37
|
-
beforeEach(function() { data = "1\t2\t3"; });
|
38
|
-
it("should produce a vector", function() { expect(Jax.Util.vectorize(data)).toEqualVector([1,2,3]); });
|
39
|
-
});
|
40
|
-
describe("comma-space-tab delimited", function() {
|
41
|
-
beforeEach(function() { data = "1, \t2, \t3"; });
|
42
|
-
it("should produce a vector", function() { expect(Jax.Util.vectorize(data)).toEqualVector([1,2,3]); });
|
43
|
-
});
|
44
|
-
});
|
45
|
-
|
46
|
-
describe("colorize", function() {
|
47
|
-
var data;
|
48
|
-
|
49
|
-
describe("3D", function() {
|
50
|
-
beforeEach(function() { data = [1, 2, 3]; });
|
51
|
-
|
52
|
-
it("should work", function() { expect(Jax.Util.colorize(data)).toEqualVector([1,2,3,1]); });
|
53
|
-
});
|
54
|
-
|
55
|
-
describe("with object with short names", function() {
|
56
|
-
beforeEach(function() { data = {r:1,g:2,b:3,a:4}; });
|
57
|
-
it("should produce a color", function() { expect(Jax.Util.colorize(data)).toEqualVector([1,2,3,4]); });
|
58
|
-
});
|
59
|
-
|
60
|
-
describe("with object with long names", function() {
|
61
|
-
beforeEach(function() { data = {red:1,green:2,blue:3,alpha:4}; });
|
62
|
-
it("should produce a color", function() { expect(Jax.Util.colorize(data)).toEqualVector([1,2,3,4]); });
|
63
|
-
});
|
64
|
-
|
65
|
-
describe("with string", function() {
|
66
|
-
describe("comma delimited", function() {
|
67
|
-
beforeEach(function() { data = "1,2,3,4"; });
|
68
|
-
it("should produce a color", function() { expect(Jax.Util.colorize(data)).toEqualVector([1,2,3,4]); });
|
69
|
-
});
|
70
|
-
describe("space delimited", function() {
|
71
|
-
beforeEach(function() { data = "1 2 3 4"; });
|
72
|
-
it("should produce a color", function() { expect(Jax.Util.colorize(data)).toEqualVector([1,2,3,4]); });
|
73
|
-
});
|
74
|
-
describe("comma-and-space delimited", function() {
|
75
|
-
beforeEach(function() { data = "1, 2, 3, 4"; });
|
76
|
-
it("should produce a color", function() { expect(Jax.Util.colorize(data)).toEqualVector([1,2,3,4]); });
|
77
|
-
});
|
78
|
-
describe("tab delimited", function() {
|
79
|
-
beforeEach(function() { data = "1\t2\t3\t4"; });
|
80
|
-
it("should produce a color", function() { expect(Jax.Util.colorize(data)).toEqualVector([1,2,3,4]); });
|
81
|
-
});
|
82
|
-
describe("comma-space-tab delimited", function() {
|
83
|
-
beforeEach(function() { data = "1, \t2, \t3, \t4"; });
|
84
|
-
it("should produce a color", function() { expect(Jax.Util.colorize(data)).toEqualVector([1,2,3,4]); });
|
85
|
-
});
|
86
|
-
});
|
87
|
-
|
88
|
-
describe("with object with short names and no alpha", function() {
|
89
|
-
beforeEach(function() { data = {r:1,g:2,b:3}; });
|
90
|
-
it("should produce a color", function() { expect(Jax.Util.colorize(data)).toEqualVector([1,2,3,1]); });
|
91
|
-
});
|
92
|
-
|
93
|
-
describe("with object with long names and no alpha", function() {
|
94
|
-
beforeEach(function() { data = {red:1,green:2,blue:3}; });
|
95
|
-
it("should produce a color", function() { expect(Jax.Util.colorize(data)).toEqualVector([1,2,3,1]); });
|
96
|
-
});
|
97
|
-
|
98
|
-
describe("with string", function() {
|
99
|
-
describe("comma delimited and no alpha", function() {
|
100
|
-
beforeEach(function() { data = "1,2,3"; });
|
101
|
-
it("should produce a color", function() { expect(Jax.Util.colorize(data)).toEqualVector([1,2,3,1]); });
|
102
|
-
});
|
103
|
-
describe("space delimited and no alpha", function() {
|
104
|
-
beforeEach(function() { data = "1 2 3"; });
|
105
|
-
it("should produce a color", function() { expect(Jax.Util.colorize(data)).toEqualVector([1,2,3,1]); });
|
106
|
-
});
|
107
|
-
describe("comma-and-space delimited and no alpha", function() {
|
108
|
-
beforeEach(function() { data = "1, 2, 3"; });
|
109
|
-
it("should produce a color", function() { expect(Jax.Util.colorize(data)).toEqualVector([1,2,3,1]); });
|
110
|
-
});
|
111
|
-
describe("tab delimited and no alpha", function() {
|
112
|
-
beforeEach(function() { data = "1\t2\t3"; });
|
113
|
-
it("should produce a color", function() { expect(Jax.Util.colorize(data)).toEqualVector([1,2,3,1]); });
|
114
|
-
});
|
115
|
-
describe("comma-space-tab delimited and no alpha", function() {
|
116
|
-
beforeEach(function() { data = "1, \t2, \t3"; });
|
117
|
-
it("should produce a color", function() { expect(Jax.Util.colorize(data)).toEqualVector([1,2,3,1]); });
|
118
|
-
});
|
119
|
-
});
|
120
|
-
});
|
121
|
-
|
122
|
-
describe("with object with indices", function() {
|
123
|
-
beforeEach(function() { data = {0:1,1:2,2:3}; });
|
124
|
-
it("should produce a vector", function() { expect(Jax.Util.vectorize(data)).toEqualVector([1,2,3]); });
|
125
|
-
});
|
126
|
-
|
127
|
-
describe("with a vector", function() {
|
128
|
-
beforeEach(function() { data = [1,2,3]; });
|
129
|
-
it("should produce a vector", function() { expect(Jax.Util.vectorize(data)).toEqualVector([1,2,3]); });
|
130
|
-
xit("should not return itself", function() { expect(Jax.Util.vectorize(data)).not.toEqual(data); });
|
131
|
-
});
|
132
|
-
});
|
133
|
-
|
134
|
-
describe("properties", function() {
|
135
|
-
var src;
|
136
|
-
beforeEach(function() { src = { prop1: 1, prop2: 2 }; });
|
137
|
-
it("should return property names", function() {
|
138
|
-
expect(Jax.Util.properties(src)).toEqual(['prop1', 'prop2']);
|
139
|
-
});
|
140
|
-
});
|
141
|
-
|
142
|
-
describe("merge", function() {
|
143
|
-
var src, dst;
|
144
|
-
describe("with a source with null attributes and destination with existing attributes of same name", function() {
|
145
|
-
beforeEach(function() { src = {i:null}; dst = {i:5}; Jax.Util.merge(src,dst); });
|
146
|
-
|
147
|
-
it("should copy null attributes", function() {
|
148
|
-
expect(dst.i).toBeNull();
|
149
|
-
});
|
150
|
-
});
|
151
|
-
});
|
152
|
-
|
153
|
-
describe("sizeofFormat", function() {
|
154
|
-
it("should return size of ALPHA", function() { expect(Jax.Util.sizeofFormat(GL_ALPHA)).toEqual(1); });
|
155
|
-
it("should return size of LUMINANCE", function() { expect(Jax.Util.sizeofFormat(GL_LUMINANCE)).toEqual(1); });
|
156
|
-
it("should return size of RGB", function() { expect(Jax.Util.sizeofFormat(GL_RGB)).toEqual(3); });
|
157
|
-
it("should return size of RGBA", function() { expect(Jax.Util.sizeofFormat(GL_RGBA)).toEqual(4); });
|
158
|
-
it("should return size of LUMINANCE_ALPHA", function() { expect(Jax.Util.sizeofFormat(GL_LUMINANCE_ALPHA)).toEqual(2); });
|
159
|
-
it("should fail", function() { expect(function(){Jax.Util.sizeofFormat(-12345);}).toThrow(); });
|
160
|
-
});
|
161
|
-
|
162
|
-
describe("enumName", function() {
|
163
|
-
it("should work", function() {
|
164
|
-
expect(Jax.Util.enumName(GL_TEXTURE_2D)).toEqual("GL_TEXTURE_2D");
|
165
|
-
});
|
166
|
-
|
167
|
-
describe("failure", function() {
|
168
|
-
it("should contain the decimal form", function() {
|
169
|
-
expect(Jax.Util.enumName(36059)).toMatch(/36059/);
|
170
|
-
});
|
171
|
-
|
172
|
-
it("should contain the hex form", function() {
|
173
|
-
expect(Jax.Util.enumName(36059)).toMatch(/0x8cdb/);
|
174
|
-
});
|
175
|
-
});
|
176
|
-
});
|
177
|
-
|
178
|
-
describe("normalizeOptions", function() {
|
179
|
-
var normalized;
|
180
|
-
describe("with a missing default array", function() {
|
181
|
-
var arr = [1,2,3];
|
182
|
-
beforeEach(function() { normalized = Jax.Util.normalizeOptions(null, {def:arr}); });
|
183
|
-
|
184
|
-
it("should copy the default array", function() {
|
185
|
-
expect(normalized.def.length).toEqual(arr.length);
|
186
|
-
for (var i = 0; i < arr.length; i++)
|
187
|
-
expect(normalized.def[i]).toEqual(arr[i]);
|
188
|
-
});
|
189
|
-
});
|
190
|
-
|
191
|
-
describe("with only 1 argument", function() {
|
192
|
-
it("should clone the argument", function() {
|
193
|
-
expect(Jax.Util.normalizeOptions({i:1}).i).toEqual(1);
|
194
|
-
});
|
195
|
-
});
|
196
|
-
|
197
|
-
describe("with a object left and array right", function() {
|
198
|
-
beforeEach(function() { normalized = Jax.Util.normalizeOptions({p:{"x":20,"y":40,"z":60}}, {p:[1,2,3]}); });
|
199
|
-
it("should merge both into a gen object", function() {
|
200
|
-
expect(Object.isArray(normalized.p)).toBeFalsy();
|
201
|
-
|
202
|
-
expect(normalized.p.x).toEqual(20);
|
203
|
-
expect(normalized.p.y).toEqual(40);
|
204
|
-
expect(normalized.p.z).toEqual(60);
|
205
|
-
expect(normalized.p[0]).toEqual(1);
|
206
|
-
expect(normalized.p[1]).toEqual(2);
|
207
|
-
expect(normalized.p[2]).toEqual(3);
|
208
|
-
});
|
209
|
-
});
|
210
|
-
|
211
|
-
describe("with a function value that defaults to null", function() {
|
212
|
-
beforeEach(function() { normalized = Jax.Util.normalizeOptions({onload:function(){}}, {onload:null}); });
|
213
|
-
|
214
|
-
it("should assign the function value", function() {
|
215
|
-
expect(typeof(normalized.onload)).toEqual("function");
|
216
|
-
});
|
217
|
-
});
|
218
|
-
|
219
|
-
describe("with a missing value that defaults to null", function() {
|
220
|
-
beforeEach(function() { normalized = Jax.Util.normalizeOptions({}, {onload:null}); });
|
221
|
-
|
222
|
-
it("should assign the default value", function() {
|
223
|
-
expect(normalized.onload).toBeNull();
|
224
|
-
});
|
225
|
-
});
|
226
|
-
|
227
|
-
describe("given a klass value", function() {
|
228
|
-
beforeEach(function() { normalized = Jax.Util.normalizeOptions({k:new (Jax.Class.create({}))}, {}); });
|
229
|
-
|
230
|
-
it("should be an instance of that klass", function() {
|
231
|
-
expect(normalized.k.klass).not.toBeUndefined();
|
232
|
-
expect(normalized.k).toBeKindOf(normalized.k.klass);
|
233
|
-
});
|
234
|
-
});
|
235
|
-
|
236
|
-
describe("given values that are not in defaults", function() {
|
237
|
-
beforeEach(function() { normalized = Jax.Util.normalizeOptions({m:8,n:{o:9,p:0}}, {i:1,j:{k:2,l:3}}); });
|
238
|
-
|
239
|
-
it("should contain defaults", function() {
|
240
|
-
expect(normalized.i).toEqual(1);
|
241
|
-
expect(normalized.j.k).toEqual(2);
|
242
|
-
expect(normalized.j.l).toEqual(3);
|
243
|
-
});
|
244
|
-
|
245
|
-
it("should contain customs", function() {
|
246
|
-
expect(normalized.m).toEqual(8);
|
247
|
-
expect(normalized.n.o).toEqual(9);
|
248
|
-
expect(normalized.n.p).toEqual(0);
|
249
|
-
});
|
250
|
-
});
|
251
|
-
|
252
|
-
describe("given values that override defaults", function() {
|
253
|
-
beforeEach(function() { normalized = Jax.Util.normalizeOptions({i:8,j:{k:9,l:0}}, {i:1,j:{k:2,l:3}}); });
|
254
|
-
|
255
|
-
it("should copy overrides", function() {
|
256
|
-
expect(normalized.i).toEqual(8);
|
257
|
-
expect(normalized.j.k).toEqual(9);
|
258
|
-
expect(normalized.j.l).toEqual(0);
|
259
|
-
});
|
260
|
-
});
|
261
|
-
|
262
|
-
describe("given undefined", function() {
|
263
|
-
beforeEach(function() { normalized = Jax.Util.normalizeOptions(undefined, {i:1,j:{k:2,l:3}}); });
|
264
|
-
|
265
|
-
it("should copy defaults", function() {
|
266
|
-
expect(normalized.i).toEqual(1);
|
267
|
-
});
|
268
|
-
|
269
|
-
it("should copy nested defaults", function() {
|
270
|
-
expect(normalized.j.k).toEqual(2);
|
271
|
-
expect(normalized.j.l).toEqual(3);
|
272
|
-
})
|
273
|
-
});
|
274
|
-
});
|
275
|
-
});
|