add gravity to the editModels property

This commit is contained in:
ZappoMan 2014-08-11 13:27:19 -07:00
parent b89c740e17
commit 779d846f1e
2 changed files with 11 additions and 6 deletions

View file

@ -1648,7 +1648,11 @@ function handeMenuEvent(menuItem){
array.push({ label: "Velocity X:", value: properties.velocity.x.toFixed(decimals) });
array.push({ label: "Velocity Y:", value: properties.velocity.y.toFixed(decimals) });
array.push({ label: "Velocity Z:", value: properties.velocity.z.toFixed(decimals) });
array.push({ label: "Damping:", value: properties.damping });
array.push({ label: "Damping:", value: properties.damping.toFixed(decimals) });
array.push({ label: "Gravity X:", value: properties.gravity.x.toFixed(decimals) });
array.push({ label: "Gravity Y:", value: properties.gravity.y.toFixed(decimals) });
array.push({ label: "Gravity Z:", value: properties.gravity.z.toFixed(decimals) });
if (properties.type == "Box") {
array.push({ label: "Red:", value: properties.color.red });
@ -1680,7 +1684,9 @@ function handeMenuEvent(menuItem){
properties.velocity.y = array[index++].value;
properties.velocity.z = array[index++].value;
properties.damping = array[index++].value;
print("properties.damping=" + properties.damping);
properties.gravity.x = array[index++].value;
properties.gravity.y = array[index++].value;
properties.gravity.z = array[index++].value;
if (properties.type == "Box") {
properties.color.red = array[index++].value;

View file

@ -39,10 +39,6 @@ Model properties:
//
// REQUIRED TO DO:
A) add velocity, gravity, damping to entity base class
2) EntityTree::update()/EntityTreeElement::update()... velocity changes...
C) verify "update" works
D) update and verify all particle examples to use new entity features
E) memory leaks???
@ -216,4 +212,7 @@ Model properties:
// handle setProperty()/getProperty() so that each subclass doesn't have to completely reimplement
// the entire base class data stream...
// SOLVED - Ab) implement support for requestedProperties in appendEntityData() to be virtual to handle various subclasses
// SOLVED - A) add velocity, gravity, damping to entity base class
// SOLVED - 2) EntityTree::update()/EntityTreeElement::update()... velocity changes...
// SOLVED - C) verify "update" works