/**
 *@author liuhaixiao
 *@createTime 2018-09-30 10:23
 *@description 下雪面板canvas
 */

export default class SnowCanvas {
  /**
   * 创建canvas的元素，设置ID，背景色，宽高属性
   * @param w 宽度
   * @param h 高度
   */
  constructor(w,h) {
    this.width = w;
    this.height = h;
    var oC = document.createElement("canvas");
    oC.setAttribute('width', this.width);
    oC.setAttribute('height', this.height);
    oC.setAttribute('id', 'canvas');
    oC.style.backgroundColor = '#000';
    document.body.appendChild(oC);
  }
}
