API Docs for: 0.3
Show:

File: src\app\Render\Wall.js

  1. 'use strict';
  2.  
  3. var WallModel = require('CrowdSim').Wall;
  4. var Base = require('./Base');
  5. var Entity = require('./Entity');
  6. var LinePrototype = require('./LinePrototype');
  7. var Detail = require('./Detail');
  8. var Colors = Base.Colors;
  9. var Fonts = Base.Fonts;
  10.  
  11. var Wall = LinePrototype(Colors.Wall);
  12.  
  13. /**
  14. * Wall render view.
  15. *
  16. * @class Wall
  17. * @module Render
  18. * @submodule Wall
  19. * @constructor
  20. * @param {Wall} wall
  21. * @return {Wall}
  22. */
  23. Wall.CreateFromModel = function(wall) {
  24. return new Wall(wall);
  25. };
  26.  
  27. /**
  28. * Description
  29. * @method CreateFromPoint
  30. * @param {} x
  31. * @param {} y
  32. * @param {} parent
  33. * @param {} options
  34. * @return NewExpression
  35. */
  36. Wall.CreateFromPoint = function(x, y, parent, options) {
  37. var wall = new WallModel(x, y, parent, options);
  38. return new Wall(wall);
  39. };
  40.  
  41. /**
  42. * Description
  43. * @method getPos
  44. * @return CallExpression
  45. */
  46. Wall.prototype.getPos = function() {
  47. return Entity.prototype.getPos.call(this);
  48. };
  49.  
  50. Wall.texture = null; // wall joints texture
  51. Wall.detail = new Detail(2);
  52.  
  53. module.exports = Wall;
  54.