mirror of
https://github.com/overte-org/overte.git
synced 2025-04-14 07:47:30 +02:00
cleanup
This commit is contained in:
parent
876d8ab6b2
commit
f19d1a3067
6 changed files with 24 additions and 24 deletions
|
@ -23,6 +23,8 @@
|
|||
green: 10,
|
||||
blue: 10
|
||||
}];
|
||||
|
||||
this.searchRadius = 10;
|
||||
};
|
||||
|
||||
ArcBall.prototype = {
|
||||
|
@ -38,7 +40,7 @@
|
|||
searchForNearbyArcBalls: function() {
|
||||
//Search for nearby balls and create an arc to it if one is found
|
||||
var position = Entities.getEntityProperties(this.entityID, "position").position
|
||||
var entities = Entities.findEntities(position, 10);
|
||||
var entities = Entities.findEntities(position, this.searchRadius);
|
||||
entities.forEach(function(entity) {
|
||||
var props = Entities.getEntityProperties(entity, ["position", "name"]);
|
||||
if (props.name === "Arc Ball" && JSON.stringify(_this.entityID) !== JSON.stringify(entity)) {
|
||||
|
@ -84,8 +86,8 @@
|
|||
z: .01
|
||||
},
|
||||
polarStart: 0,
|
||||
polarFinish: .0,
|
||||
azimuthStart: .02,
|
||||
polarFinish: 0,
|
||||
azimuthStart: 0.02,
|
||||
azimuthFinish: .01,
|
||||
emitAcceleration: {
|
||||
x: 0,
|
||||
|
@ -93,15 +95,15 @@
|
|||
z: 0
|
||||
},
|
||||
accelerationSpread: {
|
||||
x: .00,
|
||||
y: .00,
|
||||
z: .00
|
||||
x: 0,
|
||||
y: 0,
|
||||
z: 0
|
||||
},
|
||||
radiusStart: 0.01,
|
||||
radiusFinish: 0.005,
|
||||
radiusSpread: .005,
|
||||
radiusSpread: 0.005,
|
||||
alpha: 0.5,
|
||||
alphaSpread: .1,
|
||||
alphaSpread: 0.1,
|
||||
alphaStart: 0.5,
|
||||
alphaFinish: 0.5,
|
||||
textures: "https://s3.amazonaws.com/hifi-public/eric/textures/particleSprites/beamParticle.png",
|
||||
|
|
|
@ -33,7 +33,7 @@ var raveStick = new RaveStick(Vec3.sum(basePosition, {x: 1, y: 0.5, z: 1}));
|
|||
var lightSaber = new LightSaber(Vec3.sum(basePosition, {x: 3, y: 0.5, z: 1}));
|
||||
|
||||
|
||||
var modelURL = "https://s3.amazonaws.com/hifi-public/eric/models/rave/RaveRoom.fbx";
|
||||
var modelURL = "https://s3-us-west-1.amazonaws.com/hifi-content/eric/models/RaveRoom.fbx";
|
||||
|
||||
var roomDimensions = {x: 30.58, y: 15.29, z: 30.58};
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
//
|
||||
|
||||
Script.include("../../libraries/utils.js");
|
||||
var modelURL = "https://s3.amazonaws.com/hifi-public/eric/models/rave/lightSaber.fbx";
|
||||
var modelURL = "https://s3-us-west-1.amazonaws.com/hifi-content/eric/models/lightSaber.fbx";
|
||||
var scriptURL = Script.resolvePath("lightSaberEntityScript.js");
|
||||
LightSaber = function(spawnPosition) {
|
||||
|
||||
|
|
|
@ -80,7 +80,7 @@
|
|||
lifespan: 2,
|
||||
emitRate: 1000,
|
||||
emitOrientation: forwardQuat,
|
||||
emitSpeed: .4,
|
||||
emitSpeed: 0.7,
|
||||
speedSpread: 0.0,
|
||||
emitDimensions: {
|
||||
x: 0,
|
||||
|
@ -88,9 +88,9 @@
|
|||
z: 0
|
||||
},
|
||||
polarStart: 0,
|
||||
polarFinish: .0,
|
||||
azimuthStart: .1,
|
||||
azimuthFinish: .01,
|
||||
polarFinish: 0,
|
||||
azimuthStart: 0.1,
|
||||
azimuthFinish: 0.01,
|
||||
emitAcceleration: {
|
||||
x: 0,
|
||||
y: 0,
|
||||
|
@ -104,7 +104,7 @@
|
|||
radiusStart: 0.03,
|
||||
adiusFinish: 0.025,
|
||||
alpha: 0.7,
|
||||
alphaSpread: .1,
|
||||
alphaSpread: 0.1,
|
||||
alphaStart: 0.5,
|
||||
alphaFinish: 0.5,
|
||||
textures: "https://s3.amazonaws.com/hifi-public/eric/textures/particleSprites/beamParticle.png",
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
//
|
||||
|
||||
Script.include("../../libraries/utils.js");
|
||||
var modelURL = "https://s3.amazonaws.com/hifi-public/eric/models/rave/raveStick.fbx";
|
||||
var modelURL = "https://s3-us-west-1.amazonaws.com/hifi-content/eric/models/raveStick.fbx";
|
||||
var scriptURL = Script.resolvePath("raveStickEntityScript.js");
|
||||
RaveStick = function(spawnPosition) {
|
||||
var colorPalette = [{
|
||||
|
@ -31,7 +31,7 @@ RaveStick = function(spawnPosition) {
|
|||
position: spawnPosition,
|
||||
shapeType: 'box',
|
||||
collisionsWillMove: true,
|
||||
// script: scriptURL,
|
||||
script: scriptURL,
|
||||
dimensions: {
|
||||
x: 0.06,
|
||||
y: 0.06,
|
||||
|
@ -99,12 +99,12 @@ RaveStick = function(spawnPosition) {
|
|||
lifespan: 1,
|
||||
emitRate: 1000,
|
||||
emitOrientation: forwardQuat,
|
||||
emitSpeed: .2,
|
||||
emitSpeed: 0.2,
|
||||
speedSpread: 0.0,
|
||||
polarStart: 0,
|
||||
polarFinish: .0,
|
||||
polarFinish: 0.0,
|
||||
azimuthStart: .1,
|
||||
azimuthFinish: .01,
|
||||
azimuthFinish: 0.01,
|
||||
emitAcceleration: {
|
||||
x: 0,
|
||||
y: 0,
|
||||
|
@ -118,10 +118,10 @@ RaveStick = function(spawnPosition) {
|
|||
radiusStart: 0.03,
|
||||
radiusFinish: 0.025,
|
||||
alpha: 0.7,
|
||||
alphaSpread: .1,
|
||||
alphaSpread: 0.1,
|
||||
alphaStart: 0.5,
|
||||
alphaFinish: 0.5,
|
||||
textures: "https://s3.amazonaws.com/hifi-public/eric/textures/particleSprites/beamParticle.png",
|
||||
textures: "https://s3-us-west-1.amazonaws.com/hifi-content/eric/textures/beamParticle.png",
|
||||
emitterShouldTrail: false,
|
||||
}
|
||||
var beam = Entities.addEntity(props);
|
||||
|
|
|
@ -74,8 +74,6 @@
|
|||
forwardVec = Vec3.normalize(forwardVec);
|
||||
var forwardQuat = orientationOf(forwardVec);
|
||||
var position = Vec3.sum(props.position, Vec3.multiply(Quat.getFront(props.rotation), 0.2));
|
||||
// position.z += 0.1;
|
||||
// position.x += -0.035;
|
||||
var localPoint = Vec3.subtract(position, this.trailBasePosition);
|
||||
if (this.points.length >= 1 && Vec3.distance(localPoint, this.points[this.points.length - 1]) < MIN_POINT_DISTANCE) {
|
||||
//Need a minimum distance to avoid binormal NANs
|
||||
|
|
Loading…
Reference in a new issue