mirror of
https://github.com/overte-org/overte.git
synced 2025-08-10 05:52:31 +02:00
colors
This commit is contained in:
parent
54109c6c6f
commit
e81f65d992
2 changed files with 7 additions and 24 deletions
|
@ -43,9 +43,9 @@ var HAND_HEAD_MIX_RATIO = 0.0; // 0 = only use hands for search/move. 1 = only
|
||||||
var PICK_WITH_HAND_RAY = true;
|
var PICK_WITH_HAND_RAY = true;
|
||||||
|
|
||||||
var EQUIP_SPHERE_COLOR = {
|
var EQUIP_SPHERE_COLOR = {
|
||||||
red: 179,
|
red: 116,
|
||||||
green: 120,
|
green: 90,
|
||||||
blue: 211
|
blue: 238
|
||||||
};
|
};
|
||||||
var EQUIP_SPHERE_ALPHA = 0.15;
|
var EQUIP_SPHERE_ALPHA = 0.15;
|
||||||
var EQUIP_SPHERE_SCALE_FACTOR = 0.65;
|
var EQUIP_SPHERE_SCALE_FACTOR = 0.65;
|
||||||
|
@ -60,17 +60,6 @@ var DISTANCE_HOLDING_UNITY_MASS = 1200; // The mass at which the distance holdi
|
||||||
var DISTANCE_HOLDING_UNITY_DISTANCE = 6; // The distance at which the distance holding action timeframe is unmodified
|
var DISTANCE_HOLDING_UNITY_DISTANCE = 6; // The distance at which the distance holding action timeframe is unmodified
|
||||||
var MOVE_WITH_HEAD = true; // experimental head-control of distantly held objects
|
var MOVE_WITH_HEAD = true; // experimental head-control of distantly held objects
|
||||||
|
|
||||||
var NO_INTERSECT_COLOR = {
|
|
||||||
red: 10,
|
|
||||||
green: 10,
|
|
||||||
blue: 255
|
|
||||||
}; // line color when pick misses
|
|
||||||
var INTERSECT_COLOR = {
|
|
||||||
red: 250,
|
|
||||||
green: 10,
|
|
||||||
blue: 10
|
|
||||||
}; // line color when pick hits
|
|
||||||
|
|
||||||
var COLORS_GRAB_SEARCHING_HALF_SQUEEZE = {
|
var COLORS_GRAB_SEARCHING_HALF_SQUEEZE = {
|
||||||
red: 255,
|
red: 255,
|
||||||
green: 97,
|
green: 97,
|
||||||
|
@ -89,12 +78,6 @@ var COLORS_GRAB_DISTANCE_HOLD = {
|
||||||
blue: 214
|
blue: 214
|
||||||
};
|
};
|
||||||
|
|
||||||
var COLORS_EQUIP_SPHERE = {
|
|
||||||
red: 116,
|
|
||||||
green: 90,
|
|
||||||
blue: 238
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
var LINE_LENGTH = 500;
|
var LINE_LENGTH = 500;
|
||||||
var PICK_MAX_DISTANCE = 500; // max length of pick-ray
|
var PICK_MAX_DISTANCE = 500; // max length of pick-ray
|
||||||
|
@ -1535,7 +1518,7 @@ function MyController(hand) {
|
||||||
|
|
||||||
// visualizations
|
// visualizations
|
||||||
|
|
||||||
this.overlayLineOn(handPosition, grabbedProperties.position, INTERSECT_COLOR);
|
this.overlayLineOn(handPosition, grabbedProperties.position, COLORS_GRAB_DISTANCE_HOLD);
|
||||||
|
|
||||||
var distanceToObject = Vec3.length(Vec3.subtract(MyAvatar.position, this.currentObjectPosition));
|
var distanceToObject = Vec3.length(Vec3.subtract(MyAvatar.position, this.currentObjectPosition));
|
||||||
var success = Entities.updateAction(this.grabbedEntity, this.actionID, {
|
var success = Entities.updateAction(this.grabbedEntity, this.actionID, {
|
||||||
|
|
|
@ -51,6 +51,7 @@ var COLORS_TELEPORT_CAN_TELEPORT = {
|
||||||
green: 255,
|
green: 255,
|
||||||
blue: 241
|
blue: 241
|
||||||
};
|
};
|
||||||
|
|
||||||
var COLORS_TELEPORT_CANNOT_TELEPORT = {
|
var COLORS_TELEPORT_CANNOT_TELEPORT = {
|
||||||
red: 68,
|
red: 68,
|
||||||
green: 183,
|
green: 183,
|
||||||
|
@ -281,7 +282,7 @@ function Teleporter() {
|
||||||
|
|
||||||
this.rightPickRay = rightPickRay;
|
this.rightPickRay = rightPickRay;
|
||||||
|
|
||||||
var location = Vec3.sum(rightPickRay.origin, Vec3.multiply(rightPickRay.direction, 500));
|
var location = Vec3.sum(rightPickRay.origin, Vec3.multiply(rightPickRay.direction, 50));
|
||||||
|
|
||||||
|
|
||||||
var rightIntersection = Entities.findRayIntersection(teleporter.rightPickRay, true, [], [this.targetEntity]);
|
var rightIntersection = Entities.findRayIntersection(teleporter.rightPickRay, true, [], [this.targetEntity]);
|
||||||
|
@ -322,7 +323,7 @@ function Teleporter() {
|
||||||
|
|
||||||
this.leftPickRay = leftPickRay;
|
this.leftPickRay = leftPickRay;
|
||||||
|
|
||||||
var location = Vec3.sum(MyAvatar.position, Vec3.multiply(leftPickRay.direction, 500));
|
var location = Vec3.sum(MyAvatar.position, Vec3.multiply(leftPickRay.direction, 50));
|
||||||
|
|
||||||
|
|
||||||
var leftIntersection = Entities.findRayIntersection(teleporter.leftPickRay, true, [], [this.targetEntity]);
|
var leftIntersection = Entities.findRayIntersection(teleporter.leftPickRay, true, [], [this.targetEntity]);
|
||||||
|
@ -339,7 +340,6 @@ function Teleporter() {
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
|
|
||||||
this.deleteTargetOverlay();
|
this.deleteTargetOverlay();
|
||||||
this.leftLineOn(leftPickRay.origin, location, COLORS_TELEPORT_CANNOT_TELEPORT);
|
this.leftLineOn(leftPickRay.origin, location, COLORS_TELEPORT_CANNOT_TELEPORT);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue