flatten directory

master
howard 2021-04-06 12:46:16 -07:00
parent c7457f9c58
commit 3412f5537c
23 changed files with 35 additions and 38 deletions

View File

@ -6,7 +6,7 @@ import {
TOUCH, TOUCH,
Vector2, Vector2,
Vector3 Vector3
} from '../../node_modules/three/src/Three'; } from '../node_modules/three/src/Three';
// This set of controls performs orbiting, dollying (zooming), and panning. // This set of controls performs orbiting, dollying (zooming), and panning.

View File

@ -1,22 +1,20 @@
// import * as THREE from 'three/src/Three';
import * as THREE from '../node_modules/three/src/Three'; import * as THREE from '../node_modules/three/src/Three';
// import { OrbitControls } from './utils/OrbitControls' import { TrackballControls } from './trackball'
import { TrackballControls } from './utils/trackball' import { Sketch } from './Sketch'
import { Sketch } from './sketcher/Sketch' import Stats from './stats.module.js';
import Stats from './utils/stats.module.js';
import { add3DPoint } from './datums' import { add3DPoint } from './datums'
import { extrude } from './extrude' import { extrude } from './extrude'
import { onHover, onPick } from './utils/mouseEvents'; import { onHover, onPick } from './mouseEvents';
import { _vec2, _vec3, color, awaitPts } from './utils/shared' import { _vec2, _vec3, color, awaitPts } from './shared'
import { Vector3 } from 'three/src/Three';
import { AxesHelper } from './utils/axes'
import { Patch } from './utils/patch'
import CSG from "./utils/three-csg.js" import { AxesHelper } from './axes'
import { Patch } from './patch'
import CSG from "./three-csg.js"
window.BoolOp = CSG window.BoolOp = CSG
@ -277,7 +275,7 @@ async function addSketch() {
this.obj3d.add(sketch.obj3d) this.obj3d.add(sketch.obj3d)
sketch.align( sketch.align(
...references.map( ...references.map(
el => new Vector3(...el.geometry.attributes.position.array).applyMatrix4(el.matrixWorld) el => new THREE.Vector3(...el.geometry.attributes.position.array).applyMatrix4(el.matrixWorld)
) )
) )
} }

View File

@ -1,14 +1,14 @@
import * as THREE from '../../node_modules/three/src/Three'; import * as THREE from '../node_modules/three/src/Three';
import { drawOnClick1, drawOnClick2, drawPreClick2, drawClear } from './drawEvents' import { drawOnClick1, drawOnClick2, drawPreClick2, drawClear } from './drawEvents'
import { onHover, onDrag, onDragDim, onPick, onRelease } from '../utils/mouseEvents' import { onHover, onDrag, onDragDim, onPick, onRelease } from './mouseEvents'
import { addDimension, setCoincident } from './constraintEvents' import { addDimension, setCoincident } from './constraintEvents'
import { get3PtArc } from './drawArc' import { get3PtArc } from './drawArc'
import { _vec2, _vec3, raycaster, awaitPts } from '../utils/shared' import { _vec2, _vec3, raycaster, awaitPts } from './shared'
import { replacer, reviver } from '../utils/mapJSONReplacer' import { replacer, reviver } from './mapJSONReplacer'
import { AxesHelper } from '../utils/sketchAxes' import { AxesHelper } from './sketchAxes'
import { drawDimension, _onMoveDimension, setDimLines, updateDim } from './drawDimension'; import { drawDimension, _onMoveDimension, setDimLines, updateDim } from './drawDimension';

View File

