mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-09 20:11:13 +02:00
bubble update hook
This commit is contained in:
parent
8f77c0b61c
commit
dfa43e84bf
1 changed files with 14 additions and 5 deletions
|
@ -28,6 +28,8 @@
|
||||||
blue: 255,
|
blue: 255,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var _t = this;
|
||||||
|
|
||||||
var properties;
|
var properties;
|
||||||
var checkPositionInterval;
|
var checkPositionInterval;
|
||||||
this.preload = function(entityID) {
|
this.preload = function(entityID) {
|
||||||
|
@ -36,8 +38,14 @@
|
||||||
// _t.entityID = entityID;
|
// _t.entityID = entityID;
|
||||||
// properties = Entities.getEntityProperties(entityID);
|
// properties = Entities.getEntityProperties(entityID);
|
||||||
// _t.loadShader(entityID);
|
// _t.loadShader(entityID);
|
||||||
|
Script.update.connect(_t.internalUpdate);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
this.internalUpdate = function() {
|
||||||
|
|
||||||
|
properties = Entities.getEntityProperties(_t.entityID)
|
||||||
|
}
|
||||||
|
|
||||||
this.loadShader = function(entityID) {
|
this.loadShader = function(entityID) {
|
||||||
setEntityUserData(entityID, {
|
setEntityUserData(entityID, {
|
||||||
"ProceduralEntity": {
|
"ProceduralEntity": {
|
||||||
|
@ -57,12 +65,13 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
this.unload = function(entityID) {
|
this.unload = function(entityID) {
|
||||||
// Script.clearInterval(checkPositionInterval);
|
|
||||||
// var position = properties.position;
|
Script.update.disconnect(this.internalUpdate);
|
||||||
// this.endOfBubble(position);
|
properties = Entities.getEntityProperties(entityID)
|
||||||
var properties = Entities.getEntityProperties(entityID)
|
|
||||||
var position = properties.position;
|
var position = properties.position;
|
||||||
//print('UNLOAD PROPS' + JSON.stringify(position));
|
// this.endOfBubble(position);
|
||||||
|
print('UNLOAD PROPS' + JSON.stringify(position));
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
this.endOfBubble = function(position) {
|
this.endOfBubble = function(position) {
|
||||||
|
|
Loading…
Reference in a new issue