Files
WebGPU-FFT-Ocean-Demo/framework/Memory.js

25 lines
374 B
JavaScript
Raw Normal View History

2025-12-31 14:22:45 +01:00
export class Memory {
constructor(scopeName = "") {
this.scopeName = scopeName;
this._map = new Map();
}
set(name, value) {
this._map.set(name, value);
this[name] = value; // property access
}
get(name) {
return this._map.get(name);
}
has(name) {
return this._map.has(name);
}
delete(name) {
this._map.delete(name);
delete this[name];
}
}