Replace addons with conventional handles
Provide the single-loadout Scene API, SAB-backed meshes, cameras, materials, lights, workers, post effects, and tutorial playgrounds. Batch matching row growth so active GPU loadouts refresh once. Amp-Thread-ID: https://ampcode.com/threads/T-01a01380-b478-77d0-84a0-102880a5c5ae Co-authored-by: Heaust Azure <heaust.azure@gmail.com>
This commit is contained in:
@@ -77,6 +77,18 @@ export class YawnCore {
|
||||
return array;
|
||||
}
|
||||
|
||||
async createRowsBatch(rows) {
|
||||
await this.ready;
|
||||
if (!Array.isArray(rows) || !rows.length) throw new TypeError("ROWS");
|
||||
const descriptors = await this.#request("create-rows-batch", { rows });
|
||||
return descriptors.map(descriptor => {
|
||||
const array = this.#arrays.get(descriptor.name)?.update(descriptor)
|
||||
?? new SharedRows(this.#buffer, descriptor);
|
||||
this.#arrays.set(descriptor.name, array);
|
||||
return array;
|
||||
});
|
||||
}
|
||||
|
||||
async deleteRows(name) {
|
||||
await this.ready;
|
||||
await this.#request("delete-rows", { name });
|
||||
|
||||
Reference in New Issue
Block a user