mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-07 12:04:25 +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 + ")");
|
||||
|
||||
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 baton;
|
||||
var iOwn = false;
|
||||
|
||||
this.iOwn = false;
|
||||
var currentInterval;
|
||||
var _entityId;
|
||||
|
||||
function startUpdate() {
|
||||
iOwn = true;
|
||||
self.iOwn = true;
|
||||
print('i am the owner ' + _entityId)
|
||||
}
|
||||
|
||||
function stopUpdateAndReclaim() {
|
||||
print('i released the object ' + _entityId)
|
||||
iOwn = false;
|
||||
self.iOwn = false;
|
||||
baton.claim(startUpdate, stopUpdateAndReclaim);
|
||||
}
|
||||
|
||||
|
@ -40,7 +41,7 @@
|
|||
this.minAngularVelocity = 0.01;
|
||||
this.maxAngularVelocity = 0.03;
|
||||
baton = virtualBaton({
|
||||
batonName: 'io.highfidelity.vesicles:' + entityID, // One winner for each entity
|
||||
batonName: 'io.highfidelity.cells:' + entityID, // One winner for each entity
|
||||
});
|
||||
stopUpdateAndReclaim();
|
||||
currentInterval = Script.setInterval(self.move, self.getTotalWait())
|
||||
|
@ -146,19 +147,11 @@
|
|||
}
|
||||
|
||||
this.move = function() {
|
||||
if (!iOwn) {
|
||||
if (self.iOwn===false) {
|
||||
print('cell is not owned by me...')
|
||||
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 directionAV = {
|
||||
|
@ -166,7 +159,7 @@
|
|||
y: 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, {
|
||||
// velocity: Vec3.multiply(magnitudeV, Vec3.normalize(directionV)),
|
||||
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
|
||||
//
|
||||
|
||||
var version = 1052;
|
||||
var version = 1055;
|
||||
var cellLayout;
|
||||
var baseLocation = "https://hifi-content.s3.amazonaws.com/DomainContent/CellScience/";
|
||||
|
||||
|
|
Loading…
Reference in a new issue