<commit_before>###*
The Debuggable Module provides a simple API to easily display
an object's properties onscreen. This mixin comes with predefined
attribute filters so that you can exclude irrelevant data.

    player = GameObject
      x: 40
      y: 14
      spriteName: null
      numericErrorProperty: NaN
    
    player.include Debuggable
    
    # sets up debug output for all player's properties
    # at the starting position (0, 0)
    player.debug
      filter: 'all'

Debuggable module
@name Debuggable
@module
@constructor
@param {Object} I Instance variables
@param {Core} self Reference to including object
###
Debuggable = (I={}, self) ->
  COL_HEIGHT = 175
  ROW_HEIGHT = 9
  FONT_SIZE = 9

  debugX = 0
  debugY = 0

  Object.reverseMerge I,
    debug:
      enabled: false
      color: 'black'
      filter: 'all'
      bounds: true
      velocity: true
      position:
        x: 0
        y: 0
  
  initialI = Object.extend({}, I)
  
  debugBounds = (canvas) ->
    canvas.drawRect
      color: 'rgba(255, 0, 255, 0.4)'
      bounds: self.bounds()  <commit_msg>Modified in browser at pixie.strd6.com<commit_after>###*
The Debuggable Module provides a simple API to easily display
an object's properties onscreen. This mixin comes with predefined
attribute filters so that you can exclude irrelevant data.

    player = GameObject
      x: 40
      y: 14
      spriteName: null
      numericErrorProperty: NaN
    
    player.include Debuggable
    
    # sets up debug output for all player's properties
    # at the starting position (0, 0)
    player.debug
      filter: 'all'

@name Debuggable
@module
@constructor
@param {Object} I Instance variables
@param {Core} self Reference to including object
###
Debuggable = (I={}, self) ->
  COL_HEIGHT = 175
  ROW_HEIGHT = 9
  FONT_SIZE = 9

  debugX = 0
  debugY = 0

  Object.reverseMerge I,
    debug:
      enabled: false
      color: 'black'
      filter: 'all'
      bounds: true
      velocity: true
      position:
        x: 0
        y: 0
  
  initialI = Object.extend({}, I)
  
  debugBounds = (canvas) ->
    canvas.drawRect
      color: 'rgba(255, 0, 255, 0.4)'
      bounds: self.bounds()  
{'fraction_non_alphanumeric': 0.0864367816091954, 'fraction_numerical': 0.022528735632183907, 'mean_word_length': 2.5497553017944536, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3671744', 'n_tokens_mistral': 722, 'n_tokens_neox': 660, 'n_words': 242}