Skip to content

Commit 9262a20

Browse files
authored
Merge pull request #45 from MassiveHeights/v0.6.x-dev
v0.5.5-stable
2 parents f8c6513 + 445f332 commit 9262a20

Some content is hidden

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

49 files changed

+2750
-570
lines changed

CHANGELOG.md

Lines changed: 47 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,50 @@
11
Black Engine: Changelog
22
=======================
3-
v0.5.1
4-
------
3+
4+
# v0.5.5
5+
### New features
6+
- Added support for Black Vector Graphics (beta)
7+
- Added orientation lock support
8+
- Added Graphics to optionally accept either string or GraphicsData instance
9+
- Added skew via `skewX` and `skewY` properties in the `DisplayObject`
10+
- Added support for 9 grid slice
11+
- Added sprite tiling support
12+
- Added sprite wrapping support
13+
- Added [svg2bvg](https://github.com/MassiveHeights/svg2bvg) tool which converts SVG files into BVG
14+
- Added [bsa-gen](https://github.com/MassiveHeights/bsa-gen) tool to generate sound atlases from multiple audio files
15+
- Added Timer component
16+
- Added `GameObject#relativeTo` method to calculates GameObject's position relative to another GameObject
17+
- Added `Graphics#quadraticCurveTo` method
18+
- Added `Graphics#setLineDash` method
19+
- Added optional param `isNonZero` for `Graphics#fill` method to control winding order
20+
- Added `GraphicsData` class. Now you can have many graphics objects inside one Graphics GameObject.
21+
22+
### Changes
23+
- Graphics internally changed and now supports nested graphics via GraphicsData object
24+
- Changed Black Texture Atlas format to support version number (internal)
25+
26+
### Bug Fixes
27+
- Fixed incorrect font bounds on different platforms by changing the way how its calculated. Now it checks font height using `pixel by pixel` method. Line height is a bit smaller from now. But overall font metrics looks good and exactly the same on different browsers.
28+
29+
### Examples & Docs
30+
- Added tutorial about how to use "bsa-gen" tool to generate sound atlas
31+
- Added tutorial about how to use "svg2bvg" tool and vector graphics in your app
32+
- Added tutorial about how to use texture atlases
33+
- Added 3 timer examples
34+
- Added "Vector As a Sprite"
35+
- Added "Orientation Lock" example
36+
- Added "Texture Repeat" example
37+
- Added "Slice 9 Grid" example
38+
- Added "Skew" example
39+
40+
# v0.5.1
541
- Fixed broken `visible` property
642
- Fixed broken overhearing
743
- Fixed missing `Stage#onUpdate` calls
844
- Added `TextField#highQuality` property to control how TextField will be rendered
945
- Added many tests
1046

11-
v0.5.0
12-
------
47+
# v0.5.0
1348
- Added Arcade physics system
1449
- Added `Black.ups` property to control number of updates per second (render goes as fast as it can)
1550
- Added `Time.alpha` - indicates how much time has been passed since last update in range from 0 to 1
@@ -23,8 +58,7 @@ v0.5.0
2358
- Fixed missing onRemoved call when removing children within onRemoved method
2459
- Improved `getBounds` performance for clipped objects
2560

26-
v0.4.0
27-
------
61+
# v0.4.0
2862
- Graphics reworked (now it has bounds and API similar to HTML canvas)
2963
- `AssetManager` dramatically improved
3064
- TextField now posts `change` message when text is changed
@@ -41,8 +75,7 @@ v0.3.5
4175
- Added `Input.once` method
4276
- Added `Glob` class
4377

44-
v0.3.42
45-
-------
78+
# v0.3.42
4679
- Added `Black#hasSystem` method
4780
- Added `GameObject.scale` property
4881
- Added `GameObject.getStageBounds` helper method
@@ -67,12 +100,10 @@ v0.3.42
67100
- Removed `VideoNullDriver.renderResolution`
68101
- Minor refactoring
69102

70-
v0.3.41
71-
-------
103+
# 0.3.41
72104
- Fixed incorrect alignPivot and alignPivotOffset
73105

74-
v0.3.4
75-
------
106+
# 0.3.4
76107
- Added BitmapTextField
77108
- Added Audio support (spatial, audio atlas, sound effects)
78109
- Added Stage, stage scale modes and orientations
@@ -97,16 +128,14 @@ v0.3.4
97128
- Removed pivotX/pivotY, use pivotOffsetX/pivotOffsetY instead
98129
- Typed 95% for GCC
99130

100-
v0.0.12a
101-
--------
131+
# v0.0.12a
102132
- Fixed TextField align issues caused by new pivot logic
103133
- Fixed DOMDriver align issues caused by new pivot logic
104134
- Fixed `Matrix::translate` broken logic
105135
- Changed `VideoDriver::DrawImage` now accepts bounds
106136
- Minor jsdoc fixess
107137

108-
v0.0.11a
109-
--------
138+
# v0.0.11a
110139
- Reworked `Input`
111140
- Now `Input` is single target system
112141
- Added `pointerIn` and `pointerOut` messages
@@ -125,8 +154,7 @@ v0.0.11a
125154
- Updated `Viewport`, now it will automatically add missing CSS styles on start.
126155

127156

128-
v0.0.10a
129-
--------
157+
# v0.0.10a
130158
- Added dist folder to github
131159
- Added `touchable` to the `Sprite`
132160
- Fixed package.json version mess
@@ -135,6 +163,5 @@ v0.0.10a
135163
- Moved examples to external repo
136164
- Renamed `Assert` to `Debug`
137165

138-
v0.0.8a
139-
------------------------
166+
# v0.0.8a
140167
- Initial commit

TexturePacker/black/black.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
1-
{"frames":{{% for sprite in allSprites %}
1+
{
2+
"format": "bta",
3+
"v": "1.0",
4+
"frames":{{% for sprite in allSprites %}
25
"{{sprite.trimmedName}}":[{{sprite.frameRect.x}},{{sprite.frameRect.y}},{{sprite.frameRect.width}},{{sprite.frameRect.height}},{{sprite.sourceRect.x}},{{sprite.sourceRect.y}},{{sprite.untrimmedSize.width}},{{sprite.untrimmedSize.height}}]{% if not forloop.last %},{% endif %}{% endfor %}}}

build.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@
6161
"src/assets/BitmapFontAsset.js",
6262
"src/assets/SoundAsset.js",
6363
"src/assets/SoundAtlasAsset.js",
64+
"src/assets/BVGAsset.js",
6465
"src/assets/AssetManagerState.js",
6566
"src/assets/AssetManager.js",
6667

@@ -85,11 +86,14 @@
8586
"src/drivers/canvas/CanvasDriver.js",
8687

8788
"src/display/DisplayObject.js",
89+
"src/display/GraphicsData.js",
8890
"src/display/Graphics.js",
8991
"src/display/GraphicsCommand.js",
9092
"src/display/GraphicsCommandType.js",
9193
"src/display/CapsStyle.js",
9294
"src/display/JointStyle.js",
95+
"src/display/FillRule.js",
96+
"src/display/TilingInfo.js",
9397
"src/display/Sprite.js",
9498
"src/display/text/TextStyle.js",
9599
"src/display/text/TextField.js",
@@ -172,8 +176,14 @@
172176

173177
"src/physics/arcade/Arcade.js",
174178

179+
"src/parsers/ParserBase.js",
180+
"src/parsers/BVGParser.js",
181+
"src/parsers/BVGStyle.js",
182+
175183
"src/core/SplashScreen.js",
176184

185+
"src/timers/Timer.js",
186+
177187
"src/Black.js"
178188
]
179189
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "black",
3-
"version": "0.5.1",
3+
"version": "0.5.5",
44
"description": "",
55
"main": "dist/black-es6-module.js",
66
"directories": {},

src/Black.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ class Black extends MessageDispatcher {
273273
return;
274274
}
275275

276-
this.constructor.instance = this;
276+
Black.instance = this;
277277

278278
if (this.mIsStarted === true)
279279
return;
@@ -649,7 +649,7 @@ class Black extends MessageDispatcher {
649649
}
650650

651651
/**
652-
* Gets/Sets if engine should be automatically paused when container element is blured.
652+
* Gets/Sets if engine should be automatically paused when container element is blurred.
653653
*
654654
* @return {boolean}
655655
*/
@@ -687,7 +687,7 @@ class Black extends MessageDispatcher {
687687
}
688688

689689
/**
690-
* Retuns HTML comtainer element id.
690+
* Returns HTML container element id.
691691
* @returns {string}
692692
*/
693693
get containerElementId() {
@@ -769,4 +769,4 @@ Black.numUpdates = 0;
769769
* Limit for number of updates to be done per one RAF.
770770
* @public
771771
*/
772-
Black.maxUpdatesPerFrame = 60;
772+
Black.maxUpdatesPerFrame = 60;

src/animation/Tween.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@ class Tween extends Component {
9090
/** @private @type {function(number):number} */
9191
this.mEase = Tween.DEFAULT_EASE;
9292

93-
// TODO: fix ESDOC issue
9493
if (this.mProperties !== null) {
9594
for (let f in this.mProperties) {
9695
this[f] = /** @dict */ (this.mProperties[f]);

src/assets/Asset.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ class Asset extends MessageDispatcher {
7070
this.abort();
7171

7272
/**
73-
* Posted when error occured during loading this asset.
73+
* Posted when error occurred during loading this asset.
7474
* @event Asset#error
7575
*/
7676
this.post(Message.ERROR);
@@ -96,7 +96,7 @@ class Asset extends MessageDispatcher {
9696
}
9797

9898
/**
99-
* Protected method used to notify AssetManager about completition of loading this asset.
99+
* Protected method used to notify AssetManager about completion of loading this asset.
100100
*
101101
* @protected
102102
* @param {Object=} data
@@ -107,7 +107,7 @@ class Asset extends MessageDispatcher {
107107
this.mIsReady = true;
108108

109109
/**
110-
* Posten when asset finished loading.
110+
* Posted when asset finished loading.
111111
* @event Asset#complete
112112
*/
113113
this.post(Message.COMPLETE);

0 commit comments

Comments
 (0)