Skip to content

Commit

Permalink
add at last commit
Browse files Browse the repository at this point in the history
  • Loading branch information
lamache committed Mar 17, 2021
1 parent d988add commit 635f40c
Show file tree
Hide file tree
Showing 9 changed files with 65 additions and 13 deletions.
File renamed without changes.
22 changes: 16 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
{
"name": "ud-viz",
"version": "2.28.2",
"version": "2.29.0",
"description": "A collection of itowns plugins",
"main": "dist/release/udv.js",
"scripts": {
"main": "src",
"scripts": {
"build": "cross-env NODE_ENV=production webpack",
"build-debug": "cross-env NODE_ENV=development webpack",
"debug": "nodemon --verbose --watch src --delay 2500ms ./bin/dev.js -e js,css,html"
"debug": "nodemon --verbose --watch src --delay 2500ms ./bin/debug.js -e js,css,html"
},
"files": [
"Tools",
"Modules"
"src"
],
"repository": {
"type": "git",
Expand All @@ -21,9 +20,20 @@
"url": "https://github.com/VCityTeam/UD-Viz/issues"
},
"homepage": "https://github.com/VCityTeam/UD-Viz/",
"peerDependencies": {
"detect-collisions": "^2.5.2",
"itowns": "2.28.1",
"proj4": "^2.6.2",
"socket.io-client": "^4.0.0",
"three": "^0.122.0",
"vis-data": "^7.1.2",
"vis-network": "^9.0.3"
},
"dependencies": {
"detect-collisions": "^2.5.2",
"itowns": "2.28.1",
"proj4": "^2.6.2",
"socket.io-client": "^4.0.0",
"three": "^0.122.0",
"vis-data": "^7.1.2",
"vis-network": "^9.0.3"
Expand Down
11 changes: 11 additions & 0 deletions src/Game/Client/Client.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/** @format */

export { UDVDebugger } from './UDVDebugger/UDVDebugger';

export { GameView } from './GameView/GameView';

export { WebSocketService } from './WebSocketService';

export { AssetsManager } from './AssetsManager';

export { WorldStateInterpolator } from './WorldStateInterpolator';
4 changes: 3 additions & 1 deletion src/Game/Client/GameView/GameView.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,13 +115,15 @@ export class GameView {
}

initScene(state) {
this.updateObject3D(state);

const o = state.getOrigin();
const [x, y] = proj4('EPSG:3946').forward([o.lng, o.lat]);
this.object3D.position.x = x;
this.object3D.position.y = y;
this.object3D.position.z = o.alt;
this.updateObject3D(state);
this.view.scene.add(this.object3D);
console.log(this.object3D)

//shadow
const renderer = this.view.mainLoop.gfxEngine.renderer;
Expand Down
3 changes: 2 additions & 1 deletion src/Game/Shared/Data.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@
const RenderComponent = require('./GameObject/Components/RenderComponent');
const ScriptComponent = require('./GameObject/Components/ScriptComponent');
const GameObject = require('./GameObject/GameObject.js');
const THREE = require('three');
const BodyComponent = require('./GameObject/Components/BodyComponent');

const THREE = require('three');

module.exports = Object.freeze({
WEBSOCKET: {
MSG_TYPES: {
Expand Down
1 change: 0 additions & 1 deletion src/Game/Shared/GameObject/GameObject.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
*/

const THREE = require('three');
const Data = require('../Data');

//GameObject Components
const RenderComponent = require('./Components/RenderComponent');
Expand Down
22 changes: 21 additions & 1 deletion src/Game/Shared/Shared.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,24 @@
/** @format */

const es5Data = require('./Data');
export { es5Data as Data };
// export { es5Data as Data };

const es5Command = require('./Command');
// export { es5Command as Command };

const es5GameObject = require('./GameObject/GameObject');
// export { es5GameObject as GameObject };

const es5World = require('./World');
// export { es5World as World };

const es5WorldState = require('./WorldState');
// export { es5WorldState as WorldState };

module.exports = {
Data: es5Data,
Command: es5Command,
GameObject: es5GameObject,
World: es5World,
WorldState: es5WorldState,
};
4 changes: 4 additions & 0 deletions src/udv.js → src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,7 @@ export { Components };
//Widgets
import * as Widgets from './Widgets/Widgets.js';
export { Widgets };

//Game
import * as Game from './Game/Game.js';
export { Game };
11 changes: 8 additions & 3 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,19 @@ module.exports = (env) => {
},
];

const entry = process.env.npm_config_entry || './src/index.js';
const output = process.env.npm_config_output || 'udv';

console.log('Build from ', entry, ' to ', output);

return {
mode,
entry: path.resolve(__dirname, './src/udv.js'),
entry: path.resolve(__dirname, entry),
devtool: devTool,
output: {
path: outputPath,
filename: 'udv.js',
library: 'udv',
filename: output + '.js',
library: output + '',
libraryTarget: 'umd',
umdNamedDefine: true,
},
Expand Down

0 comments on commit 635f40c

Please sign in to comment.