Skip to content

Commit 5314d7b

Browse files
committed
Merge branch 'dev'
2 parents ee749f3 + 60c4b53 commit 5314d7b

File tree

265 files changed

+1605
-929
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

265 files changed

+1605
-929
lines changed

README.md

+16-49
Original file line numberDiff line numberDiff line change
@@ -1,63 +1,30 @@
1-
Release Notes 0.6.0
1+
Release Notes 0.6.1
22

33
Kiwi.js (BETA)
44
=====
55

66
###HTML5 game library written in TypeScript/Javascript
77
-----------------------------------------------------------------
88

9-
version 0.6.0
9+
version 0.6.1
1010

1111
###Release notes for this version
1212

13-
####New Features and major updates
14-
* Tilemap system has been totally revmped (see below)
15-
* The four core gameobjects (Sprite, staticImage, Tilemap and Textfield) now all render in both 2d canvas and WebGL.
16-
* WebGL rendering system has been greatly expanded, allowing the easy addition custom renderers and shaders when writing plugins.
17-
Examples are forthcoming.
13+
1814

19-
####Bug Fixes
20-
- Fixed bug that would stop Kiwi from working on Safari on the iPad 2.
21-
- Reimplement Kiwi.DEVICE.touch. Was previously commented out.
22-
- Fixed issue where destroying groups would generate an error when switching states.
23-
- Fixed the 'cocoon.php' Previously was generating a js error and so the settings were not being taken into affect.
24-
25-
####Changes (no impact on pre-existing API)
26-
- Entity now has a rendererGL property and a renderGL method that can be overriden by WebGL compatible gameobjects.
27-
- The list of Base2 sizes are now stored as a Static property on the Kiwi.Utils.Common.
28-
- A method for resizing a Image/Canvas to be Base2 is now on the Kiwi.Utils.Common.
29-
- Textfields now always use the 'optimised' version and the 'unoptimised' version has been removed.
30-
- Pointers (Mouse/Touch Input)
31-
- Now takes the scale of stage into consideration. Thus making inputs more accurate when smaller/enlarged.
32-
- Stage
33-
- Now contains a 'scale' property, which keeps track of how much the 'stage' has been scaled down due to CSS. In Cocoon this is always at 1 for now.
34-
- The offset of the stage and scale is now re-calculated when the browser is resized.
35-
- Kiwi.Files Object
36-
- File class on Kiwi has be refactored.
37-
- The XHR loading method now times-out after 4000 milliseconds, previously was 2000.
38-
- You can tell the XHR to not timeout by setting the delay to null.
39-
- Arcade Physics
40-
- New method 'isTouching' has been added. Used just like the flixel 'touching' equivalent.
41-
- Now can affect rotation/angle of attached GameObjects.
42-
- Can now resolve collisions vs tiles in a TileMapLayer using the 'overlapsTiles' method.
43-
- States
44-
- Code has been refactored.
45-
- Redundant checks and conditions removed.
46-
- StateConfig now keeps track of how many times a State has been switched to/used.
47-
- Now have a 'shutDown' method which developers override. Is called just before a state is destroyed.
48-
- Nicer messages appear throughout the state process.
49-
- Example Folder.
50-
- New examples for ArcadePhysics have been added.
51-
- A few new examples for Groups have been added.
52-
- A list of TileMap examples have been implemented.
53-
54-
55-
####Changes to API pre-exisiting API in this release
56-
- Previous property 'visibility' on Entities has been renamed to visible.
57-
- New Tilemap system has been implemented.
58-
- You can now use TextureAtlases when creating Tilemaps.
59-
- JSON format used when creating a Tilemap is the same as Tiled.
60-
- See the examples and docs for more documentation.
15+
####Bug Fixes and changes
16+
- Audio that cannot be decoded/isn't supported by the browser are no longer loaded by default. Done so that games no longer crash when an audio piece could not load.
17+
- TextField GameObject no longer generates a image of the text when rendering.
18+
- Keys
19+
- Duration property has been implemented. Returns the number of milliseconds a key has been held down for.
20+
- Repeat property has been implemented. Contains the number of times the 'onkeydown' event has fired for that Key. Is reset with each subsequent release/press.
21+
- JustReleased/JustPressed methods have been implemented.
22+
- New property 'preventDefault' added. This boolean tells the key whether to 'prevent' any default functionality for that key or not when it is pressed/released.
23+
- Keyboard
24+
- A new signal named 'onKeyDownOnce' has been added. This signal only dispatches a single event with each key-press, which is the first time a key has been pressed but not any subsequent events if the key is held.
25+
- JustPressed/JustReleased methods have been implemented.
26+
- New parameter (preventDefault) added to 'addKey' method. See the new property 'preventDefault' for more information.
27+
6128

