dat.gui/controller.js

18 lines
563 B
JavaScript
Raw Normal View History

var Controller = function() {
2011-01-24 02:59:29 +00:00
this.name = function(n) {
2011-01-24 02:59:29 +00:00
this.propertyNameElement.innerHTML = n;
}
2011-01-24 00:15:04 +00:00
this.domElement = document.createElement('div');
2011-01-24 02:59:29 +00:00
this.domElement.setAttribute('class', 'guidat-controller ' + this.type);
2011-01-24 00:50:14 +00:00
this.object = arguments[0];
this.propertyName = arguments[1];
2011-01-24 00:50:14 +00:00
this.propertyNameElement = document.createElement('span');
this.propertyNameElement.setAttribute('class', 'guidat-propertyname');
this.name(this.propertyName);
2011-01-24 00:50:14 +00:00
this.domElement.appendChild(this.propertyNameElement);
2011-01-24 02:59:29 +00:00
};