flatten directory
parent
c7457f9c58
commit
3412f5537c
|
@ -6,7 +6,7 @@ import {
|
|||
TOUCH,
|
||||
Vector2,
|
||||
Vector3
|
||||
} from '../../node_modules/three/src/Three';
|
||||
} from '../node_modules/three/src/Three';
|
||||
|
||||
|
||||
// This set of controls performs orbiting, dollying (zooming), and panning.
|
22
src/Scene.js
22
src/Scene.js
|
@ -1,22 +1,20 @@
|
|||
|
||||
|
||||
|
||||
// import * as THREE from 'three/src/Three';
|
||||
import * as THREE from '../node_modules/three/src/Three';
|
||||
// import { OrbitControls } from './utils/OrbitControls'
|
||||
import { TrackballControls } from './utils/trackball'
|
||||
import { Sketch } from './sketcher/Sketch'
|
||||
import Stats from './utils/stats.module.js';
|
||||
import { TrackballControls } from './trackball'
|
||||
import { Sketch } from './Sketch'
|
||||
import Stats from './stats.module.js';
|
||||
|
||||
import { add3DPoint } from './datums'
|
||||
import { extrude } from './extrude'
|
||||
import { onHover, onPick } from './utils/mouseEvents';
|
||||
import { _vec2, _vec3, color, awaitPts } from './utils/shared'
|
||||
import { Vector3 } from 'three/src/Three';
|
||||
import { AxesHelper } from './utils/axes'
|
||||
import { Patch } from './utils/patch'
|
||||
import { onHover, onPick } from './mouseEvents';
|
||||
import { _vec2, _vec3, color, awaitPts } from './shared'
|
||||
|
||||
import CSG from "./utils/three-csg.js"
|
||||
import { AxesHelper } from './axes'
|
||||
import { Patch } from './patch'
|
||||
|
||||
import CSG from "./three-csg.js"
|
||||
|
||||
window.BoolOp = CSG
|
||||
|
||||
|
@ -277,7 +275,7 @@ async function addSketch() {
|
|||
this.obj3d.add(sketch.obj3d)
|
||||
sketch.align(
|
||||
...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)
|
||||
)
|
||||
)
|
||||
}
|
||||
|
|
|
@ -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 { onHover, onDrag, onDragDim, onPick, onRelease } from '../utils/mouseEvents'
|
||||
import { onHover, onDrag, onDragDim, onPick, onRelease } from './mouseEvents'
|
||||
import { addDimension, setCoincident } from './constraintEvents'
|
||||
import { get3PtArc } from './drawArc'
|
||||
import { _vec2, _vec3, raycaster, awaitPts } from '../utils/shared'
|
||||
import { replacer, reviver } from '../utils/mapJSONReplacer'
|
||||
import { AxesHelper } from '../utils/sketchAxes'
|
||||
import { _vec2, _vec3, raycaster, awaitPts } from './shared'
|
||||
import { replacer, reviver } from './mapJSONReplacer'
|
||||
import { AxesHelper } from './sketchAxes'
|
||||
import { drawDimension, _onMoveDimension, setDimLines, updateDim } from './drawDimension';
|
||||
|
||||
|
|
@ -4,10 +4,11 @@ import React, { useEffect, useReducer, useRef, useState } from 'react';
|
|||
import './app.css'
|
||||
|
||||
import { Provider, useDispatch, useSelector } from 'react-redux'
|
||||
|
||||
import { FaCube, FaEdit } from 'react-icons/fa'
|
||||
import { MdEdit, MdDone, MdVisibilityOff, MdVisibility, MdDelete } from 'react-icons/md'
|
||||
import * as Icon from "./icons";
|
||||
import { color } from './utils/shared'
|
||||
// import { color } from './shared'
|
||||
|
||||
export const Root = ({ store }) => (
|
||||
<Provider store={store}>
|
||||
|
@ -116,14 +117,14 @@ const TreeEntry = ({ entId }) => {
|
|||
<div className="btn"
|
||||
onPointerEnter={() => {
|
||||
if (entId[0] == 'm') {
|
||||
entry.material.color.set(color.hover)
|
||||
// entry.material.color.set(color.hover)
|
||||
sc.render()
|
||||
}
|
||||
}}
|
||||
onPointerLeave={() => {
|
||||
const obj = entry
|
||||
if (entId[0] == 'm' && !sc.selected.includes(obj)) {
|
||||
obj.material.color.set(color.mesh)
|
||||
// obj.material.color.set(color.mesh)
|
||||
sc.render()
|
||||
}
|
||||
}}
|
||||
|
|
|
@ -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
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
import * as THREE from '../../node_modules/three/src/Three';
|
||||
import { color } from '../utils/shared'
|
||||
import * as THREE from '../node_modules/three/src/Three';
|
||||
import { color } from './shared'
|
||||
|
||||
const lineMaterial = new THREE.LineBasicMaterial({
|
||||
linewidth: 2,
|
|
@ -1,5 +1,5 @@
|
|||
import * as THREE from '../../node_modules/three/src/Three';
|
||||
import {ptObj, lineObj} from '../utils/shared'
|
||||
import * as THREE from '../node_modules/three/src/Three';
|
||||
import {ptObj, lineObj} from './shared'
|
||||
|
||||
export function drawLine(mouseLoc) {
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
import * as THREE from 'three/src/Three';
|
||||
import { color, ptObj } from './utils/shared'
|
||||
import * as THREE from '../node_modules/three/src/Three';
|
||||
import { color, ptObj } from './shared'
|
||||
export function extrude(sketch) {
|
||||
|
||||
let constraints = sketch.constraints;
|
||||
|
|
|
@ -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';
|
||||
|
||||
export function onHover(e) {
|
|
@ -3,7 +3,7 @@
|
|||
// import { Float32BufferAttribute } from '../core/BufferAttribute.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 {
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
import * as THREE from 'three/src/Three';
|
||||
import * as THREE from '../node_modules/three/src/Three';
|
||||
|
||||
|
||||
|
|
@ -3,7 +3,7 @@
|
|||
// import { Float32BufferAttribute } from '../core/BufferAttribute.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 {
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
"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"
|
||||
|
||||
|
|
@ -4,7 +4,7 @@ import {
|
|||
Quaternion,
|
||||
Vector2,
|
||||
Vector3
|
||||
} from '../../node_modules/three/src/Three';
|
||||
} from '../node_modules/three/src/Three';
|
||||
|
||||
var TrackballControls = function ( object, domElement ) {
|
||||
|
File diff suppressed because one or more lines are too long
|
@ -42,6 +42,6 @@ module.exports = {
|
|||
],
|
||||
},
|
||||
resolve: {
|
||||
extensions: ['.js', '.jsx', '*']
|
||||
extensions: ['.mjs', '.js', '.jsx', '*']
|
||||
},
|
||||
};
|
Loading…
Reference in New Issue