6229
###Known Issues
6330
The WebGL/Cocoon combination is not currently stable and some visual errors may occur. This is due to internal coocoon issues and we're working with Ludei to improve stability.

build/kiwi.d.ts

+8-6
Original file line numberDiff line numberDiff line change
@@ -748,7 +748,7 @@ declare module Kiwi.Files {
748748
public addImage(key: string, url: string, width?: number, height?: number, offsetX?: number, offsetY?: number, storeAsGlobal?: boolean): void;
749749
public addSpriteSheet(key: string, url: string, frameWidth: number, frameHeight: number, numCells?: number, rows?: number, cols?: number, sheetOffsetX?: number, sheetOffsetY?: number, cellOffsetX?: number, cellOffsetY?: number, storeAsGlobal?: boolean): void;
750750
public addTextureAtlas(key: string, imageURL: string, jsonID: string, jsonURL: string, storeAsGlobal?: boolean): void;
751-
public addAudio(key: string, url: string, storeAsGlobal?: boolean): void;
751+
public addAudio(key: string, url: string, storeAsGlobal?: boolean, onlyIfSupported?: boolean): void;
752752
public addJSON(key: string, url: string, storeAsGlobal?: boolean): void;
753753
public addXML(key: string, url: string, storeAsGlobal?: boolean): void;
754754
public addBinaryFile(key: string, url: string, storeAsGlobal?: boolean): void;
@@ -973,7 +973,6 @@ declare module Kiwi.GameObjects {
973973
private _canvas;
974974
private _ctx;
975975
private _tempDirty;
976-
public img: any;
977976
private _renderText();
978977
public render(camera: Kiwi.Camera): void;
979978
public renderGL(gl: WebGLRenderingContext, camera: Kiwi.Camera, params?: any): void;
@@ -1782,6 +1781,8 @@ declare module Kiwi.Animations {
17821781
declare module Kiwi.Input {
17831782
class Key {
17841783
constructor(manager: Input.Keyboard, keycode: number, event?: KeyboardEvent);
1784+
public preventDefault: boolean;
1785+
public game: Kiwi.Game;
17851786
public objType(): string;
17861787
private _manager;
17871788
public keyCode: number;
@@ -1791,7 +1792,7 @@ declare module Kiwi.Input {
17911792
public ctrlKey: boolean;
17921793
public shiftKey: boolean;
17931794
public timeDown: number;
1794-
public duration: number;
1795+
public duration : number;
17951796
public timeUp: number;
17961797
public repeats: number;
17971798
public update(event: KeyboardEvent): void;
@@ -1813,13 +1814,14 @@ declare module Kiwi.Input {
18131814
public update(): void;
18141815
public onKeyUp: Kiwi.Signal;
18151816
public onKeyDown: Kiwi.Signal;
1817+
public onKeyDownOnce: Kiwi.Signal;
18161818
public start(): void;
18171819
public stop(): void;
18181820
private _keyPressed(event);
18191821
private _keyReleased(event);
1820-
public addKey(keycode: number): Input.Key;
1821-
public justPressed(key: any, duration?: number): void;
1822-
public justReleased(key: any, duration?: number): void;
1822+
public addKey(keycode: number, preventDefault?: boolean): Input.Key;
1823+
public justPressed(keycode: any, duration?: number): boolean;
1824+
public justReleased(keycode: any, duration?: number): boolean;
18231825
public isDown(keycode: number): boolean;
18241826
public isUp(keycode: number): boolean;
18251827
public reset(): void;

0 commit comments

Comments
 (0)