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';
window.actions = actionWrapper(actions, store.dispatch);
// add inital shapes
import * as CAL from 'cal';
// store.dispatch(actions.addObject({
// type: 'FREE_HAND',
// fill: false,
// 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 })
}));
import modelData from './models/noodlebot.d3sketch';
import JSONToSketchData from './src/shape/JSONToSketchData.js';
(async () => {
const data = await JSONToSketchData(JSON.parse(modelData));
store.dispatch(actions.openSketch({ data }));
})();
// render dom
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: {
loader: 'raw-loader'
}