mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-07-14 02:47:15 +02:00
lines no longer disapear after drawing for a while
This commit is contained in:
parent
0b569a0fab
commit
045d542f11
2 changed files with 5 additions and 5 deletions
|
@ -92,7 +92,7 @@
|
|||
position: position,
|
||||
textures: _this.MARKER_TEXTURE_URL,
|
||||
color: _this.markerColor,
|
||||
lifetime: 200
|
||||
lifetime: 10
|
||||
});
|
||||
|
||||
_this.linePoints = [];
|
||||
|
@ -111,9 +111,9 @@
|
|||
_this.newStroke(basePosition);
|
||||
}
|
||||
|
||||
var localPoint = Vec3.subtract(basePosition, this.strokeBasePosition);
|
||||
var localPoint = Vec3.subtract(basePosition, _this.strokeBasePosition);
|
||||
localPoint = Vec3.sum(localPoint, Vec3.multiply(_this.whiteboardNormal, _this.strokeForwardOffset));
|
||||
_this.strokeForwardOffset += _this.STROKE_FORWARD_OFFSET_INCRERMENT;
|
||||
_this.strokeForwardOffset -= _this.STROKE_FORWARD_OFFSET_INCRERMENT;
|
||||
|
||||
if (_this.linePoints.length > 0) {
|
||||
var distance = Vec3.distance(localPoint, _this.linePoints[_this.linePoints.length - 1]);
|
||||
|
@ -121,7 +121,6 @@
|
|||
return;
|
||||
}
|
||||
}
|
||||
|
||||
_this.linePoints.push(localPoint);
|
||||
_this.normals.push(_this.whiteboardNormal);
|
||||
this.strokeWidths.push(_this.STROKE_WIDTH);
|
||||
|
|
|
@ -142,12 +142,13 @@ function createMarkers() {
|
|||
|
||||
|
||||
function createMarker(modelURL, markerPosition, markerColor) {
|
||||
var MARKER_SCRIPT_URL = Script.resolvePath("markerEntityScript.js");
|
||||
var MARKER_SCRIPT_URL = Script.resolvePath("markerEntityScript.js?v1" + Math.random());
|
||||
var marker = Entities.addEntity({
|
||||
type: "Model",
|
||||
modelURL: modelURL,
|
||||
rotation: markerRotation,
|
||||
shapeType: "box",
|
||||
name: "marker",
|
||||
dynamic: true,
|
||||
gravity: {
|
||||
x: 0,
|
||||
|
|
Loading…
Reference in a new issue