@realsee/vreo 0.2.0-alpha.4 → 0.2.0-alpha.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -63,14 +63,14 @@ var searchV1 = function searchV1(_ref) {
|
|
|
63
63
|
var rightTop = new _three.Vector3(right, top);
|
|
64
64
|
var rightBottom = new _three.Vector3(right, bottom);
|
|
65
65
|
var points = [leftBottom, rightBottom, rightTop, leftTop].map(function (point) {
|
|
66
|
-
point.setX(point.x / window.innerWidth * 2 -
|
|
66
|
+
point.setX(point.x / window.innerWidth * 2 - 2);
|
|
67
67
|
point.setY(-(point.y / window.innerHeight) * 2 + 1);
|
|
68
68
|
point.setZ(0.5);
|
|
69
69
|
return point.unproject(five.camera).addScaledVector(cameraDirection, 0.2);
|
|
70
70
|
}); // const colors = [0xdc143c, 0xffff00, 0x0000ff, 0x008000]
|
|
71
71
|
// points.forEach((p, index) => five.scene.add(getSphere(p, colors[index])))
|
|
72
72
|
|
|
73
|
-
var ratio = leftBottom.distanceTo(rightBottom) /
|
|
73
|
+
var ratio = leftBottom.distanceTo(rightBottom) / 120;
|
|
74
74
|
return {
|
|
75
75
|
points: points,
|
|
76
76
|
ratio: ratio
|
package/package.json
CHANGED
|
@@ -48,7 +48,7 @@ const searchV1 = ({ five, dom }: SearchParams) => {
|
|
|
48
48
|
const rightBottom = new Vector3(right, bottom)
|
|
49
49
|
|
|
50
50
|
const points = [leftBottom, rightBottom, rightTop, leftTop].map((point) => {
|
|
51
|
-
point.setX((point.x / window.innerWidth) * 2 -
|
|
51
|
+
point.setX((point.x / window.innerWidth) * 2 - 2)
|
|
52
52
|
point.setY(-(point.y / window.innerHeight) * 2 + 1)
|
|
53
53
|
point.setZ(0.5)
|
|
54
54
|
return point.unproject(five.camera).addScaledVector(cameraDirection, 0.2)
|
|
@@ -57,7 +57,7 @@ const searchV1 = ({ five, dom }: SearchParams) => {
|
|
|
57
57
|
// const colors = [0xdc143c, 0xffff00, 0x0000ff, 0x008000]
|
|
58
58
|
// points.forEach((p, index) => five.scene.add(getSphere(p, colors[index])))
|
|
59
59
|
|
|
60
|
-
const ratio = leftBottom.distanceTo(rightBottom) /
|
|
60
|
+
const ratio = leftBottom.distanceTo(rightBottom) / 120
|
|
61
61
|
return { points, ratio }
|
|
62
62
|
}
|
|
63
63
|
|