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';
|
||||
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';
|
||||
|
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: {
|
||||
loader: 'raw-loader'
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user