revert to two entry pts
parent
3eb050e893
commit
960b0acb90
|
@ -27,7 +27,7 @@ window.id = 0
|
|||
|
||||
|
||||
|
||||
export class Scene {
|
||||
export default class Scene {
|
||||
constructor(store) {
|
||||
this.sid = 1
|
||||
this.mid = 1
|
||||
|
@ -430,4 +430,4 @@ function addSketch() {
|
|||
return sketch
|
||||
}
|
||||
|
||||
// window.sc = new Scene(store)
|
||||
window.sce = new Scene(store)
|
|
@ -329,7 +329,6 @@ class Sketch {
|
|||
this.scene.store.dispatch({ type: 'set-mode', mode })
|
||||
}
|
||||
|
||||
// console.log('this mode:', this.scene.mode)
|
||||
}
|
||||
|
||||
deleteSelected() {
|
||||
|
|
|
@ -36,13 +36,8 @@ const App = ({ store }) => {
|
|||
</Provider>
|
||||
}
|
||||
|
||||
export let sce
|
||||
|
||||
document.addEventListener('DOMContentLoaded', async () => {
|
||||
|
||||
const { Scene } = await import('../Scene')
|
||||
sce = new Scene(store)
|
||||
window.sc = sce
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
|
||||
ReactDOM.render(<App store={store} />, document.getElementById('react'));
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import {sce} from './app'
|
||||
// import {sce} from './app'
|
||||
|
||||
export class DepTree {
|
||||
constructor(obj) {
|
||||
|
|
|
@ -6,7 +6,7 @@ import { useDispatch, useSelector } from 'react-redux'
|
|||
import { MdDone, MdClose } from 'react-icons/md'
|
||||
import * as Icon from "./icons";
|
||||
|
||||
import { sce } from './app'
|
||||
// import { sce } from './app'
|
||||
|
||||
|
||||
export const Dialog = () => {
|
||||
|
|
|
@ -3,7 +3,7 @@ import React, { useState } from 'react';
|
|||
|
||||
import { useDispatch} from 'react-redux'
|
||||
|
||||
import { sce } from './app'
|
||||
// import { sce } from './app'
|
||||
|
||||
|
||||
const utf8decoder = new TextDecoder();
|
||||
|
|
|
@ -10,7 +10,7 @@ import {
|
|||
fileSave,
|
||||
} from 'browser-fs-access';
|
||||
|
||||
import { sce } from './app'
|
||||
// import { sce } from './app'
|
||||
|
||||
// https://web.dev/file-system-access/
|
||||
|
||||
|
|
|
@ -12,9 +12,9 @@ import { Dialog } from './dialog'
|
|||
import { DropDown } from './dropDown'
|
||||
import { STLExport, saveFile, openFile } from './fileHelpers'
|
||||
|
||||
import { drawClear } from '../drawEvents'
|
||||
// import { drawClear } from '../drawEvents'
|
||||
|
||||
import { sce } from './app'
|
||||
// import { sce } from './app'
|
||||
|
||||
|
||||
|
||||
|
@ -121,7 +121,7 @@ export const NavBar = () => {
|
|||
|
||||
const sketchModeButtons = [
|
||||
[Icon.Extrude, () => {
|
||||
drawClear.call(sce.activeSketch)
|
||||
// drawClear.call(sce.activeSketch)
|
||||
dispatch({ type: 'set-dialog', action: 'extrude', target: sce.activeSketch.obj3d.name })
|
||||
}, 'Extrude'],
|
||||
[Icon.Line, () => sce.activeSketch.command('line'), 'Line (L)'], //1
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
import { DepTree } from './depTree'
|
||||
import update from 'immutability-helper'
|
||||
import { combineReducers } from 'redux';
|
||||
import { sce } from './app'
|
||||
// import { sce } from './app'
|
||||
|
||||
const defaultTreeState = {
|
||||
byId: {},
|
||||
|
|
|
@ -6,7 +6,7 @@ import { useDispatch, useSelector } from 'react-redux'
|
|||
import { MdEdit, MdVisibility, MdDelete } from 'react-icons/md'
|
||||
import { FaCube, FaDrawPolygon } from 'react-icons/fa'
|
||||
|
||||
import { sce } from './app'
|
||||
// import { sce } from './app'
|
||||
|
||||
export const Tree = () => {
|
||||
const treeEntries = useSelector(state => state.treeEntries)
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
<div id="labels"></div>
|
||||
<div id="stats"></div>
|
||||
<script src="app.bundle.js"></script>
|
||||
<!-- <script src="scene.bundle.js"></script> -->
|
||||
<script src="scene.bundle.js"></script>
|
||||
<script src="solver.js"></script>
|
||||
<script src="gunzip.min.js"></script>
|
||||
</body>
|
||||
|
|
|
@ -5,7 +5,7 @@ const tailwindcss = require('tailwindcss')
|
|||
module.exports = {
|
||||
entry: {
|
||||
app: './src/react/app.jsx',
|
||||
// scene: './src/Scene.js',
|
||||
scene: './src/Scene.js',
|
||||
},
|
||||
output: {
|
||||
filename: '[name].bundle.js',
|
||||
|
|
Loading…
Reference in New Issue