Skip to content

Commit

Permalink
Merge pull request #243 from VCityTeam/dev-unstable
Browse files Browse the repository at this point in the history
2.33.4
  • Loading branch information
valentinMachado authored Oct 19, 2021
2 parents 753c90a + 18db5d7 commit f8b38cc
Show file tree
Hide file tree
Showing 17 changed files with 1,860 additions and 3,719 deletions.
3 changes: 1 addition & 2 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ UD-Viz is a JavaScript library based on [iTowns](https://github.com/itowns/itown
A tutorial of the game engine can be found [here](./Doc/Devel/LocalGameTutorial.md)

### Pre-requisite
Developing UD-Viz requires some knowledge about [JS](https://github.com/VCityTeam/UD-SV/blob/master/UD-Doc/Devel/ToolJavaScript.md), node.js, npm and [three.js](https://threejs.org/).

Developing UD-Viz requires some knowledge about [JS](https://github.com/VCityTeam/UD-SV/blob/master/UD-Doc/Devel/ToolJavaScript.md), [node.js](https://en.wikipedia.org/wiki/Node.js), [npm](https://en.wikipedia.org/wiki/Npm_(software)) and [three.js](https://threejs.org/).

### Install nodejs and npm
Expand Down Expand Up @@ -72,6 +70,7 @@ npm run travis

in order to assert that `eslint` and `webpack` commands are still effective

**Tip for Windows developers:** eslint requires Linux style newline characters which are often overwritten in Windows environments. Although this is automatically resolved by Git when pushing code, eslint may detect "incorrect" newline characters when running locally. To attempt to fix this you may need to run `npm run eslint -- --fix`.

## Sources directory layout (organizational principles)
Definitions:
Expand Down
15 changes: 7 additions & 8 deletions examples/Billboard.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,18 +33,17 @@

const center = extent.center();

const image = document.createElement('img');
image.src =
'https://i.pinimg.com/236x/33/a6/d0/33a6d0266c7a8c5dd22c975861d8abbc.jpg';
view3D.appendCSS3D(
image,
{ width: 200, height: 500 },
const iframe = document.createElement('iframe');
iframe.src = 'http://localhost:8000/examples/AvatarGame.html';
const billboard = new udv.Widgets.Billboard(
iframe,
new udv.Game.Shared.Components.THREEUtils.Transform(
new udv.THREE.Vector3(center.x, center.y, 50),
new udv.THREE.Vector3(center.x, center.y, 400),
new udv.THREE.Vector3(Math.PI * 0.5, Math.PI * 0.2, 0),
new udv.THREE.Vector3(2, 2, 2)
new udv.THREE.Vector3(20, 20, 20)
)
);
view3D.appendBillboard(billboard);
</script>
</body>
</html>
2 changes: 1 addition & 1 deletion examples/assets/localScripts/commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ module.exports = class Commands {
const inputManager = localContext.getGameView().getInputManager();

//send input manager command to the world
worldComputer.setOnAfterTick(function () {
worldComputer.addAfterTickRequester(function () {
const cmds = inputManager.computeCommands();
worldComputer.onCommands(cmds);
});
Expand Down
Loading

0 comments on commit f8b38cc

Please sign in to comment.