code split

master
howard 2021-03-28 16:25:57 -07:00
parent f47cee76c3
commit 79282f8572
9 changed files with 20 additions and 66 deletions

2
.gitignore vendored
View File

@ -1,2 +1,2 @@
node_modules/
dist/bundle.js*
dist/*bundle.js*

File diff suppressed because one or more lines are too long

View File

@ -1,41 +0,0 @@
/*
object-assign
(c) Sindre Sorhus
@license MIT
*/
/** @license React v0.20.2
* scheduler.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
/** @license React v16.13.1
* react-is.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
/** @license React v17.0.2
* react-dom.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
/** @license React v17.0.2
* react.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

8
dist/index.html vendored
View File

@ -38,14 +38,12 @@
<body>
<div id="react"></div>
<canvas id="c"></canvas>
<script src="https://cdnjs.cloudflare.com/ajax/libs/redux/4.0.0-beta.1/redux.js" integrity="sha512-a18iH5k0MJdFLaOvN1STjT2wNpH4tjIKSuWXZOZ7nWxkMydoMGZCkQ88Ch/RnAVzVVNVfhl3dxyg5UKABKhr0Q==" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/redux-logger/4.0.0/redux-logger.js" integrity="sha512-desjPFOQxT8YLUME+WMxNB5xmoyi8d/h+XG8Pgv+d/vIpy2Phw1uVyZYl4VUN+/Vvv2Z9hGHhx1StlZRW5Sx5w==" crossorigin="anonymous"></script>
<script src="redux.js"></script>
<script src="redux.bundle.js"></script>
<script src="renderer.bundle.js"></script>
<script src="index.bundle.js"></script>
<script src="solver.js"></script>
<!-- <script src="lz-string.min.js"></script> -->
<script src="lz-string.js"></script>
<script src="lz-string.min.js"></script>
<!-- <script src="lz-string.js"></script> -->
<div id="stats"></div>
</body>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -10,6 +10,7 @@ import Stats from './utils/stats.module.js';
import { add3DPoint } from './datums'
export function Renderer(store) {
this.store = store
// this.stats = new Stats();

View File

@ -1,18 +1,18 @@
// import { createStore, applyMiddleware } from 'redux'
// import logger from 'redux-logger'
import { createStore, applyMiddleware } from 'redux'
import logger from 'redux-logger'
// function reducer(state = {}, action) {
// switch (action.type) {
// case 'toggle':
// return { ...state, toggle: action.payload }
// case 'rx-new-sketch':
// return { ...state, sketches: [...state.sketches, action.idx] }
// default:
// return state
// }
// }
var bbb = 'bbbx'
// var store = createStore(reducer, {sketches:[]}, applyMiddleware(logger))
function reducer(state = {}, action) {
switch (action.type) {
case 'toggle':
return { ...state, toggle: action.payload }
case 'rx-new-sketch':
return { ...state, sketches: [...state.sketches, action.idx] }
default:
return state
}
}
window.store = createStore(reducer, {sketches:[]}, applyMiddleware(logger))

View File

@ -12,7 +12,7 @@ module.exports = {
entry: {
// redux: './src/redux.js',
redux: './src/redux.js',
index: './src/index.js',
renderer: './src/Renderer.js',
},