Skip to content

Commit

Permalink
Fix zui nodes array encoding
Browse files Browse the repository at this point in the history
  • Loading branch information
luboslenco committed Jan 20, 2024
1 parent 04ac076 commit 17d46fe
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Sources/zui/Zui.ts
Original file line number Diff line number Diff line change
Expand Up @@ -709,7 +709,7 @@ class Nodes {
static jsToC(type: string, d: any): Uint8Array {
if (type == "RGBA") {
if (d == null) return new Uint8Array(16);
if (Array.isArray(d)) {
else {
let f32a = new Float32Array(4);
f32a[0] = d[0];
f32a[1] = d[1];
Expand All @@ -721,7 +721,7 @@ class Nodes {
}
if (type == "VECTOR") {
if (d == null) return new Uint8Array(12);
if (Array.isArray(d)) {
else {
let f32a = new Float32Array(4);
f32a[0] = d[0];
f32a[1] = d[1];
Expand Down

0 comments on commit 17d46fe

Please sign in to comment.