joybox 1.0.0 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.travis.yml +3 -0
- data/Gemfile +2 -2
- data/Gemfile.lock +4 -4
- data/README.md +66 -22
- data/Rakefile +22 -4
- data/app/ios/app_delegate.rb +48 -0
- data/app/osx/app_delegate.rb +26 -0
- data/app/osx/layers/game_layer.rb +5 -0
- data/app/osx/menu.rb +51 -0
- data/command/command/image.rb +26 -0
- data/command/command/string.rb +15 -0
- data/command/command/template.rb +59 -0
- data/command/command/tmx.rb +75 -0
- data/command/joybox_generate_command.rb +64 -110
- data/command/joybox_retina_command.rb +87 -0
- data/command/{joybox/templates → templates}/layer.erb +0 -0
- data/command/{joybox/templates → templates}/layer_spec.erb +0 -0
- data/command/{joybox/templates → templates}/scene.erb +0 -0
- data/command/{joybox/templates → templates}/scene_spec.erb +0 -0
- data/command/{joybox/templates → templates}/sprite.erb +0 -0
- data/command/{joybox/templates → templates}/sprite_spec.erb +0 -0
- data/ext/extconf.rb +34 -0
- data/joybox.gemspec +103 -50
- data/lib/joybox.rb +2 -0
- data/lib/joybox/joybox-ios.rb +18 -3
- data/lib/joybox/joybox-osx.rb +18 -2
- data/lib/joybox/version.rb +1 -1
- data/motion/joybox-ios/common/cg_point.rb +46 -16
- data/motion/joybox-ios/common/device.rb +56 -0
- data/motion/joybox-ios/common/ui_touch.rb +0 -2
- data/motion/joybox-ios/configuration/configuration.rb +10 -40
- data/motion/joybox-ios/configuration/file_utils.rb +0 -4
- data/motion/joybox-ios/configuration/gl_view.rb +14 -20
- data/motion/joybox-ios/configuration/texture_2d.rb +0 -4
- data/motion/joybox-ios/core/layer.rb +2 -8
- data/motion/joybox-ios/debug/proxy_view.rb +5 -5
- data/motion/joybox-ios/debug/{node.rb → repl.rb} +25 -19
- data/motion/joybox-ios/director.rb +15 -4
- data/motion/joybox-osx/common/ats_point.rb +45 -15
- data/motion/joybox-osx/common/device.rb +30 -0
- data/motion/joybox-osx/common/ns_event.rb +0 -1
- data/motion/joybox-osx/configuration/configuration.rb +6 -26
- data/motion/joybox-osx/configuration/gl_view.rb +16 -14
- data/motion/joybox-osx/core/layer.rb +45 -26
- data/motion/joybox-osx/debug/proxy_view.rb +5 -5
- data/motion/joybox-osx/debug/{node.rb → repl.rb} +13 -7
- data/motion/joybox-osx/director.rb +4 -3
- data/motion/joybox/actions/animate.rb +0 -1
- data/motion/joybox/actions/bezier.rb +2 -9
- data/motion/joybox/actions/blink.rb +1 -4
- data/motion/joybox/actions/callback.rb +19 -0
- data/motion/joybox/actions/d3/flip.rb +27 -0
- data/motion/joybox/actions/d3/jump.rb +30 -0
- data/motion/joybox/actions/d3/lens.rb +30 -0
- data/motion/joybox/actions/d3/shake.rb +32 -0
- data/motion/joybox/actions/d3/shatter.rb +30 -0
- data/motion/joybox/actions/d3/wave.rb +33 -0
- data/motion/joybox/actions/delay.rb +19 -0
- data/motion/joybox/actions/ease.rb +3 -21
- data/motion/joybox/actions/fade.rb +30 -6
- data/motion/joybox/actions/jump.rb +0 -5
- data/motion/joybox/actions/liquid.rb +28 -0
- data/motion/joybox/actions/move.rb +2 -9
- data/motion/joybox/actions/place.rb +0 -2
- data/motion/joybox/actions/repeat.rb +0 -2
- data/motion/joybox/actions/rotate.rb +2 -9
- data/motion/joybox/actions/scale.rb +2 -9
- data/motion/joybox/actions/sequence.rb +0 -1
- data/motion/joybox/actions/shuffle.rb +26 -0
- data/motion/joybox/actions/skew.rb +2 -11
- data/motion/joybox/actions/spawn.rb +0 -1
- data/motion/joybox/actions/split.rb +24 -0
- data/motion/joybox/actions/tint.rb +0 -5
- data/motion/joybox/actions/turn.rb +24 -0
- data/motion/joybox/actions/twirl.rb +30 -0
- data/motion/joybox/actions/visibility.rb +21 -0
- data/motion/joybox/actions/wave.rb +32 -0
- data/motion/joybox/animations/animation.rb +7 -11
- data/motion/joybox/audio/audio.rb +31 -0
- data/motion/joybox/audio/audio_effect.rb +69 -0
- data/motion/joybox/audio/background_audio.rb +77 -0
- data/motion/joybox/common/{gc_size.rb → cg_size.rb} +13 -12
- data/motion/joybox/common/color.rb +4 -13
- data/motion/joybox/common/initialize.rb +11 -0
- data/motion/joybox/common/ns_array.rb +15 -0
- data/motion/joybox/common/ns_string.rb +7 -0
- data/motion/joybox/common/numeric.rb +13 -4
- data/motion/joybox/common/screen.rb +4 -12
- data/motion/joybox/configuration/debug.rb +29 -0
- data/motion/joybox/core/layer.rb +0 -24
- data/motion/joybox/core/layer_color.rb +47 -0
- data/motion/joybox/core/node.rb +18 -8
- data/motion/joybox/core/scene.rb +0 -5
- data/motion/joybox/core/sprite.rb +43 -25
- data/motion/joybox/core/sprite_batch.rb +15 -6
- data/motion/joybox/core/sprite_frame_cache.rb +9 -58
- data/motion/joybox/debug/physics.rb +40 -0
- data/motion/joybox/debug/physics_draw.rb +191 -0
- data/motion/joybox/joybox.rb +9 -1
- data/motion/joybox/macros.rb +13 -13
- data/motion/joybox/physics/aabb.rb +28 -0
- data/motion/joybox/physics/body.rb +163 -68
- data/motion/joybox/physics/chain_shape.rb +71 -0
- data/motion/joybox/physics/circle_shape.rb +31 -0
- data/motion/joybox/physics/edge_shape.rb +37 -0
- data/motion/joybox/physics/filter.rb +17 -0
- data/motion/joybox/physics/fixture.rb +52 -0
- data/motion/joybox/physics/mass_data.rb +19 -0
- data/motion/joybox/physics/physics_sprite.rb +50 -16
- data/motion/joybox/physics/polygon_shape.rb +54 -0
- data/motion/joybox/physics/profile.rb +14 -0
- data/motion/joybox/physics/ray_cast_input.rb +30 -0
- data/motion/joybox/physics/ray_cast_output.rb +17 -0
- data/motion/joybox/physics/shape.rb +61 -0
- data/motion/joybox/physics/transform.rb +17 -0
- data/motion/joybox/physics/world.rb +101 -30
- data/motion/joybox/tmx/object_layer.rb +12 -0
- data/motion/joybox/tmx/tile_layer.rb +74 -0
- data/motion/joybox/tmx/tile_map.rb +112 -0
- data/motion/joybox/tmx/tile_set.rb +26 -0
- data/motion/joybox/tmx/tmx.rb +16 -0
- data/motion/joybox/ui/label.rb +44 -16
- data/motion/joybox/ui/menu.rb +7 -9
- data/motion/joybox/ui/menu_image.rb +11 -8
- data/motion/joybox/ui/menu_label.rb +14 -13
- data/resources/Default-568h@2x.png +0 -0
- data/resources/animation_frames-hd.plist +126 -0
- data/resources/animation_frames-ipadhd.plist +126 -0
- data/resources/animation_frames.plist +126 -0
- data/resources/animation_sprite_sheet-hd.png +0 -0
- data/resources/animation_sprite_sheet-ipadhd.png +0 -0
- data/resources/animation_sprite_sheet.png +0 -0
- data/resources/fps_images-hd.png +0 -0
- data/resources/fps_images-ipadhd.png +0 -0
- data/resources/fps_images.png +0 -0
- data/resources/sprite.png +0 -0
- data/resources/sprite_inverted.png +0 -0
- data/resources/sprite_sheet.png +0 -0
- data/spec/motion/joybox-ios/common/screen_spec.rb +21 -0
- data/spec/{main_spec.rb → motion/joybox-ios/main_spec.rb} +6 -2
- data/spec/motion/joybox-ios/ui/label_spec.rb +20 -0
- data/spec/motion/joybox-ios/ui/menu_label_spec.rb +15 -0
- data/spec/motion/joybox-ios/ui/menu_spec.rb +87 -0
- data/spec/motion/joybox-osx/common/screen_spec.rb +21 -0
- data/spec/motion/joybox-osx/main_spec.rb +13 -0
- data/spec/motion/joybox-osx/ui/label_spec.rb +18 -0
- data/spec/motion/joybox-osx/ui/menu_label_spec.rb +13 -0
- data/spec/motion/joybox-osx/ui/menu_spec.rb +87 -0
- data/spec/motion/joybox/actions/actions_spec.rb +11 -0
- data/spec/motion/joybox/actions/bezier_spec.rb +37 -0
- data/spec/motion/joybox/actions/blink_spec.rb +16 -0
- data/spec/motion/joybox/actions/fade_spec.rb +49 -0
- data/spec/motion/joybox/actions/jump_spec.rb +37 -0
- data/spec/motion/joybox/actions/move_spec.rb +37 -0
- data/spec/motion/joybox/actions/place_spec.rb +12 -0
- data/spec/motion/joybox/actions/rotate_spec.rb +35 -0
- data/spec/motion/joybox/actions/scale_spec.rb +43 -0
- data/spec/motion/joybox/actions/skew_spec.rb +43 -0
- data/spec/motion/joybox/common/cg_size_spec.rb +29 -0
- data/spec/motion/joybox/common/color_spec.rb +31 -0
- data/spec/motion/joybox/common/ns_string_spec.rb +8 -0
- data/spec/motion/joybox/common/numeric_spec.rb +13 -0
- data/spec/motion/joybox/core/node_spec.rb +36 -0
- data/spec/motion/joybox/core/sprite_batch_spec.rb +34 -0
- data/spec/motion/joybox/core/sprite_frame_cache_spec.rb +111 -0
- data/spec/motion/joybox/core/sprite_spec.rb +121 -0
- data/spec/motion/joybox/macros_spec.rb +280 -0
- data/spec/motion/joybox/physics/aabb_spec.rb +17 -0
- data/spec/motion/joybox/physics/body_spec.rb +318 -0
- data/spec/motion/joybox/physics/chain_shape_spec.rb +80 -0
- data/spec/motion/joybox/physics/circle_shape_spec.rb +63 -0
- data/spec/motion/joybox/physics/edge_shape_spec.rb +48 -0
- data/spec/motion/joybox/physics/fixture_spec.rb +106 -0
- data/spec/motion/joybox/physics/mass_data_spec.rb +13 -0
- data/spec/motion/joybox/physics/physics_sprite_spec.rb +50 -0
- data/spec/motion/joybox/physics/polygon_shape_spec.rb +92 -0
- data/spec/motion/joybox/physics/ray_cast_input_spec.rb +17 -0
- data/spec/motion/joybox/physics/ray_cast_output_spec.rb +13 -0
- data/spec/motion/joybox/physics/shape_spec.rb +50 -0
- data/spec/motion/joybox/physics/transform_spec.rb +13 -0
- data/spec/motion/joybox/physics/world_spec.rb +228 -0
- data/spec/motion/joybox/ui/label_spec.rb +53 -0
- data/spec/motion/joybox/ui/menu_image_spec.rb +51 -0
- data/spec/motion/joybox/ui/menu_label_spec.rb +68 -0
- data/spec/motion/joybox/ui/menu_spec.rb +26 -0
- data/spec/spec_helpers/cg_point.rb +5 -0
- data/spec/spec_helpers/cg_point_spec.rb +14 -0
- data/template/joybox-ios-example-repl/files/.gitignore +16 -0
- data/template/joybox-ios/files/.gitignore +16 -0
- data/template/joybox-osx-example-repl/files/.gitignore +16 -0
- data/template/joybox-osx/files/.gitignore +16 -0
- data/vendor/vendor-ios/box_2d/box_2d.bridgesupport +1201 -85
- data/vendor/vendor-ios/box_2d/box_2d_include/B2DAABB.h +21 -0
- data/vendor/vendor-ios/box_2d/box_2d_include/B2DBody.h +58 -13
- data/vendor/vendor-ios/box_2d/box_2d_include/B2DBodyDef.h +44 -0
- data/vendor/vendor-ios/box_2d/box_2d_include/B2DBodyTypes.h +20 -0
- data/vendor/vendor-ios/box_2d/box_2d_include/B2DChainShape.h +29 -0
- data/vendor/vendor-ios/box_2d/box_2d_include/B2DCircleShape.h +7 -0
- data/vendor/vendor-ios/box_2d/box_2d_include/B2DColor.h +23 -0
- data/vendor/vendor-ios/box_2d/box_2d_include/B2DContactFilter.h +24 -0
- data/vendor/vendor-ios/box_2d/box_2d_include/B2DContactListener.h +1 -1
- data/vendor/vendor-ios/box_2d/box_2d_include/B2DDestructionListener.h +24 -0
- data/vendor/vendor-ios/box_2d/box_2d_include/B2DDraw.h +54 -0
- data/vendor/vendor-ios/box_2d/box_2d_include/B2DEdgeShape.h +13 -2
- data/vendor/vendor-ios/box_2d/box_2d_include/B2DFilter.h +23 -0
- data/vendor/vendor-ios/box_2d/box_2d_include/B2DFixture.h +47 -0
- data/vendor/vendor-ios/box_2d/box_2d_include/B2DFixtureDef.h +29 -0
- data/vendor/vendor-ios/box_2d/box_2d_include/B2DMassData.h +23 -0
- data/vendor/vendor-ios/box_2d/box_2d_include/B2DPolygonShape.h +14 -1
- data/vendor/vendor-ios/box_2d/box_2d_include/B2DProfile.h +31 -0
- data/vendor/vendor-ios/box_2d/box_2d_include/B2DQueryCallback.h +24 -0
- data/vendor/vendor-ios/box_2d/box_2d_include/B2DRayCastCallback.h +24 -0
- data/vendor/vendor-ios/box_2d/box_2d_include/B2DRayCastInput.h +23 -0
- data/vendor/vendor-ios/box_2d/box_2d_include/B2DRayCastOutput.h +21 -0
- data/vendor/vendor-ios/box_2d/box_2d_include/B2DShape.h +23 -3
- data/vendor/vendor-ios/box_2d/box_2d_include/B2DShapeTypes.h +22 -0
- data/vendor/vendor-ios/box_2d/box_2d_include/B2DTransform.h +21 -0
- data/vendor/vendor-ios/box_2d/box_2d_include/B2DWorld.h +40 -19
- data/vendor/vendor-ios/box_2d/libBox2D.a +0 -0
- data/vendor/vendor-ios/cocos_2d/cocos_2d.bridgesupport +808 -1578
- data/vendor/vendor-ios/cocos_2d/cocos_2d_include/CCActionEase.h +47 -0
- data/vendor/vendor-ios/cocos_2d/cocos_2d_include/CCFontDefinition.h +85 -0
- data/vendor/vendor-ios/cocos_2d/cocos_2d_include/CCLabelTTF.h +54 -6
- data/vendor/vendor-ios/cocos_2d/cocos_2d_include/CCMenuItem.h +1 -0
- data/vendor/vendor-ios/cocos_2d/cocos_2d_include/CCTMXLayer.h +2 -2
- data/vendor/vendor-ios/cocos_2d/cocos_2d_include/CCTexture2D.h +4 -0
- data/vendor/vendor-ios/cocos_2d/cocos_2d_include/ccTypes.h +51 -1
- data/vendor/vendor-ios/cocos_2d/libcocos2d.a +0 -0
- data/vendor/vendor-ios/cocos_builder_reader/cocos_builder_reader.bridgesupport +510 -0
- data/vendor/vendor-ios/cocos_builder_reader/cocos_builder_reader_include/CCBAnimationManager.h +149 -0
- data/vendor/vendor-ios/cocos_builder_reader/cocos_builder_reader_include/CCBKeyframe.h +40 -0
- data/vendor/vendor-ios/cocos_builder_reader/cocos_builder_reader_include/CCBReader.h +176 -0
- data/vendor/vendor-ios/cocos_builder_reader/cocos_builder_reader_include/CCBSequence.h +49 -0
- data/vendor/vendor-ios/cocos_builder_reader/cocos_builder_reader_include/CCBSequenceProperty.h +38 -0
- data/vendor/vendor-ios/cocos_builder_reader/cocos_builder_reader_include/CCNode+CCBRelativePositioning.h +65 -0
- data/vendor/vendor-ios/cocos_builder_reader/libCocosBuilderReader.a +0 -0
- data/vendor/vendor-ios/cocos_denshion/cocos_denshion.bridgesupport +1001 -0
- data/vendor/vendor-ios/cocos_denshion/cocos_denshion_include/CDAudioManager.h +243 -0
- data/vendor/vendor-ios/cocos_denshion/cocos_denshion_include/CDConfig.h +60 -0
- data/vendor/vendor-ios/cocos_denshion/cocos_denshion_include/CDOpenALSupport.h +77 -0
- data/vendor/vendor-ios/cocos_denshion/cocos_denshion_include/CDXMacOSXSupport.h +232 -0
- data/vendor/vendor-ios/cocos_denshion/cocos_denshion_include/CDXPropertyModifierAction.h +45 -0
- data/vendor/vendor-ios/cocos_denshion/cocos_denshion_include/CocosDenshion.h +440 -0
- data/vendor/vendor-ios/cocos_denshion/cocos_denshion_include/SimpleAudioEngine.h +90 -0
- data/vendor/vendor-ios/cocos_denshion/libCocosDenshion.a +0 -0
- data/vendor/vendor-ios/kazmath/kazmath.bridgesupport +865 -0
- data/vendor/vendor-ios/kazmath/kazmath_include/GL/mat4stack.h +51 -0
- data/vendor/vendor-ios/kazmath/kazmath_include/GL/matrix.h +58 -0
- data/vendor/vendor-ios/kazmath/kazmath_include/aabb.h +53 -0
- data/vendor/vendor-ios/kazmath/kazmath_include/kazmath.h +39 -0
- data/vendor/vendor-ios/kazmath/kazmath_include/mat3.h +75 -0
- data/vendor/vendor-ios/kazmath/kazmath_include/mat4.h +93 -0
- data/vendor/vendor-ios/kazmath/kazmath_include/neon_matrix_impl.h +41 -0
- data/vendor/vendor-ios/kazmath/kazmath_include/plane.h +70 -0
- data/vendor/vendor-ios/kazmath/kazmath_include/quaternion.h +113 -0
- data/vendor/vendor-ios/kazmath/kazmath_include/ray2.h +50 -0
- data/vendor/vendor-ios/kazmath/kazmath_include/utility.h +74 -0
- data/vendor/vendor-ios/kazmath/kazmath_include/vec2.h +64 -0
- data/vendor/vendor-ios/kazmath/kazmath_include/vec3.h +68 -0
- data/vendor/vendor-ios/kazmath/kazmath_include/vec4.h +68 -0
- data/vendor/vendor-ios/kazmath/libkazmath.a +0 -0
- data/vendor/vendor-osx/box_2d/box_2d.bridgesupport +1199 -83
- data/vendor/vendor-osx/box_2d/box_2d_include/B2DAABB.h +21 -0
- data/vendor/vendor-osx/box_2d/box_2d_include/B2DBody.h +58 -13
- data/vendor/vendor-osx/box_2d/box_2d_include/B2DBodyDef.h +44 -0
- data/vendor/vendor-osx/box_2d/box_2d_include/B2DBodyTypes.h +20 -0
- data/vendor/vendor-osx/box_2d/box_2d_include/B2DChainShape.h +29 -0
- data/vendor/vendor-osx/box_2d/box_2d_include/B2DCircleShape.h +7 -0
- data/vendor/vendor-osx/box_2d/box_2d_include/B2DColor.h +23 -0
- data/vendor/vendor-osx/box_2d/box_2d_include/B2DContactFilter.h +24 -0
- data/vendor/vendor-osx/box_2d/box_2d_include/B2DContactListener.h +1 -1
- data/vendor/vendor-osx/box_2d/box_2d_include/B2DDestructionListener.h +24 -0
- data/vendor/vendor-osx/box_2d/box_2d_include/B2DDraw.h +54 -0
- data/vendor/vendor-osx/box_2d/box_2d_include/B2DEdgeShape.h +13 -2
- data/vendor/vendor-osx/box_2d/box_2d_include/B2DFilter.h +23 -0
- data/vendor/vendor-osx/box_2d/box_2d_include/B2DFixture.h +47 -0
- data/vendor/vendor-osx/box_2d/box_2d_include/B2DFixtureDef.h +29 -0
- data/vendor/vendor-osx/box_2d/box_2d_include/B2DMassData.h +23 -0
- data/vendor/vendor-osx/box_2d/box_2d_include/B2DPolygonShape.h +14 -1
- data/vendor/vendor-osx/box_2d/box_2d_include/B2DProfile.h +31 -0
- data/vendor/vendor-osx/box_2d/box_2d_include/B2DQueryCallback.h +24 -0
- data/vendor/vendor-osx/box_2d/box_2d_include/B2DRayCastCallback.h +24 -0
- data/vendor/vendor-osx/box_2d/box_2d_include/B2DRayCastInput.h +23 -0
- data/vendor/vendor-osx/box_2d/box_2d_include/B2DRayCastOutput.h +21 -0
- data/vendor/vendor-osx/box_2d/box_2d_include/B2DShape.h +23 -3
- data/vendor/vendor-osx/box_2d/box_2d_include/B2DShapeTypes.h +22 -0
- data/vendor/vendor-osx/box_2d/box_2d_include/B2DTransform.h +21 -0
- data/vendor/vendor-osx/box_2d/box_2d_include/B2DWorld.h +40 -19
- data/vendor/vendor-osx/box_2d/libBox2D.a +0 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d.bridgesupport +2820 -2633
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCActionEase.h +47 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCFontDefinition.h +85 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCLabelTTF.h +54 -6
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCMenuItem.h +1 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCTMXLayer.h +2 -2
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCTexture2D.h +4 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/Platforms/iOS/CCDirectorIOS.h +111 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/Platforms/iOS/CCES2Renderer.h +83 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/Platforms/iOS/CCESRenderer.h +54 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/Platforms/iOS/CCGLView.h +175 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/Platforms/iOS/CCTouchDelegateProtocol.h +75 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/Platforms/iOS/CCTouchDispatcher.h +120 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/Platforms/iOS/CCTouchHandler.h +93 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/ccTypes.h +65 -1
- data/vendor/vendor-osx/cocos_2d/libcocos2d.a +0 -0
- data/vendor/vendor-osx/cocos_builder_reader/cocos_builder_reader.bridgesupport +510 -0
- data/vendor/vendor-osx/cocos_builder_reader/cocos_builder_reader_include/CCBAnimationManager.h +149 -0
- data/vendor/vendor-osx/cocos_builder_reader/cocos_builder_reader_include/CCBKeyframe.h +40 -0
- data/vendor/vendor-osx/cocos_builder_reader/cocos_builder_reader_include/CCBReader.h +176 -0
- data/vendor/vendor-osx/cocos_builder_reader/cocos_builder_reader_include/CCBSequence.h +49 -0
- data/vendor/vendor-osx/cocos_builder_reader/cocos_builder_reader_include/CCBSequenceProperty.h +38 -0
- data/vendor/vendor-osx/cocos_builder_reader/cocos_builder_reader_include/CCNode+CCBRelativePositioning.h +65 -0
- data/vendor/vendor-osx/cocos_builder_reader/libCocosBuilderReader.a +0 -0
- data/vendor/vendor-osx/cocos_denshion/cocos_denshion.bridgesupport +1001 -0
- data/vendor/vendor-osx/cocos_denshion/cocos_denshion_include/CDAudioManager.h +243 -0
- data/vendor/vendor-osx/cocos_denshion/cocos_denshion_include/CDConfig.h +60 -0
- data/vendor/vendor-osx/cocos_denshion/cocos_denshion_include/CDOpenALSupport.h +77 -0
- data/vendor/vendor-osx/cocos_denshion/cocos_denshion_include/CDXMacOSXSupport.h +232 -0
- data/vendor/vendor-osx/cocos_denshion/cocos_denshion_include/CDXPropertyModifierAction.h +45 -0
- data/vendor/vendor-osx/cocos_denshion/cocos_denshion_include/CocosDenshion.h +440 -0
- data/vendor/vendor-osx/cocos_denshion/cocos_denshion_include/SimpleAudioEngine.h +90 -0
- data/vendor/vendor-osx/cocos_denshion/libCocosDenshion.a +0 -0
- data/vendor/vendor-osx/kazmath/kazmath.bridgesupport +865 -0
- data/vendor/vendor-osx/kazmath/kazmath_include/GL/mat4stack.h +51 -0
- data/vendor/vendor-osx/kazmath/kazmath_include/GL/matrix.h +58 -0
- data/vendor/vendor-osx/kazmath/kazmath_include/aabb.h +53 -0
- data/vendor/vendor-osx/kazmath/kazmath_include/kazmath.h +39 -0
- data/vendor/vendor-osx/kazmath/kazmath_include/mat3.h +75 -0
- data/vendor/vendor-osx/kazmath/kazmath_include/mat4.h +93 -0
- data/vendor/vendor-osx/kazmath/kazmath_include/neon_matrix_impl.h +41 -0
- data/vendor/vendor-osx/kazmath/kazmath_include/plane.h +70 -0
- data/vendor/vendor-osx/kazmath/kazmath_include/quaternion.h +113 -0
- data/vendor/vendor-osx/kazmath/kazmath_include/ray2.h +50 -0
- data/vendor/vendor-osx/kazmath/kazmath_include/utility.h +74 -0
- data/vendor/vendor-osx/kazmath/kazmath_include/vec2.h +64 -0
- data/vendor/vendor-osx/kazmath/kazmath_include/vec3.h +68 -0
- data/vendor/vendor-osx/kazmath/kazmath_include/vec4.h +68 -0
- data/vendor/vendor-osx/kazmath/libkazmath.a +0 -0
- metadata +353 -57
- checksums.yaml +0 -15
- data/bin/joybox +0 -49
- data/command/joybox/USAGE +0 -24
- data/motion/joybox-ios/configuration/debug.rb +0 -27
- data/motion/joybox-ios/debug/debug.rb +0 -10
- data/motion/joybox-osx/configuration/debug.rb +0 -27
- data/motion/joybox-osx/configuration/sprite_view.rb +0 -91
- data/motion/joybox-osx/debug/debug.rb +0 -10
- data/motion/joybox/core/ns_object.rb +0 -8
- data/spec/lib/joybox/cocos2d/cocos2d_spec.rb +0 -7
- data/spec/lib/joybox/cocos2d/macros_spec.rb +0 -37
- data/vendor/vendor-ios/cocos_2d/cocos_2d_include/cocos2d-ios-exceptions.bridgesupport +0 -39
- data/vendor/vendor-ios/cocos_2d/cocos_2d_include/gen_cocos2d_bridgesupport.sh +0 -17
- data/vendor/vendor-ios/cocos_2d/cocos_2d_include/gen_cocos2d_complement.sh +0 -17
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
//
|
|
2
|
+
// B2DAABB.h
|
|
3
|
+
// Box2D
|
|
4
|
+
//
|
|
5
|
+
// Created by Juan Jose Karam on 6/15/13.
|
|
6
|
+
// Copyright (c) 2013 Joybox. All rights reserved.
|
|
7
|
+
//
|
|
8
|
+
|
|
9
|
+
#import <Foundation/Foundation.h>
|
|
10
|
+
|
|
11
|
+
@interface B2DAABB : NSObject {
|
|
12
|
+
CGPoint lowerBound;
|
|
13
|
+
CGPoint upperBound;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
@property (nonatomic, assign) CGPoint lowerBound;
|
|
17
|
+
@property (nonatomic, assign) CGPoint upperBound;
|
|
18
|
+
|
|
19
|
+
- (id)initWithAABB:(b2AABB)aabb;
|
|
20
|
+
|
|
21
|
+
@end
|
|
@@ -5,42 +5,87 @@
|
|
|
5
5
|
// Created by Juan Jose Karam on 2/17/13.
|
|
6
6
|
// Copyright (c) 2013 Joybox. All rights reserved.
|
|
7
7
|
//
|
|
8
|
-
// Inspired by:
|
|
9
|
-
//
|
|
10
|
-
// Thanks to Axcho for his beautiful Cocos2D-Box2D implementation
|
|
11
|
-
// CCBox2D (https://github.com/axcho/CCBox2D)
|
|
12
|
-
|
|
13
8
|
|
|
14
9
|
#import <Foundation/Foundation.h>
|
|
10
|
+
#import "B2DBodyTypes.h"
|
|
15
11
|
|
|
12
|
+
@class B2DTransform;
|
|
13
|
+
@class B2DMassData;
|
|
14
|
+
@class B2DFixtureDef;
|
|
16
15
|
@class B2DShape;
|
|
16
|
+
@class B2DFixture;
|
|
17
17
|
|
|
18
18
|
@interface B2DBody : NSObject {
|
|
19
19
|
|
|
20
20
|
b2Body *body;
|
|
21
|
+
id userData;
|
|
21
22
|
}
|
|
22
23
|
|
|
23
24
|
@property (nonatomic, assign) b2Body *body;
|
|
24
|
-
@property (nonatomic,
|
|
25
|
-
@property (nonatomic,
|
|
26
|
-
@property (nonatomic,
|
|
27
|
-
@property (nonatomic,
|
|
28
|
-
|
|
25
|
+
@property (nonatomic, assign) id userData;
|
|
26
|
+
@property (nonatomic, assign) B2DBodyTypes type;
|
|
27
|
+
@property (nonatomic, assign, readonly) B2DTransform *transform;
|
|
28
|
+
@property (nonatomic, assign) CGPoint position;
|
|
29
|
+
@property (nonatomic, assign, readonly) CGFloat angle;
|
|
30
|
+
@property (nonatomic, assign, readonly) CGPoint worldCenter;
|
|
31
|
+
@property (nonatomic, assign, readonly) CGPoint localCenter;
|
|
32
|
+
@property (nonatomic, assign) CGPoint linearVelocity;
|
|
33
|
+
@property (nonatomic, assign) CGFloat angularVelocity;
|
|
34
|
+
@property (nonatomic, assign, readonly) CGFloat mass;
|
|
35
|
+
@property (nonatomic, assign, readonly) CGFloat inertia;
|
|
36
|
+
@property (nonatomic, assign) B2DMassData *massData;
|
|
37
|
+
@property (nonatomic, assign) CGFloat linearDamping;
|
|
38
|
+
@property (nonatomic, assign) CGFloat angularDamping;
|
|
39
|
+
@property (nonatomic, assign) CGFloat gravityScale;
|
|
40
|
+
@property (nonatomic, assign, readonly) bool isBullet;
|
|
41
|
+
@property (nonatomic, assign) bool bullet;
|
|
42
|
+
@property (nonatomic, assign, readonly) bool isAwake;
|
|
43
|
+
@property (nonatomic, assign) bool awake;
|
|
44
|
+
@property (nonatomic, assign, readonly) bool isActive;
|
|
45
|
+
@property (nonatomic, assign, readonly) bool isFixedRotation;
|
|
46
|
+
@property (nonatomic, assign) bool fixedRotation;
|
|
47
|
+
@property (nonatomic, assign, readonly) bool isSleepingAllowed;
|
|
48
|
+
@property (nonatomic, assign) bool sleepingAllowed;
|
|
29
49
|
|
|
30
50
|
- (id)initWithBody:(b2Body *)boxBody;
|
|
31
51
|
|
|
52
|
+
- (bool)isEqualToBody:(B2DBody *)aBody;
|
|
53
|
+
- (void)resetMassData;
|
|
54
|
+
- (void)setTransformWithPosition:(CGPoint)position andAngle:(CGFloat)angle;
|
|
55
|
+
- (CGPoint)worldPoint:(CGPoint)localPoint;
|
|
56
|
+
- (CGPoint)worldVector:(CGPoint)localVector;
|
|
57
|
+
- (CGPoint)localPoint:(CGPoint)worldPoint;
|
|
58
|
+
- (CGPoint)localVector:(CGPoint)worldVector;
|
|
59
|
+
- (CGPoint)linearVelocityFromWorldPoint:(CGPoint)worldPoint;
|
|
60
|
+
- (CGPoint)linearVelocityFromLocalPoint:(CGPoint)localPoint;
|
|
61
|
+
- (NSArray *)fixtureList;
|
|
62
|
+
- (B2DBody *)next;
|
|
63
|
+
- (void)applyForce:(CGPoint)force atPoint:(CGPoint)point;
|
|
64
|
+
- (void)applyForceToCenter:(CGPoint)force;
|
|
65
|
+
- (void)applyTorque:(CGFloat)torque;
|
|
66
|
+
- (void)applyLinearImpulse:(CGPoint)impulse atPoint:(CGPoint)point;
|
|
67
|
+
- (void)applyAngularImpulse:(CGFloat)impulse;
|
|
68
|
+
- (void)createFixture:(B2DFixtureDef *)fixtureDefinition;
|
|
69
|
+
- (void)createFixtureWithShape:(B2DShape *)shape andDensity:(CGFloat)density;
|
|
70
|
+
- (void)destroyFixture:(B2DFixture *)fixture;
|
|
71
|
+
- (void)dump;
|
|
72
|
+
|
|
73
|
+
#pragma mark - Deprecated
|
|
74
|
+
|
|
75
|
+
@property (nonatomic, readonly) CGPoint center __attribute__ ((deprecated));
|
|
76
|
+
|
|
32
77
|
- (void)addFixtureForShape:(B2DShape *)shape
|
|
33
78
|
friction:(CGFloat)friction
|
|
34
79
|
restitution:(CGFloat)restitution
|
|
35
80
|
density:(CGFloat)density
|
|
36
|
-
isSensor:(BOOL)isSensor;
|
|
81
|
+
isSensor:(BOOL)isSensor __attribute__ ((deprecated));
|
|
37
82
|
|
|
38
83
|
- (void)applyForce:(CGPoint)force
|
|
39
84
|
atLocation:(CGPoint)location
|
|
40
|
-
asImpulse:(BOOL)asImpulse;
|
|
85
|
+
asImpulse:(BOOL)asImpulse __attribute__ ((deprecated));
|
|
41
86
|
|
|
42
87
|
|
|
43
88
|
- (void)applyTorque:(CGFloat)torque
|
|
44
|
-
asImpulse:(BOOL)impulse;
|
|
89
|
+
asImpulse:(BOOL)impulse __attribute__ ((deprecated));
|
|
45
90
|
|
|
46
91
|
@end
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
//
|
|
2
|
+
// B2DBodyDef.h
|
|
3
|
+
// Box2D
|
|
4
|
+
//
|
|
5
|
+
// Created by Juan Jose Karam on 6/15/13.
|
|
6
|
+
// Copyright (c) 2013 Joybox. All rights reserved.
|
|
7
|
+
//
|
|
8
|
+
|
|
9
|
+
#import <Foundation/Foundation.h>
|
|
10
|
+
#import "B2DBodyTypes.h"
|
|
11
|
+
|
|
12
|
+
@interface B2DBodyDef : NSObject {
|
|
13
|
+
B2DBodyTypes type;
|
|
14
|
+
CGPoint position;
|
|
15
|
+
CGFloat angle;
|
|
16
|
+
CGPoint linearVelocity;
|
|
17
|
+
CGFloat angularVelocity;
|
|
18
|
+
CGFloat linearDamping;
|
|
19
|
+
CGFloat angularDamping;
|
|
20
|
+
bool allowSleep;
|
|
21
|
+
bool awake;
|
|
22
|
+
bool fixedRotation;
|
|
23
|
+
bool bullet;
|
|
24
|
+
bool active;
|
|
25
|
+
CGFloat gravityScale;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
@property (nonatomic, assign) B2DBodyTypes type;
|
|
29
|
+
@property (nonatomic, assign) CGPoint position;
|
|
30
|
+
@property (nonatomic, assign) CGFloat angle;
|
|
31
|
+
@property (nonatomic, assign) CGPoint linearVelocity;
|
|
32
|
+
@property (nonatomic, assign) CGFloat angularVelocity;
|
|
33
|
+
@property (nonatomic, assign) CGFloat linearDamping;
|
|
34
|
+
@property (nonatomic, assign) CGFloat angularDamping;
|
|
35
|
+
@property (nonatomic, assign) bool allowSleep;
|
|
36
|
+
@property (nonatomic, assign) bool awake;
|
|
37
|
+
@property (nonatomic, assign) bool fixedRotation;
|
|
38
|
+
@property (nonatomic, assign) bool bullet;
|
|
39
|
+
@property (nonatomic, assign) bool active;
|
|
40
|
+
@property (nonatomic, assign) CGFloat gravityScale;
|
|
41
|
+
|
|
42
|
+
- (id)initWithBodyDef:(b2BodyDef)bodyDef;
|
|
43
|
+
|
|
44
|
+
@end
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
//
|
|
2
|
+
// B2DBodyTypes.h
|
|
3
|
+
// Box2D
|
|
4
|
+
//
|
|
5
|
+
// Created by Juan Jose Karam on 6/8/13.
|
|
6
|
+
// Copyright (c) 2013 Joybox. All rights reserved.
|
|
7
|
+
//
|
|
8
|
+
|
|
9
|
+
#ifndef Box2D_B2DBodyTypes_h
|
|
10
|
+
#define Box2D_B2DBodyTypes_h
|
|
11
|
+
|
|
12
|
+
typedef enum {
|
|
13
|
+
|
|
14
|
+
kStaticBodyType = 0,
|
|
15
|
+
kKinematicBodyType,
|
|
16
|
+
kDynamicBodyType
|
|
17
|
+
|
|
18
|
+
} B2DBodyTypes;
|
|
19
|
+
|
|
20
|
+
#endif
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
//
|
|
2
|
+
// B2DChainShape.h
|
|
3
|
+
// Box2D
|
|
4
|
+
//
|
|
5
|
+
// Created by Juan Jose Karam on 6/15/13.
|
|
6
|
+
// Copyright (c) 2013 Joybox. All rights reserved.
|
|
7
|
+
//
|
|
8
|
+
|
|
9
|
+
#import <Foundation/Foundation.h>
|
|
10
|
+
#import "B2DShape.h"
|
|
11
|
+
|
|
12
|
+
@class B2DEdgeShape;
|
|
13
|
+
|
|
14
|
+
@interface B2DChainShape : B2DShape
|
|
15
|
+
|
|
16
|
+
@property (nonatomic, assign, readonly) NSInteger vertexCount;
|
|
17
|
+
@property (nonatomic, assign, readonly) CGPoint *vertices;
|
|
18
|
+
@property (nonatomic, assign, readonly) bool hasPreviousVertex;
|
|
19
|
+
@property (nonatomic, assign, readonly) bool hasNextVertex;
|
|
20
|
+
|
|
21
|
+
- (void)createLoopWithVertices:(CGPoint *)vertices andVertexCount:(NSInteger)vertexCount;
|
|
22
|
+
- (void)createChainWithVertices:(CGPoint *)vertices andVertexCount:(NSInteger)vertexCount;
|
|
23
|
+
- (CGPoint)previousVertex;
|
|
24
|
+
- (void)setPreviousVertex:(CGPoint)vertex;
|
|
25
|
+
- (CGPoint)nextVertex;
|
|
26
|
+
- (void)setNextVertex:(CGPoint)vertex;
|
|
27
|
+
- (void)getChildEdge:(B2DEdgeShape *)edgeShape withIndex:(NSInteger)index;
|
|
28
|
+
|
|
29
|
+
@end
|
|
@@ -11,6 +11,13 @@
|
|
|
11
11
|
|
|
12
12
|
@interface B2DCircleShape : B2DShape
|
|
13
13
|
|
|
14
|
+
@property (nonatomic, assign, readonly) NSInteger vertexCount;
|
|
15
|
+
@property (nonatomic, assign, readonly) CGPoint position;
|
|
16
|
+
|
|
14
17
|
- (id)initWithRadius:(CGFloat)radius;
|
|
15
18
|
|
|
19
|
+
- (NSInteger)getSupport:(CGPoint)direction;
|
|
20
|
+
- (CGPoint)getSupportVertex:(CGPoint)direction;
|
|
21
|
+
- (CGPoint)getVertex:(NSInteger)index;
|
|
22
|
+
|
|
16
23
|
@end
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
//
|
|
2
|
+
// B2DColor.h
|
|
3
|
+
// Box2D
|
|
4
|
+
//
|
|
5
|
+
// Created by Juan José Karam on 7/4/13.
|
|
6
|
+
// Copyright (c) 2013 Joybox. All rights reserved.
|
|
7
|
+
//
|
|
8
|
+
|
|
9
|
+
#import <Foundation/Foundation.h>
|
|
10
|
+
|
|
11
|
+
@interface B2DColor : NSObject {
|
|
12
|
+
Float32 red;
|
|
13
|
+
Float32 green;
|
|
14
|
+
Float32 blue;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
@property (nonatomic, assign) Float32 red;
|
|
18
|
+
@property (nonatomic, assign) Float32 green;
|
|
19
|
+
@property (nonatomic, assign) Float32 blue;
|
|
20
|
+
|
|
21
|
+
- (id)initWithColor:(b2Color)color;
|
|
22
|
+
|
|
23
|
+
@end
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
//
|
|
2
|
+
// B2DContactFilter.h
|
|
3
|
+
// Box2D
|
|
4
|
+
//
|
|
5
|
+
// Created by Juan Jose Karam on 6/15/13.
|
|
6
|
+
// Copyright (c) 2013 Joybox. All rights reserved.
|
|
7
|
+
//
|
|
8
|
+
|
|
9
|
+
#import <Foundation/Foundation.h>
|
|
10
|
+
#import "ContactFilter.h"
|
|
11
|
+
|
|
12
|
+
@class B2DFixture;
|
|
13
|
+
|
|
14
|
+
typedef bool (^shouldCollideCallback)(B2DFixture *fixtureA, B2DFixture *fixtureB);
|
|
15
|
+
|
|
16
|
+
@interface B2DContactFilter : NSObject {
|
|
17
|
+
ContactFilter *contactFilter;
|
|
18
|
+
shouldCollideCallback shouldCollide;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
@property (nonatomic, assign) ContactFilter *contactFilter;
|
|
22
|
+
@property (nonatomic, copy) shouldCollideCallback shouldCollide;
|
|
23
|
+
|
|
24
|
+
@end
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
|
|
12
12
|
@class B2DBody;
|
|
13
13
|
|
|
14
|
-
typedef void (^beginContactCallback)(B2DBody *firstBody, B2DBody *secondBody,
|
|
14
|
+
typedef void (^beginContactCallback)(B2DBody *firstBody, B2DBody *secondBody, bool isTouching);
|
|
15
15
|
typedef void (^endContactCallback)(B2DBody *firstBody, B2DBody *secondBody);
|
|
16
16
|
|
|
17
17
|
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
//
|
|
2
|
+
// B2DDestructionListener.h
|
|
3
|
+
// Box2D
|
|
4
|
+
//
|
|
5
|
+
// Created by Juan Jose Karam on 6/15/13.
|
|
6
|
+
// Copyright (c) 2013 Joybox. All rights reserved.
|
|
7
|
+
//
|
|
8
|
+
|
|
9
|
+
#import <Foundation/Foundation.h>
|
|
10
|
+
#import "DestructionListener.h"
|
|
11
|
+
|
|
12
|
+
@class B2DFixture;
|
|
13
|
+
|
|
14
|
+
typedef void (^fixtureSayGoodbyeCallback)(B2DFixture *fixture);
|
|
15
|
+
|
|
16
|
+
@interface B2DDestructionListener : NSObject {
|
|
17
|
+
DestructionListener *destructionListener;
|
|
18
|
+
fixtureSayGoodbyeCallback fixtureSayGoodbye;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
@property (nonatomic, assign) DestructionListener *destructionListener;
|
|
22
|
+
@property (nonatomic, copy) fixtureSayGoodbyeCallback fixtureSayGoodbye;
|
|
23
|
+
|
|
24
|
+
@end
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
//
|
|
2
|
+
// B2DDraw.h
|
|
3
|
+
// Box2D
|
|
4
|
+
//
|
|
5
|
+
// Created by Juan José Karam on 6/29/13.
|
|
6
|
+
// Copyright (c) 2013 Joybox. All rights reserved.
|
|
7
|
+
//
|
|
8
|
+
|
|
9
|
+
#import <Foundation/Foundation.h>
|
|
10
|
+
#import "Draw.h"
|
|
11
|
+
|
|
12
|
+
@class B2DColor;
|
|
13
|
+
@class B2DTransform;
|
|
14
|
+
|
|
15
|
+
typedef enum {
|
|
16
|
+
|
|
17
|
+
kShapeDrawFlag = 0x0001,
|
|
18
|
+
kJointDrawFlag = 0x0002,
|
|
19
|
+
kAABBDrawFlag = 0x0004,
|
|
20
|
+
kPairDrawFlag = 0x0008,
|
|
21
|
+
kCenterOfMassDrawFlag = 0x0010
|
|
22
|
+
|
|
23
|
+
} B2DDrawingFlags;
|
|
24
|
+
|
|
25
|
+
typedef void (^drawPolygonCallback) (CGPoint *vertices, NSInteger vertexCount, B2DColor *color);
|
|
26
|
+
typedef void (^drawSolidPolygonCallback) (CGPoint *vertices, NSInteger vertexCount, B2DColor *color);
|
|
27
|
+
typedef void (^drawCircleCallback) (CGPoint center, float radius, B2DColor *color);
|
|
28
|
+
typedef void (^drawSolidCircleCallback) (CGPoint center, float radius, CGPoint axis, B2DColor *color);
|
|
29
|
+
typedef void (^drawSegmentCallback) (CGPoint point1, CGPoint point2, B2DColor *color);
|
|
30
|
+
typedef void (^drawTransformCallback) (B2DTransform *transform);
|
|
31
|
+
|
|
32
|
+
@interface B2DDraw : NSObject {
|
|
33
|
+
Draw *draw;
|
|
34
|
+
drawPolygonCallback drawPolygon;
|
|
35
|
+
drawSolidPolygonCallback drawSolidPolygon;
|
|
36
|
+
drawCircleCallback drawCircle;
|
|
37
|
+
drawSolidCircleCallback drawSolidCircle;
|
|
38
|
+
drawSegmentCallback drawSegment;
|
|
39
|
+
drawTransformCallback drawTransform;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
@property (nonatomic, assign) Draw *draw;
|
|
43
|
+
@property (nonatomic, assign) unsigned int drawFlags;
|
|
44
|
+
@property (nonatomic, copy) drawPolygonCallback drawPolygon;
|
|
45
|
+
@property (nonatomic, copy) drawSolidPolygonCallback drawSolidPolygon;
|
|
46
|
+
@property (nonatomic, copy) drawCircleCallback drawCircle;
|
|
47
|
+
@property (nonatomic, copy) drawSolidCircleCallback drawSolidCircle;
|
|
48
|
+
@property (nonatomic, copy) drawSegmentCallback drawSegment;
|
|
49
|
+
@property (nonatomic, copy) drawTransformCallback drawTransform;
|
|
50
|
+
|
|
51
|
+
- (void)appendDrawFlags:(unsigned int)flags;
|
|
52
|
+
- (void)clearDrawFlags:(unsigned int)flags;
|
|
53
|
+
|
|
54
|
+
@end
|
|
@@ -11,7 +11,18 @@
|
|
|
11
11
|
|
|
12
12
|
@interface B2DEdgeShape : B2DShape
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
@property (nonatomic, assign, readonly) CGPoint startVertex;
|
|
15
|
+
@property (nonatomic, assign, readonly) CGPoint endVertex;
|
|
16
|
+
@property (nonatomic, assign, readonly) bool hasStartAdjacentVertex;
|
|
17
|
+
@property (nonatomic, assign, readonly) CGPoint startAdjacentVertex;
|
|
18
|
+
@property (nonatomic, assign, readonly) bool hasEndAdjacentVertex;
|
|
19
|
+
@property (nonatomic, assign, readonly) CGPoint endAdjacentVertex;
|
|
20
|
+
|
|
21
|
+
- (id)initWithStartVertex:(CGPoint)startVertex endVertex:(CGPoint)endVertex;
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
#pragma mark - Deprecated
|
|
25
|
+
|
|
26
|
+
- (id)initWithStartPoint:(CGPoint)startPoint endPoint:(CGPoint)endPoint __attribute__ ((deprecated));
|
|
16
27
|
|
|
17
28
|
@end
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
//
|
|
2
|
+
// B2DFilter.h
|
|
3
|
+
// Box2D
|
|
4
|
+
//
|
|
5
|
+
// Created by Juan Jose Karam on 6/15/13.
|
|
6
|
+
// Copyright (c) 2013 Joybox. All rights reserved.
|
|
7
|
+
//
|
|
8
|
+
|
|
9
|
+
#import <Foundation/Foundation.h>
|
|
10
|
+
|
|
11
|
+
@interface B2DFilter : NSObject {
|
|
12
|
+
NSUInteger categoryBits;
|
|
13
|
+
NSUInteger maskBits;
|
|
14
|
+
NSInteger groupIndex;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
@property (nonatomic, assign) NSUInteger categoryBits;
|
|
18
|
+
@property (nonatomic, assign) NSUInteger maskBits;
|
|
19
|
+
@property (nonatomic, assign) NSInteger groupIndex;
|
|
20
|
+
|
|
21
|
+
- (id)initWithFilter:(b2Filter)filter;
|
|
22
|
+
|
|
23
|
+
@end
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
//
|
|
2
|
+
// B2DFixture.h
|
|
3
|
+
// Box2D
|
|
4
|
+
//
|
|
5
|
+
// Created by Juan Jose Karam on 6/8/13.
|
|
6
|
+
// Copyright (c) 2013 Joybox. All rights reserved.
|
|
7
|
+
//
|
|
8
|
+
|
|
9
|
+
#import <Foundation/Foundation.h>
|
|
10
|
+
#import "B2DShapeTypes.h"
|
|
11
|
+
|
|
12
|
+
@class B2DShape;
|
|
13
|
+
@class B2DFilter;
|
|
14
|
+
@class B2DBody;
|
|
15
|
+
@class B2DRayCastOutput;
|
|
16
|
+
@class B2DRayCastInput;
|
|
17
|
+
@class B2DMassData;
|
|
18
|
+
@class B2DAABB;
|
|
19
|
+
|
|
20
|
+
@interface B2DFixture : NSObject {
|
|
21
|
+
|
|
22
|
+
b2Fixture *fixture;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
@property (nonatomic, assign) b2Fixture *fixture;
|
|
26
|
+
@property (nonatomic, assign, readonly) B2DShapeTypes type;
|
|
27
|
+
@property (nonatomic, assign, readonly) B2DShape *shape;
|
|
28
|
+
@property (nonatomic, assign, readonly) bool isSensor;
|
|
29
|
+
@property (nonatomic, assign) bool sensor;
|
|
30
|
+
@property (nonatomic, assign) B2DFilter *filterData;
|
|
31
|
+
@property (nonatomic, assign, readonly) B2DBody *body;
|
|
32
|
+
@property (nonatomic, assign) id userData;
|
|
33
|
+
@property (nonatomic, assign) CGFloat density;
|
|
34
|
+
@property (nonatomic, assign) CGFloat friction;
|
|
35
|
+
@property (nonatomic, assign) CGFloat restitution;
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
- (id)initWithFixture:(b2Fixture *)boxFixture;
|
|
39
|
+
- (void)refilter;
|
|
40
|
+
- (B2DFixture *)next;
|
|
41
|
+
- (bool)testPoint:(CGPoint)point;
|
|
42
|
+
- (bool)rayCastWithOutput:(B2DRayCastOutput *)output input:(B2DRayCastInput *)input andChildIndex:(NSInteger)childIndex;
|
|
43
|
+
- (B2DMassData *)massData;
|
|
44
|
+
- (B2DAABB *)aabb:(NSInteger)childIndex;
|
|
45
|
+
- (void)dump:(NSInteger)bodyIndex;
|
|
46
|
+
|
|
47
|
+
@end
|