<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	
	>
<channel>
	<title>Comments on: getBounds() method for EaselJS DisplayObjects</title>
	<atom:link href="http://indiegamr.com/getbounds-method-for-easeljs-displayobjects/feed/" rel="self" type="application/rss+xml" />
	<link>http://indiegamr.com/getbounds-method-for-easeljs-displayobjects/</link>
	<description>apps, indie &#38; beyond</description>
	<lastBuildDate>Sun, 20 Oct 2019 13:54:00 +0000</lastBuildDate>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=4.0.38</generator>
	<item>
		<title>By: olsn</title>
		<link>http://indiegamr.com/getbounds-method-for-easeljs-displayobjects/#comment-14962</link>
		<dc:creator><![CDATA[olsn]]></dc:creator>
		<pubDate>Thu, 09 May 2013 15:59:36 +0000</pubDate>
		<guid isPermaLink="false">http://indiegamr.com/?p=180#comment-14962</guid>
		<description><![CDATA[You can absolutely do that - the getBounds-method here does only work for Bitmaps and BitmapAnimations - so for Shapes it&#039;s not that simple to get the bounds.]]></description>
		<content:encoded><![CDATA[<p>You can absolutely do that &#8211; the getBounds-method here does only work for Bitmaps and BitmapAnimations &#8211; so for Shapes it&#8217;s not that simple to get the bounds.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: moose</title>
		<link>http://indiegamr.com/getbounds-method-for-easeljs-displayobjects/#comment-14960</link>
		<dc:creator><![CDATA[moose]]></dc:creator>
		<pubDate>Thu, 09 May 2013 14:27:58 +0000</pubDate>
		<guid isPermaLink="false">http://indiegamr.com/?p=180#comment-14960</guid>
		<description><![CDATA[I like the collision detection (and all the other stuff!), but it might be a little too much calculations for some cases with simple shapes just to get the bounds?

Though maybe a bit sloppy, is there much harm in creating and saving an extra var like radius, width and height on a shape object like this:
&lt;pre&gt;
var circle;

function init(){
circle = new createjs.Shape();
var radius = circle.radius  = Math.random()*20 + 20; 
circle.graphics.beginFill(&quot;olive&quot;).drawCircle(0, 0, radius);
}

function somewhereAlongTheLine(){
alert(circle.radius);
}

..and if you do a transform you&#039;ll have to update &#039;m manually...

circle.scaleX = 1.5;
circle.radius *=1.5; 
&lt;/pre&gt;
Would that slow things down a lot or generate problems for cleaning up DisplayObjects?



Cheers! Michel]]></description>
		<content:encoded><![CDATA[<p>I like the collision detection (and all the other stuff!), but it might be a little too much calculations for some cases with simple shapes just to get the bounds?</p>
<p>Though maybe a bit sloppy, is there much harm in creating and saving an extra var like radius, width and height on a shape object like this:</p><!-- Crayon Syntax Highlighter v2.6.5 -->

		<div id="crayon-69d4c44a8d0d7112675197" class="crayon-syntax crayon-theme-classic crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-mouseover" style=" margin-top: 12px; margin-bottom: 12px; font-size: 12px !important; line-height: 15px !important;">
		
			<div class="crayon-toolbar" data-settings=" mouseover overlay hide delay" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;"><span class="crayon-title"></span>
			<div class="crayon-tools" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;"><div class="crayon-button crayon-nums-button" title="Toggle Line Numbers"><div class="crayon-button-icon"></div></div><div class="crayon-button crayon-plain-button" title="Toggle Plain Code"><div class="crayon-button-icon"></div></div><div class="crayon-button crayon-wrap-button" title="Toggle Line Wrap"><div class="crayon-button-icon"></div></div><div class="crayon-button crayon-expand-button" title="Expand Code"><div class="crayon-button-icon"></div></div><div class="crayon-button crayon-copy-button" title="Copy"><div class="crayon-button-icon"></div></div><div class="crayon-button crayon-popup-button" title="Open Code In New Window"><div class="crayon-button-icon"></div></div><span class="crayon-language">JavaScript</span></div></div>
			<div class="crayon-info" style="min-height: 16.8px !important; line-height: 16.8px !important;"></div>
			<div class="crayon-plain-wrap"><textarea wrap="soft" class="crayon-plain print-no" data-settings="dblclick" readonly style="-moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4; font-size: 12px !important; line-height: 15px !important;">
var circle;

function init(){
circle = new createjs.Shape();
var radius = circle.radius  = Math.random()*20 + 20; 
circle.graphics.beginFill("olive").drawCircle(0, 0, radius);
}

function somewhereAlongTheLine(){
alert(circle.radius);
}

..and if you do a transform you'll have to update 'm manually...

circle.scaleX = 1.5;
circle.radius *=1.5; </textarea></div>
			<div class="crayon-main" style="">
				<table class="crayon-table">
					<tr class="crayon-row">
				<td class="crayon-nums " data-settings="show">
					<div class="crayon-nums-content" style="font-size: 12px !important; line-height: 15px !important;"><div class="crayon-num" data-line="crayon-69d4c44a8d0d7112675197-1">1</div><div class="crayon-num crayon-striped-num" data-line="crayon-69d4c44a8d0d7112675197-2">2</div><div class="crayon-num" data-line="crayon-69d4c44a8d0d7112675197-3">3</div><div class="crayon-num crayon-striped-num" data-line="crayon-69d4c44a8d0d7112675197-4">4</div><div class="crayon-num" data-line="crayon-69d4c44a8d0d7112675197-5">5</div><div class="crayon-num crayon-striped-num" data-line="crayon-69d4c44a8d0d7112675197-6">6</div><div class="crayon-num" data-line="crayon-69d4c44a8d0d7112675197-7">7</div><div class="crayon-num crayon-striped-num" data-line="crayon-69d4c44a8d0d7112675197-8">8</div><div class="crayon-num" data-line="crayon-69d4c44a8d0d7112675197-9">9</div><div class="crayon-num crayon-striped-num" data-line="crayon-69d4c44a8d0d7112675197-10">10</div><div class="crayon-num" data-line="crayon-69d4c44a8d0d7112675197-11">11</div><div class="crayon-num crayon-striped-num" data-line="crayon-69d4c44a8d0d7112675197-12">12</div><div class="crayon-num" data-line="crayon-69d4c44a8d0d7112675197-13">13</div><div class="crayon-num crayon-striped-num" data-line="crayon-69d4c44a8d0d7112675197-14">14</div><div class="crayon-num" data-line="crayon-69d4c44a8d0d7112675197-15">15</div><div class="crayon-num crayon-striped-num" data-line="crayon-69d4c44a8d0d7112675197-16">16</div></div>
				</td>
						<td class="crayon-code"><div class="crayon-pre" style="font-size: 12px !important; line-height: 15px !important;"><div class="crayon-line" id="crayon-69d4c44a8d0d7112675197-1"><span class="crayon-t">var</span><span class="crayon-h"> </span><span class="crayon-v">circle</span><span class="crayon-sy">;</span></div><div class="crayon-line crayon-striped-line" id="crayon-69d4c44a8d0d7112675197-2">&nbsp;</div><div class="crayon-line" id="crayon-69d4c44a8d0d7112675197-3"><span class="crayon-t">function</span><span class="crayon-h"> </span><span class="crayon-e">init</span><span class="crayon-sy">(</span><span class="crayon-sy">)</span><span class="crayon-sy">{</span></div><div class="crayon-line crayon-striped-line" id="crayon-69d4c44a8d0d7112675197-4"><span class="crayon-v">circle</span><span class="crayon-h"> </span><span class="crayon-o">=</span><span class="crayon-h"> </span><span class="crayon-r">new</span><span class="crayon-h"> </span><span class="crayon-v">createjs</span><span class="crayon-sy">.</span><span class="crayon-e">Shape</span><span class="crayon-sy">(</span><span class="crayon-sy">)</span><span class="crayon-sy">;</span></div><div class="crayon-line" id="crayon-69d4c44a8d0d7112675197-5"><span class="crayon-t">var</span><span class="crayon-h"> </span><span class="crayon-v">radius</span><span class="crayon-h"> </span><span class="crayon-o">=</span><span class="crayon-h"> </span><span class="crayon-v">circle</span><span class="crayon-sy">.</span><span class="crayon-v">radius</span><span class="crayon-h">&nbsp;&nbsp;</span><span class="crayon-o">=</span><span class="crayon-h"> </span><span class="crayon-v">Math</span><span class="crayon-sy">.</span><span class="crayon-e">random</span><span class="crayon-sy">(</span><span class="crayon-sy">)</span><span class="crayon-o">*</span><span class="crayon-cn">20</span><span class="crayon-h"> </span><span class="crayon-o">+</span><span class="crayon-h"> </span><span class="crayon-cn">20</span><span class="crayon-sy">;</span><span class="crayon-h"> </span></div><div class="crayon-line crayon-striped-line" id="crayon-69d4c44a8d0d7112675197-6"><span class="crayon-v">circle</span><span class="crayon-sy">.</span><span class="crayon-v">graphics</span><span class="crayon-sy">.</span><span class="crayon-e">beginFill</span><span class="crayon-sy">(</span><span class="crayon-s">"olive"</span><span class="crayon-sy">)</span><span class="crayon-sy">.</span><span class="crayon-e">drawCircle</span><span class="crayon-sy">(</span><span class="crayon-cn">0</span><span class="crayon-sy">,</span><span class="crayon-h"> </span><span class="crayon-cn">0</span><span class="crayon-sy">,</span><span class="crayon-h"> </span><span class="crayon-v">radius</span><span class="crayon-sy">)</span><span class="crayon-sy">;</span></div><div class="crayon-line" id="crayon-69d4c44a8d0d7112675197-7"><span class="crayon-sy">}</span></div><div class="crayon-line crayon-striped-line" id="crayon-69d4c44a8d0d7112675197-8">&nbsp;</div><div class="crayon-line" id="crayon-69d4c44a8d0d7112675197-9"><span class="crayon-t">function</span><span class="crayon-h"> </span><span class="crayon-e">somewhereAlongTheLine</span><span class="crayon-sy">(</span><span class="crayon-sy">)</span><span class="crayon-sy">{</span></div><div class="crayon-line crayon-striped-line" id="crayon-69d4c44a8d0d7112675197-10"><span class="crayon-r">alert</span><span class="crayon-sy">(</span><span class="crayon-v">circle</span><span class="crayon-sy">.</span><span class="crayon-v">radius</span><span class="crayon-sy">)</span><span class="crayon-sy">;</span></div><div class="crayon-line" id="crayon-69d4c44a8d0d7112675197-11"><span class="crayon-sy">}</span></div><div class="crayon-line crayon-striped-line" id="crayon-69d4c44a8d0d7112675197-12">&nbsp;</div><div class="crayon-line" id="crayon-69d4c44a8d0d7112675197-13"><span class="crayon-sy">.</span><span class="crayon-sy">.</span><span class="crayon-st">and</span><span class="crayon-h"> </span><span class="crayon-st">if</span><span class="crayon-h"> </span><span class="crayon-e">you </span><span class="crayon-st">do</span><span class="crayon-h"> </span><span class="crayon-i">a</span><span class="crayon-h"> </span><span class="crayon-e">transform </span><span class="crayon-i">you</span><span class="crayon-s">'ll have to update '</span><span class="crayon-i">m</span><span class="crayon-h"> </span><span class="crayon-v">manually</span><span class="crayon-sy">.</span><span class="crayon-sy">.</span><span class="crayon-sy">.</span></div><div class="crayon-line crayon-striped-line" id="crayon-69d4c44a8d0d7112675197-14">&nbsp;</div><div class="crayon-line" id="crayon-69d4c44a8d0d7112675197-15"><span class="crayon-v">circle</span><span class="crayon-sy">.</span><span class="crayon-v">scaleX</span><span class="crayon-h"> </span><span class="crayon-o">=</span><span class="crayon-h"> </span><span class="crayon-cn">1.5</span><span class="crayon-sy">;</span></div><div class="crayon-line crayon-striped-line" id="crayon-69d4c44a8d0d7112675197-16"><span class="crayon-v">circle</span><span class="crayon-sy">.</span><span class="crayon-v">radius</span><span class="crayon-h"> </span><span class="crayon-o">*=</span><span class="crayon-cn">1.5</span><span class="crayon-sy">;</span><span class="crayon-h"> </span></div></div></td>
					</tr>
				</table>
			</div>
		</div>
<!-- [Format Time: 0.0021 seconds] -->
<p>Would that slow things down a lot or generate problems for cleaning up DisplayObjects?</p>
<p>Cheers! Michel</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: olsn</title>
		<link>http://indiegamr.com/getbounds-method-for-easeljs-displayobjects/#comment-9811</link>
		<dc:creator><![CDATA[olsn]]></dc:creator>
		<pubDate>Thu, 14 Mar 2013 09:22:17 +0000</pubDate>
		<guid isPermaLink="false">http://indiegamr.com/?p=180#comment-9811</guid>
		<description><![CDATA[Yes, that is correct. Shapes are dynamic and it is currently not possible to get the width and hight of a Shape with a reasonable performance.
Also I would suggest you to use this library: https://github.com/olsn/Collision-Detection-for-EaselJS it contains the getBounds()-method and is regularly updated and contains bugfixes]]></description>
		<content:encoded><![CDATA[<p>Yes, that is correct. Shapes are dynamic and it is currently not possible to get the width and hight of a Shape with a reasonable performance.<br />
Also I would suggest you to use this library: <a href="https://github.com/olsn/Collision-Detection-for-EaselJS" rel="nofollow">https://github.com/olsn/Collision-Detection-for-EaselJS</a> it contains the getBounds()-method and is regularly updated and contains bugfixes</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Muhammad</title>
		<link>http://indiegamr.com/getbounds-method-for-easeljs-displayobjects/#comment-9805</link>
		<dc:creator><![CDATA[Muhammad]]></dc:creator>
		<pubDate>Thu, 14 Mar 2013 07:10:59 +0000</pubDate>
		<guid isPermaLink="false">http://indiegamr.com/?p=180#comment-9805</guid>
		<description><![CDATA[Apparently this does not work with DisplayObject or Shape.. right?]]></description>
		<content:encoded><![CDATA[<p>Apparently this does not work with DisplayObject or Shape.. right?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: olsn</title>
		<link>http://indiegamr.com/getbounds-method-for-easeljs-displayobjects/#comment-3037</link>
		<dc:creator><![CDATA[olsn]]></dc:creator>
		<pubDate>Thu, 06 Dec 2012 12:40:54 +0000</pubDate>
		<guid isPermaLink="false">http://indiegamr.com/?p=180#comment-3037</guid>
		<description><![CDATA[I updated the snipped, it should work with the current version of easelJS now.
It will also take rotation into account now.

cheers]]></description>
		<content:encoded><![CDATA[<p>I updated the snipped, it should work with the current version of easelJS now.<br />
It will also take rotation into account now.</p>
<p>cheers</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: olsn</title>
		<link>http://indiegamr.com/getbounds-method-for-easeljs-displayobjects/#comment-2965</link>
		<dc:creator><![CDATA[olsn]]></dc:creator>
		<pubDate>Wed, 05 Dec 2012 15:50:16 +0000</pubDate>
		<guid isPermaLink="false">http://indiegamr.com/?p=180#comment-2965</guid>
		<description><![CDATA[hi,

i wrote this for an older version of EaselJS and have not tested or used it with the current version,
it is possible that it might be not working correctly any more]]></description>
		<content:encoded><![CDATA[<p>hi,</p>
<p>i wrote this for an older version of EaselJS and have not tested or used it with the current version,<br />
it is possible that it might be not working correctly any more</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tony</title>
		<link>http://indiegamr.com/getbounds-method-for-easeljs-displayobjects/#comment-2958</link>
		<dc:creator><![CDATA[Tony]]></dc:creator>
		<pubDate>Wed, 05 Dec 2012 14:46:41 +0000</pubDate>
		<guid isPermaLink="false">http://indiegamr.com/?p=180#comment-2958</guid>
		<description><![CDATA[Hello again,

Just tested it..
Actually, it does&quot;t work. At least for containers.
You compare to the width of children which is an undefined property as the width of the parent...]]></description>
		<content:encoded><![CDATA[<p>Hello again,</p>
<p>Just tested it..<br />
Actually, it does&#8221;t work. At least for containers.<br />
You compare to the width of children which is an undefined property as the width of the parent&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tony</title>
		<link>http://indiegamr.com/getbounds-method-for-easeljs-displayobjects/#comment-2954</link>
		<dc:creator><![CDATA[Tony]]></dc:creator>
		<pubDate>Wed, 05 Dec 2012 14:09:39 +0000</pubDate>
		<guid isPermaLink="false">http://indiegamr.com/?p=180#comment-2954</guid>
		<description><![CDATA[Hello,

it looks great, i&#039;m testing it.
Quickly:
 - the algorithm for Bitmap doesn&#039;t handle the case the bitmap is not loaded yet
 - your algorithm doesn&#039;t handle filters as well
But anyway, very useful job ;)]]></description>
		<content:encoded><![CDATA[<p>Hello,</p>
<p>it looks great, i&#8217;m testing it.<br />
Quickly:<br />
 &#8211; the algorithm for Bitmap doesn&#8217;t handle the case the bitmap is not loaded yet<br />
 &#8211; your algorithm doesn&#8217;t handle filters as well<br />
But anyway, very useful job <img src="http://indiegamr.com/wp-includes/images/smilies/icon_wink.gif" alt=";)" class="wp-smiley" /></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Retro Style Plattform Runner Game for mobile with EaselJS (Part 2) &#124; indiegamr</title>
		<link>http://indiegamr.com/getbounds-method-for-easeljs-displayobjects/#comment-149</link>
		<dc:creator><![CDATA[Retro Style Plattform Runner Game for mobile with EaselJS (Part 2) &#124; indiegamr]]></dc:creator>
		<pubDate>Thu, 05 Jul 2012 14:31:33 +0000</pubDate>
		<guid isPermaLink="false">http://indiegamr.com/?p=180#comment-149</guid>
		<description><![CDATA[[...] Post navigation &#8592; Previous [...]]]></description>
		<content:encoded><![CDATA[<p>[&#8230;] Post navigation &larr; Previous [&#8230;]</p>
]]></content:encoded>
	</item>
</channel>
</rss>
