IgeEntity

Method: backgroundPattern

Gets / sets the texture to use as the background pattern for this entity.
backgroundPattern (IgeTexture texture, String repeat, Boolean trackCamera, Boolean isoTile)
  • IgeTexturetexture The texture to use as the background.
  • Stringrepeat The type of repeat mode either: "repeat", "repeat-x", "repeat-y" or "none".
  • BooleantrackCamera If set to true, will track the camera translation and "move" the background with the camera.
  • BooleanisoTile If true the tiles of the background will be treated as isometric and will therefore be drawn so that they are layered seamlessly in isometric view.
Returns *

Set a background pattern for this entity with 2d tiling

var texture = new IgeTexture('path/to/my/texture.png');
entity.backgroundPattern(texture, 'repeat', true, false);

Set a background pattern for this entity with isometric tiling

var texture = new IgeTexture('path/to/my/texture.png');
entity.backgroundPattern(texture, 'repeat', true, true);
© 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