Skip to content

Commit 202d95c

Browse files
committed
Construct Float32Array to return uv coords
NP-1250
1 parent 7081897 commit 202d95c

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

UvulaJS/UvulaJS.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,7 @@ UnwrapResult unwrap(const Float32Array& vertices_js, const Uint32Array& indices_
7878
}
7979

8080
// Convert result to structured return type
81-
emscripten::val uv_array = emscripten::val::array();
82-
81+
emscripten::val uv_array = emscripten::val::global("Float32Array").new_(uv_coords.size() * 2);
8382
for (size_t i = 0; i < uv_coords.size(); ++i)
8483
{
8584
uv_array.set(i * 2, uv_coords[i].x);

0 commit comments

Comments
 (0)