mirror of
https://thingvellir.net/git/overte
synced 2025-03-27 23:52:03 +01:00
more debug
This commit is contained in:
parent
fdb9455540
commit
4abb251728
1 changed files with 6 additions and 2 deletions
|
@ -76,9 +76,13 @@ function update(deltaTime) {
|
|||
totalTime += deltaTime;
|
||||
var intensity = (MINIMUM_LIGHT_INTENSITY + (MAXIMUM_LIGHT_INTENSITY + (Math.sin(totalTime) * MAXIMUM_LIGHT_INTENSITY)));
|
||||
intensity += randFloat(-LIGHT_INTENSITY_RANDOMNESS, LIGHT_INTENSITY_RANDOMNESS);
|
||||
var properties = Entities.getEntityProperties(LightMaker.light, "age");
|
||||
var properties = Entities.getEntityProperties(LightMaker.light, ["age", "lifetime"]);
|
||||
print("props:" +JSON.stringify(properties));
|
||||
print("age:" + properties.age);
|
||||
Entities.editEntity(LightMaker.light, { intensity: intensity, lifetime: properties.age + EPHEMERAL_LIFETIME });
|
||||
print("lifetime:" + properties.lifetime);
|
||||
var newLifetime = properties.age + EPHEMERAL_LIFETIME;
|
||||
print("newLifetime:" + newLifetime);
|
||||
Entities.editEntity(LightMaker.light, { intensity : intensity, lifetime: newLifetime });
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue