mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-07-14 14:47:05 +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,
|
position: position,
|
||||||
textures: _this.MARKER_TEXTURE_URL,
|
textures: _this.MARKER_TEXTURE_URL,
|
||||||
color: _this.markerColor,
|
color: _this.markerColor,
|
||||||
lifetime: 200
|
lifetime: 10
|
||||||
});
|
});
|
||||||
|
|
||||||
_this.linePoints = [];
|
_this.linePoints = [];
|
||||||
|
@ -111,9 +111,9 @@
|
||||||
_this.newStroke(basePosition);
|
_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));
|
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) {
|
if (_this.linePoints.length > 0) {
|
||||||
var distance = Vec3.distance(localPoint, _this.linePoints[_this.linePoints.length - 1]);
|
var distance = Vec3.distance(localPoint, _this.linePoints[_this.linePoints.length - 1]);
|
||||||
|
@ -121,7 +121,6 @@
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
_this.linePoints.push(localPoint);
|
_this.linePoints.push(localPoint);
|
||||||
_this.normals.push(_this.whiteboardNormal);
|
_this.normals.push(_this.whiteboardNormal);
|
||||||
this.strokeWidths.push(_this.STROKE_WIDTH);
|
this.strokeWidths.push(_this.STROKE_WIDTH);
|
||||||
|
|
|
@ -142,12 +142,13 @@ function createMarkers() {
|
||||||
|
|
||||||
|
|
||||||
function createMarker(modelURL, markerPosition, markerColor) {
|
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({
|
var marker = Entities.addEntity({
|
||||||
type: "Model",
|
type: "Model",
|
||||||
modelURL: modelURL,
|
modelURL: modelURL,
|
||||||
rotation: markerRotation,
|
rotation: markerRotation,
|
||||||
shapeType: "box",
|
shapeType: "box",
|
||||||
|
name: "marker",
|
||||||
dynamic: true,
|
dynamic: true,
|
||||||
gravity: {
|
gravity: {
|
||||||
x: 0,
|
x: 0,
|
||||||
|
|
Loading…
Reference in a new issue