@ -4,10 +4,11 @@ import React, { useEffect, useReducer, useRef, useState } from 'react';
import './app.css' import './app.css'
import { Provider, useDispatch, useSelector } from 'react-redux' import { Provider, useDispatch, useSelector } from 'react-redux'
import { FaCube, FaEdit } from 'react-icons/fa' import { FaCube, FaEdit } from 'react-icons/fa'
import { MdEdit, MdDone, MdVisibilityOff, MdVisibility, MdDelete } from 'react-icons/md' import { MdEdit, MdDone, MdVisibilityOff, MdVisibility, MdDelete } from 'react-icons/md'
import * as Icon from "./icons"; import * as Icon from "./icons";
import { color } from './utils/shared' // import { color } from './shared'
export const Root = ({ store }) => ( export const Root = ({ store }) => (
<Provider store={store}> <Provider store={store}>
@ -116,14 +117,14 @@ const TreeEntry = ({ entId }) => {
<div className="btn" <div className="btn"
onPointerEnter={() => { onPointerEnter={() => {
if (entId[0] == 'm') { if (entId[0] == 'm') {
entry.material.color.set(color.hover) // entry.material.color.set(color.hover)
sc.render() sc.render()
} }
}} }}
onPointerLeave={() => { onPointerLeave={() => {
const obj = entry const obj = entry
if (entId[0] == 'm' && !sc.selected.includes(obj)) { if (entId[0] == 'm' && !sc.selected.includes(obj)) {
obj.material.color.set(color.mesh) // obj.material.color.set(color.mesh)
sc.render() sc.render()
} }
}} }}

View File

@ -1,8 +1,6 @@
import * as THREE from '../../node_modules/three/src/Three';
import {lineMaterial, pointMaterial} from '../utils/shared'
import {ptObj, lineObj} from '../utils/shared' import {ptObj, lineObj} from './shared'
const n = 30 const n = 30

View File

@ -1,5 +1,5 @@
import * as THREE from '../../node_modules/three/src/Three'; import * as THREE from '../node_modules/three/src/Three';
import { color } from '../utils/shared' import { color } from './shared'
const lineMaterial = new THREE.LineBasicMaterial({ const lineMaterial = new THREE.LineBasicMaterial({
linewidth: 2, linewidth: 2,

View File

@ -1,5 +1,5 @@
import * as THREE from '../../node_modules/three/src/Three'; import * as THREE from '../node_modules/three/src/Three';
import {ptObj, lineObj} from '../utils/shared' import {ptObj, lineObj} from './shared'
export function drawLine(mouseLoc) { export function drawLine(mouseLoc) {

View File

@ -1,5 +1,5 @@
import * as THREE from 'three/src/Three'; import * as THREE from '../node_modules/three/src/Three';
import { color, ptObj } from './utils/shared' import { color, ptObj } from './shared'
export function extrude(sketch) { export function extrude(sketch) {
let constraints = sketch.constraints; let constraints = sketch.constraints;

View File

@ -1,4 +1,4 @@
import * as THREE from 'three/src/Three'; import * as THREE from '../node_modules/three/src/Three';
import { raycaster, color, hoverColor } from './shared'; import { raycaster, color, hoverColor } from './shared';
export function onHover(e) { export function onHover(e) {

View File

@ -3,7 +3,7 @@
// import { Float32BufferAttribute } from '../core/BufferAttribute.js'; // import { Float32BufferAttribute } from '../core/BufferAttribute.js';
// import { BufferGeometry } from '../core/BufferGeometry.js'; // import { BufferGeometry } from '../core/BufferGeometry.js';
import { LineSegments, MeshBasicMaterial, Float32BufferAttribute, BufferGeometry, Mesh, DoubleSide } from 'three/src/Three' import { LineSegments, MeshBasicMaterial, Float32BufferAttribute, BufferGeometry, Mesh, DoubleSide } from '../node_modules/three/src/Three'
class Patch extends Mesh { class Patch extends Mesh {

View File

@ -1,4 +1,4 @@
import * as THREE from 'three/src/Three'; import * as THREE from '../node_modules/three/src/Three';

View File

@ -3,7 +3,7 @@
// import { Float32BufferAttribute } from '../core/BufferAttribute.js'; // import { Float32BufferAttribute } from '../core/BufferAttribute.js';
// import { BufferGeometry } from '../core/BufferGeometry.js'; // import { BufferGeometry } from '../core/BufferGeometry.js';
import { LineSegments, LineBasicMaterial, Float32BufferAttribute, BufferGeometry } from 'three/src/Three' import { LineSegments, LineBasicMaterial, Float32BufferAttribute, BufferGeometry } from '../node_modules/three/src/Three'
class AxesHelper extends LineSegments { class AxesHelper extends LineSegments {

View File

@ -1,6 +1,6 @@
"use strict" "use strict"
import * as THREE from '../../node_modules/three/src/Three'; import * as THREE from '../node_modules/three/src/Three';
import { CSG, Vertex, Polygon } from "./csg-lib.js" import { CSG, Vertex, Polygon } from "./csg-lib.js"

View File

@ -4,7 +4,7 @@ import {
Quaternion, Quaternion,
Vector2, Vector2,
Vector3 Vector3
} from '../../node_modules/three/src/Three'; } from '../node_modules/three/src/Three';
var TrackballControls = function ( object, domElement ) { var TrackballControls = function ( object, domElement ) {

File diff suppressed because one or more lines are too long

View File

@ -42,6 +42,6 @@ module.exports = {
], ],
}, },
resolve: { resolve: {
extensions: ['.js', '.jsx', '*'] extensions: ['.mjs', '.js', '.jsx', '*']
}, },
}; };