移除dat.gui

使用cache-loader代替旧的webpack缓存插件
pull/295/MERGE
ChenX 5 years ago
parent 96a5a17e60
commit 02995d6a62

@ -1,6 +1,6 @@
import * as AddAssetHtmlPlugin from "add-asset-html-webpack-plugin";
import ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin');
import * as HardSourceWebpackPlugin from 'hard-source-webpack-plugin';
// import * as HardSourceWebpackPlugin from 'hard-source-webpack-plugin';
import * as HtmlWebPackPlugin from "html-webpack-plugin";
import * as CleanWebpackPlugin from 'clean-webpack-plugin';
import * as path from 'path';
@ -40,7 +40,7 @@ const config: webpack.Configuration = {
test: /\.tsx?$/,
exclude: /node_modules/,
use: [
// { loader: 'cache-loader' },
{ loader: 'cache-loader', options: { cacheDirectory: "node_modules/.cache_loader" } },
{
loader: 'ts-loader',
options: {
@ -142,7 +142,7 @@ const config: webpack.Configuration = {
React: 'react',
THREE: "three"
}),
new HardSourceWebpackPlugin(),
// new HardSourceWebpackPlugin(),
new ForkTsCheckerWebpackPlugin({ checkSyntacticErrors: true }),
new CleanWebpackPlugin([`./dist/*.main.js`], { root: path.resolve(__dirname, "..") }),
],

@ -20,7 +20,6 @@
"license": "ISC",
"devDependencies": {
"@types/blueimp-md5": "^2.7.0",
"@types/dat-gui": "^0.6.3",
"@types/hard-source-webpack-plugin": "^1.0.0",
"@types/html-webpack-plugin": "^3.2.0",
"@types/jest": "^24.0.0",
@ -44,7 +43,6 @@
"fork-ts-checker-webpack-plugin": "^0.5.2",
"git-revision-webpack-plugin": "^3.0.3",
"gitlog": "^3.1.2",
"hard-source-webpack-plugin": "https://github.com/FishOrBear/hard-source-webpack-plugin",
"html-loader": "^0.5.5",
"html-webpack-plugin": "^3.2.0",
"jest": "^24.7.1",
@ -75,7 +73,6 @@
"dependencies": {
"@blueprintjs/core": "^3.13.0",
"blueimp-md5": "^2.10.0",
"dat.gui": "^0.7.5",
"golden-layout": "^1.5.9",
"mobx": "^5.9.0",
"mobx-react": "^5.4.3",

@ -9,7 +9,6 @@ import { FontLoader } from '../DatabaseServices/Text/FontLoader';
import { CameraControls } from '../Editor/CameraControls';
import { commandMachine } from '../Editor/CommandMachine';
import { ContextMenu } from '../Editor/ContextMenu';
import { DatGUI } from '../Editor/DebugDatUi';
import { Editor } from '../Editor/Editor';
import { Gesture } from '../Editor/Gesture';
import { RegisterGesture } from '../Editor/RegisterGesture';
@ -26,7 +25,6 @@ export let app: ApplicationService;
*/
export class ApplicationService
{
gui: DatGUI;
m_Database: Database;
m_Viewer: Viewer;
m_Editor: Editor;
@ -53,8 +51,6 @@ export class ApplicationService
new CameraControls(this.m_Viewer);
this.gui = new DatGUI();
this.m_Editor = new Editor(this);
new ContextMenu(this.m_Editor);
let gt = new Gesture(this.m_Editor);

@ -1,21 +0,0 @@
// import * as dat from "dat.gui"
export class DatGUI
{
//UI.
m_Ctrl_UI: any; //dat.GUI
color: string = "#ffae23";
constructor()
{
// this.m_Ctrl_UI = new dat.GUI(
// {
// autoPlace: true,
// width: 300,
// }
// );
// this.m_Ctrl_UI.domElement.parentElement.style.top = "36px";
// this.m_Ctrl_UI.addColor(this, "color");
}
}

@ -196,5 +196,4 @@ function RenderComponent(Components, el: Element, store?: any)
, el);
else
ReactDOM.render(<Components />, el)
}

@ -1,7 +1,5 @@
import * as THREE from 'three';
import { guiMaterial, guiMeshBasicMaterial, guiScene } from './Common/Material';
import { CameraControlState } from './Editor/CameraControls';
import { DatGUI } from './Editor/DebugDatUi';
import './UI/Css/style.less';
import '../../Css/switchTheme.less'
import { WebCADView } from './WebCADView/WebCADView';
@ -118,23 +116,6 @@ window.onload = async () =>
}
btn = createBtn("旋转", content, rotateSwithMove);
{
let mat = new THREE.MeshBasicMaterial({ color: 0xc8575b })
let geometry = new THREE.BoxGeometry(10, 10, 10);
let mat2 = new THREE.MeshNormalMaterial();
let mesh = new THREE.Mesh(geometry, mat);
window["mat"] = mat2;
let gui = new DatGUI();
guiMeshBasicMaterial(gui.m_Ctrl_UI, mesh, mat, mesh.geometry);
guiMaterial(gui.m_Ctrl_UI, mesh, mat, mesh.geometry);
guiScene(gui.m_Ctrl_UI, app.m_Viewer.Scene, app.m_Viewer.m_Render, hemiLight);
app.m_Viewer.Scene.add(mesh);
}
}
function parseQuery(search): Object

Loading…
Cancel
Save