diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2018-05-21 19:27:23 +0200 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2018-05-21 19:27:23 +0200 |
| commit | dd469b4ff7f9945864aa2da0e23fd466334884aa (patch) | |
| tree | f2b61ee34633ce89dee2790ab4d10818bf1fe7b9 /public/bundle.js | |
| parent | b19ebab84c13edadee0f2d6033e9b50b37842d17 (diff) | |
onchange
Diffstat (limited to 'public/bundle.js')
| -rw-r--r-- | public/bundle.js | 779 |
1 files changed, 777 insertions, 2 deletions
diff --git a/public/bundle.js b/public/bundle.js index ba7dea0..7a43c1b 100644 --- a/public/bundle.js +++ b/public/bundle.js @@ -122,6 +122,396 @@ exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)( /***/ }), +/***/ "./app/client/common/paramGroup.component.js": +/*!***************************************************!*\ + !*** ./app/client/common/paramGroup.component.js ***! + \***************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +var _preact = __webpack_require__(/*! preact */ "./node_modules/preact/dist/preact.esm.js"); + +var _reactRedux = __webpack_require__(/*! react-redux */ "./node_modules/react-redux/es/index.js"); + +var _redux = __webpack_require__(/*! redux */ "./node_modules/redux/es/redux.js"); + +var _actions = __webpack_require__(/*! ../live/actions */ "./app/client/live/actions.js"); + +var liveActions = _interopRequireWildcard(_actions); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +var ParamGroup = function (_Component) { + _inherits(ParamGroup, _Component); + + function ParamGroup(props) { + _classCallCheck(this, ParamGroup); + + var _this = _possibleConstructorReturn(this, (ParamGroup.__proto__ || Object.getPrototypeOf(ParamGroup)).call(this, props)); + + _this.handleClick = _this.handleClick.bind(_this); + return _this; + } + + _createClass(ParamGroup, [{ + key: 'handleClick', + value: function handleClick(e) { + clearTimeout(this.timeout); + var new_value = e.target.checked; + this.props.actions.set_param(this.props.name, new_value); + } + }, { + key: 'render', + value: function render() { + var checked = this.props.opt[this.props.name]; + var toggle = !this.props.noToggle; + var className = !toggle || checked ? 'paramGroup active' : 'paramGroup inactive'; + return (0, _preact.h)( + 'div', + { className: className }, + (0, _preact.h)( + 'label', + null, + (0, _preact.h)( + 'h3', + null, + this.props.title + ), + toggle ? (0, _preact.h)('input', { + type: 'checkbox', + onClick: this.handleClick, + checked: checked + }) : null + ), + this.props.children + ); + } + }]); + + return ParamGroup; +}(_preact.Component); + +var mapStateToProps = function mapStateToProps(state) { + return { + opt: state.live.opt + }; +}; + +var mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) { + return { + actions: (0, _redux.bindActionCreators)(liveActions, dispatch) + }; +}; + +exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(ParamGroup); + +/***/ }), + +/***/ "./app/client/common/select.component.js": +/*!***********************************************!*\ + !*** ./app/client/common/select.component.js ***! + \***********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +var _preact = __webpack_require__(/*! preact */ "./node_modules/preact/dist/preact.esm.js"); + +var _reactRedux = __webpack_require__(/*! react-redux */ "./node_modules/react-redux/es/index.js"); + +var _redux = __webpack_require__(/*! redux */ "./node_modules/redux/es/redux.js"); + +var _actions = __webpack_require__(/*! ../live/actions */ "./app/client/live/actions.js"); + +var liveActions = _interopRequireWildcard(_actions); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +var Select = function (_Component) { + _inherits(Select, _Component); + + function Select(props) { + _classCallCheck(this, Select); + + var _this = _possibleConstructorReturn(this, (Select.__proto__ || Object.getPrototypeOf(Select)).call(this, props)); + + _this.handleChange = _this.handleChange.bind(_this); + return _this; + } + + _createClass(Select, [{ + key: 'handleChange', + value: function handleChange(e) { + clearTimeout(this.timeout); + var new_value = e.target.value; + this.props.actions.set_param(this.props.name, new_value); + this.props.onChange && this.props.onChange(new_value); + } + }, { + key: 'render', + value: function render() { + var value = this.props.opt[this.props.name]; + var options = (this.props.options || []).map(function (key, i) { + var name = void 0, + value = void 0; + if (typeof key == 'string') { + name = key.length < 4 ? key.toUpperCase() : key; + value = key; + } else { + var frames = Math.round(key.count / 30) + ' s.'; + name = key.name.replace(/_/g, ' ') + ' (' + frames + ')'; + value = key.name; + } + return (0, _preact.h)( + 'option', + { value: value, key: i }, + name + ); + }); + return (0, _preact.h)( + 'div', + { className: 'select param' }, + (0, _preact.h)( + 'label', + null, + (0, _preact.h)( + 'span', + null, + this.props.title + ), + (0, _preact.h)( + 'select', + { + onChange: this.handleChange, + value: value + }, + options + ) + ), + this.props.children + ); + } + }]); + + return Select; +}(_preact.Component); + +function capitalize(s) { + return (s || "").replace(/(?:^|\s)\S/g, function (a) { + return a.toUpperCase(); + }); +} + +var mapStateToProps = function mapStateToProps(state) { + return { + opt: state.live.opt + }; +}; + +var mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) { + return { + actions: (0, _redux.bindActionCreators)(liveActions, dispatch) + }; +}; + +exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(Select); + +/***/ }), + +/***/ "./app/client/common/slider.component.js": +/*!***********************************************!*\ + !*** ./app/client/common/slider.component.js ***! + \***********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +var _preact = __webpack_require__(/*! preact */ "./node_modules/preact/dist/preact.esm.js"); + +var _reactRedux = __webpack_require__(/*! react-redux */ "./node_modules/react-redux/es/index.js"); + +var _redux = __webpack_require__(/*! redux */ "./node_modules/redux/es/redux.js"); + +var _actions = __webpack_require__(/*! ../live/actions */ "./app/client/live/actions.js"); + +var liveActions = _interopRequireWildcard(_actions); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +var SLIDER_THROTTLE_TIME = 100; + +var Slider = function (_Component) { + _inherits(Slider, _Component); + + function Slider(props) { + _classCallCheck(this, Slider); + + var _this = _possibleConstructorReturn(this, (Slider.__proto__ || Object.getPrototypeOf(Slider)).call(this, props)); + + _this.timeout = 0; + _this.state = { + value: props.opt[props.name] + }; + _this.handleInput = _this.handleInput.bind(_this); + _this.handleRange = _this.handleRange.bind(_this); + return _this; + } + + _createClass(Slider, [{ + key: 'componentWillReceiveProps', + value: function componentWillReceiveProps(nextProps) { + var next_value = nextProps.value || nextProps.opt[nextProps.name]; + if (next_value !== this.state.value) { + this.setState({ value: next_value }); + } + } + }, { + key: 'handleInput', + value: function handleInput(e) { + var _props = this.props, + name = _props.name, + opt = _props.opt; + + var old_value = opt[name]; + var new_value = e.target.value; + if (this.props.type === 'int') { + new_value = parseInt(new_value); + } + if (this.props.type === 'odd') { + new_value = parseInt(Math.floor(new_value / 2) * 2 + 1); + } + if (old_value !== new_value) { + this.setState({ value: new_value }); + this.props.actions.set_param(this.props.name, new_value); + this.props.onChange && this.props.onChange(new_value); + } + clearTimeout(this.timeout); + } + }, { + key: 'handleRange', + value: function handleRange(e) { + var _this2 = this; + + clearTimeout(this.timeout); + var new_value = e.target.value; + if (this.props.type === 'int') { + new_value = parseInt(new_value); + } + if (this.props.type === 'odd') { + new_value = parseInt(Math.floor(new_value / 2) * 2 + 1); + } + this.setState({ value: new_value }); + this.timeout = setTimeout(function () { + _this2.props.actions.set_param(_this2.props.name, new_value); + _this2.props.onChange && _this2.props.onChange(new_value); + }, SLIDER_THROTTLE_TIME); + } + }, { + key: 'render', + value: function render() { + var _props2 = this.props, + name = _props2.name, + title = _props2.title; + + var value = this.state.value; + if (typeof value === 'undefined') { + value = this.props.min; + } + var text_value = value; + var step = void 0; + if (this.props.type === 'int') { + step = 1; + } else { + step = (this.props.max - this.props.min) / 100; + text_value = parseFloat(value).toFixed(2); + } + return (0, _preact.h)( + 'div', + { 'class': 'slider param' }, + (0, _preact.h)( + 'label', + null, + (0, _preact.h)( + 'span', + null, + title || name.replace(/_/g, ' ') + ), + (0, _preact.h)('input', { type: 'text', value: text_value, onBlur: this.handleInput }) + ), + (0, _preact.h)('input', { + type: 'range', + min: this.props.min, + max: this.props.max, + step: step, + value: value, + onInput: this.handleRange + }) + ); + } + }]); + + return Slider; +}(_preact.Component); + +var mapStateToProps = function mapStateToProps(state) { + return { + opt: state.live.opt + }; +}; + +var mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) { + return { + actions: (0, _redux.bindActionCreators)(liveActions, dispatch) + }; +}; + +exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(Slider); + +/***/ }), + /***/ "./app/client/index.jsx": /*!******************************!*\ !*** ./app/client/index.jsx ***! @@ -178,14 +568,399 @@ var app = (0, _preact.h)( /***/ }), +/***/ "./app/client/live/actions.js": +/*!************************************!*\ + !*** ./app/client/live/actions.js ***! + \************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.seek = exports.load_epoch = exports.load_sequence = exports.list_sequences = exports.list_epochs = exports.list_checkpoints = exports.set_param = exports.get_params = undefined; + +var _socket = __webpack_require__(/*! ../socket */ "./app/client/socket.js"); + +var socket = _interopRequireWildcard(_socket); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +var get_params = exports.get_params = function get_params() { + socket.get_params(); + return { type: 'GET_PARAMS' }; +}; + +var set_param = exports.set_param = function set_param(key, value) { + console.log('set param', key, value); + socket.set_param(key, value); + return { type: 'SET_PARAM', key: key, value: value }; +}; + +var list_checkpoints = exports.list_checkpoints = function list_checkpoints() { + socket.list_checkpoints(); + return { type: 'LOADING_CHECKPOINTS' }; +}; + +var list_epochs = exports.list_epochs = function list_epochs(path) { + socket.list_epochs(path); + return { type: 'LOADING_EPOCHS' }; +}; + +var list_sequences = exports.list_sequences = function list_sequences() { + socket.list_sequences(); + return { type: 'LOADING_SEQUENCES' }; +}; + +var load_sequence = exports.load_sequence = function load_sequence(sequence) { + socket.load_sequence(sequence); + return { type: 'LOADING_SEQUENCE' }; +}; + +var load_epoch = exports.load_epoch = function load_epoch(checkpoint, epoch) { + socket.load_epoch(checkpoint, epoch); + return { type: 'LOADING_CHECKPOINT' }; +}; + +var seek = exports.seek = function seek(frame) { + socket.seek(frame); + return { type: 'SEEKING' }; +}; + +/***/ }), + +/***/ "./app/client/live/components/player.component.js": +/*!********************************************************!*\ + !*** ./app/client/live/components/player.component.js ***! + \********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _preact = __webpack_require__(/*! preact */ "./node_modules/preact/dist/preact.esm.js"); + +var _reactRedux = __webpack_require__(/*! react-redux */ "./node_modules/react-redux/es/index.js"); + +function Player(props) { + return (0, _preact.h)( + 'div', + { className: 'player' }, + (0, _preact.h)('canvas', { width: '424', height: '256' }) + ); +} + +var mapStateToProps = function mapStateToProps(state) { + return {}; +}; + +var mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) { + return {}; +}; + +exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(Player); + +/***/ }), + /***/ "./app/client/live/index.js": /*!**********************************!*\ !*** ./app/client/live/index.js ***! \**********************************/ /*! no static exports found */ -/***/ (function(module, exports) { +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +var _preact = __webpack_require__(/*! preact */ "./node_modules/preact/dist/preact.esm.js"); + +var _redux = __webpack_require__(/*! redux */ "./node_modules/redux/es/redux.js"); + +var _reactRedux = __webpack_require__(/*! react-redux */ "./node_modules/react-redux/es/index.js"); + +var _player = __webpack_require__(/*! ./components/player.component */ "./app/client/live/components/player.component.js"); + +var _player2 = _interopRequireDefault(_player); + +var _paramGroup = __webpack_require__(/*! ../common/paramGroup.component */ "./app/client/common/paramGroup.component.js"); + +var _paramGroup2 = _interopRequireDefault(_paramGroup); + +var _slider = __webpack_require__(/*! ../common/slider.component */ "./app/client/common/slider.component.js"); + +var _slider2 = _interopRequireDefault(_slider); + +var _select = __webpack_require__(/*! ../common/select.component */ "./app/client/common/select.component.js"); + +var _select2 = _interopRequireDefault(_select); + +var _actions = __webpack_require__(/*! ./actions */ "./app/client/live/actions.js"); + +var liveActions = _interopRequireWildcard(_actions); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +var App = function (_Component) { + _inherits(App, _Component); + + function App(props) { + _classCallCheck(this, App); + + var _this = _possibleConstructorReturn(this, (App.__proto__ || Object.getPrototypeOf(App)).call(this)); + + props.actions.get_params(); + props.actions.list_checkpoints(); + props.actions.list_sequences(); + _this.changeCheckpoint = _this.changeCheckpoint.bind(_this); + _this.changeEpoch = _this.changeEpoch.bind(_this); + _this.changeSequence = _this.changeSequence.bind(_this); + _this.seek = _this.seek.bind(_this); + return _this; + } + + _createClass(App, [{ + key: 'componentWillUpdate', + value: function componentWillUpdate(nextProps) { + if (nextProps.opt.checkpoint_name && nextProps.opt.checkpoint_name !== this.props.opt.checkpoint_name) { + this.props.actions.list_epochs(nextProps.opt.checkpoint_name); + } + } + }, { + key: 'changeCheckpoint', + value: function changeCheckpoint(checkpoint_name) { + this.props.actions.load_epoch(checkpoint_name, 'latest'); + } + }, { + key: 'changeEpoch', + value: function changeEpoch(epoch_name) { + this.props.actions.load_epoch(this.props.opt.checkpoint_name, epoch_name); + } + }, { + key: 'changeSequence', + value: function changeSequence(sequence) { + console.log('got sequence', sequence); + this.props.actions.load_sequence(sequence); + } + }, { + key: 'seek', + value: function seek(percentage) { + var frame = Math.floor(percentage * (parseInt(this.props.frame.sequence_len) || 1) + 1); + this.props.actions.seek(frame); + } + }, { + key: 'render', + value: function render() { + return (0, _preact.h)( + 'div', + { className: 'app' }, + (0, _preact.h)(_player2.default, null), + (0, _preact.h)( + 'div', + { className: 'params' }, + (0, _preact.h)( + 'div', + { className: 'column' }, + (0, _preact.h)( + _paramGroup2.default, + { + title: 'Playback', + noToggle: true + }, + (0, _preact.h)(_select2.default, { + name: 'send_image', + title: 'view mode', + options: ['a', 'b', 'sequence', 'recursive'] + }), + (0, _preact.h)(_select2.default, { + name: 'checkpoint_name', + title: 'checkpoint', + options: this.props.checkpoints, + onChange: this.changeCheckpoint + }), + (0, _preact.h)(_select2.default, { + name: 'epoch', + title: 'epoch', + options: this.props.epochs, + onChange: this.changeEpoch + }), + (0, _preact.h)(_select2.default, { + name: 'sequence_name', + title: 'sequence', + options: this.props.sequences, + onChange: this.changeSequence + }), + (0, _preact.h)(_slider2.default, { + name: 'position', + min: 0.0, max: 1.0, type: 'float', + value: (this.props.frame.sequence_i || 0) / (this.props.frame.sequence_len || 1), + onChange: this.seek + }) + ) + ), + (0, _preact.h)( + 'div', + { className: 'column' }, + (0, _preact.h)( + _paramGroup2.default, + { + title: 'Transition', + name: 'transition' + }, + (0, _preact.h)(_slider2.default, { + name: 'transition_period', + min: 10, max: 5000, type: 'int' + }), + (0, _preact.h)(_slider2.default, { + name: 'transition_min', + min: 0.001, max: 0.2, type: 'float' + }), + (0, _preact.h)(_slider2.default, { + name: 'transition_max', + min: 0.1, max: 1.0, type: 'float' + }) + ), + (0, _preact.h)( + _paramGroup2.default, + { + title: 'Recursion', + name: 'recursive' + }, + (0, _preact.h)(_slider2.default, { + name: 'recursive_frac', + min: 0.0, max: 0.5, type: 'float' + }), + (0, _preact.h)(_slider2.default, { + name: 'recurse_roll', + min: -64, max: 64, type: 'int' + }), + (0, _preact.h)(_slider2.default, { + name: 'recurse_roll_axis', + min: 0, max: 1, type: 'int' + }) + ), + (0, _preact.h)( + _paramGroup2.default, + { + title: 'Sequence', + name: 'sequence' + }, + (0, _preact.h)(_slider2.default, { + name: 'sequence_frac', + min: 0.0, max: 0.5, type: 'float' + }), + (0, _preact.h)(_slider2.default, { + name: 'process_frac', + min: 0, max: 1, type: 'float' + }) + ) + ), + (0, _preact.h)( + 'div', + { className: 'column' }, + (0, _preact.h)( + _paramGroup2.default, + { + title: 'Clahe', + name: 'clahe' + }, + (0, _preact.h)(_slider2.default, { + name: 'clip_limit', + min: 1.0, max: 4.0, type: 'float' + }) + ), + (0, _preact.h)( + _paramGroup2.default, + { + title: 'Posterize', + name: 'posterize' + }, + (0, _preact.h)(_slider2.default, { + name: 'spatial_window', + min: 2, max: 128, type: 'int' + }), + (0, _preact.h)(_slider2.default, { + name: 'color_window', + min: 2, max: 128, type: 'int' + }) + ), + (0, _preact.h)( + _paramGroup2.default, + { + title: 'Blur', + name: 'blur' + }, + (0, _preact.h)(_slider2.default, { + name: 'blur_radius', + min: 3, max: 7, type: 'odd' + }), + (0, _preact.h)(_slider2.default, { + name: 'blur_sigma', + min: 0, max: 2, type: 'float' + }) + ), + (0, _preact.h)( + _paramGroup2.default, + { + title: 'Canny Edge Detection', + name: 'canny' + }, + (0, _preact.h)(_slider2.default, { + name: 'canny_lo', + min: 10, max: 200, type: 'int' + }), + (0, _preact.h)(_slider2.default, { + name: 'canny_hi', + min: 10, max: 200, type: 'int' + }) + ) + ) + ) + ); + } + }]); + + return App; +}(_preact.Component); + +var mapStateToProps = function mapStateToProps(state) { + return { + opt: state.live.opt, + frame: state.live.frame, + checkpoints: state.live.checkpoints, + epochs: state.live.epochs, + sequences: state.live.sequences + }; +}; + +var mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) { + return { + actions: (0, _redux.bindActionCreators)(liveActions, dispatch) + }; +}; -throw new Error("Module build failed: SyntaxError: Unexpected token, expected , (44:4)\n\n\u001b[0m \u001b[90m 42 | \u001b[39m seek(percentage){\n \u001b[90m 43 | \u001b[39m \u001b[36mconst\u001b[39m frame \u001b[33m=\u001b[39m \u001b[33mMath\u001b[39m\u001b[33m.\u001b[39mfloor(percentage \u001b[33m*\u001b[39m (\u001b[36mthis\u001b[39m\u001b[33m.\u001b[39mprops\u001b[33m.\u001b[39mopt\u001b[33m.\u001b[39mframe\u001b[33m.\u001b[39msequence_len \u001b[33m||\u001b[39m \u001b[35m1\u001b[39m) \u001b[33m+\u001b[39m \u001b[35m1\u001b[39m\n\u001b[31m\u001b[1m>\u001b[22m\u001b[39m\u001b[90m 44 | \u001b[39m \u001b[36mthis\u001b[39m\u001b[33m.\u001b[39mprops\u001b[33m.\u001b[39mactions\u001b[33m.\u001b[39mseek(frame)\n \u001b[90m | \u001b[39m \u001b[31m\u001b[1m^\u001b[22m\u001b[39m\n \u001b[90m 45 | \u001b[39m }\n \u001b[90m 46 | \u001b[39m render(){\n \u001b[90m 47 | \u001b[39m \u001b[36mreturn\u001b[39m (\u001b[0m\n"); +exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(App); /***/ }), |
