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
data/src/jax/mvc/view.js
DELETED
@@ -1,43 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* class Jax.View
|
3
|
-
*
|
4
|
-
* Provides a container class around which View functions can be stored.
|
5
|
-
*
|
6
|
-
* This is useful because other parts of Jax will set up helper methods and
|
7
|
-
* delegation methods for a View to make use of.
|
8
|
-
*
|
9
|
-
* For example, one of the most common tasks for a View is to clear the
|
10
|
-
* rendering canvas:
|
11
|
-
*
|
12
|
-
* this.glClear(GL_COLOR_BIT | GL_DEPTH_BUFFER_BIT);
|
13
|
-
*
|
14
|
-
* The _glClear_ method is delegated into the Jax.Context associated with
|
15
|
-
* this view.
|
16
|
-
*
|
17
|
-
* By default, in addition to all WebGL methods, the following delegates and
|
18
|
-
* properties are created by Jax:
|
19
|
-
*
|
20
|
-
* * *world* - the instance of Jax.World that houses all of the objects in
|
21
|
-
* the scene
|
22
|
-
* * *player* - the instance of Jax.Player for this context containing information
|
23
|
-
* about the human user.
|
24
|
-
* * *context* - the instance of Jax.Context that this view is associated with.
|
25
|
-
*
|
26
|
-
**/
|
27
|
-
Jax.View = (function() {
|
28
|
-
return Jax.Class.create({
|
29
|
-
initialize: function(view_func) {
|
30
|
-
this.view_func = view_func;
|
31
|
-
},
|
32
|
-
|
33
|
-
/**
|
34
|
-
* Jax.View#render() -> Jax.View
|
35
|
-
*
|
36
|
-
* Renders this View. Returns itself.
|
37
|
-
**/
|
38
|
-
render: function() {
|
39
|
-
this.view_func();
|
40
|
-
return this;
|
41
|
-
}
|
42
|
-
});
|
43
|
-
})();
|
data/src/jax/mvc/view_manager.js
DELETED
@@ -1,47 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* class Jax.ViewManager
|
3
|
-
*
|
4
|
-
* Maintains a registry of all Jax views and the paths to them.
|
5
|
-
**/
|
6
|
-
Jax.ViewManager = (function() {
|
7
|
-
return Jax.Class.create({
|
8
|
-
initialize: function() {
|
9
|
-
this.views = {};
|
10
|
-
},
|
11
|
-
|
12
|
-
/**
|
13
|
-
* Jax.ViewManager#push(path, view) -> undefined
|
14
|
-
* - path (String): the view path to be stored
|
15
|
-
* - view (Function): a function to be called when rendering the view
|
16
|
-
*
|
17
|
-
* If the path is already stored, the current one will be replaced.
|
18
|
-
**/
|
19
|
-
push: function(path, view) {
|
20
|
-
this.views[path] = view;
|
21
|
-
},
|
22
|
-
|
23
|
-
/**
|
24
|
-
* Jax.ViewManager#get(path) -> Object
|
25
|
-
* - path (String): the view path to be returned.
|
26
|
-
*
|
27
|
-
* Note that every call to this method produces a new instance of Jax.View,
|
28
|
-
* so be aware that this can cause efficiency problems and memory leaks
|
29
|
-
* if not handled appropriately.
|
30
|
-
**/
|
31
|
-
get: function(path) {
|
32
|
-
if (this.views[path])
|
33
|
-
return new Jax.View(this.views[path]);
|
34
|
-
else throw new Error("Could not find view at '"+path+"'!");
|
35
|
-
},
|
36
|
-
|
37
|
-
/** alias of: Jax.ViewManager#get
|
38
|
-
* Jax.ViewManager#find(path) -> Object
|
39
|
-
* - path (String): the view path to be returned.
|
40
|
-
*
|
41
|
-
* Note that every call to this method produces a new instance of Jax.View,
|
42
|
-
* so be aware that this can cause efficiency problems and memory leaks
|
43
|
-
* if not handled appropriately.
|
44
|
-
**/
|
45
|
-
find: function(path) { return this.get(path); }
|
46
|
-
});
|
47
|
-
})();
|
data/src/jax/noise.js
DELETED
@@ -1,206 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* class Jax.Noise
|
3
|
-
* Constructs several textures to be used in vertex shaders involving Perlin noise.
|
4
|
-
*
|
5
|
-
* Example:
|
6
|
-
*
|
7
|
-
* var noise = new Jax.Noise();
|
8
|
-
* var program = new Jax.Shader.Program({...});
|
9
|
-
* program.manifest.set('perm', noise.perm);
|
10
|
-
* program.manifest.set('simplex', noise.simplex);
|
11
|
-
* program.manifest.set('grad', noise.grad);
|
12
|
-
*
|
13
|
-
**/
|
14
|
-
Jax.Noise = (function() {
|
15
|
-
var perm/*[256]*/ = [151,160,137,91,90,15,
|
16
|
-
131,13,201,95,96,53,194,233,7,225,140,36,103,30,69,142,8,99,37,240,21,10,23,
|
17
|
-
190, 6,148,247,120,234,75,0,26,197,62,94,252,219,203,117,35,11,32,57,177,33,
|
18
|
-
88,237,149,56,87,174,20,125,136,171,168, 68,175,74,165,71,134,139,48,27,166,
|
19
|
-
77,146,158,231,83,111,229,122,60,211,133,230,220,105,92,41,55,46,245,40,244,
|
20
|
-
102,143,54, 65,25,63,161, 1,216,80,73,209,76,132,187,208, 89,18,169,200,196,
|
21
|
-
135,130,116,188,159,86,164,100,109,198,173,186, 3,64,52,217,226,250,124,123,
|
22
|
-
5,202,38,147,118,126,255,82,85,212,207,206,59,227,47,16,58,17,182,189,28,42,
|
23
|
-
223,183,170,213,119,248,152, 2,44,154,163, 70,221,153,101,155,167, 43,172,9,
|
24
|
-
129,22,39,253, 19,98,108,110,79,113,224,232,178,185, 112,104,218,246,97,228,
|
25
|
-
251,34,242,193,238,210,144,12,191,179,162,241, 81,51,145,235,249,14,239,107,
|
26
|
-
49,192,214, 31,181,199,106,157,184, 84,204,176,115,121,50,45,127, 4,150,254,
|
27
|
-
138,236,205,93,222,114,67,29,24,72,243,141,128,195,78,66,215,61,156,180];
|
28
|
-
|
29
|
-
/* These are Ken Perlin's proposed gradients for 3D noise. I kept them for
|
30
|
-
better consistency with the reference implementation, but there is really
|
31
|
-
no need to pad this to 16 gradients for this particular implementation.
|
32
|
-
If only the "proper" first 12 gradients are used, they can be extracted
|
33
|
-
from the grad4[][] array: grad3[i][j] == grad4[i*2][j], 0<=i<=11, j=0,1,2
|
34
|
-
*/
|
35
|
-
var grad3/*[16][3]*/ = [0,1,1, 0,1,-1, 0,-1,1, 0,-1,-1,
|
36
|
-
1,0,1, 1,0,-1, -1,0,1, -1,0,-1,
|
37
|
-
1,1,0, 1,-1,0, -1,1,0, -1,-1,0, // 12 cube edges
|
38
|
-
1,0,-1, -1,0,-1, 0,-1,1, 0,1,1]; // 4 more to make 16
|
39
|
-
|
40
|
-
/* These are my own proposed gradients for 4D noise. They are the coordinates
|
41
|
-
of the midpoints of each of the 32 edges of a tesseract, just like the 3D
|
42
|
-
noise gradients are the midpoints of the 12 edges of a cube.
|
43
|
-
*/
|
44
|
-
var grad4/*[32][4]*/ = [0,1,1,1, 0,1,1,-1, 0,1,-1,1, 0,1,-1,-1, // 32 tesseract edges
|
45
|
-
0,-1,1,1, 0,-1,1,-1, 0,-1,-1,1, 0,-1,-1,-1,
|
46
|
-
1,0,1,1, 1,0,1,-1, 1,0,-1,1, 1,0,-1,-1,
|
47
|
-
-1,0,1,1, -1,0,1,-1, -1,0,-1,1, -1,0,-1,-1,
|
48
|
-
1,1,0,1, 1,1,0,-1, 1,-1,0,1, 1,-1,0,-1,
|
49
|
-
-1,1,0,1, -1,1,0,-1, -1,-1,0,1, -1,-1,0,-1,
|
50
|
-
1,1,1,0, 1,1,-1,0, 1,-1,1,0, 1,-1,-1,0,
|
51
|
-
-1,1,1,0, -1,1,-1,0, -1,-1,1,0, -1,-1,-1,0];
|
52
|
-
|
53
|
-
/* This is a look-up table to speed up the decision on which simplex we
|
54
|
-
are in inside a cube or hypercube "cell" for 3D and 4D simplex noise.
|
55
|
-
It is used to avoid complicated nested conditionals in the GLSL code.
|
56
|
-
The table is indexed in GLSL with the results of six pair-wise
|
57
|
-
comparisons beween the components of the P=(x,y,z,w) coordinates
|
58
|
-
within a hypercube cell.
|
59
|
-
c1 = x>=y ? 32 : 0;
|
60
|
-
c2 = x>=z ? 16 : 0;
|
61
|
-
c3 = y>=z ? 8 : 0;
|
62
|
-
c4 = x>=w ? 4 : 0;
|
63
|
-
c5 = y>=w ? 2 : 0;
|
64
|
-
c6 = z>=w ? 1 : 0;
|
65
|
-
offsets = simplex[c1+c2+c3+c4+c5+c6];
|
66
|
-
o1 = step(160,offsets);
|
67
|
-
o2 = step(96,offsets);
|
68
|
-
o3 = step(32,offsets);
|
69
|
-
(For the 3D case, c4, c5, c6 and o3 are not needed.)
|
70
|
-
*/
|
71
|
-
var simplex4/*[][4]*/ = [0,64,128,192, 0,64,192,128, 0,0,0,0, 0,128,192,64,
|
72
|
-
0,0,0,0, 0,0,0,0, 0,0,0,0, 64,128,192,0,
|
73
|
-
0,128,64,192, 0,0,0,0, 0,192,64,128, 0,192,128,64,
|
74
|
-
0,0,0,0, 0,0,0,0, 0,0,0,0, 64,192,128,0,
|
75
|
-
0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0,
|
76
|
-
0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0,
|
77
|
-
64,128,0,192, 0,0,0,0, 64,192,0,128, 0,0,0,0,
|
78
|
-
0,0,0,0, 0,0,0,0, 128,192,0,64, 128,192,64,0,
|
79
|
-
64,0,128,192, 64,0,192,128, 0,0,0,0, 0,0,0,0,
|
80
|
-
0,0,0,0, 128,0,192,64, 0,0,0,0, 128,64,192,0,
|
81
|
-
0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0,
|
82
|
-
0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0,
|
83
|
-
128,0,64,192, 0,0,0,0, 0,0,0,0, 0,0,0,0,
|
84
|
-
192,0,64,128, 192,0,128,64, 0,0,0,0, 192,64,128,0,
|
85
|
-
128,64,0,192, 0,0,0,0, 0,0,0,0, 0,0,0,0,
|
86
|
-
192,64,0,128, 0,0,0,0, 192,128,0,64, 192,128,64,0];
|
87
|
-
|
88
|
-
var simplex_buf = null, perm_buf = null, grad_buf = null;
|
89
|
-
|
90
|
-
/*
|
91
|
-
* initPermTexture() - create and load a 2D texture for
|
92
|
-
* a combined index permutation and gradient lookup table.
|
93
|
-
* This texture is used for 2D and 3D noise, both classic and simplex.
|
94
|
-
*/
|
95
|
-
function initPermTexture(context)
|
96
|
-
{
|
97
|
-
var tex = new Jax.Texture({min_filter: GL_NEAREST, mag_filter: GL_NEAREST, width:256, height:256});
|
98
|
-
|
99
|
-
if (!perm_buf) {
|
100
|
-
var pixels = new Array(256*256*4);
|
101
|
-
var i,j;
|
102
|
-
for(i = 0; i<256; i++)
|
103
|
-
for(j = 0; j<256; j++) {
|
104
|
-
var offset = (i*256+j)*4;
|
105
|
-
var value = perm[(j+perm[i]) & 0xFF];
|
106
|
-
var g = (value & 0x0F) * 3;
|
107
|
-
pixels[offset] = grad3[g+0] * 64 + 64; // Gradient x
|
108
|
-
pixels[offset+1] = grad3[g+1] * 64 + 64; // Gradient y
|
109
|
-
pixels[offset+2] = grad3[g+2] * 64 + 64; // Gradient z
|
110
|
-
pixels[offset+3] = value; // Permuted index
|
111
|
-
}
|
112
|
-
perm_buf = new Uint8Array(pixels);
|
113
|
-
}
|
114
|
-
|
115
|
-
tex.bind(context, function() {
|
116
|
-
context.glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, 256, 256, 0, GL_RGBA, GL_UNSIGNED_BYTE, perm_buf);
|
117
|
-
});
|
118
|
-
|
119
|
-
return tex;
|
120
|
-
}
|
121
|
-
|
122
|
-
/*
|
123
|
-
* initSimplexTexture() - create and load a 1D texture for a
|
124
|
-
* simplex traversal order lookup table. This is used for simplex noise only,
|
125
|
-
* and only for 3D and 4D noise where there are more than 2 simplices.
|
126
|
-
* (3D simplex noise has 6 cases to sort out, 4D simplex noise has 24 cases.)
|
127
|
-
*/
|
128
|
-
function initSimplexTexture(context)
|
129
|
-
{
|
130
|
-
// webgl doesn't support 1D so we'll simulate it with a 64x1 texture
|
131
|
-
|
132
|
-
if (!simplex_buf) simplex_buf = new Uint8Array(simplex4);
|
133
|
-
var tex = new Jax.Texture({min_filter:GL_NEAREST,mag_filter:GL_NEAREST, width:64, height:1});
|
134
|
-
tex.bind(context, function() {
|
135
|
-
context.glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, 64, 1, 0, GL_RGBA, GL_UNSIGNED_BYTE, simplex_buf);
|
136
|
-
});
|
137
|
-
return tex;
|
138
|
-
}
|
139
|
-
|
140
|
-
/*
|
141
|
-
* initGradTexture(context) - create and load a 2D texture
|
142
|
-
* for a 4D gradient lookup table. This is used for 4D noise only.
|
143
|
-
*/
|
144
|
-
function initGradTexture(context)
|
145
|
-
{
|
146
|
-
var tex = new Jax.Texture({min_filter: GL_NEAREST, mag_filter: GL_NEAREST, width:256, height:256});
|
147
|
-
|
148
|
-
if (!grad_buf) {
|
149
|
-
var pixels = new Array(256*256*4);
|
150
|
-
var i,j;
|
151
|
-
|
152
|
-
for(i = 0; i<256; i++)
|
153
|
-
for(j = 0; j<256; j++) {
|
154
|
-
var offset = (i*256+j)*4;
|
155
|
-
var value = perm[(j+perm[i]) & 0xFF];
|
156
|
-
var g = (value & 0x1F) * 4;
|
157
|
-
pixels[offset] = grad4[g+0] * 64 + 64; // Gradient x
|
158
|
-
pixels[offset+1] = grad4[g+1] * 64 + 64; // Gradient y
|
159
|
-
pixels[offset+2] = grad4[g+2] * 64 + 64; // Gradient z
|
160
|
-
pixels[offset+3] = grad4[g+3] * 64 + 64; // Gradient z
|
161
|
-
}
|
162
|
-
|
163
|
-
grad_buf = new Uint8Array(pixels);
|
164
|
-
}
|
165
|
-
|
166
|
-
tex.bind(context, function() {
|
167
|
-
context.glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, 256, 256, 0, GL_RGBA, GL_UNSIGNED_BYTE, grad_buf);
|
168
|
-
});
|
169
|
-
return tex;
|
170
|
-
}
|
171
|
-
|
172
|
-
/**
|
173
|
-
* class Jax.Noise
|
174
|
-
*
|
175
|
-
* Used by +Jax.Material.Noise+.
|
176
|
-
**/
|
177
|
-
return Jax.Class.create({
|
178
|
-
initialize: function(context) {
|
179
|
-
/**
|
180
|
-
* Jax.Noise#perm -> Jax.Texture
|
181
|
-
* A 2D texture for a combined index permutation and gradient lookup table.
|
182
|
-
* This texture is used for both 2D and 3D noise, both classic and simplex.
|
183
|
-
**/
|
184
|
-
this.perm = initPermTexture(context);
|
185
|
-
|
186
|
-
/**
|
187
|
-
* Jax.Noise#simplex -> Jax.Texture
|
188
|
-
* A 1D texture for a simplex transversal order lookup table. This is used
|
189
|
-
* for simplex noise only, and only for 3D and 4D noise where there are more
|
190
|
-
* than 2 simplices. (3D simplex noise has 6 cases to sort out, 4D simplex
|
191
|
-
* noise has 24 cases.)
|
192
|
-
*
|
193
|
-
* Note that WebGL does not support 1D textures, so this is technically a
|
194
|
-
* 2D texture with a height of 1 pixel.
|
195
|
-
**/
|
196
|
-
this.simplex = initSimplexTexture(context);
|
197
|
-
|
198
|
-
/**
|
199
|
-
* Jax.Noise#grad -> Jax.Texture
|
200
|
-
* A 2D texture for a 4D gradient lookup table. This is used for 4D noise
|
201
|
-
* only.
|
202
|
-
**/
|
203
|
-
this.grad = initGradTexture(context);
|
204
|
-
}
|
205
|
-
});
|
206
|
-
})();
|
data/src/jax/prototype/class.js
DELETED
@@ -1,81 +0,0 @@
|
|
1
|
-
//= require "core"
|
2
|
-
|
3
|
-
/**
|
4
|
-
* Jax.Class
|
5
|
-
**/
|
6
|
-
Jax.Class = (function() {
|
7
|
-
var emptyFunction = function() { };
|
8
|
-
|
9
|
-
var IS_DONTENUM_BUGGY = (function(){
|
10
|
-
for (var p in { toString: 1 }) {
|
11
|
-
if (p === 'toString') return false;
|
12
|
-
}
|
13
|
-
return true;
|
14
|
-
})();
|
15
|
-
|
16
|
-
function subclass() {};
|
17
|
-
function create() {
|
18
|
-
var parent = null, properties = Jax.$A(arguments);
|
19
|
-
if (Object.isFunction(properties[0]))
|
20
|
-
parent = properties.shift();
|
21
|
-
|
22
|
-
function klass() {
|
23
|
-
this.initialize.apply(this, arguments);
|
24
|
-
}
|
25
|
-
|
26
|
-
Object.extend(klass, Jax.Class.Methods);
|
27
|
-
klass.superclass = parent;
|
28
|
-
klass.subclasses = [];
|
29
|
-
|
30
|
-
if (parent) {
|
31
|
-
subclass.prototype = parent.prototype;
|
32
|
-
klass.prototype = new subclass;
|
33
|
-
parent.subclasses.push(klass);
|
34
|
-
}
|
35
|
-
|
36
|
-
for (var i = 0, length = properties.length; i < length; i++)
|
37
|
-
klass.addMethods(properties[i]);
|
38
|
-
|
39
|
-
if (!klass.prototype.initialize)
|
40
|
-
klass.prototype.initialize = emptyFunction;
|
41
|
-
|
42
|
-
klass.prototype.constructor = klass;
|
43
|
-
return klass;
|
44
|
-
}
|
45
|
-
|
46
|
-
function addMethods(source) {
|
47
|
-
var ancestor = this.superclass && this.superclass.prototype,
|
48
|
-
properties = Object.keys(source);
|
49
|
-
|
50
|
-
if (IS_DONTENUM_BUGGY) {
|
51
|
-
if (source.toString != Object.prototype.toString)
|
52
|
-
properties.push("toString");
|
53
|
-
if (source.valueOf != Object.prototype.valueOf)
|
54
|
-
properties.push("valueOf");
|
55
|
-
}
|
56
|
-
|
57
|
-
for (var i = 0, length = properties.length; i < length; i++) {
|
58
|
-
var property = properties[i], value = source[property];
|
59
|
-
if (ancestor && Object.isFunction(value) &&
|
60
|
-
value.argumentNames()[0] == "$super") {
|
61
|
-
var method = value;
|
62
|
-
value = (function(m) {
|
63
|
-
return function() { return ancestor[m].apply(this, arguments); };
|
64
|
-
})(property).wrap(method);
|
65
|
-
|
66
|
-
value.valueOf = method.valueOf.bind(method);
|
67
|
-
value.toString = method.toString.bind(method);
|
68
|
-
}
|
69
|
-
this.prototype[property] = value;
|
70
|
-
}
|
71
|
-
|
72
|
-
return this;
|
73
|
-
}
|
74
|
-
|
75
|
-
return {
|
76
|
-
create: create,
|
77
|
-
Methods: {
|
78
|
-
addMethods: addMethods
|
79
|
-
}
|
80
|
-
};
|
81
|
-
})();
|
data/src/jax/prototype/core.js
DELETED
@@ -1,112 +0,0 @@
|
|
1
|
-
/*
|
2
|
-
Core functions borrowed from Prototype. I don't think these are stepping on anyone's (e.g. jQuery's) toes,
|
3
|
-
but if I find out otherwise I'll have to tweak it. The goal here is to be totally compatible with other libraries
|
4
|
-
wherever possible.
|
5
|
-
*/
|
6
|
-
|
7
|
-
Jax.$A = function(iterable) {
|
8
|
-
if (!iterable) return [];
|
9
|
-
if ('toArray' in Object(iterable)) return iterable.toArray();
|
10
|
-
var length = iterable.length || 0, results = new Array(length);
|
11
|
-
while (length--) results[length] = iterable[length];
|
12
|
-
return results;
|
13
|
-
};
|
14
|
-
|
15
|
-
/* TODO find a way to avoid polluting Object. */
|
16
|
-
Object.isFunction = function(arg) { return Object.prototype.toString.call(arg) === '[object Function]'; };
|
17
|
-
Object.isUndefined = function(object) { return typeof object === "undefined"; };
|
18
|
-
Object.isArray = function(object) { return Object.prototype.toString.call(object) === '[object Array]'; };
|
19
|
-
Object.extend = function(destination, source) {
|
20
|
-
for (var property in source)
|
21
|
-
destination[property] = source[property];
|
22
|
-
return destination;
|
23
|
-
};
|
24
|
-
|
25
|
-
Object.extend(Function.prototype, (function() {
|
26
|
-
var slice = Array.prototype.slice;
|
27
|
-
|
28
|
-
function update(array, args) {
|
29
|
-
var arrayLength = array.length, length = args.length;
|
30
|
-
while (length--) array[arrayLength + length] = args[length];
|
31
|
-
return array;
|
32
|
-
}
|
33
|
-
|
34
|
-
function merge(array, args) {
|
35
|
-
array = slice.call(array, 0);
|
36
|
-
return update(array, args);
|
37
|
-
}
|
38
|
-
|
39
|
-
function argumentNames() {
|
40
|
-
var names = this.toString().match(/^[\s\(]*function[^(]*\(([^)]*)\)/)[1]
|
41
|
-
.replace(/\/\/.*?[\r\n]|\/\*(?:.|[\r\n])*?\*\//g, '')
|
42
|
-
.replace(/\s+/g, '').split(',');
|
43
|
-
return names.length == 1 && !names[0] ? [] : names;
|
44
|
-
}
|
45
|
-
|
46
|
-
function bind(context) {
|
47
|
-
if (arguments.length < 2 && Object.isUndefined(arguments[0])) return this;
|
48
|
-
var __method = this, args = slice.call(arguments, 1);
|
49
|
-
return function() {
|
50
|
-
var a = merge(args, arguments);
|
51
|
-
return __method.apply(context, a);
|
52
|
-
}
|
53
|
-
}
|
54
|
-
|
55
|
-
function bindAsEventListener(context) {
|
56
|
-
var __method = this, args = slice.call(arguments, 1);
|
57
|
-
return function(event) {
|
58
|
-
var a = update([event || window.event], args);
|
59
|
-
return __method.apply(context, a);
|
60
|
-
}
|
61
|
-
}
|
62
|
-
|
63
|
-
function curry() {
|
64
|
-
if (!arguments.length) return this;
|
65
|
-
var __method = this, args = slice.call(arguments, 0);
|
66
|
-
return function() {
|
67
|
-
var a = merge(args, arguments);
|
68
|
-
return __method.apply(this, a);
|
69
|
-
}
|
70
|
-
}
|
71
|
-
|
72
|
-
function delay(timeout) {
|
73
|
-
var __method = this, args = slice.call(arguments, 1);
|
74
|
-
timeout = timeout * 1000;
|
75
|
-
return window.setTimeout(function() {
|
76
|
-
return __method.apply(__method, args);
|
77
|
-
}, timeout);
|
78
|
-
}
|
79
|
-
|
80
|
-
function defer() {
|
81
|
-
var args = update([0.01], arguments);
|
82
|
-
return this.delay.apply(this, args);
|
83
|
-
}
|
84
|
-
|
85
|
-
function wrap(wrapper) {
|
86
|
-
var __method = this;
|
87
|
-
return function() {
|
88
|
-
var a = update([__method.bind(this)], arguments);
|
89
|
-
return wrapper.apply(this, a);
|
90
|
-
}
|
91
|
-
}
|
92
|
-
|
93
|
-
function methodize() {
|
94
|
-
if (this._methodized) return this._methodized;
|
95
|
-
var __method = this;
|
96
|
-
return this._methodized = function() {
|
97
|
-
var a = update([this], arguments);
|
98
|
-
return __method.apply(null, a);
|
99
|
-
};
|
100
|
-
}
|
101
|
-
|
102
|
-
return {
|
103
|
-
argumentNames: argumentNames,
|
104
|
-
bind: bind,
|
105
|
-
bindAsEventListener: bindAsEventListener,
|
106
|
-
curry: curry,
|
107
|
-
delay: delay,
|
108
|
-
defer: defer,
|
109
|
-
wrap: wrap,
|
110
|
-
methodize: methodize
|
111
|
-
};
|
112
|
-
})());
|