add noodle bot as default shape

This commit is contained in:
casperlamboo 2017-12-07 16:21:27 +01:00
parent ac78534f06
commit f2c409de0d
3 changed files with 8 additions and 17 deletions

View File

@ -27,22 +27,12 @@ import actionWrapper from 'redux-action-wrapper';
import * as actions from './src/actions/index.js'; import * as actions from './src/actions/index.js';
window.actions = actionWrapper(actions, store.dispatch); window.actions = actionWrapper(actions, store.dispatch);
// add inital shapes import modelData from './models/noodlebot.d3sketch';
import * as CAL from 'cal'; import JSONToSketchData from './src/shape/JSONToSketchData.js';
// store.dispatch(actions.addObject({ (async () => {
// type: 'FREE_HAND', const data = await JSONToSketchData(JSON.parse(modelData));
// fill: false, store.dispatch(actions.openSketch({ data }));
// solid: false, })();
// points: [new CAL.Vector(-20, 0), new CAL.Vector(10, 1)],
// transform: new CAL.Matrix({ x: 0, y: 0 })
// }));
store.dispatch(actions.addObject({
type: 'RECT',
fill: true,
rectSize: new CAL.Vector(20, 20),
height: 40,
transform: new CAL.Matrix({ x: -10, y: -10 })
}));
// render dom // render dom
import React from 'react'; import React from 'react';

File diff suppressed because one or more lines are too long

View File

@ -66,7 +66,7 @@ module.exports = {
} }
} }
}, { }, {
test: /\.(svg|glsl)$/, test: /\.(svg|glsl|d3sketch)$/,
use: { use: {
loader: 'raw-loader' loader: 'raw-loader'
} }