Coder Social home page Coder Social logo

Comments (4)

lewa-j avatar lewa-j commented on May 13, 2024 1

Many thanks! This is exactly what I was missing. From README.md it seemed that XYZWUUVV was exactly the format of the vertices field.

from earth-reverse-engineering.

retroplasma avatar retroplasma commented on May 13, 2024

it is still working:

node dump_obj.js 214272516372616353 20
image

one level up:

node dump_obj.js 21427251637261635 20
image

edit: Is that helpful or are you trying to do something else?

from earth-reverse-engineering.

lewa-j avatar lewa-j commented on May 13, 2024

I am trying to do the same in C#. Maybe proto files in the repository are not the same as those used in js?

from earth-reverse-engineering.

retroplasma avatar retroplasma commented on May 13, 2024

The proto in this repo is incomplete; here is one with more detail which only lacks NodeData field 8. The vertices byte array straight from the proto (field 1) is a multiple of 3; it only contains XYZ. A vertex buffer is created with a count divisible by 8 from XYZ, UV (field 7) and layer/octant-counts (field 8).

XYZ processing works ~ like this:

var count = input.length / 3;
var output = new Uint8Array(8 * count);
for (var i = 0, axis = 0; axis < 3; axis++) {       
  for (var j = 0, d = 0; j < count; j++) {
    d = (d + input[i++]) & 0xFF;
    output[8 * j + axis] = d;
  }
}

Unfortunately I didn't have time yet to make this stuff transparent.

from earth-reverse-engineering.

Related Issues (20)

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.