mirror of
https://github.com/Doodle3D/Doodle3D-Core.git
synced 2024-10-31 20:03:24 +01:00
add noodle bot as default shape
This commit is contained in:
parent
ac78534f06
commit
f2c409de0d
22
index.js
22
index.js
@ -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';
|
||||||
|
1
models/noodlebot.d3sketch
Normal file
1
models/noodlebot.d3sketch
Normal file
File diff suppressed because one or more lines are too long
@ -66,7 +66,7 @@ module.exports = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
test: /\.(svg|glsl)$/,
|
test: /\.(svg|glsl|d3sketch)$/,
|
||||||
use: {
|
use: {
|
||||||
loader: 'raw-loader'
|
loader: 'raw-loader'
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user