IgeEntity

Method: dimensionsFromTexture

Sets the geometry of the entity to match the width and height of the assigned texture.
dimensionsFromTexture (Number percent)
  • Numberpercent The percentage size to resize to.
Returns * The object this method was called from to allow method chaining.

Set the entity dimensions based on the assigned texture

var texture = new IgeTexture('path/to/some/texture.png');

// Assign the texture, and then set the entity to the
// size of the texture automatically!
entity.texture(texture)
    .dimensionsFromTexture();
© Copyright 2013 Irrelon Software Limited. All Rights Reserved. UK Registered Company Number: 07522767
Isogenic (ī´sōjen´ik): Adj originating from a common source; possessing the same genetic composition.
Strange Things Happen at the One Two Point