joybox 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/Gemfile.lock +1 -1
- data/LICENSE +1 -1
- data/LICENSE_Box2D +20 -0
- data/LICENSE_Cocos2D +24 -0
- data/README.md +34 -66
- data/Rakefile +2 -3
- data/bin/joybox +49 -0
- data/command/joybox/USAGE +24 -0
- data/command/joybox/templates/layer.erb +11 -0
- data/command/joybox/templates/layer_spec.erb +3 -0
- data/command/joybox/templates/scene.erb +11 -0
- data/command/joybox/templates/scene_spec.erb +3 -0
- data/command/joybox/templates/sprite.erb +11 -0
- data/command/joybox/templates/sprite_spec.erb +3 -0
- data/command/joybox_generate_command.rb +114 -0
- data/joybox.gemspec +44 -0
- data/lib/joybox/joybox-ios.rb +47 -0
- data/lib/joybox/joybox-osx.rb +47 -0
- data/lib/joybox/version.rb +1 -1
- data/lib/joybox.rb +18 -36
- data/{lib/joybox/cocos2d → motion/joybox}/actions/actions.rb +0 -0
- data/motion/joybox/actions/animate.rb +22 -0
- data/motion/joybox/actions/bezier.rb +33 -0
- data/motion/joybox/actions/blink.rb +24 -0
- data/motion/joybox/actions/ease.rb +149 -0
- data/motion/joybox/actions/fade.rb +38 -0
- data/motion/joybox/actions/jump.rb +39 -0
- data/{lib/joybox/cocos2d → motion/joybox}/actions/move.rb +4 -2
- data/motion/joybox/actions/place.rb +22 -0
- data/{lib/joybox/cocos2d → motion/joybox}/actions/repeat.rb +10 -1
- data/{lib/joybox/cocos2d → motion/joybox}/actions/rotate.rb +4 -2
- data/{lib/joybox/cocos2d → motion/joybox}/actions/scale.rb +4 -2
- data/{lib/joybox/cocos2d → motion/joybox}/actions/sequence.rb +3 -3
- data/{lib/joybox/cocos2d → motion/joybox}/actions/skew.rb +0 -0
- data/motion/joybox/actions/spawn.rb +22 -0
- data/motion/joybox/actions/tint.rb +37 -0
- data/motion/joybox/animations/animation.rb +60 -0
- data/{lib/joybox/cocos2d → motion/joybox}/common/color.rb +12 -1
- data/{lib/joybox/cocos2d → motion/joybox}/common/gc_size.rb +4 -4
- data/{lib/joybox/cocos2d → motion/joybox}/common/ns_set.rb +0 -0
- data/{lib/joybox/cocos2d → motion/joybox}/common/numeric.rb +0 -0
- data/{lib/joybox/cocos2d → motion/joybox}/common/screen.rb +4 -4
- data/motion/joybox/core/layer.rb +51 -0
- data/{lib/joybox/cocos2d → motion/joybox}/core/node.rb +0 -0
- data/{lib/joybox/cocos2d → motion/joybox}/core/scene.rb +0 -0
- data/{lib/joybox/cocos2d → motion/joybox}/core/sprite.rb +22 -3
- data/{lib/joybox/cocos2d → motion/joybox}/core/sprite_batch.rb +0 -0
- data/motion/joybox/core/sprite_frame_cache.rb +147 -0
- data/{lib/joybox/cocos2d/cocos2d.rb → motion/joybox/joybox.rb} +3 -1
- data/{lib/joybox/cocos2d → motion/joybox}/macros.rb +0 -0
- data/{lib/joybox/box2d → motion/joybox/physics}/body.rb +44 -17
- data/{lib/joybox/cocos2d/core → motion/joybox/physics}/physics_sprite.rb +1 -1
- data/motion/joybox/physics/world.rb +79 -0
- data/{lib/joybox/cocos2d → motion/joybox}/ui/label.rb +3 -2
- data/{lib/joybox/cocos2d → motion/joybox}/ui/menu.rb +0 -0
- data/{lib/joybox/cocos2d → motion/joybox}/ui/menu_image.rb +0 -0
- data/{lib/joybox/cocos2d → motion/joybox}/ui/menu_label.rb +0 -0
- data/{lib/joybox/cocos2d → motion/joybox}/ui/ui.rb +0 -0
- data/{lib/joybox/cocos2d → motion/joybox-ios}/common/cg_point.rb +9 -2
- data/{lib/joybox/cocos2d → motion/joybox-ios}/common/ui_touch.rb +1 -1
- data/{lib/joybox/cocos2d → motion/joybox-ios}/configuration/configuration.rb +0 -0
- data/{lib/joybox/cocos2d → motion/joybox-ios}/configuration/file_utils.rb +0 -3
- data/{lib/joybox/cocos2d → motion/joybox-ios}/configuration/gl_view.rb +0 -0
- data/{lib/joybox/cocos2d → motion/joybox-ios}/configuration/texture_2d.rb +0 -0
- data/{lib/joybox/cocos2d → motion/joybox-ios}/core/layer.rb +1 -45
- data/{lib/joybox/cocos2d → motion/joybox-ios}/director.rb +6 -6
- data/motion/joybox-osx/common/ats_point.rb +48 -0
- data/motion/joybox-osx/common/ns_event.rb +8 -0
- data/motion/joybox-osx/configuration/configuration.rb +46 -0
- data/motion/joybox-osx/configuration/gl_view.rb +57 -0
- data/motion/joybox-osx/core/layer.rb +135 -0
- data/motion/joybox-osx/director.rb +42 -0
- data/template/joybox-ios/files/Rakefile.erb +9 -0
- data/{app → template/joybox-ios/files/app}/app_delegate.rb +1 -5
- data/{resources → template/joybox-ios/files/resources}/fps_images-hd.png +0 -0
- data/{resources → template/joybox-ios/files/resources}/fps_images-ipadhd.png +0 -0
- data/{resources → template/joybox-ios/files/resources}/fps_images.png +0 -0
- data/template/joybox-ios/files/spec/main_spec.rb.erb +9 -0
- data/template/joybox-osx/files/Rakefile.erb +9 -0
- data/template/joybox-osx/files/app/app_delegate.rb +23 -0
- data/template/joybox-osx/files/app/layers/default_layer.rb +5 -0
- data/template/joybox-osx/files/app/menu.rb +51 -0
- data/template/joybox-osx/files/resources/Credits.rtf +29 -0
- data/template/joybox-osx/files/resources/fps_images-hd.png +0 -0
- data/template/joybox-osx/files/resources/fps_images-ipadhd.png +0 -0
- data/template/joybox-osx/files/resources/fps_images.png +0 -0
- data/template/joybox-osx/files/spec/main_spec.rb.erb +9 -0
- data/vendor/{Box2D.framework → vendor-ios/Box2D.framework}/Box2D +0 -0
- data/vendor/{Box2D.framework → vendor-ios/Box2D.framework}/Box2D.framework.bridgesupport +47 -37
- data/vendor/{Box2D.framework → vendor-ios/Box2D.framework}/Versions/A/Box2D +0 -0
- data/vendor/{Box2D.framework → vendor-ios/Box2D.framework}/Versions/A/Headers/Collision/B2DContactListener.h +0 -0
- data/vendor/vendor-ios/Box2D.framework/Versions/A/Headers/Collision/Shapes/B2DCircleShape.h +16 -0
- data/vendor/{Box2D.framework → vendor-ios/Box2D.framework}/Versions/A/Headers/Collision/Shapes/B2DEdgeShape.h +0 -0
- data/vendor/{Box2D.framework → vendor-ios/Box2D.framework}/Versions/A/Headers/Collision/Shapes/B2DPolygonShape.h +0 -0
- data/vendor/{Box2D.framework → vendor-ios/Box2D.framework}/Versions/A/Headers/Collision/Shapes/B2DShape.h +0 -0
- data/vendor/{Box2D.framework → vendor-ios/Box2D.framework}/Versions/A/Headers/Dynamics/B2DBody.h +6 -6
- data/vendor/{Box2D.framework → vendor-ios/Box2D.framework}/Versions/A/Headers/Dynamics/B2DWorld.h +0 -0
- data/vendor/{Box2D.framework → vendor-ios/Box2D.framework}/Versions/A/Resources/Box2DConfig.cmake +0 -0
- data/vendor/{Box2D.framework → vendor-ios/Box2D.framework}/Versions/A/Resources/CMakeLists.txt +0 -0
- data/vendor/vendor-ios/Box2D.framework/Versions/A/Resources/LICENSE +22 -0
- data/vendor/vendor-ios/cocos_2d/cocos_2d.bridgesupport +9154 -0
- data/vendor/vendor-ios/cocos_2d/cocos_2d_exceptions.bridgesupport +39 -0
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCAction.h +23 -23
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCActionCamera.h +21 -19
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCActionCatmullRom.h +18 -6
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCActionEase.h +117 -31
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCActionGrid.h +19 -17
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCActionGrid3D.h +45 -42
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCActionInstant.h +21 -13
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCActionInterval.h +123 -81
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCActionManager.h +2 -2
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCActionPageTurn3D.h +2 -1
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCActionProgressTimer.h +4 -4
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCActionTiledGrid.h +46 -38
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCActionTween.h +3 -3
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCAnimation.h +8 -8
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCAnimationCache.h +2 -2
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCAtlasNode.h +19 -17
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCCamera.h +12 -12
- data/vendor/vendor-ios/cocos_2d/include/CCClippingNode.h +77 -0
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCConfiguration.h +31 -13
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCDirector.h +51 -42
- data/vendor/vendor-ios/cocos_2d/include/CCDrawNode.h +65 -0
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCDrawingPrimitives.h +42 -8
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCGLProgram.h +56 -21
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCGrabber.h +2 -2
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCGrid.h +29 -29
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCLabelAtlas.h +5 -2
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCLabelBMFont.h +56 -32
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCLabelTTF.h +20 -20
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCLayer.h +107 -79
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCMenu.h +10 -14
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCMenuItem.h +37 -32
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCMotionStreak.h +18 -19
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCNode+Debug.h +0 -0
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCNode.h +87 -37
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCParallaxNode.h +2 -2
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCParticleBatchNode.h +2 -2
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCParticleExamples.h +22 -0
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCParticleSystem.h +51 -40
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCParticleSystemQuad.h +4 -4
- data/vendor/vendor-ios/cocos_2d/include/CCPhysicsDebugNode.h +58 -0
- data/vendor/vendor-ios/cocos_2d/include/CCPhysicsSprite.h +82 -0
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCProgressTimer.h +9 -11
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCProtocols.h +54 -26
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCRenderTexture.h +29 -9
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCScene.h +4 -0
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCScheduler.h +94 -40
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCShaderCache.h +1 -1
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCSprite.h +21 -28
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCSpriteBatchNode.h +16 -9
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCSpriteFrame.h +10 -10
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCSpriteFrameCache.h +6 -6
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCTMXLayer.h +16 -16
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCTMXObjectGroup.h +4 -4
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCTMXTiledMap.h +9 -9
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCTMXXMLParser.h +44 -33
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCTexture2D.h +17 -25
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCTextureAtlas.h +10 -10
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCTextureCache.h +4 -4
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCTexturePVR.h +25 -8
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCTileMapAtlas.h +6 -6
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCTransition.h +57 -12
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCTransitionPageTurn.h +2 -2
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCTransitionProgress.h +27 -5
- data/vendor/{Cocos2D/include → vendor-ios/cocos_2d/include/Platforms}/CCGL.h +4 -2
- data/vendor/{Cocos2D/include → vendor-ios/cocos_2d/include/Platforms}/CCNS.h +0 -0
- data/vendor/vendor-ios/cocos_2d/include/Platforms/Mac/CCDirectorMac.h +110 -0
- data/vendor/vendor-ios/cocos_2d/include/Platforms/Mac/CCEventDispatcher.h +343 -0
- data/vendor/vendor-ios/cocos_2d/include/Platforms/Mac/CCGLView.h +103 -0
- data/vendor/vendor-ios/cocos_2d/include/Platforms/Mac/CCWindow.h +41 -0
- data/vendor/{Cocos2D/include → vendor-ios/cocos_2d/include/Platforms/iOS}/CCDirectorIOS.h +12 -5
- data/vendor/{Cocos2D/include → vendor-ios/cocos_2d/include/Platforms/iOS}/CCES2Renderer.h +12 -12
- data/vendor/{Cocos2D/include → vendor-ios/cocos_2d/include/Platforms/iOS}/CCESRenderer.h +0 -0
- data/vendor/{Cocos2D/include → vendor-ios/cocos_2d/include/Platforms/iOS}/CCGLView.h +28 -13
- data/vendor/{Cocos2D/include → vendor-ios/cocos_2d/include/Platforms/iOS}/CCTouchDelegateProtocol.h +4 -4
- data/vendor/{Cocos2D/include → vendor-ios/cocos_2d/include/Platforms/iOS}/CCTouchDispatcher.h +2 -2
- data/vendor/{Cocos2D/include → vendor-ios/cocos_2d/include/Platforms/iOS}/CCTouchHandler.h +7 -7
- data/vendor/{Cocos2D/include → vendor-ios/cocos_2d/include/Support}/CCArray.h +1 -1
- data/vendor/vendor-ios/cocos_2d/include/Support/CCFileUtils.h +394 -0
- data/vendor/{Cocos2D/include → vendor-ios/cocos_2d/include/Support}/CCProfiling.h +0 -0
- data/vendor/{Cocos2D/include → vendor-ios/cocos_2d/include/Support}/CCVertex.h +1 -1
- data/vendor/{Cocos2D/include → vendor-ios/cocos_2d/include/Support}/CGPointExtension.h +4 -2
- data/vendor/{Cocos2D/include → vendor-ios/cocos_2d/include/Support}/NSThread+performBlock.h +0 -0
- data/vendor/{Cocos2D/include → vendor-ios/cocos_2d/include/Support}/OpenGL_Internal.h +0 -0
- data/vendor/{Cocos2D/include → vendor-ios/cocos_2d/include/Support}/TGAlib.h +0 -0
- data/vendor/{Cocos2D/include → vendor-ios/cocos_2d/include/Support}/TransformUtils.h +0 -0
- data/vendor/{Cocos2D/include → vendor-ios/cocos_2d/include/Support}/ZipUtils.h +4 -4
- data/vendor/{Cocos2D/include → vendor-ios/cocos_2d/include/Support}/base64.h +0 -0
- data/vendor/{Cocos2D/include → vendor-ios/cocos_2d/include/Support}/ccCArray.h +15 -15
- data/vendor/{Cocos2D/include → vendor-ios/cocos_2d/include/Support}/ccUtils.h +0 -0
- data/vendor/{Cocos2D/include → vendor-ios/cocos_2d/include/Support}/uthash.h +129 -184
- data/vendor/{Cocos2D/include → vendor-ios/cocos_2d/include/Support}/utlist.h +298 -55
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/ccConfig.h +56 -9
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/ccDeprecated.h +131 -0
- data/vendor/vendor-ios/cocos_2d/include/ccFPSImages.h +39 -0
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/ccGLStateCache.h +44 -26
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/ccMacros.h +9 -9
- data/vendor/vendor-ios/cocos_2d/include/ccShader_PositionColorLengthTexture_frag.h +41 -0
- data/vendor/vendor-ios/cocos_2d/include/ccShader_PositionColorLengthTexture_vert.h +47 -0
- data/vendor/vendor-ios/cocos_2d/include/ccShader_PositionColor_frag.h +37 -0
- data/vendor/vendor-ios/cocos_2d/include/ccShader_PositionColor_vert.h +40 -0
- data/vendor/vendor-ios/cocos_2d/include/ccShader_PositionTextureA8Color_frag.h +41 -0
- data/vendor/vendor-ios/cocos_2d/include/ccShader_PositionTextureA8Color_vert.h +45 -0
- data/vendor/vendor-ios/cocos_2d/include/ccShader_PositionTextureColorAlphaTest_frag.h +47 -0
- data/vendor/vendor-ios/cocos_2d/include/ccShader_PositionTextureColor_frag.h +39 -0
- data/vendor/vendor-ios/cocos_2d/include/ccShader_PositionTextureColor_vert.h +45 -0
- data/vendor/vendor-ios/cocos_2d/include/ccShader_PositionTexture_frag.h +38 -0
- data/vendor/vendor-ios/cocos_2d/include/ccShader_PositionTexture_uColor_frag.h +41 -0
- data/vendor/vendor-ios/cocos_2d/include/ccShader_PositionTexture_uColor_vert.h +41 -0
- data/vendor/vendor-ios/cocos_2d/include/ccShader_PositionTexture_vert.h +41 -0
- data/vendor/vendor-ios/cocos_2d/include/ccShader_Position_uColor_frag.h +37 -0
- data/vendor/vendor-ios/cocos_2d/include/ccShader_Position_uColor_vert.h +43 -0
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/ccShaders.h +11 -0
- data/vendor/vendor-ios/cocos_2d/include/ccTypes.h +392 -0
- data/vendor/vendor-ios/cocos_2d/include/cocos2d-ios-exceptions.bridgesupport +39 -0
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/cocos2d.h +28 -3
- data/vendor/vendor-ios/cocos_2d/include/gen_cocos2d_bridgesupport.sh +17 -0
- data/vendor/vendor-ios/cocos_2d/include/gen_cocos2d_complement.sh +17 -0
- data/vendor/vendor-ios/cocos_2d/libcocos2d.a +0 -0
- data/vendor/vendor-osx/box_2d/box_2d.bridgesupport +176 -0
- data/vendor/vendor-osx/box_2d/include/B2DBody.h +46 -0
- data/vendor/vendor-osx/box_2d/include/B2DCircleShape.h +16 -0
- data/vendor/vendor-osx/box_2d/include/B2DContactListener.h +30 -0
- data/vendor/vendor-osx/box_2d/include/B2DEdgeShape.h +17 -0
- data/vendor/vendor-osx/box_2d/include/B2DPolygonShape.h +16 -0
- data/vendor/vendor-osx/box_2d/include/B2DShape.h +18 -0
- data/vendor/vendor-osx/box_2d/include/B2DWorld.h +44 -0
- data/vendor/vendor-osx/box_2d/libBox2D.a +0 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d.bridgesupport +8292 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCAction.h +195 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCActionCamera.h +75 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCActionCatmullRom.h +151 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCActionEase.h +245 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCActionGrid.h +167 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCActionGrid3D.h +208 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCActionInstant.h +235 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCActionInterval.h +473 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCActionManager.h +113 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCActionPageTurn3D.h +43 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCActionProgressTimer.h +59 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCActionTiledGrid.h +219 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCActionTween.h +62 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCAnimation.h +150 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCAnimationCache.h +74 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCAtlasNode.h +98 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCCamera.h +98 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCClippingNode.h +77 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCConfiguration.h +144 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCDirector.h +353 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCDrawNode.h +65 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCDrawingPrimitives.h +173 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCGLProgram.h +185 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCGrabber.h +44 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCGrid.h +130 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCLabelAtlas.h +71 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCLabelBMFont.h +240 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCLabelTTF.h +132 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCLayer.h +308 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCMenu.h +96 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCMenuItem.h +428 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCMotionStreak.h +86 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCNode+Debug.h +39 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCNode.h +619 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCParallaxNode.h +50 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCParticleBatchNode.h +99 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCParticleExamples.h +117 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCParticleSystem.h +464 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCParticleSystemQuad.h +73 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCPhysicsDebugNode.h +58 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCPhysicsSprite.h +82 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCProgressTimer.h +92 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCProtocols.h +160 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCRenderTexture.h +159 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCScene.h +47 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCScheduler.h +284 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCShaderCache.h +60 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCSprite.h +281 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCSpriteBatchNode.h +145 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCSpriteFrame.h +126 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCSpriteFrameCache.h +121 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCTMXLayer.h +164 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCTMXObjectGroup.h +67 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCTMXTiledMap.h +145 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCTMXXMLParser.h +228 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCTexture2D.h +349 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCTextureAtlas.h +188 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCTextureCache.h +146 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCTexturePVR.h +146 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCTileMapAtlas.h +83 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCTransition.h +341 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCTransitionPageTurn.h +60 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCTransitionProgress.h +84 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/Platforms/CCGL.h +74 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/Platforms/CCNS.h +54 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/Platforms/Mac/CCDirectorMac.h +110 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/Platforms/Mac/CCEventDispatcher.h +343 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/Platforms/Mac/CCGLView.h +103 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/Platforms/Mac/CCWindow.h +41 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/Support/CCArray.h +119 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/Support/CCFileUtils.h +394 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/Support/CCProfiling.h +89 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/Support/CCVertex.h +36 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/Support/CGPointExtension.h +346 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/Support/NSThread+performBlock.h +22 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/Support/OpenGL_Internal.h +86 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/Support/TGAlib.h +55 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/Support/TransformUtils.h +36 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/Support/ZipUtils.h +91 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/Support/base64.h +33 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/Support/ccCArray.h +229 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/Support/ccUtils.h +36 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/Support/uthash.h +917 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/Support/utlist.h +733 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/ccConfig.h +292 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/ccDeprecated.h +431 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/ccFPSImages.h +39 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/ccGLStateCache.h +156 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/ccMacros.h +353 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/ccShader_PositionColorLengthTexture_frag.h +41 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/ccShader_PositionColorLengthTexture_vert.h +47 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/ccShader_PositionColor_frag.h +37 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/ccShader_PositionColor_vert.h +40 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/ccShader_PositionTextureA8Color_frag.h +41 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/ccShader_PositionTextureA8Color_vert.h +45 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/ccShader_PositionTextureColorAlphaTest_frag.h +47 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/ccShader_PositionTextureColor_frag.h +39 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/ccShader_PositionTextureColor_vert.h +45 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/ccShader_PositionTexture_frag.h +38 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/ccShader_PositionTexture_uColor_frag.h +41 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/ccShader_PositionTexture_uColor_vert.h +41 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/ccShader_PositionTexture_vert.h +41 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/ccShader_Position_uColor_frag.h +37 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/ccShader_Position_uColor_vert.h +43 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/ccShaders.h +56 -0
- data/vendor/{Cocos2D/include → vendor-osx/cocos_2d/cocos_2d_include}/ccTypes.h +39 -35
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/cocos2d.h +203 -0
- data/vendor/vendor-osx/cocos_2d/libcocos2d.a +0 -0
- metadata +363 -195
- data/app/layers/box2d_layer.rb +0 -109
- data/app/layers/cocos2d_layer.rb +0 -14
- data/app/layers/cocos_motion_layer.rb +0 -145
- data/app/layers/menu_layer.rb +0 -59
- data/lib/joybox/box2d/world.rb +0 -79
- data/resources/box2d/blocks_sprite_sheet.png +0 -0
- data/resources/cocos_motion/dot.png +0 -0
- data/resources/cocos_motion/dot_selected.png +0 -0
- data/resources/cocos_motion/grossini.png +0 -0
- data/resources/cocos_motion/grossinis_sister.png +0 -0
- data/resources/cocos_motion/grossinis_sister_two.png +0 -0
- data/resources/cocos_motion/left_arrow.png +0 -0
- data/resources/cocos_motion/left_arrow_selected.png +0 -0
- data/resources/cocos_motion/right_arrow.png +0 -0
- data/resources/cocos_motion/right_arrow_selected.png +0 -0
- data/vendor/Cocos2D/Cocos2D.bridgesupport +0 -7808
- data/vendor/Cocos2D/include/CCFileUtils.h +0 -188
- data/vendor/Cocos2D/include/CocosDenshion/CDAudioManager.h +0 -243
- data/vendor/Cocos2D/include/CocosDenshion/CDConfig.h +0 -60
- data/vendor/Cocos2D/include/CocosDenshion/CDOpenALSupport.h +0 -77
- data/vendor/Cocos2D/include/CocosDenshion/CDXPropertyModifierAction.h +0 -45
- data/vendor/Cocos2D/include/CocosDenshion/CocosDenshion.h +0 -440
- data/vendor/Cocos2D/include/CocosDenshion/SimpleAudioEngine.h +0 -90
- data/vendor/Cocos2D/include/RubyMotionSchedule.h +0 -7
- data/vendor/Cocos2D/include/ccShader_PositionColor_frag.h +0 -12
- data/vendor/Cocos2D/include/ccShader_PositionColor_vert.h +0 -17
- data/vendor/Cocos2D/include/ccShader_PositionTextureA8Color_frag.h +0 -16
- data/vendor/Cocos2D/include/ccShader_PositionTextureA8Color_vert.h +0 -21
- data/vendor/Cocos2D/include/ccShader_PositionTextureColorAlphaTest_frag.h +0 -23
- data/vendor/Cocos2D/include/ccShader_PositionTextureColor_frag.h +0 -14
- data/vendor/Cocos2D/include/ccShader_PositionTextureColor_vert.h +0 -22
- data/vendor/Cocos2D/include/ccShader_PositionTexture_frag.h +0 -13
- data/vendor/Cocos2D/include/ccShader_PositionTexture_uColor_frag.h +0 -16
- data/vendor/Cocos2D/include/ccShader_PositionTexture_uColor_vert.h +0 -18
- data/vendor/Cocos2D/include/ccShader_PositionTexture_vert.h +0 -17
- data/vendor/Cocos2D/include/ccShader_Position_uColor_frag.h +0 -12
- data/vendor/Cocos2D/include/ccShader_Position_uColor_vert.h +0 -19
- data/vendor/Cocos2D/include/kazmath/GL/mat4stack.h +0 -51
- data/vendor/Cocos2D/include/kazmath/GL/matrix.h +0 -58
- data/vendor/Cocos2D/include/kazmath/aabb.h +0 -53
- data/vendor/Cocos2D/include/kazmath/kazmath.h +0 -39
- data/vendor/Cocos2D/include/kazmath/mat3.h +0 -75
- data/vendor/Cocos2D/include/kazmath/mat4.h +0 -93
- data/vendor/Cocos2D/include/kazmath/neon_matrix_impl.h +0 -41
- data/vendor/Cocos2D/include/kazmath/plane.h +0 -70
- data/vendor/Cocos2D/include/kazmath/quaternion.h +0 -113
- data/vendor/Cocos2D/include/kazmath/ray2.h +0 -50
- data/vendor/Cocos2D/include/kazmath/utility.h +0 -74
- data/vendor/Cocos2D/include/kazmath/vec2.h +0 -64
- data/vendor/Cocos2D/include/kazmath/vec3.h +0 -68
- data/vendor/Cocos2D/include/kazmath/vec4.h +0 -68
- data/vendor/Cocos2D/libCocosDenshion.a +0 -0
- data/vendor/Cocos2D/libcocos2d.a +0 -0
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ODczNzk5MjM1YzkyNWM0NDJlZjAxZjkzNDdlOGNhYmNjYmNkODY2MQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
NWVjMjU5MjA5NDM4YjViY2UzZjJhODc3Y2IxNWYzNzNmYzYyY2E5Mg==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ODEzZTdmNmY3MGYzZTk2YTA4NDNkMGY0NjNjNmI1NGI1YTg5NzM4Y2ZiYzVl
|
10
|
+
YWU1YTlkNWE3YTQ4NGNiN2EzYWRjZDkxNTFlYWM3NDEzMjI1ZWEzMTc5ZTIy
|
11
|
+
Nzg2ZDUzZWFkYjhmODJhNjJhMDE5ZTgyMmEyZDlhZDUwNDgxZDg=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
YTQxZjMzMDQ5MmM5YTg4NWQzMDVlNWQ0NzExMjcxNGM3MjNlMWFlNjAyYTdh
|
14
|
+
NjE4N2E1ZDAwMjY4NTRkNTU4YTUyNzIxOGMxNzcwMjQ5NjE0NzZhYWQ5NWNh
|
15
|
+
MjQ0NmNiYWJiZmI2OGE2YmViYzQ3YWMyYTFmNTE3OGJlYjc4MzI=
|
data/Gemfile.lock
CHANGED
data/LICENSE
CHANGED
data/LICENSE_Box2D
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
http://box2d.org/
|
2
|
+
|
3
|
+
Copyright (c) 2006-2007 Erin Catto http://www.gphysics.com
|
4
|
+
|
5
|
+
This software is provided 'as-is', without any express or implied
|
6
|
+
warranty. In no event will the authors be held liable for any damages
|
7
|
+
arising from the use of this software.
|
8
|
+
|
9
|
+
Permission is granted to anyone to use this software for any purpose,
|
10
|
+
including commercial applications, and to alter it and redistribute it
|
11
|
+
freely, subject to the following restrictions:
|
12
|
+
|
13
|
+
1. The origin of this software must not be misrepresented; you must not
|
14
|
+
claim that you wrote the original software. If you use this software
|
15
|
+
in a product, an acknowledgment in the product documentation would be
|
16
|
+
appreciated but is not required.
|
17
|
+
2. Altered source versions must be plainly marked as such, and must not be
|
18
|
+
misrepresented as being the original software.
|
19
|
+
3. This notice may not be removed or altered from any source distribution.
|
20
|
+
|
data/LICENSE_Cocos2D
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
cocos2d for iPhone: http://www.cocos2d-iphone.org
|
2
|
+
|
3
|
+
Copyright (c) 2008-2011 - Ricardo Quesada and contributors
|
4
|
+
Copyright (c) 2011-2012 - Zynga Inc. and contributors
|
5
|
+
(see each file to see the different copyright owners)
|
6
|
+
|
7
|
+
|
8
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
9
|
+
of this software and associated documentation files (the "Software"), to deal
|
10
|
+
in the Software without restriction, including without limitation the rights
|
11
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
12
|
+
copies of the Software, and to permit persons to whom the Software is
|
13
|
+
furnished to do so, subject to the following conditions:
|
14
|
+
|
15
|
+
The above copyright notice and this permission notice shall be included in
|
16
|
+
all copies or substantial portions of the Software.
|
17
|
+
|
18
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
19
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
20
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
21
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
22
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
23
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
24
|
+
THE SOFTWARE.
|
data/README.md
CHANGED
@@ -1,71 +1,40 @@
|
|
1
1
|
# Joybox
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
2
|
+
Introduced at [#Inspect 2013](http://www.rubymotion.com/conference/), Joybox is the easiest way to build 2D games for iPhones and iPads using [RubyMotion](http://www.rubymotion.com/). Joybox combines the most popular and widely used 2D game engine for iOS, [Cocos2D](http://www.cocos2d-iphone.org/), folds in the amazing [Box2D](http://box2d.org/) physics engine, and then wraps them up into a clean Ruby API that will make game development faster and more enjoyable for both beginners and experts alike.
|
3
|
+
|
4
|
+
For more information, see the presentation: [Cocos2D, an Easier Way](https://speakerdeck.com/curveberyl/cocos2d-an-easier-way).
|
5
|
+
|
6
|
+
## Latest version history (0.0.6)
|
7
|
+
* Added OSX development support. Use 'motion create --template=joybox-osx' to create
|
8
|
+
an OSX project.
|
9
|
+
* Added Ruby Motion Template support. Use 'joybox install' to install the templates (joybox-ios & joybox-osx)
|
10
|
+
* Added Ruby Motion Command support. Use 'motion joybox:generate <class> <name>' to generate Sprites, Layers and Scene subclases and their respective specs.
|
11
|
+
* Added Circle Shape to Box2D Fixtures. Thank you Kenichi Yonekawa!
|
12
|
+
* Added Sprite Batch & Sprite Frame Cache full support.
|
13
|
+
* Added Animations and Animate Action.
|
14
|
+
* Added Bezier, Blink, Fade, Jump, Place, Spawn, Tint action. Thanks Gabriel Sosa!
|
15
|
+
* Added Repeat.with actions:<array of actions> times:<number of times> method to Repeat class.
|
16
|
+
* IMPORTANT: Changed Sequence.new items:<array of actions> for Sequence.with actions:<array of actions> in Sequence class.
|
17
|
+
* IMPORTANT: Typo fix in the Body class, changing edge_fixure and polygon_fixure to edge_fixture and polygon_fixture.
|
18
|
+
* Better bridgesupport generation :D, thank you Laurent Sansonetti!
|
19
|
+
* Added: mouse and keyboard events to joybox-osx.
|
20
|
+
* Joybox is stopping the madness! **Thanks all** for your support!
|
21
|
+
|
22
|
+
## Documentation and Getting Started
|
23
|
+
If you are looking for the installation process and the documentation, please visit: [joybox.io](http://joybox.io)
|
24
|
+
|
25
|
+
Also you can look at some examples in this repository: [Joybox - Examples](https://github.com/CurveBeryl/Joybox-Examples)
|
14
26
|
|
15
27
|
## Feedback and Help
|
28
|
+
For questions, feedback, bug reports, use the project's [Issue Tracker](https://github.com/rubymotion/Joybox/issues).
|
16
29
|
|
17
|
-
|
18
|
-
Tracker](https://github.com/rubymotion/Joybox/issues).
|
19
|
-
|
20
|
-
## Getting Started
|
21
|
-
|
22
|
-
### Installation with RubyGems
|
23
|
-
|
24
|
-
First install Joybox from RubyGems. Run:
|
25
|
-
|
26
|
-
gem install joybox
|
27
|
-
|
28
|
-
Next, add to your Rakefile:
|
29
|
-
|
30
|
-
require 'joybox'
|
31
|
-
|
32
|
-
### Installation with Bundler
|
33
|
-
|
34
|
-
First, add to your Gemfile:
|
35
|
-
|
36
|
-
gem 'joybox'
|
37
|
-
|
38
|
-
Next, install the Joybox gem by running:
|
39
|
-
|
40
|
-
bundle
|
41
|
-
|
42
|
-
## Core Classes
|
43
|
-
|
44
|
-
For building games, the core classes are Director, Scene, Layer, and Sprite.
|
45
|
-
|
46
|
-
For more info, see: [cocos2d Basic Concepts](http://www.cocos2d-iphone.org/wiki/doku.php/prog_guide:basic_concepts)
|
47
|
-
|
48
|
-
### Director
|
49
|
-
|
50
|
-
The director presents scenes, manages flow from one scene to another,
|
51
|
-
manages the game loop, and responds to interruptions.
|
52
|
-
|
53
|
-
### Scene
|
54
|
-
|
55
|
-
A scene is composed of multiple layers. Examples of scenes are: menus,
|
56
|
-
game levels, cut scenes, and high score screen.
|
57
|
-
|
58
|
-
### Layer
|
59
|
-
|
60
|
-
Layers are primarily where a game's sprites are placed. Layers handle
|
61
|
-
user interaction, for example screen touches or device orientation.
|
30
|
+
## Contributions
|
62
31
|
|
63
|
-
|
32
|
+
If you wish to help us to stop the madness, there are some ways you can do it:
|
64
33
|
|
65
|
-
|
66
|
-
|
34
|
+
* Joybox Wrapper (Ruby): This repository ;)
|
35
|
+
* Box2D Wrapper (C++): [Joybox - Box2D](https://github.com/CurveBeryl/Joybox-Box2D)
|
36
|
+
* Documentation (markdown): [Joybox - Documentation](https://github.com/CurveBeryl/Joybox-Documentation)
|
67
37
|
|
68
|
-
## Contributions
|
69
38
|
|
70
39
|
1. Fork it
|
71
40
|
2. Create your feature branch (git checkout -b my-new-feature)
|
@@ -76,11 +45,10 @@ rotation, scaling, translation and animation.
|
|
76
45
|
## License
|
77
46
|
|
78
47
|
Joybox is released under the MIT License.
|
48
|
+
|
79
49
|
|
80
50
|
## Authors
|
81
51
|
|
82
|
-
[
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
If you wish to download or contribute to the Objective-C Box 2D wrapper, the repository URL is the following: https://github.com/CurveBeryl/Joybox-Box2D
|
52
|
+
**Cocos2D**: Ricardo Quesada, Zynga and contributors [cocos2d for iPhone](http://www.cocos2d-iphone.org)
|
53
|
+
**Box2D**: Erin Catto [Box2D | A 2D Physics Engine for Games](http://box2d.org)
|
54
|
+
**Joybox**: [Juan José Karam](https://github.com/CurveBeryl) [@JuanKaram](https://twitter.com/JuanKaram) and [Gabriel Sosa](https://github.com/mexinsane) [@mexinsane](https://twitter.com/mexinsane) and contributors
|
data/Rakefile
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
$:.unshift("/Library/RubyMotion/lib")
|
2
|
-
require 'motion/project'
|
2
|
+
require 'motion/project/template/ios'
|
3
3
|
require 'bundler'
|
4
4
|
Bundler.require
|
5
5
|
|
@@ -7,8 +7,7 @@ Bundler.require
|
|
7
7
|
Motion::Project::App.setup do |app|
|
8
8
|
# Use `rake config' to see complete project settings.
|
9
9
|
app.name = 'Joybox'
|
10
|
-
app.identifier = '
|
10
|
+
app.identifier = 'com.rubymotion.joybox'
|
11
11
|
app.version = "0.0.1"
|
12
12
|
|
13
|
-
|
14
13
|
end
|
data/bin/joybox
ADDED
@@ -0,0 +1,49 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require 'fileutils'
|
4
|
+
|
5
|
+
if ARGV.size != 1
|
6
|
+
$stderr.puts 'Usage: joybox <command> [<args...>]'
|
7
|
+
$stderr.puts 'Commands:'
|
8
|
+
$stderr.puts ' install '.ljust(15) + 'Installs the Joybox RubyMotion Templates and Commands'
|
9
|
+
$stderr.puts ' uninstall '.ljust(15) + 'Uninstall the Joybox RubyMotion Templates and Commands'
|
10
|
+
exit 1
|
11
|
+
end
|
12
|
+
|
13
|
+
if ARGV[0] == 'install'
|
14
|
+
ruby_motion_directory = File.expand_path('~/Library/RubyMotion')
|
15
|
+
template_directory = File.join(ruby_motion_directory, 'template')
|
16
|
+
command_directory = File.join(ruby_motion_directory, 'command')
|
17
|
+
|
18
|
+
FileUtils.mkdir_p(template_directory) unless File.directory?(template_directory)
|
19
|
+
FileUtils.mkdir_p(command_directory) unless File.directory?(command_directory)
|
20
|
+
|
21
|
+
joybox_template_directory = File.expand_path('../../template/', __FILE__)
|
22
|
+
FileUtils.cp_r(Dir.glob("#{joybox_template_directory}/*"), template_directory)
|
23
|
+
|
24
|
+
joybox_command_directory = File.expand_path('../../command', __FILE__)
|
25
|
+
FileUtils.cp_r(Dir.glob("#{joybox_command_directory}/*"), command_directory)
|
26
|
+
|
27
|
+
$stderr.puts 'Joybox RubyMotion Templates and Commands installed correctly'
|
28
|
+
end
|
29
|
+
|
30
|
+
|
31
|
+
if ARGV[0] == 'uninstall'
|
32
|
+
ruby_motion_directory = File.expand_path('~/Library/RubyMotion')
|
33
|
+
template_directory = File.join(ruby_motion_directory, 'template')
|
34
|
+
command_directory = File.join(ruby_motion_directory, 'command')
|
35
|
+
|
36
|
+
joybox_template_directory = File.expand_path('../../template', __FILE__)
|
37
|
+
|
38
|
+
Dir.glob("#{joybox_template_directory}/**").each do |directory|
|
39
|
+
directory = File.expand_path(File.basename(directory), template_directory)
|
40
|
+
FileUtils.rm_r(directory) if File.exists?(directory)
|
41
|
+
end
|
42
|
+
|
43
|
+
Dir.glob("#{joybox_command_directory}/*").each do |directory|
|
44
|
+
directory = File.expand_path(File.basename(directory), command_directory)
|
45
|
+
FileUtils.rm_r(directory) if File.exists?(directory)
|
46
|
+
end
|
47
|
+
|
48
|
+
$stderr.puts 'Joybox RubyMotion Templates and Commands uninstalled correctly'
|
49
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
Usage:
|
2
|
+
motion jb:generate <class-type> <class-name>
|
3
|
+
|
4
|
+
Options:
|
5
|
+
class-type # Class to be generated (Sprite, Scene, Layer)
|
6
|
+
class-name # Name of the class
|
7
|
+
|
8
|
+
Description:
|
9
|
+
Generates a new class according to the class type and name, those
|
10
|
+
parameters can be sended either CamelCased or snake_cased. Also a
|
11
|
+
test class will be generated and placed inside the spec folder.
|
12
|
+
|
13
|
+
Example:
|
14
|
+
'motion jb:generate layer game'
|
15
|
+
|
16
|
+
This will generate a Layer class named 'GameLayer' with the
|
17
|
+
following files:
|
18
|
+
class: 'app/layers/game_layer.rb'
|
19
|
+
spec: 'spec/layers/game_layer_spec.rb'
|
20
|
+
|
21
|
+
The list of posible paths according to the class type:
|
22
|
+
Sprite: app/sprites/ - spec/sprites/
|
23
|
+
Layer: app/layers/ - spec/layers/
|
24
|
+
Scene: app/scenes/ - spec/scenes/
|
@@ -0,0 +1,114 @@
|
|
1
|
+
class String
|
2
|
+
|
3
|
+
def underscore
|
4
|
+
gsub(/::/, '/').
|
5
|
+
gsub(/([A-Z]+)([A-Z][a-z])/,'\1_\2').
|
6
|
+
gsub(/([a-z\d])([A-Z])/,'\1_\2').
|
7
|
+
tr("-", "_").
|
8
|
+
downcase
|
9
|
+
end
|
10
|
+
|
11
|
+
def titleize
|
12
|
+
gsub(/([A-Z])/, '_\1').split(/_/).map(&:capitalize).join
|
13
|
+
end
|
14
|
+
|
15
|
+
end
|
16
|
+
|
17
|
+
|
18
|
+
module Motion; module Project
|
19
|
+
class JoyboxGenerateCommand < Command
|
20
|
+
|
21
|
+
self.name = 'joybox:generate'
|
22
|
+
self.help = 'Joybox: Class Generator'
|
23
|
+
|
24
|
+
attr_reader :name
|
25
|
+
|
26
|
+
def run(args)
|
27
|
+
|
28
|
+
if args.empty? or args.size != 2
|
29
|
+
show_help
|
30
|
+
end
|
31
|
+
|
32
|
+
klass = args[0]
|
33
|
+
name = args[1]
|
34
|
+
|
35
|
+
template_class_file = File.expand_path("../joybox/templates/#{klass}.erb", __FILE__)
|
36
|
+
template_spec_file = File.expand_path("../joybox/templates/#{klass}_spec.erb", __FILE__)
|
37
|
+
|
38
|
+
unless File.exists?(template_class_file)
|
39
|
+
show_help
|
40
|
+
end
|
41
|
+
|
42
|
+
begin
|
43
|
+
app_directory = find_app_directory
|
44
|
+
spec_directory = find_spec_directory
|
45
|
+
rescue
|
46
|
+
die 'The command needs to run inside of a RubyMotion project'
|
47
|
+
end
|
48
|
+
|
49
|
+
class_file = File.join(app_directory, "#{klass}s/#{name.underscore}_#{klass}.rb")
|
50
|
+
test_file = File.join(spec_directory, "#{klass}s/#{name.underscore}_#{klass}_spec.rb")
|
51
|
+
|
52
|
+
if File.exists?(class_file) or File.exists?(test_file)
|
53
|
+
App.log 'Duplicate', "#{class_file} exists" if File.exists?(class_file)
|
54
|
+
App.log 'Duplicate', "#{test_file} exists" if File.exists?(test_file)
|
55
|
+
exit 1
|
56
|
+
end
|
57
|
+
|
58
|
+
create_directory(File.dirname(class_file))
|
59
|
+
create_directory(File.dirname(test_file))
|
60
|
+
|
61
|
+
@name = name.titleize
|
62
|
+
create_file(class_file, template_class_file)
|
63
|
+
create_file(test_file, template_spec_file)
|
64
|
+
end
|
65
|
+
|
66
|
+
|
67
|
+
def find_app_directory(directory = 'app')
|
68
|
+
|
69
|
+
finded_directories = Dir.glob(directory)
|
70
|
+
|
71
|
+
if finded_directories.size != 1
|
72
|
+
|
73
|
+
find_app_directory(File.join('..', directory))
|
74
|
+
else
|
75
|
+
|
76
|
+
finded_directories[0]
|
77
|
+
end
|
78
|
+
end
|
79
|
+
|
80
|
+
|
81
|
+
def find_spec_directory(directory = 'spec')
|
82
|
+
|
83
|
+
finded_directories = Dir.glob(directory)
|
84
|
+
|
85
|
+
if finded_directories.size != 1
|
86
|
+
|
87
|
+
find_app_directory(File.join('..', directory))
|
88
|
+
else
|
89
|
+
|
90
|
+
finded_directories[0]
|
91
|
+
end
|
92
|
+
end
|
93
|
+
|
94
|
+
|
95
|
+
def create_directory(directory)
|
96
|
+
FileUtils.mkdir_p(directory) unless File.directory?(directory)
|
97
|
+
end
|
98
|
+
|
99
|
+
|
100
|
+
def create_file(file_path, template_path)
|
101
|
+
File.open(file_path, "w") { |io|
|
102
|
+
io.print ERB.new(File.read(template_path)).result(binding)
|
103
|
+
}
|
104
|
+
App.log 'Create', "#{file_path}"
|
105
|
+
end
|
106
|
+
|
107
|
+
|
108
|
+
def show_help
|
109
|
+
usage_file = File.expand_path("../joybox/USAGE", __FILE__)
|
110
|
+
die File.read(usage_file)
|
111
|
+
end
|
112
|
+
|
113
|
+
end
|
114
|
+
end; end
|
data/joybox.gemspec
CHANGED
@@ -14,6 +14,7 @@ Gem::Specification.new do |gem|
|
|
14
14
|
|
15
15
|
gem.summary = 'A Cocos2D & Box2D DSL for RubyMotion'
|
16
16
|
gem.homepage = 'http://joybox.io'
|
17
|
+
gem.license = 'MIT'
|
17
18
|
|
18
19
|
gem.files = `git ls-files`.split($\)
|
19
20
|
gem.require_paths = ['lib']
|
@@ -22,4 +23,47 @@ Gem::Specification.new do |gem|
|
|
22
23
|
gem.add_dependency 'rake'
|
23
24
|
gem.add_development_dependency 'rspec'
|
24
25
|
|
26
|
+
gem.executables = ["joybox"]
|
27
|
+
|
28
|
+
gem.post_install_message = <<-MESSAGE
|
29
|
+
** Joybox 0.0.6 **
|
30
|
+
|
31
|
+
* Added OSX development support. Use 'motion create --template=joybox-osx' to create
|
32
|
+
an OSX project.
|
33
|
+
* Added Ruby Motion Template support. Use 'joybox install' to install the templates (joybox-ios & joybox-osx)
|
34
|
+
* Added Ruby Motion Command support. Use 'motion joybox:generate <class> <name>' to generate Sprites, Layers and Scene subclases and their respective specs.
|
35
|
+
* Added Circle Shape to Box2D Fixtures. Thank you Kenichi Yonekawa!
|
36
|
+
* Added Sprite Batch & Sprite Frame Cache full support.
|
37
|
+
* Added Animations and Animate Action.
|
38
|
+
* Added Bezier, Blink, Fade, Jump, Place, Spawn, Tint action. Thanks Gabriel Sosa!
|
39
|
+
* Added Repeat.with actions:<array of actions> times:<number of times> method to Repeat class.
|
40
|
+
* IMPORTANT: Changed Sequence.new items:<array of actions> for Sequence.with actions:<array of actions> in Sequence class.
|
41
|
+
* IMPORTANT: Typo fix in the Body class, changing edge_fixure and polygon_fixure to edge_fixture and polygon_fixture.
|
42
|
+
* Better bridgesupport generation :D, thank you Laurent Sansonetti!
|
43
|
+
* Added: mouse and keyboard events to joybox-osx.
|
44
|
+
* Joybox is stopping the madness! Thanks all for your support!
|
45
|
+
|
46
|
+
_+880_____________________________
|
47
|
+
_++88_____________________________
|
48
|
+
_++88_____________________________
|
49
|
+
__+880_________________________++
|
50
|
+
__+888________________________+88_
|
51
|
+
__++880______________________+88__
|
52
|
+
__++888_____+++88__________+++8___
|
53
|
+
__++8888__+++8880++88____+++88____
|
54
|
+
__+++8888+++8880++8888__++888_____
|
55
|
+
___++888++8888+++888888++888______
|
56
|
+
___++88++8888++8888888++888_______
|
57
|
+
___++++++888888888888888888_______
|
58
|
+
____++++++88888888888888888_______
|
59
|
+
____++++++++000888888888888_______
|
60
|
+
_____+++++++000088888888888_______
|
61
|
+
______+++++++00088888888888_______
|
62
|
+
_______+++++++088888888888________
|
63
|
+
_______+++++++088888888888________
|
64
|
+
________+++++++8888888888_________
|
65
|
+
________+++++++0088888888_________
|
66
|
+
________++++++0088888888__________
|
67
|
+
MESSAGE
|
68
|
+
|
25
69
|
end
|
@@ -0,0 +1,47 @@
|
|
1
|
+
Motion::Project::App.setup do |app|
|
2
|
+
|
3
|
+
# Extracted from Teacup: https://github.com/rubymotion/teacup
|
4
|
+
# Thanks Colin! (@colinta)
|
5
|
+
platform = app.respond_to?(:template) ? app.template : :ios
|
6
|
+
|
7
|
+
platform_joybox = File.expand_path(File.join(File.dirname(__FILE__), "../../motion/joybox-#{platform}"))
|
8
|
+
platform_vendor = File.expand_path(File.join(File.dirname(__FILE__), "../../vendor/vendor-#{platform}"))
|
9
|
+
|
10
|
+
|
11
|
+
app.frameworks += ["QuartzCore",
|
12
|
+
"CoreGraphics",
|
13
|
+
"Foundation",
|
14
|
+
"ApplicationServices",
|
15
|
+
"OpenAL",
|
16
|
+
"AVFoundation",
|
17
|
+
"AudioToolbox",
|
18
|
+
"QuartzCore"]
|
19
|
+
|
20
|
+
app.libs << "/usr/lib/libz.dylib"
|
21
|
+
|
22
|
+
|
23
|
+
cocos2d_vendor = File.expand_path(File.join(platform_vendor, "cocos_2d"))
|
24
|
+
box2d_vendor = File.expand_path(File.join(platform_vendor, "Box2D.framework"))
|
25
|
+
|
26
|
+
app.vendor_project(cocos2d_vendor,
|
27
|
+
:static,
|
28
|
+
:products => ["libcocos2d.a"],
|
29
|
+
:headers_dir => "include",
|
30
|
+
:bridgesupport_cflags => "-D__CC_PLATFORM_IOS -ISupport -IPlatforms -IPlatforms/iOS",
|
31
|
+
:bridgesupport_exceptions => ["cocos_2d_exceptions.bridgesupport"])
|
32
|
+
|
33
|
+
app.vendor_project(box2d_vendor,
|
34
|
+
:static,
|
35
|
+
:products => ['Box2D'],
|
36
|
+
:headers_dir => "Headers")
|
37
|
+
|
38
|
+
|
39
|
+
# Scans app.files until it finds app/ (the default)
|
40
|
+
# if found, it inserts just before those files, otherwise it will insert to
|
41
|
+
# the end of the list
|
42
|
+
insert_point = app.files.find_index { |file| file =~ /^(?:\.\/)?app\// } || 0
|
43
|
+
|
44
|
+
Dir.glob(File.join(platform_joybox, '**/*.rb')).reverse.each do |file|
|
45
|
+
app.files.insert(insert_point, file)
|
46
|
+
end
|
47
|
+
end
|
@@ -0,0 +1,47 @@
|
|
1
|
+
Motion::Project::App.setup do |app|
|
2
|
+
|
3
|
+
# Extracted from Teacup: https://github.com/rubymotion/teacup
|
4
|
+
# Thanks Colin! (@colinta)
|
5
|
+
platform = app.respond_to?(:template) ? app.template : :ios
|
6
|
+
|
7
|
+
platform_joybox = File.expand_path(File.join(File.dirname(__FILE__), "../../motion/joybox-#{platform}"))
|
8
|
+
platform_vendor = File.expand_path(File.join(File.dirname(__FILE__), "../../vendor/vendor-#{platform}"))
|
9
|
+
|
10
|
+
|
11
|
+
app.frameworks += ["Cocoa",
|
12
|
+
"OpenGL",
|
13
|
+
"QuartzCore",
|
14
|
+
"ApplicationServices",
|
15
|
+
"AppKit",
|
16
|
+
"CoreData",
|
17
|
+
"Foundation",
|
18
|
+
"JavaScriptCore",
|
19
|
+
"CoreGraphics"]
|
20
|
+
|
21
|
+
app.libs << "/usr/lib/libz.dylib"
|
22
|
+
app.libs << "/usr/lib/libffi.dylib"
|
23
|
+
|
24
|
+
|
25
|
+
cocos2d_vendor = File.expand_path(File.join(platform_vendor, "cocos_2d"))
|
26
|
+
box2d_vendor = File.expand_path(File.join(platform_vendor, "box_2d"))
|
27
|
+
|
28
|
+
app.vendor_project(cocos2d_vendor,
|
29
|
+
:static,
|
30
|
+
:products => ["libcocos2d.a"],
|
31
|
+
:bridgesupport_cflags => "-D__CC_PLATFORM_MAC -ISupport -IPlatforms -IPlatforms/Mac")
|
32
|
+
|
33
|
+
app.vendor_project(box2d_vendor,
|
34
|
+
:static,
|
35
|
+
:products => ['libBox2D.a'],
|
36
|
+
:bridgesupport_cflags => "-D__CC_PLATFORM_MAC -ISupport -IPlatforms -IPlatforms/Mac")
|
37
|
+
|
38
|
+
|
39
|
+
# Scans app.files until it finds app/ (the default)
|
40
|
+
# if found, it inserts just before those files, otherwise it will insert to
|
41
|
+
# the end of the list
|
42
|
+
insert_point = app.files.find_index { |file| file =~ /^(?:\.\/)?app\// } || 0
|
43
|
+
|
44
|
+
Dir.glob(File.join(platform_joybox, '**/*.rb')).reverse.each do |file|
|
45
|
+
app.files.insert(insert_point, file)
|
46
|
+
end
|
47
|
+
end
|
data/lib/joybox/version.rb
CHANGED