mirror of
https://github.com/Armored-Dragon/overte.git
synced 2025-03-11 16:13:16 +01:00
adjusted surface position
This commit is contained in:
parent
5e0de4bdee
commit
d1d4a9d6b1
2 changed files with 15 additions and 13 deletions
|
@ -23,7 +23,7 @@
|
|||
MarkerTip = function() {
|
||||
_this = this;
|
||||
_this.MARKER_TEXTURE_URL = "https://s3-us-west-1.amazonaws.com/hifi-content/eric/textures/markerStroke.png";
|
||||
this.strokeForwardOffset = 0.0005;
|
||||
this.strokeForwardOffset = 0.0001;
|
||||
this.STROKE_FORWARD_OFFSET_INCRERMENT = 0.00001;
|
||||
this.STROKE_WIDTH = 0.003
|
||||
_this.MAX_MARKER_TO_BOARD_DISTANCE = 1.4;
|
||||
|
@ -43,6 +43,9 @@
|
|||
|
||||
releaseEquip: function() {
|
||||
_this.resetStroke();
|
||||
Overlays.editOverlay(_this.laserPointer, {
|
||||
visible: false
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
|
@ -69,14 +72,12 @@
|
|||
} else {
|
||||
_this.resetStroke();
|
||||
Overlays.editOverlay(_this.laserPointer, {
|
||||
visible: true
|
||||
})
|
||||
visible: false
|
||||
});
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
|
||||
|
||||
newStroke: function(position) {
|
||||
_this.strokeBasePosition = position;
|
||||
_this.currentStroke = Entities.addEntity({
|
||||
|
@ -158,9 +159,9 @@
|
|||
_this.whiteboardNormal = Quat.getFront(whiteboardProps.rotation);
|
||||
_this.laserPointer = Overlays.addOverlay("circle3d", {
|
||||
color: {
|
||||
red: 200,
|
||||
green: 10,
|
||||
blue: 10
|
||||
red: 220,
|
||||
green: 35,
|
||||
blue: 53
|
||||
},
|
||||
solid: true,
|
||||
size: 0.01,
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
|
||||
Script.include("../../libraries/utils.js")
|
||||
|
||||
var orientation = Camera.getOrientation();
|
||||
var orientation = MyAvatar.orientation;
|
||||
orientation = Quat.safeEulerAngles(orientation);
|
||||
var markerRotation = Quat.fromVec3Degrees({
|
||||
x: orientation.x + 10,
|
||||
|
@ -52,12 +52,13 @@ var whiteboardSurfacePosition = Vec3.sum(whiteboardPosition, {
|
|||
x: 0.0,
|
||||
y: 0.45,
|
||||
z: 0.0
|
||||
})
|
||||
});
|
||||
whiteboardSurfacePosition = Vec3.sum(whiteboardSurfacePosition, Vec3.multiply(-0.02, Quat.getRight(orientation)));
|
||||
var whiteboardDrawingSurface = Entities.addEntity({
|
||||
type: "Box",
|
||||
name: "whiteboardDrawingSurface",
|
||||
dimensions: {
|
||||
x: 1.85,
|
||||
x: 1.82,
|
||||
y: 1.8,
|
||||
z: 0.04
|
||||
},
|
||||
|
@ -75,7 +76,7 @@ var whiteboardDrawingSurface = Entities.addEntity({
|
|||
|
||||
var WHITEBOARD_RACK_DEPTH = 1.9;
|
||||
|
||||
var ERASER_MODEL_URL = "http://hifi-content.s3.amazonaws.com/alan/dev/eraser.fbx";
|
||||
var ERASER_MODEL_URL = "http://hifi-content.s3.amazonaws.com/alan/dev/eraser-2.fbx";
|
||||
var ERASER_SCRIPT_URL = Script.resolvePath("eraserEntityScript.js");
|
||||
var eraserPosition = Vec3.sum(MyAvatar.position, Vec3.multiply(WHITEBOARD_RACK_DEPTH, Quat.getFront(orientation)));
|
||||
eraserPosition = Vec3.sum(eraserPosition, Vec3.multiply(-0.5, Quat.getFront(whiteboardRotation)));
|
||||
|
@ -102,7 +103,7 @@ var eraser = Entities.addEntity({
|
|||
x: 0,
|
||||
y: -0.1,
|
||||
z: 0
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
createMarkers();
|
||||
|
|
Loading…
Reference in a new issue