raycastAll
Returns a RayObjectHit of the first object that is intersected by the current mouse-cursor position, or the Ray if specified.
raycastAll(
ray?: Ray
): Promise<RayObjectHit | null>
Parameters
Description
Type
A ray specifying how we should intersect with the objects.
Usage:
await modelApi.raycastAll();
Return value:
{
"id": "5a9510cf-fa29-4c8b-9804-6cf6df6b43ee",
"name": "T-Shirt",
"position": {
"x": 37.350260811166834,
"y": -120.26830756045021,
"z": 363.7658504937014
},
"normal": {
"x": -0.022361778356376052,
"y": -0.9989480768854121,
"z": -0.03996635577118709
},
"uv": {
"x": 0.20498806490294819,
"y": 0.2775749847073309,
"z": 0
}
}