Giter Club home page Giter Club logo

city-core's People

Contributors

bleucitron avatar davidbruant avatar lionelb avatar queenant avatar thibauts avatar tzano avatar vallettea avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

city-core's Issues

3D objects loading

It hit me recently. The real problem we need to solve is finding the 3D objects enclosed (even if only partially) in the camera field (which is a trapezoid delimited by the close and far planes).
It's the most generic problem to be solved that is useful to us.

Finding the buildings within [north, south, east, west] is only a special case of this problem when the camera above ground facing negative z, with (0, 1, 0) as its up vector.

It's still unclear how this generic problem is solved, but for sure it demonstrates that asking objects by north/south/east/west is a bad API for what we're doing.

Investigating in the background. Let's keep doing n/s/e/w in the meantime.

Make CameraProxy

In front/src/3dviz.js, don't expose the camera. Instead, expose an object shaped like:
js var cameraProxy = { position, lookedAtVector, upVector };
lookedAtVector and upVector are getter/setters calling the corresponding functions.

Any change to one of these 3 things emits a "cameraViewChange" event.

First person controls

  • keeping mouse down: move forward (mouseup to stop moving)
  • move mouse: look around when no object is focused & move around object when one focused
  • one click focus on object and move around it

It's possible a promise in unzipCUB3ds.js gets rejected without logging

The README estimates the extraction time to 5 minutes on "normal hardware"but I've launched the extraction procedure more than an hour ago and it's still working at it!

My guess is that the operation takes around 5 minutes per exported tile (I have exported something like 25 tiles), the docs should probably mention that.

Some object faces are mis-parsed

Error with object 06348026 skipping. [RangeError: Trying to access beyond buffer length] Error with object 06347529 skipping. [RangeError: Trying to access beyond buffer length] Error with object 06308382 skipping. [RangeError: Trying to access beyond buffer length] Error with object 06308336 skipping. [RangeError: Trying to access beyond buffer length] Error with object 06307469 skipping. [RangeError: Trying to access beyond buffer length] Error with object 06359943 skipping. [RangeError: Trying to access beyond buffer length] Error with object 06349218 skipping. [RangeError: Trying to access beyond buffer length] Error with object 063598 skipping. [RangeError: Trying to access beyond buffer length] Error with object 06345507 skipping. [RangeError: Trying to access beyond buffer length] Error with object Grd skipping. [RangeError: Trying to access beyond buffer length] Error with object Poteau skipping. [RangeError: Trying to access beyond buffer length] Error with object Grd_Road skipping. [RangeError: Trying to access beyond buffer length] Error with object x146y90 skipping. [RangeError: Trying to access beyond buffer length]

Error installing bordeaux3d

Hi

I justed wanted to look at your project but I was unable to install it. Running the command line

$ node tools/unzipCUB3ds.js --out front/data/ --zip path/to/3Ddata/BATI3D_NT.zip

I had the following error :

events.js:72
       throw er; // Unhandled 'error' event
            ^
 Error: ENOENT, open '/Users/…/Documents/bordeaux3d/path/to/3Ddata/BATI3D_NT.zip'

Do you have any explanation ?

Align z

Walking around first-person showed that tile's z aren't aligned.
It's still unclear how to fix it.

Tiles aren't centered on (0, 0)

Tiles are centered around the bounding box which includes buildings that are outside the 200x200 perimeter. When trying to display several tiles together, it takes re-computing the center and translating every object inside the tile.

Remove references to window

We've been assuming that the view is full screen. We should only refer to the container.
I'm doing part of it as part of the refactoring, but there may be left overs.

Reduce the number of coordinates systems

Right now, we have 3 coordinates systems:

  • long/lat
  • Lambert 45 (x/y)
  • some arbitrary x/y coordinate system constructed from the metadata + building coordinates (which the rtree uses)

We should reduce to 2. I'd argue in favor of removing the last one.

Make browserified script below 1MB

Current browserified script is 3.2MB.

Commenting out require('socket.io-client'); removes 500k. Do we really need Socket.io (with all the fallbacks for old browsers and shit)?
Commenting out dat-gui saves 300k

We'd be at ~2.4MB which is still a lot. Need to investigate minifying.

Object "ids" may not be unique

Apparently, some objects have shared names like "Poteau" or "Road". Need to look into it and maybe devise a algorithm to assign unique ids.

Find another Map polyfill

For whatever reason, harmony-collections doesn't work in Firefox. Something related to the size getter.
Working on Chrome for now, but we need to fix that before shipping.

Strange socketio error

on the server i saw this sometimes:

starting in mode dev
Server running on 9000

/home/queenant/city-core/node_modules/socket.io/node_modules/engine.io/lib/socket.js:338
      this.sentCallbackFn.push.apply(this.sentCallbackFn, this.packetsFn);
                               ^
RangeError: Maximum call stack size exceeded
    at Socket.flush (/home/queenant/city-core/node_modules/socket.io/node_modules/engine.io/lib/socket.js:338:32)
    at WebSocket.EventEmitter.emit (events.js:117:20)
    at /home/queenant/city-core/node_modules/socket.io/node_modules/engine.io/lib/transports/websocket.js:94:14
    at afterWrite (_stream_writable.js:274:3)
    at onwrite (_stream_writable.js:266:7)
    at Socket.WritableState.onwrite (_stream_writable.js:97:5)
    at Object.afterWrite (net.js:728:12)
error: Forever detected script exited with code: 8
error: Script restart attempt #1
starting in mode dev
Server running on 9000

we should have a look

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.