mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 07:19:05 +02:00
tests
This commit is contained in:
parent
f7b3da078b
commit
e4bc0ce691
3 changed files with 9 additions and 28 deletions
|
@ -52,13 +52,7 @@
|
||||||
print("Teleporting to (" + data.location.x + ", " + data.location.y + ", " + data.location.z + ")");
|
print("Teleporting to (" + data.location.x + ", " + data.location.y + ", " + data.location.z + ")");
|
||||||
|
|
||||||
MyAvatar.position = data.location;
|
MyAvatar.position = data.location;
|
||||||
|
|
||||||
// if (data.hasOwnProperty('entryPoint') && data.hasOwnProperty('target')) {
|
|
||||||
// this.lookAtTarget(data.entryPoint, data.target);
|
|
||||||
// }
|
|
||||||
// else{
|
|
||||||
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -103,10 +97,4 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.hoverEnterEntity = function(entityID) {
|
|
||||||
Entities.editEntity(entityID, {
|
|
||||||
animationURL: animationURL,
|
|
||||||
animationSettings: '{ "fps": 24, "firstFrame": 1, "lastFrame": 25, "frameIndex": 1, "running": true, "hold": true }'
|
|
||||||
});
|
|
||||||
}
|
|
||||||
})
|
})
|
|
@ -15,18 +15,19 @@
|
||||||
|
|
||||||
var self = this;
|
var self = this;
|
||||||
var baton;
|
var baton;
|
||||||
var iOwn = false;
|
|
||||||
|
this.iOwn = false;
|
||||||
var currentInterval;
|
var currentInterval;
|
||||||
var _entityId;
|
var _entityId;
|
||||||
|
|
||||||
function startUpdate() {
|
function startUpdate() {
|
||||||
iOwn = true;
|
self.iOwn = true;
|
||||||
print('i am the owner ' + _entityId)
|
print('i am the owner ' + _entityId)
|
||||||
}
|
}
|
||||||
|
|
||||||
function stopUpdateAndReclaim() {
|
function stopUpdateAndReclaim() {
|
||||||
print('i released the object ' + _entityId)
|
print('i released the object ' + _entityId)
|
||||||
iOwn = false;
|
self.iOwn = false;
|
||||||
baton.claim(startUpdate, stopUpdateAndReclaim);
|
baton.claim(startUpdate, stopUpdateAndReclaim);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -40,7 +41,7 @@
|
||||||
this.minAngularVelocity = 0.01;
|
this.minAngularVelocity = 0.01;
|
||||||
this.maxAngularVelocity = 0.03;
|
this.maxAngularVelocity = 0.03;
|
||||||
baton = virtualBaton({
|
baton = virtualBaton({
|
||||||
batonName: 'io.highfidelity.vesicles:' + entityID, // One winner for each entity
|
batonName: 'io.highfidelity.cells:' + entityID, // One winner for each entity
|
||||||
});
|
});
|
||||||
stopUpdateAndReclaim();
|
stopUpdateAndReclaim();
|
||||||
currentInterval = Script.setInterval(self.move, self.getTotalWait())
|
currentInterval = Script.setInterval(self.move, self.getTotalWait())
|
||||||
|
@ -146,19 +147,11 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
this.move = function() {
|
this.move = function() {
|
||||||
if (!iOwn) {
|
if (self.iOwn===false) {
|
||||||
|
print('cell is not owned by me...')
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// var magnitudeV = self.maxVelocity;
|
|
||||||
// var directionV = {
|
|
||||||
// x: Math.random() - 0.5,
|
|
||||||
// y: Math.random() - 0.5,
|
|
||||||
// z: Math.random() - 0.5
|
|
||||||
// };
|
|
||||||
|
|
||||||
//print("POS magnitude is " + magnitudeV + " and direction is " + directionV.x);
|
|
||||||
|
|
||||||
var magnitudeAV = self.maxAngularVelocity;
|
var magnitudeAV = self.maxAngularVelocity;
|
||||||
|
|
||||||
var directionAV = {
|
var directionAV = {
|
||||||
|
@ -166,7 +159,7 @@
|
||||||
y: Math.random() - 0.5,
|
y: Math.random() - 0.5,
|
||||||
z: Math.random() - 0.5
|
z: Math.random() - 0.5
|
||||||
};
|
};
|
||||||
//print("ROT magnitude is " + magnitudeAV + " and direction is " + directionAV.x);
|
print("ROT magnitude is " + magnitudeAV + " and direction is " + directionAV.x);
|
||||||
Entities.editEntity(self.entityId, {
|
Entities.editEntity(self.entityId, {
|
||||||
// velocity: Vec3.multiply(magnitudeV, Vec3.normalize(directionV)),
|
// velocity: Vec3.multiply(magnitudeV, Vec3.normalize(directionV)),
|
||||||
angularVelocity: Vec3.multiply(magnitudeAV, Vec3.normalize(directionAV))
|
angularVelocity: Vec3.multiply(magnitudeAV, Vec3.normalize(directionAV))
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
//
|
//
|
||||||
|
|
||||||
var version = 1052;
|
var version = 1055;
|
||||||
var cellLayout;
|
var cellLayout;
|
||||||
var baseLocation = "https://hifi-content.s3.amazonaws.com/DomainContent/CellScience/";
|
var baseLocation = "https://hifi-content.s3.amazonaws.com/DomainContent/CellScience/";
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue