rSimulate/WebHexPlanet

Abstract world creation, parent/child hierarchy, orbital parameters as array

Closed this issue · 3 comments

Create a world creator function that takes all the parameters cleanly and in a modular format. That way we can quickly customize solar systems and pull basic info for drawing orbit lines.

On the branch "tom," check out the "createWorld" function from "main.js" which then calls functions from "space_creator.js"

I want to expand it it to look something like this:

function createWorld(objectID, name, type, texture, propertiesArray, orbitArray) {
if (type == 'terra'){
createTerra(size, texture, propertiesArray);
}
else if (type == 'rocky'){
createRocky(size, texture, propertiesArray);
}
// PORT POSITIONING CODE HERE FROM ORBIT ARRAY
animateAstrometry(orbitArray);
drawOrbits(orbitArray);
}

Sort of addressed by having engines generate planets and textures.

K, then it will pass {x,y,z} and velocity for rendering?

That's right! The client just needs to implement it. The data is already being passed.