nucleation 0.5.0 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/MeshResult.d.ts +5 -0
- package/MeshResult.mjs +26 -0
- package/nucleation.wasm +0 -0
- package/package.json +1 -1
package/MeshResult.d.ts
CHANGED
package/MeshResult.mjs
CHANGED
|
@@ -115,6 +115,32 @@ export class MeshResult {
|
|
|
115
115
|
}
|
|
116
116
|
}
|
|
117
117
|
|
|
118
|
+
/**
|
|
119
|
+
* The mesh as a USDZ archive, base64-encoded.
|
|
120
|
+
*/
|
|
121
|
+
usdzDataB64() {
|
|
122
|
+
const diplomatReceive = new diplomatRuntime.DiplomatReceiveBuf(wasm, 5, 4, true);
|
|
123
|
+
|
|
124
|
+
const write = new diplomatRuntime.DiplomatWriteBuf(wasm);
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
const result = wasm.MeshResult_usdz_data_b64(diplomatReceive.buffer, this.ffiValue, write.buffer);
|
|
128
|
+
|
|
129
|
+
try {
|
|
130
|
+
if (!diplomatReceive.resultFlag) {
|
|
131
|
+
const cause = new NucleationError(diplomatRuntime.internalConstructor, diplomatRuntime.enumDiscriminant(wasm, diplomatReceive.buffer));
|
|
132
|
+
throw new globalThis.Error('NucleationError.' + cause.value, { cause });
|
|
133
|
+
}
|
|
134
|
+
return write.readString8();
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
finally {
|
|
138
|
+
diplomatRuntime.FUNCTION_PARAM_ALLOC.clean();
|
|
139
|
+
diplomatReceive.free();
|
|
140
|
+
write.free();
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
|
|
118
144
|
/**
|
|
119
145
|
* The mesh serialized in the NUCM cache format, base64-encoded.
|
|
120
146
|
*/
|
package/nucleation.wasm
CHANGED
|
Binary file
|