mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 16:41:02 +02:00
working
This commit is contained in:
parent
a608725658
commit
e32a317533
1 changed files with 4 additions and 3 deletions
|
@ -18,7 +18,7 @@
|
||||||
var TWEEN = loadTween();
|
var TWEEN = loadTween();
|
||||||
GrowingPlant = function() {
|
GrowingPlant = function() {
|
||||||
_this = this;
|
_this = this;
|
||||||
this.startingFlowerDimensions = {
|
_this.startingFlowerDimensions = {
|
||||||
x: 0.6,
|
x: 0.6,
|
||||||
y: 0.001,
|
y: 0.001,
|
||||||
z: 0.6
|
z: 0.6
|
||||||
|
@ -64,7 +64,7 @@
|
||||||
var bloomTween = new TWEEN.Tween(curProps).
|
var bloomTween = new TWEEN.Tween(curProps).
|
||||||
to(endProps, 3000).
|
to(endProps, 3000).
|
||||||
easing(TWEEN.Easing.Cubic.InOut).
|
easing(TWEEN.Easing.Cubic.InOut).
|
||||||
delay( 10000).
|
delay(1000).
|
||||||
onUpdate(function() {
|
onUpdate(function() {
|
||||||
Entities.editEntity(_this.flower, {
|
Entities.editEntity(_this.flower, {
|
||||||
dimensions: {x: _this.startingFlowerDimensions.x, y: curProps.yDimension, z: _this.startingFlowerDimensions.z},
|
dimensions: {x: _this.startingFlowerDimensions.x, y: curProps.yDimension, z: _this.startingFlowerDimensions.z},
|
||||||
|
@ -74,6 +74,7 @@
|
||||||
},
|
},
|
||||||
|
|
||||||
preload: function(entityID) {
|
preload: function(entityID) {
|
||||||
|
print("EBL PRELOAD");
|
||||||
this.entityID = entityID;
|
this.entityID = entityID;
|
||||||
this.props = Entities.getEntityProperties(this.entityID, ["position", "dimensions"]);
|
this.props = Entities.getEntityProperties(this.entityID, ["position", "dimensions"]);
|
||||||
this.position = this.props.position;
|
this.position = this.props.position;
|
||||||
|
@ -83,7 +84,6 @@
|
||||||
},
|
},
|
||||||
|
|
||||||
update: function() {
|
update: function() {
|
||||||
print("UPDATE")
|
|
||||||
TWEEN.update();
|
TWEEN.update();
|
||||||
|
|
||||||
},
|
},
|
||||||
|
@ -91,6 +91,7 @@
|
||||||
unload: function() {
|
unload: function() {
|
||||||
Script.update.disconnect(_this.update);
|
Script.update.disconnect(_this.update);
|
||||||
Entities.deleteEntity(_this.flower);
|
Entities.deleteEntity(_this.flower);
|
||||||
|
print("EBL UNLOAD DONE")
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue