MCPcopy Index your code
hub / github.com/cvdlab/react-planner

github.com/cvdlab/react-planner @v2.0.6

Chat with this repo
repository ↗ · DeepWiki ↗ · release v2.0.6 ↗ · + Follow
2,250 symbols 5,622 edges 550 files 37 documented · 2% updated 2y ago★ 1,46677 open issues
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

react-planner

react-planner is a React component which can be used to draw model buildings. Drag & drop from a catalog of customizable and ready-to-use objects, you can start from 2D wireframes and land on 3D models. As a developer you can provide your users with new objects by adding them to the catalog.

npm javascript react-version

Demo

Demo

react-planner

Usage

import React from 'react';
import ReactDOM from 'react-dom';
import {Map} from 'immutable';
import {createStore} from 'redux';
import {Provider} from 'react-redux';

//download this demo catalog https://github.com/cvdlab/react-planner/tree/master/demo/src/catalog
import MyCatalog from './catalog/mycatalog';

import {
  Models as PlannerModels,
  reducer as PlannerReducer,
  ReactPlanner,
  Plugins as PlannerPlugins,
} from 'react-planner';


//define state
let AppState = Map({
  'react-planner': new PlannerModels.State()
});

//define reducer
let reducer = (state, action) => {
  state = state || AppState;
  state = state.update('react-planner', plannerState => PlannerReducer(plannerState, action));
  return state;
};

let store = createStore(reducer, null, window.devToolsExtension ? window.devToolsExtension() : f => f);

let plugins = [
  PlannerPlugins.Keyboard(),
  PlannerPlugins.Autosave('react-planner_v0'),
  PlannerPlugins.ConsoleDebugger(),
];

//render
ReactDOM.render(
  (
    <Provider store={store}>
      <ReactPlanner
        catalog={MyCatalog}
        width={800}
        height={600}
        plugins={plugins}
        stateExtractor={state => state.get('react-planner')}
      />
    </Provider>
  ),
  document.getElementById('app')
);

Docs

Authors

Developed @ CVDLAB

Contributing

Your contributions (issues and pull request) are very appreciated!

Contributors

License

MIT

Core symbols most depended-on inside this repo

add
called by 1432
src/class/area.js
t
called by 242
src/translator/translator.js
clone
called by 203
src/utils/threeCSG.es6.js
create
called by 110
src/class/line.js
remove
called by 85
src/class/line.js
select
called by 52
src/class/line.js
getElement
called by 51
src/catalog/catalog.js
unselectAll
called by 45
src/class/layer.js

Shape

Function 1,768
Method 348
Class 134

Languages

TypeScript100%

Modules by API surface

src/models.js44 symbols
src/utils/threeCSG.es6.js40 symbols
src/class/project.js35 symbols
src/actions/project-actions.js34 symbols
lib/actions/project-actions.js34 symbols
es/actions/project-actions.js34 symbols
lib/utils/geometry.js32 symbols
es/utils/geometry.js32 symbols
src/utils/geometry.js31 symbols
src/components/viewer3d/libs/orbit-controls.js31 symbols
lib/components/viewer3d/libs/orbit-controls.js31 symbols
es/components/viewer3d/libs/orbit-controls.js31 symbols

For agents

$ claude mcp add react-planner \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact