Files
scriptc/tests/corpus/js-class-computed-fields.js
Chris Tate df78e89342 Compile three.js scenes, cameras, and geometry
- Compile scene hierarchies, synchronized rotations, and perspective camera transforms.
- Support box and buffer geometry, bounds, normals, and index selection.
- Preserve JavaScript constructor and callback behavior in native LLVM and WASM builds.
2026-09-29 22:49:55 -05:00

11 lines
436 B
JavaScript

class Vector { constructor() { this.x = 1; this.y = 2; this.z = 3; } }
const value = new Vector();
let order = '';
function receiver() { order += 'r'; return value; }
function key() { order += 'k'; return 'y'; }
function number() { order += 'v'; return 8; }
receiver()[key()] = number();
console.log(order, value.x, value.y, value.z);
for (const name of ['x', 'z', 'extra']) value[name] = 4;
console.log(value.x, value.z, value.extra);