mirror of
https://github.com/dataarts/dat.gui.git
synced 2024-12-12 04:08:27 +00:00
Merge remote-tracking branch 'genrich/patch-1'
This commit is contained in:
commit
f93d49b207
@ -42,6 +42,7 @@ This will create a namespaced, unminified build of dat.GUI at `build/dat.gui.mai
|
||||
* Using common.js
|
||||
* Using webpack for build
|
||||
* Fixed an issue with colors based on arrays - https://github.com/dataarts/dat.gui/pull/57
|
||||
* Update factory.js, Step param was not used - https://github.com/dataarts/dat.gui/pull/45
|
||||
|
||||
### 0.5
|
||||
* Moved to requirejs for dependency management.
|
||||
|
@ -4209,40 +4209,47 @@ return /******/ (function(modules) { // webpackBootstrap
|
||||
BooleanController = __webpack_require__(8),
|
||||
common = __webpack_require__(5);
|
||||
|
||||
module.exports = function(object, property) {
|
||||
module.exports = function (object, property) {
|
||||
|
||||
var initialValue = object[property];
|
||||
var initialValue = object[property];
|
||||
|
||||
// Providing options?
|
||||
if (common.isArray(arguments[2]) || common.isObject(arguments[2])) {
|
||||
return new OptionController(object, property, arguments[2]);
|
||||
}
|
||||
|
||||
// Providing a map?
|
||||
|
||||
if (common.isNumber(initialValue)) {
|
||||
|
||||
if (common.isNumber(arguments[2]) && common.isNumber(arguments[3])) {
|
||||
// Has min and max.
|
||||
return new NumberControllerSlider(object, property, arguments[2], arguments[3]);
|
||||
|
||||
} else {
|
||||
|
||||
return new NumberControllerBox(object, property, { min: arguments[2], max: arguments[3] });
|
||||
// Providing options?
|
||||
if (common.isArray(arguments[2]) || common.isObject(arguments[2])) {
|
||||
return new OptionController(object, property, arguments[2]);
|
||||
}
|
||||
}
|
||||
|
||||
if (common.isString(initialValue)) {
|
||||
return new StringController(object, property);
|
||||
}
|
||||
// Providing a map?
|
||||
|
||||
if (common.isFunction(initialValue)) {
|
||||
return new FunctionController(object, property, '');
|
||||
}
|
||||
if (common.isNumber(initialValue)) {
|
||||
|
||||
if (common.isNumber(arguments[2]) && common.isNumber(arguments[3])) {
|
||||
|
||||
// Has min and max.
|
||||
if (common.isNumber(arguments[4])) // has step
|
||||
return new NumberControllerSlider(object, property, arguments[2], arguments[3], arguments[4]);
|
||||
else
|
||||
return new NumberControllerSlider(object, property, arguments[2], arguments[3]);
|
||||
|
||||
} else {
|
||||
|
||||
return new NumberControllerBox(object, property, {min: arguments[2], max: arguments[3]});
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (common.isString(initialValue)) {
|
||||
return new StringController(object, property);
|
||||
}
|
||||
|
||||
if (common.isFunction(initialValue)) {
|
||||
return new FunctionController(object, property, '');
|
||||
}
|
||||
|
||||
if (common.isBoolean(initialValue)) {
|
||||
return new BooleanController(object, property);
|
||||
}
|
||||
|
||||
if (common.isBoolean(initialValue)) {
|
||||
return new BooleanController(object, property);
|
||||
}
|
||||
};
|
||||
|
||||
/***/ },
|
||||
|
2
build/dat.gui.min.js
vendored
2
build/dat.gui.min.js
vendored
File diff suppressed because one or more lines are too long
@ -19,38 +19,45 @@ var OptionController = require('./OptionController'),
|
||||
BooleanController = require('./BooleanController'),
|
||||
common = require('../utils/common');
|
||||
|
||||
module.exports = function(object, property) {
|
||||
module.exports = function (object, property) {
|
||||
|
||||
var initialValue = object[property];
|
||||
var initialValue = object[property];
|
||||
|
||||
// Providing options?
|
||||
if (common.isArray(arguments[2]) || common.isObject(arguments[2])) {
|
||||
return new OptionController(object, property, arguments[2]);
|
||||
}
|
||||
|
||||
// Providing a map?
|
||||
|
||||
if (common.isNumber(initialValue)) {
|
||||
|
||||
if (common.isNumber(arguments[2]) && common.isNumber(arguments[3])) {
|
||||
// Has min and max.
|
||||
return new NumberControllerSlider(object, property, arguments[2], arguments[3]);
|
||||
|
||||
} else {
|
||||
|
||||
return new NumberControllerBox(object, property, { min: arguments[2], max: arguments[3] });
|
||||
// Providing options?
|
||||
if (common.isArray(arguments[2]) || common.isObject(arguments[2])) {
|
||||
return new OptionController(object, property, arguments[2]);
|
||||
}
|
||||
}
|
||||
|
||||
if (common.isString(initialValue)) {
|
||||
return new StringController(object, property);
|
||||
}
|
||||
// Providing a map?
|
||||
|
||||
if (common.isFunction(initialValue)) {
|
||||
return new FunctionController(object, property, '');
|
||||
}
|
||||
if (common.isNumber(initialValue)) {
|
||||
|
||||
if (common.isNumber(arguments[2]) && common.isNumber(arguments[3])) {
|
||||
|
||||
// Has min and max.
|
||||
if (common.isNumber(arguments[4])) // has step
|
||||
return new NumberControllerSlider(object, property, arguments[2], arguments[3], arguments[4]);
|
||||
else
|
||||
return new NumberControllerSlider(object, property, arguments[2], arguments[3]);
|
||||
|
||||
} else {
|
||||
|
||||
return new NumberControllerBox(object, property, {min: arguments[2], max: arguments[3]});
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (common.isString(initialValue)) {
|
||||
return new StringController(object, property);
|
||||
}
|
||||
|
||||
if (common.isFunction(initialValue)) {
|
||||
return new FunctionController(object, property, '');
|
||||
}
|
||||
|
||||
if (common.isBoolean(initialValue)) {
|
||||
return new BooleanController(object, property);
|
||||
}
|
||||
|
||||
if (common.isBoolean(initialValue)) {
|
||||
return new BooleanController(object, property);
|
||||
}
|
||||
};
|
Loading…
Reference in New Issue
Block a user