Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
PhaserEditor2D committed Dec 23, 2020
2 parents 785d12b + f5fcd03 commit cc3e08b
Show file tree
Hide file tree
Showing 100 changed files with 275,942 additions and 217,558 deletions.
23 changes: 23 additions & 0 deletions CHANGELOG.MD
Original file line number Diff line number Diff line change
@@ -1,5 +1,28 @@
# Change Log

## v3.9.10 - Dec 22, 2020

### Added

* Scene Editor: support for all tilemap orientation.
* Scene Editor: Bitmap Text shadow properties.
* Scene Editor: Layer object.

### Updated

* Adopt Phaser v3.50.
* Scene Editor: uses WEBGL for scene's thumbnail generation.
* Scene Editor: set origin commands now uses Ctrl+Numpad instead Shift+Numpad.
* Project templates:
* Migrated Sunny Land template to Phaser v3.50.
* When running the server in `-dev` mode, don't use Monaco editor dev files. This fixes the `-dev` option when it's used along.

### Fixed

* Editor tab context menu misspelling "Close to the right Right".
* Scene Editor: validates a tilemap's tileset doesn't have an external source.
* Scene Editor: catches error when accessing localforage for storing the thumbnail image.

## Version 3.9.2 - Dec 7, 2020

* Viewer: massive improvement of rendering performance.
Expand Down
4,437 changes: 4,437 additions & 0 deletions design/inkscape/icons.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 8 additions & 2 deletions scripts/make-all-help-files.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,10 @@ utils.makeHelpFile([
"Phaser.GameObjects.BitmapText.align",
"Phaser.GameObjects.BitmapText.setFontSize",
"Phaser.GameObjects.BitmapText.setLetterSpacing",
"Phaser.GameObjects.BitmapText.dropShadowX",
"Phaser.GameObjects.BitmapText.dropShadowY",
"Phaser.GameObjects.BitmapText.dropShadowColor",
"Phaser.GameObjects.BitmapText.dropShadowAlpha",


"Phaser.Tilemaps.Tilemap",
Expand All @@ -170,8 +174,8 @@ utils.makeHelpFile([
"Phaser.Tilemaps.Tileset.tileMargin",
"Phaser.Tilemaps.Tileset.tileSpacing",

"Phaser.Tilemaps.StaticTilemapLayer",
"Phaser.Tilemaps.DynamicTilemapLayer",
"Phaser.Tilemaps.TilemapLayer",
"Phaser.Tilemaps.TilemapLayer",

"Phaser.Tilemaps.LayerData",
"Phaser.Tilemaps.LayerData.name",
Expand Down Expand Up @@ -204,6 +208,8 @@ utils.makeHelpFile([
"Phaser.Geom.Triangle.y2",
"Phaser.Geom.Triangle.x3",
"Phaser.Geom.Triangle.y3",

"Phaser.GameObjects.Layer",

], "../source/editor/plugins/phasereditor2d.scene/data/phaser-docs.json");

Expand Down
14 changes: 0 additions & 14 deletions source/editor/plugins/colibri/src/lang/ApplyMixins.ts

This file was deleted.

2 changes: 1 addition & 1 deletion source/editor/plugins/colibri/src/ui/controls/Controls.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ namespace colibri.ui.controls {
this._textWidthMap.set(textKey, width);
}

return width * DEVICE_PIXEL_RATIO;
return width;
}

static setDragEventImage(e: DragEvent, render: (ctx: CanvasRenderingContext2D, w: number, h: number) => void) {
Expand Down
2 changes: 1 addition & 1 deletion source/editor/plugins/colibri/src/ui/ide/EditorArea.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ namespace colibri.ui.ide {
}));

menu.add(new controls.Action({
text: "Close to the right Right",
text: "Close to the Right",
callback: () => {

const editor = controls.TabPane.getContentFromLabel(labelElement) as EditorPart;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ namespace colibri.ui.ide.actions {
keys: {
control: true,
alt: true,
key: " "
key: "Space"
}
});
}
Expand Down Expand Up @@ -268,7 +268,7 @@ namespace colibri.ui.ide.actions {
);

manager.addKeyBinding(CMD_EXPAND_COLLAPSE_BRANCH, new KeyMatcher({
key: " "
key: "Space"
}));

// escape
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ namespace colibri.ui.ide.commands {
alt?: boolean;
meta?: boolean;
key?: string;
keyLabel?: string;
filterInputElements?: boolean;
}

Expand Down Expand Up @@ -48,7 +49,7 @@ namespace colibri.ui.ide.commands {

if (this._key) {

keys.push(this._key.replace(" ", "Space"));
keys.push(this._key);
}

return keys.join("+");
Expand All @@ -59,7 +60,7 @@ namespace colibri.ui.ide.commands {
return (event.ctrlKey || event.metaKey) === this._control
&& event.shiftKey === this._shift
&& event.altKey === this._alt
&& event.key.toLowerCase() === this._key.toLowerCase();
&& (event.key.toLowerCase() === this._key.toLowerCase() || event.code === this._key);
}

matchesTarget(element: EventTarget) {
Expand Down
3 changes: 3 additions & 0 deletions source/editor/plugins/colibri/src/ui/ide/utils/NameMaker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,11 @@ namespace colibri.ui.ide.utils {
}

update(objects: any[]) {

for (const obj of objects) {

const name = this._getName(obj);

this._nameSet.add(name);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,8 @@ namespace phasereditor2d.animations.ui.editors {
sprite.visible = true;

try {

sprite.play(sprite.anims.getCurrentKey());
// TODO: Phaser 3.50
sprite.play(sprite.anims.currentAnim.key);

} catch (e) {
// nothing
Expand Down
7 changes: 0 additions & 7 deletions source/editor/plugins/phasereditor2d.code/plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,5 @@
"scripts/monaco-editor-0.20.0/min/vs/loader.js",
"scripts/monaco-editor-0.20.0/min/vs/editor/editor.main.nls.js",
"scripts/monaco-editor-0.20.0/min/vs/editor/editor.main.js"
],
"scripts-dev": [
"_out/phasereditor2d.code.js",
"scripts/dev-monaco-editor-0.20.0/defineRequire.js",
"scripts/dev-monaco-editor-0.20.0/dev/vs/loader.js",
"scripts/dev-monaco-editor-0.20.0/dev/vs/editor/editor.main.nls.js",
"scripts/dev-monaco-editor-0.20.0/dev/vs/editor/editor.main.js"
]
}
2 changes: 1 addition & 1 deletion source/editor/plugins/phasereditor2d.ide/src/IDEPlugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ namespace phasereditor2d.ide {

/* program entry point */

export const VER = "3.9.2";
export const VER = "3.10.0";

async function main() {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,8 @@ namespace phasereditor2d.ide.ui.actions {

manager.addKeyBinding(CMD_CHANGE_THEME, new commands.KeyMatcher({
control: true,
key: "2",
key: "Digit2",
keyLabel: "2",
filterInputElements: false
}));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,6 @@ namespace phasereditor2d.ide.ui.dialogs {

if (!disabled) {

console.log("validating");
console.log(this._projectNames);

if (this._projectNames.has(this._projectNameText.value.toLowerCase())) {

disabled = true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,14 +80,23 @@ namespace phasereditor2d.pack.core {
return;
}

const xmlDoc = Phaser.DOM.ParseXML(xmlString);
const xmlData = Phaser.GameObjects.BitmapText.ParseXMLBitmapFont(xmlDoc as any);
const frame = game.textures.getFrame(imageAsset.getKey());

game.cache.bitmapFont.add(key, {
data: xmlData,
texture: key,
frame: null
});
if (frame) {

const xmlDoc = Phaser.DOM.ParseXML(xmlString);
const xmlData = Phaser.GameObjects.BitmapText.ParseXMLBitmapFont(xmlDoc as any, frame);

game.cache.bitmapFont.add(key, {
data: xmlData,
texture: key,
frame: null
});

} else {

console.error(`Image '${imageAsset.getKey()}' key not found.`);
}

cache.addAsset(this);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ namespace phasereditor2d.pack.core {
export interface ITilesetData {
name: string;
image: string;
source: string;
}

export class TilemapTiledJSONAssetPackItem extends AssetPackItem {
Expand Down Expand Up @@ -39,6 +40,7 @@ namespace phasereditor2d.pack.core {
for (const tilesetData of data.tilesets) {

tilesetsData.push({
source: tilesetData.source,
name: tilesetData.name,
image: tilesetData.image
});
Expand Down
Loading

0 comments on commit cc3e08b

Please sign in to comment.