Initial version
Changed location of 'modernizr' and 'pixi.dev' scripts.Removed 'requestAnimationFrame' function definition. Removed 'Rectangle' constructor function and prototype definition. Changed parameters of 'Circle' contructor function and function definition. The prototype of 'Circle' function is set to an object that inherits 'PIXI.Sprite.prototype' object. Added 'updatePosition' method to 'Circle' prototype which updates circle's position, checks if circle collide with walls and blocks, checks if circle is out of the screen and removes it if it is. Changed 'wallCollide' method of 'Circle', circle is removed if it passes bottom of the screen. Removed 'radius' property from 'Circle' object because the anchor point is at the top left corner of a virtual rectangle surrounding circle. Changed 'hitTestBlock' method of 'Circle' prototype, removed the 'radius' property from calculations. Changed 'blockCollide' method of 'Circle' prototype, removed the 'radius' property from calculations, added 2 when checking if block is hit by circle from downside. Changed 'getIntersectionRect' method of 'Circle' prototype, removed 'radius' property from calculations. Changed 'World' constructor function, slider replace by 'PIXI.Sprite' object. Removed 'removeCircle' method from 'World' prototype. Added 'removeOutOfScreenCircles' method to 'World' prototype. Removed 'drawBackground' method from 'World' prototype. Added 'addMessage' method to 'World' prototype. Added 'updateCirclesPositions' to 'World' prototype. Added 'updateSliderPosition' to 'World' prototype. Changed 'draw' method of 'World' prototype. Changed 'onWindowLoaded' function, added code for loading assets using 'PIXI.AssetsLoader' object.
Changed location of 'modernizr' and 'pixi.dev' scripts.Removed 'requestAnimationFrame' function definition. Removed 'Rectangle' constructor function and prototype definition. Changed parameters of 'Circle' contructor function and function definition. The prototype of 'Circle' function is set to an object that inherits 'PIXI.Sprite.prototype' object. Added 'updatePosition' method to 'Circle' prototype which updates circle's position, checks if circle collide with walls and blocks, checks if circle is out of the screen and removes it if it is. Changed 'wallCollide' method of 'Circle', circle is removed if it passes bottom of the screen. Removed 'radius' property from 'Circle' object because the anchor point is at the top left corner of a virtual rectangle surrounding circle. Changed 'hitTestBlock' method of 'Circle' prototype, removed the 'radius' property from calculations. Changed 'blockCollide' method of 'Circle' prototype, removed the 'radius' property from calculations, added 2 when checking if block is hit by circle from downside. Changed 'getIntersectionRect' method of 'Circle' prototype, removed 'radius' property from calculations. Changed 'World' constructor function, slider replace by 'PIXI.Sprite' object. Removed 'removeCircle' method from 'World' prototype. Added 'removeOutOfScreenCircles' method to 'World' prototype. Removed 'drawBackground' method from 'World' prototype. Added 'addMessage' method to 'World' prototype. Added 'updateCirclesPositions' to 'World' prototype. Added 'updateSliderPosition' to 'World' prototype. Changed 'draw' method of 'World' prototype. Changed 'onWindowLoaded' function, added code for loading assets using 'PIXI.AssetsLoader' object.
File that contains about texture, their location in the sprite sheet image etc.
Sprite sheet image
Changed default position of circle from (0,0) to (circle's width + 1, circle's height + 1). Changed collision point for circle when accessing block from bottom. Changed world dimension to 800x600.
Folder for project files
Changed DynamicBody class, vel and angle properties are set from options values only if appropriate options value is undefined, added stopAnimation and type properties, added updateTransform method which updates position and other properties of DynamicBody object, added onUpdateTransformed prototype callback, changed wallCollide method, now if an object crosses over defined position the onOutOfScreenCallback is triggered. Changed Gift class, added onUpdateTransformed method. Changed Slider class constructor function, x and y positions are set from options values only if they are defined. Added onUpdateTransformed callback to Slider prototype. Changed World prototype methods.
Project files and images
Merge branch 'development'
Changed DynamicBody prototype, added getCollidableBodies method which returns an array of bodies an object can collide with, changed blocksCollide method, now an object can collide only with bodies returned from getCollidableBodies method, bodies can collide only if both bodies are visible. Changed Circle prototype, added getCollidableBodies method. Changed Gift constructor function, added action instance property, changed onUpdateTransform method, now code inside the method is executed only if a body is visible, added getCollidableBodies method, changed onBlockCollided method, added code that calls a function represented by the action property if the action property is set. Added Ball3Gift constructor function and prototype. Added HandGift constructor function and prototype. Changes Slider prototype, added getCollidableBodies method, added onBlockCollided method. Changed World constructor function, removed ball3GiftTexturesLength, ball3GiftTextures, circleTexture and blockTexture variable, create circleTexture and sliderTexture instance properties, code that created circle objects replaced with appropriate calls to createCircle and addCircle methods of a World object, added BLOCKS_TEXTURE_NAMES, BALL_TEXTURE_NAME and SLIDER_TEXTURE_NAME constants, added addCircle and createCircle method.
Changed 'DynamicBody' constructor function, removed 'type' instance property. Changed 'Circle' constructor function, added 'type' instance property. Changed 'Gift' constructor function, added 'type' instance property. Changed 'HandGift' constructor function, changed value of 'HandGiftTexturesLength' from 6 to 7, changed format of textures from '3balls%i.png' to 'hand%i.png'.Changed World constructor function, added code for adding 'HandGift' bodies to block bodies. Changed World's 'addGift' method, 'play' function placed at the end of the workflow, changed 'stopAnimation' method, 'stopAnimation' property is set only if a body is of type 'circle', 'slider', 'gift'.
Changed 'Gift' class's 'onBlockCollided' method, instead of calling gift action function call to action's 'init' method is made. Changed 'Balls3Gift' class's constructor function, the gift's 'action' function returns an object with 'init'. Changed 'HandGift' class's constructor function, the gift's action function is completly refactored. Changed 'Slider' class, added 'KEY_DOWN' and 'KEY_UP' constants to 'Slider' function.
Changed 'Slider' constructor function, 'keydown' and 'keyup' values, when adding event listeners, replaced with constant values Slider.KEY_DOWN and Slider.KEY_UP.
Updated sprite sheets, added hand gift images.
Added node.js 'karma' and 'karma-mocha' packages.
Merge branch 'hand_gift' into feature/attach_start_ball_to_the_slider
Merge branch 'feature/attach_start_ball_to_the_slider' into development
Merge branch 'development'
File contains javascript code for the Batty game