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