From 8d06839056967e8786c63976545aff098ae2f128 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Tue, 26 Jun 2018 01:28:41 +0200 Subject: morph module.. enum method for sliders --- app/client/modules/morph/views/morph.app.js | 185 ++++++++++++++++++++++++++++ 1 file changed, 185 insertions(+) create mode 100644 app/client/modules/morph/views/morph.app.js (limited to 'app/client/modules/morph/views') diff --git a/app/client/modules/morph/views/morph.app.js b/app/client/modules/morph/views/morph.app.js new file mode 100644 index 0000000..045f396 --- /dev/null +++ b/app/client/modules/morph/views/morph.app.js @@ -0,0 +1,185 @@ +import { h, Component } from 'preact' +import { bindActionCreators } from 'redux' +import { Link } from 'react-router-dom'; +import { connect } from 'react-redux' +import util from '../../../util' + +import actions from '../../../actions' + +import * as morphActions from '../morph.actions' +import * as morphTasks from '../morph.tasks' + +import Loading from '../../../common/loading.component' +import { + Select, Slider, Checkbox, Group, + Button, Param, FileList, FileRow, +} from '../../../common' + +let yes_count = 0 + +class MorphResults extends Component { + constructor(props){ + super() + this.state = { + a: "", + b: "", + a_offset: 0, + b_offset: 0, + steps: 16, + dilate: 2, + smooth: true, + cmd: 'mix', + } + if (!props.morph.data) props.actions.load_data() + } + componentDidMount(){ + yes_count = 0 + } + render(){ + if (! this.props.morph.app) return + + const { sequences, renders, files } = this.props.morph.app + const sequence_options = sequences.map(sequence => [ + sequence.name.split("_").slice(0, 3).join(" ") + "~ (" + sequence.count + ")", + sequence.name + ]) + + console.log(sequence_options) + const totalLength = (this.state.steps * this.state.dilate) / 25 + let lengthWarning + if (this.state.steps > 64) { + lengthWarning = ( +
warning, this may take a while
+ ) + } + + return ( +
+
+

Morph

+
+
+
+ + this.setState({ b: key })} + /> + this.setState({ b_offset: key })} + /> + + + +