|
1 | 1 | // import './tags/curve-editor.tag'; |
2 | 2 | require('../css/main'); |
3 | | -import {render, h} from 'preact'; |
4 | | -import CurveEditor from './tags/curve-editor'; |
5 | | -import store from './store'; |
6 | 3 | import { Provider } from 'preact-redux'; |
| 4 | +import {render, h} from 'preact'; |
| 5 | +import CurveEditor from './tags/curve-editor'; |
| 6 | +import store from './store'; |
| 7 | +import C from './constants'; |
7 | 8 |
|
8 | 9 | // TODO |
9 | | -// - select at touch |
10 | | -// - move bunch of points at once |
| 10 | +// - instance dropdown on code panel |
| 11 | +// - add orange point on seleced point control/ hightlight the control |
| 12 | +// - save state to LC |
11 | 13 | // - add APIs |
| 14 | +// - import path data |
| 15 | +// - move bunch of points at once |
12 | 16 |
|
13 | 17 | document.addEventListener('DOMContentLoaded', () => { |
14 | 18 | render( |
15 | 19 | <Provider store={store}> |
16 | 20 | <CurveEditor /> |
17 | 21 | </Provider>, document.body); |
18 | 22 | }); |
| 23 | + |
| 24 | +store.dispatch({ type: 'POINT_ADD', data: { point: {x: 0, y: C.CURVE_SIZE, isLockedX: true}, index: 0 } }); |
| 25 | +store.dispatch({ type: 'POINT_ADD', data: { point: {x: 100, y: 0, isLockedX: true}, index: 1 } }); |
| 26 | + |
| 27 | +// makePoint({ x: 0, y: C.CURVE_SIZE, isLockedX: true, type: 'straight' }), |
| 28 | +// // makePoint({ x: 50, y: C.CURVE_SIZE/2, type: 'mirrored' }), |
| 29 | +// makePoint({ x: 100, y: 0, isLockedX: true }) |
| 30 | + |
| 31 | +// curve |
| 32 | +// .getFunction({ isInverseX: false, isInverseY: true, name: 'Some name' }) |
| 33 | +// .getCode() |
| 34 | + |
| 35 | + |
| 36 | + |
0 commit comments