Skip to content

Commit 70f0c6e

Browse files
authored
refactor: Single component props in Vec4 are in a weird order (#2296)
1 parent 31abbba commit 70f0c6e

1 file changed

Lines changed: 20 additions & 20 deletions

File tree

packages/typegpu/src/data/vectorImpl.ts

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -317,59 +317,59 @@ abstract class Vec4<S> extends VecBase<S> implements Tuple4<S> {
317317
return this[1];
318318
}
319319

320-
get r() {
321-
return this[0];
322-
}
323-
324-
get g() {
325-
return this[1];
326-
}
327-
328-
get b() {
320+
get z() {
329321
return this[2];
330322
}
331323

332-
get a() {
324+
get w() {
333325
return this[3];
334326
}
335327

336-
set r(value: S) {
328+
set x(value: S) {
337329
this[0] = value;
338330
}
339331

340-
set g(value: S) {
332+
set y(value: S) {
341333
this[1] = value;
342334
}
343335

344-
set b(value: S) {
336+
set z(value: S) {
345337
this[2] = value;
346338
}
347339

348-
set a(value: S) {
340+
set w(value: S) {
349341
this[3] = value;
350342
}
351343

352-
get z() {
344+
get r() {
345+
return this[0];
346+
}
347+
348+
get g() {
349+
return this[1];
350+
}
351+
352+
get b() {
353353
return this[2];
354354
}
355355

356-
get w() {
356+
get a() {
357357
return this[3];
358358
}
359359

360-
set x(value: S) {
360+
set r(value: S) {
361361
this[0] = value;
362362
}
363363

364-
set y(value: S) {
364+
set g(value: S) {
365365
this[1] = value;
366366
}
367367

368-
set z(value: S) {
368+
set b(value: S) {
369369
this[2] = value;
370370
}
371371

372-
set w(value: S) {
372+
set a(value: S) {
373373
this[3] = value;
374374
}
375375
}

0 commit comments

Comments
 (0)