mirror of
https://github.com/overte-org/overte.git
synced 2025-07-03 12:29:41 +02:00
more debugging
This commit is contained in:
parent
6a01c10453
commit
f83eae4d42
1 changed files with 7 additions and 5 deletions
|
@ -43,7 +43,7 @@ var totalTime = 0;
|
||||||
var MINIMUM_LIGHT_INTENSITY = 0.75;
|
var MINIMUM_LIGHT_INTENSITY = 0.75;
|
||||||
var MAXIMUM_LIGHT_INTENSITY = 2.75;
|
var MAXIMUM_LIGHT_INTENSITY = 2.75;
|
||||||
var LIGHT_INTENSITY_RANDOMNESS = 0.3;
|
var LIGHT_INTENSITY_RANDOMNESS = 0.3;
|
||||||
var EPHEMERAL_LIFETIME = 10; // ephemeral entities will live for 10 seconds after script stops running
|
var EPHEMERAL_LIFETIME = 60; // ephemeral entities will live for 60 seconds after script stops running
|
||||||
|
|
||||||
var LightMaker = {
|
var LightMaker = {
|
||||||
light: null,
|
light: null,
|
||||||
|
@ -78,11 +78,13 @@ function update(deltaTime) {
|
||||||
intensity += randFloat(-LIGHT_INTENSITY_RANDOMNESS, LIGHT_INTENSITY_RANDOMNESS);
|
intensity += randFloat(-LIGHT_INTENSITY_RANDOMNESS, LIGHT_INTENSITY_RANDOMNESS);
|
||||||
var properties = Entities.getEntityProperties(LightMaker.light, ["age", "lifetime"]);
|
var properties = Entities.getEntityProperties(LightMaker.light, ["age", "lifetime"]);
|
||||||
//print("props:" +JSON.stringify(properties));
|
//print("props:" +JSON.stringify(properties));
|
||||||
print("age:" + properties.age);
|
//print("deltaTime:" + deltaTime);
|
||||||
print("lifetime:" + properties.lifetime);
|
//print("age:" + properties.age);
|
||||||
|
//print("lifetime:" + properties.lifetime);
|
||||||
var newLifetime = properties.age + EPHEMERAL_LIFETIME;
|
var newLifetime = properties.age + EPHEMERAL_LIFETIME;
|
||||||
print("newLifetime:" + newLifetime);
|
//print("newLifetime:" + newLifetime);
|
||||||
Entities.editEntity(LightMaker.light, { type: "Light", intensity : intensity, lifetime: newLifetime });
|
Entities.editEntity(LightMaker.light, { type: "Light", intensity: intensity, lifetime: newLifetime });
|
||||||
|
//print("packetsToSendCount:" + Entities.packetsToSendCount());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue