@@ -450,6 +450,10 @@
|
|
450
450
|
if (i >= this._pointerPositionsDelta.length) return null;
|
451
451
|
return this._pointerPositionsDelta[i];
|
452
452
|
}
|
453
|
+
/**
|
454
|
+
* The pointer position in screenspace coordinates (-1 to 1) where 0 is the center of the screen.
|
455
|
+
* This can be useful for e.g. raycasting (see https://threejs.org/docs/#api/en/core/Raycaster.setFromCamera)
|
456
|
+
*/
|
453
457
|
getPointerPositionRC(i: number): Vector2 | null {
|
454
458
|
if (i >= this._pointerPositionsRC.length) return null;
|
455
459
|
return this._pointerPositionsRC[i];
|
@@ -88,7 +88,8 @@
|
|
88
88
|
material.map.colorSpace = LinearSRGBColorSpace;
|
89
89
|
material.map.premultiplyAlpha = false;
|
90
90
|
}
|
91
|
-
const newMaterial = new MeshBasicMaterial(
|
91
|
+
const newMaterial = new MeshBasicMaterial();
|
92
|
+
newMaterial.copy(material);
|
92
93
|
if (trailEnabled) this.trailMaterial = newMaterial;
|
93
94
|
else this.particleMaterial = newMaterial;
|
94
95
|
}
|