revert to two entry pts

master
howard 2021-04-26 00:25:47 -07:00
parent 3eb050e893
commit 960b0acb90
12 changed files with 14 additions and 20 deletions

View File

@ -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)

View File

@ -329,7 +329,6 @@ class Sketch {
this.scene.store.dispatch({ type: 'set-mode', mode })
}
// console.log('this mode:', this.scene.mode)
}
deleteSelected() {

View File

@ -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'));

View File

@ -1,4 +1,4 @@
import {sce} from './app'
// import {sce} from './app'
export class DepTree {
constructor(obj) {

View File

@ -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 = () => {

View File

@ -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();

View File

@ -10,7 +10,7 @@ import {
fileSave,
} from 'browser-fs-access';
import { sce } from './app'
// import { sce } from './app'
// https://web.dev/file-system-access/

View File

@ -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

View File

@ -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: {},

View File

@ -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)

View File

@ -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>

View File

@ -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',