gljs.js 502 B

12345678910111213141516171819202122
  1. /**
  2. * Created by Mai on 2017/4/1.
  3. */
  4. var GLJs = {
  5. createNew: function (project) {
  6. // 用户定义private方法
  7. var tools = {};
  8. // 所有通过this访问的属性,都不应在此单元外部进行写入操作
  9. var gljs = function (proj) {
  10. this.project = proj;
  11. this.datas = null;
  12. };
  13. // prototype用于定义public方法
  14. gljs.prototype.loadDatas = function (datas) {
  15. this.datas = datas;
  16. };
  17. return new gljs(project);
  18. }
  19. };