Skip to content

Commit

Permalink
Converted the Pixi.Ellipse class.
Browse files Browse the repository at this point in the history
  • Loading branch information
photonstorm committed Feb 10, 2014
1 parent e15bebd commit f9f2f2a
Show file tree
Hide file tree
Showing 5 changed files with 313 additions and 10 deletions.
2 changes: 1 addition & 1 deletion Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ module.exports = function (grunt) {
uglify: {
phaser: {
options: {
banner: '/*! Phaser v<%= pkg.version %> | (c) 2013 Photon Storm Ltd. */\n'
banner: '/*! Phaser v<%= pkg.version %> | (c) 2014 Photon Storm Ltd. */\n'
},
src: ['<%= umd.phaser.dest %>'],
dest: '<%= compile_dir %>/phaser.min.js'
Expand Down
9 changes: 5 additions & 4 deletions build/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@
<script src="$path/src/pixi/filters/RGBSplitFilter.js"></script>
<script src="$path/src/pixi/extras/Spine.js"></script>
<script src="$path/src/pixi/extras/Strip.js"></script>
<script src="$path/src/pixi/extras/Rope.js"></script>
<script src="$path/src/pixi/display/MovieClip.js"></script>
<script src="$path/src/pixi/utils/Utils.js"></script>
Expand All @@ -58,16 +62,15 @@
<script src="$path/src/geom/Point.js"></script>
<script src="$path/src/geom/Rectangle.js"></script>
<script src="$path/src/geom/Line.js"></script>
<script src="$path/src/geom/Ellipse.js"></script>
<script src="$path/src/pixi/Pixi.js"></script>
<script src="$path/src/pixi/core/Polygon.js"></script>
<script src="$path/src/pixi/core/Ellipse.js"></script>
<script src="$path/src/pixi/core/Matrix.js"></script>
<script src="$path/src/pixi/display/DisplayObject.js"></script>
<script src="$path/src/pixi/display/DisplayObjectContainer.js"></script>
<script src="$path/src/pixi/display/Sprite.js"></script>
<script src="$path/src/pixi/display/SpriteBatch.js"></script>
<script src="$path/src/pixi/display/MovieClip.js"></script>
<script src="$path/src/pixi/filters/FilterBlock.js"></script>
<script src="$path/src/pixi/text/Text.js"></script>
<script src="$path/src/pixi/text/BitmapText.js"></script>
Expand All @@ -92,8 +95,6 @@
<script src="$path/src/pixi/renderers/canvas/CanvasRenderer.js"></script>
<script src="$path/src/pixi/renderers/canvas/CanvasGraphics.js"></script>
<script src="$path/src/pixi/primitives/Graphics.js"></script>
<script src="$path/src/pixi/extras/Strip.js"></script>
<script src="$path/src/pixi/extras/Rope.js"></script>
<script src="$path/src/pixi/extras/TilingSprite.js"></script>
<script src="$path/src/pixi/textures/BaseTexture.js"></script>
<script src="$path/src/pixi/textures/Texture.js"></script>
Expand Down
12 changes: 8 additions & 4 deletions examples/wip/text.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,14 @@ function preload() {
}

var text;
var b;

function create() {

game.stage.backgroundColor = '#2d2d2d';

text = game.add.text(game.world.centerX, game.world.centerY, "- phaser -\nwith a sprinkle of\npixi dust");
// text = game.add.text(game.world.centerX, game.world.centerY, "- phaser -\nwith a sprinkle of\npixi dust");
text = game.add.text(game.world.centerX, game.world.centerY, "- phaser - with a sprinkle of pixi dust");

text.anchor.setTo(0.5);

Expand All @@ -30,14 +32,14 @@ function create() {
// text.fill = grd;

text.fill = '#ff0044';
text.lineSpacing = 16;
// text.lineSpacing = 16;
text.align = 'center';
text.stroke = '#000000';
text.strokeThickness = 2;

// text.setShadow(5, 5, 'rgba(0,0,0,0.5)', 5);
// text.wordWrap = true;
// test.wordWrapWidth = 50;
text.wordWrap = true;
text.wordWrapWidth = 50;

// game.input.onDown.add(change, this);

Expand Down Expand Up @@ -68,12 +70,14 @@ function change() {
}

function update() {
b = text.getBounds();


}

function render() {

game.debug.renderRectangle(b);
// game.debug.renderText(sprite.position.y, 32, 32);

}
6 changes: 5 additions & 1 deletion src/gameobjects/Text.js
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,11 @@ Phaser.Text.prototype.runWordWrap = function(text) {
result += words[j] + ' ';
}
}
result += '\n';

if (i < lines.length-1)
{
result += '\n';
}
}

return result;
Expand Down
Loading

0 comments on commit f9f2f2a

Please sign in to comment.