mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-10-20 05:40:17 +08:00
- 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.
11 lines
436 B
JavaScript
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);
|