@preference-sl/prefconfigurator-wasm 4.0.3 → 4.0.5
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/_framework/{PrefConfigurator.Abstractions.9udh87yr9w.wasm → PrefConfigurator.Abstractions.bie4f867j3.wasm} +0 -0
- package/_framework/PrefConfigurator.Abstractions.bie4f867j3.wasm.br +0 -0
- package/_framework/{PrefConfigurator.Abstractions.9udh87yr9w.wasm.gz → PrefConfigurator.Abstractions.bie4f867j3.wasm.gz} +0 -0
- package/_framework/{PrefConfigurator.Application.4u4tvcs2r1.wasm → PrefConfigurator.Application.ay79auglik.wasm} +0 -0
- package/_framework/PrefConfigurator.Application.ay79auglik.wasm.br +0 -0
- package/_framework/{PrefConfigurator.Application.4u4tvcs2r1.wasm.gz → PrefConfigurator.Application.ay79auglik.wasm.gz} +0 -0
- package/_framework/{PrefConfigurator.Infrastructure.hprpb53w1u.wasm → PrefConfigurator.Infrastructure.iah5pukfy6.wasm} +0 -0
- package/_framework/PrefConfigurator.Infrastructure.iah5pukfy6.wasm.br +0 -0
- package/_framework/PrefConfigurator.Infrastructure.iah5pukfy6.wasm.gz +0 -0
- package/_framework/PrefConfigurator.Wasm.7cmgaxlj5y.wasm +0 -0
- package/_framework/PrefConfigurator.Wasm.7cmgaxlj5y.wasm.br +0 -0
- package/_framework/PrefConfigurator.Wasm.7cmgaxlj5y.wasm.gz +0 -0
- package/_framework/blazor.boot.json +9 -9
- package/_framework/blazor.boot.json.br +0 -0
- package/_framework/blazor.boot.json.gz +0 -0
- package/index.html +13 -13
- package/js/gltf-merger.js +36 -7
- package/js/prefconfigurator-api.d.ts +12 -12
- package/package.json +1 -1
- package/_framework/PrefConfigurator.Abstractions.9udh87yr9w.wasm.br +0 -0
- package/_framework/PrefConfigurator.Application.4u4tvcs2r1.wasm.br +0 -0
- package/_framework/PrefConfigurator.Infrastructure.hprpb53w1u.wasm.br +0 -0
- package/_framework/PrefConfigurator.Infrastructure.hprpb53w1u.wasm.gz +0 -0
- package/_framework/PrefConfigurator.Wasm.dvkubq345o.wasm +0 -0
- package/_framework/PrefConfigurator.Wasm.dvkubq345o.wasm.br +0 -0
- package/_framework/PrefConfigurator.Wasm.dvkubq345o.wasm.gz +0 -0
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"mainAssemblyName": "PrefConfigurator.Wasm",
|
|
3
3
|
"resources": {
|
|
4
|
-
"hash": "sha256-
|
|
4
|
+
"hash": "sha256-1YVaao/eSK5oNL5igaYahCnhM1RR5fuiN3bOEFvJYp8=",
|
|
5
5
|
"fingerprinting": {
|
|
6
6
|
"Microsoft.CSharp.wdyr58w263.wasm": "Microsoft.CSharp.wasm",
|
|
7
7
|
"Microsoft.Extensions.Caching.Abstractions.9tfokavdri.wasm": "Microsoft.Extensions.Caching.Abstractions.wasm",
|
|
@@ -34,10 +34,10 @@
|
|
|
34
34
|
"Microsoft.Extensions.Options.c9gmov336d.wasm": "Microsoft.Extensions.Options.wasm",
|
|
35
35
|
"Microsoft.Extensions.Primitives.ii8zcoqmmf.wasm": "Microsoft.Extensions.Primitives.wasm",
|
|
36
36
|
"Newtonsoft.Json.ou6h2ikg0u.wasm": "Newtonsoft.Json.wasm",
|
|
37
|
-
"PrefConfigurator.Abstractions.
|
|
38
|
-
"PrefConfigurator.Application.
|
|
39
|
-
"PrefConfigurator.Infrastructure.
|
|
40
|
-
"PrefConfigurator.Wasm.
|
|
37
|
+
"PrefConfigurator.Abstractions.bie4f867j3.wasm": "PrefConfigurator.Abstractions.wasm",
|
|
38
|
+
"PrefConfigurator.Application.ay79auglik.wasm": "PrefConfigurator.Application.wasm",
|
|
39
|
+
"PrefConfigurator.Infrastructure.iah5pukfy6.wasm": "PrefConfigurator.Infrastructure.wasm",
|
|
40
|
+
"PrefConfigurator.Wasm.7cmgaxlj5y.wasm": "PrefConfigurator.Wasm.wasm",
|
|
41
41
|
"Preference.Hydra.OpenApi.oba396x8m7.wasm": "Preference.Hydra.OpenApi.wasm",
|
|
42
42
|
"System.Collections.Concurrent.3x28nluuwn.wasm": "System.Collections.Concurrent.wasm",
|
|
43
43
|
"System.Collections.NonGeneric.308a90ldjh.wasm": "System.Collections.NonGeneric.wasm",
|
|
@@ -134,10 +134,10 @@
|
|
|
134
134
|
"Microsoft.Extensions.Options.c9gmov336d.wasm": "sha256-0N/ionjXj1tzE4oM9Wt55U0WDRfW6CCbnq2+PbQfUBc=",
|
|
135
135
|
"Microsoft.Extensions.Primitives.ii8zcoqmmf.wasm": "sha256-Jt5QBSXSDEahiZ89Pn1MhJ9A3C/ftN8ZXaBGV9JgqwQ=",
|
|
136
136
|
"Newtonsoft.Json.ou6h2ikg0u.wasm": "sha256-8EZ4H5Mb5yxuavrUzuw5k75ewxJQbdU+Y1rksETqPVo=",
|
|
137
|
-
"PrefConfigurator.Abstractions.
|
|
138
|
-
"PrefConfigurator.Application.
|
|
139
|
-
"PrefConfigurator.Infrastructure.
|
|
140
|
-
"PrefConfigurator.Wasm.
|
|
137
|
+
"PrefConfigurator.Abstractions.bie4f867j3.wasm": "sha256-jS6KdKJTRLbRQIKlBHkBKnNCij9GPiB5KWiaJ5y7xD4=",
|
|
138
|
+
"PrefConfigurator.Application.ay79auglik.wasm": "sha256-fq07+WGFm4fZ+6O4kdVj3f7bBWDrQS+iMKOu7eP8gSI=",
|
|
139
|
+
"PrefConfigurator.Infrastructure.iah5pukfy6.wasm": "sha256-Nig/h6wZWhTjyfkybOlUeyG+/J6vlKrgNPvWBWLZBIs=",
|
|
140
|
+
"PrefConfigurator.Wasm.7cmgaxlj5y.wasm": "sha256-6azMsz5U5yiCVHtJ2oJzx42/dqEiFFOYYZpBGf97HVg=",
|
|
141
141
|
"Preference.Hydra.OpenApi.oba396x8m7.wasm": "sha256-BOitG9XqTGoVdagU40GvNefDuOylKCPs3Gp5VG0M3oY=",
|
|
142
142
|
"System.Collections.Concurrent.3x28nluuwn.wasm": "sha256-xwvOotzdpOgojZxJSPpPCqC1ZclGeXX5Gb5BO3q0GTw=",
|
|
143
143
|
"System.Collections.NonGeneric.308a90ldjh.wasm": "sha256-A4DaVYWq7Cth4jMmdivMKlU9/CVR8STku//4fK0IzsI=",
|
|
Binary file
|
|
Binary file
|
package/index.html
CHANGED
|
@@ -9,19 +9,19 @@
|
|
|
9
9
|
In production, prefer secure auth (tokens/headers/cookies) instead of plaintext here. -->
|
|
10
10
|
<script>
|
|
11
11
|
window.PREFCONF = {
|
|
12
|
-
version: 1,
|
|
13
|
-
services: {
|
|
14
|
-
baseUrl: "https://reydemo.prefnet.net/qa-reynaers",
|
|
15
|
-
urlResolutionMode: "explicit",
|
|
16
|
-
hydraBaseUrl: "https://reydemo.prefnet.net/qa-reynaers/erp.hydrawebapi.service",
|
|
17
|
-
prefWebBaseUrl: "https://reydemo.prefnet.net/qa-reynaers/prefweb",
|
|
18
|
-
kbApiBaseUrl: "https://reydemo.prefnet.net/qa-reynaers/kb.api.service",
|
|
19
|
-
hcApiBaseUrl: "https://reydemo.prefnet.net/qa-reynaers/hc.api.service",
|
|
20
|
-
cloudPrefWebBaseUrl: "https://reydemo.prefnet.net/qa-reynaers/cloud.prefweb.service/api",
|
|
21
|
-
kbUiBaseUrl: "https://reydemo.prefnet.net/qa-reynaers/kb.uiconfigurator.service",
|
|
22
|
-
wallGeneratorBaseUrl: "https://reydemo.prefnet.net/qa-reynaers/wallgenerator",
|
|
23
|
-
usdBaseUrl: "https://reydemo.prefnet.net/qa-reynaers/usd-service
|
|
24
|
-
},
|
|
12
|
+
version: 1,
|
|
13
|
+
services: {
|
|
14
|
+
baseUrl: "https://reydemo.prefnet.net/qa-reynaers",
|
|
15
|
+
urlResolutionMode: "explicit",
|
|
16
|
+
hydraBaseUrl: "https://reydemo.prefnet.net/qa-reynaers/erp.hydrawebapi.service",
|
|
17
|
+
prefWebBaseUrl: "https://reydemo.prefnet.net/qa-reynaers/prefweb",
|
|
18
|
+
kbApiBaseUrl: "https://reydemo.prefnet.net/qa-reynaers/kb.api.service",
|
|
19
|
+
hcApiBaseUrl: "https://reydemo.prefnet.net/qa-reynaers/hc.api.service",
|
|
20
|
+
cloudPrefWebBaseUrl: "https://reydemo.prefnet.net/qa-reynaers/cloud.prefweb.service/api",
|
|
21
|
+
kbUiBaseUrl: "https://reydemo.prefnet.net/qa-reynaers/kb.uiconfigurator.service",
|
|
22
|
+
wallGeneratorBaseUrl: "https://reydemo.prefnet.net/qa-reynaers/wallgenerator",
|
|
23
|
+
usdBaseUrl: "https://reydemo.prefnet.net/qa-reynaers/usd-service",
|
|
24
|
+
},
|
|
25
25
|
maker: {
|
|
26
26
|
name: "maker",
|
|
27
27
|
prefix: "MK_",
|
package/js/gltf-merger.js
CHANGED
|
@@ -1,11 +1,42 @@
|
|
|
1
1
|
// wwwroot/gltf-merger.js
|
|
2
|
-
// Este archivo
|
|
3
|
-
import createModule from '../../gltf_merger_wasm/PrefGltfMergerWasm.js';
|
|
2
|
+
// Este archivo actua como puente entre C# y tu modulo C++ WASM
|
|
4
3
|
|
|
5
4
|
let moduleInstance = null;
|
|
5
|
+
let createModuleFactory = null;
|
|
6
|
+
|
|
7
|
+
async function loadCreateModuleFactory() {
|
|
8
|
+
if (createModuleFactory) {
|
|
9
|
+
return createModuleFactory;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
// Orden: npm consumer path -> local debug path.
|
|
13
|
+
// Permite override opcional:
|
|
14
|
+
// globalThis.__PREF_GLTF_MERGER_WASM_PATH = "./PrefGltfMergerWasm.js";
|
|
15
|
+
const customPath = globalThis.__PREF_GLTF_MERGER_WASM_PATH;
|
|
16
|
+
const candidatePaths = [
|
|
17
|
+
...(customPath ? [customPath] : []),
|
|
18
|
+
"../../gltf_merger_wasm/PrefGltfMergerWasm.js",
|
|
19
|
+
"./PrefGltfMergerWasm.js"
|
|
20
|
+
];
|
|
21
|
+
|
|
22
|
+
for (const candidatePath of candidatePaths) {
|
|
23
|
+
try {
|
|
24
|
+
const module = await import(candidatePath);
|
|
25
|
+
if (typeof module.default === "function") {
|
|
26
|
+
createModuleFactory = module.default;
|
|
27
|
+
return createModuleFactory;
|
|
28
|
+
}
|
|
29
|
+
} catch {
|
|
30
|
+
// Probar siguiente candidato.
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
throw new Error(`PrefGltfMergerWasm.js not found. Tried: ${candidatePaths.join(", ")}`);
|
|
35
|
+
}
|
|
6
36
|
|
|
7
37
|
async function getModule() {
|
|
8
38
|
if (!moduleInstance) {
|
|
39
|
+
const createModule = await loadCreateModuleFactory();
|
|
9
40
|
moduleInstance = await createModule(); // esto inicializa el WASM
|
|
10
41
|
}
|
|
11
42
|
return moduleInstance;
|
|
@@ -13,8 +44,7 @@ async function getModule() {
|
|
|
13
44
|
|
|
14
45
|
export async function mergeModels(modelA, modelB, sceneWallDataStr, buildWallDataStr, materials, materialAssignment, textureRootPath, binary) {
|
|
15
46
|
if (!modelA || !modelB) {
|
|
16
|
-
|
|
17
|
-
return;
|
|
47
|
+
throw new Error("Models not valid");
|
|
18
48
|
}
|
|
19
49
|
|
|
20
50
|
const module = await getModule();
|
|
@@ -24,10 +54,9 @@ export async function mergeModels(modelA, modelB, sceneWallDataStr, buildWallDat
|
|
|
24
54
|
|
|
25
55
|
export async function applyWallMaterials(modelBuffer, wallMaterialDataJson, textureRootPath) {
|
|
26
56
|
if (!modelBuffer || !wallMaterialDataJson || !textureRootPath) {
|
|
27
|
-
|
|
28
|
-
return;
|
|
57
|
+
throw new Error("Null input data");
|
|
29
58
|
}
|
|
30
59
|
const module = await getModule();
|
|
31
60
|
const merger = new module.GltfMerger();
|
|
32
61
|
return merger.applyWallMaterials(modelBuffer, wallMaterialDataJson, textureRootPath);
|
|
33
|
-
}
|
|
62
|
+
}
|
|
@@ -166,18 +166,18 @@ export interface Scene {
|
|
|
166
166
|
export interface EnvJson {
|
|
167
167
|
version?: number | null;
|
|
168
168
|
|
|
169
|
-
services: {
|
|
170
|
-
baseUrl: string;
|
|
171
|
-
urlResolutionMode?: "legacy" | "explicit" | null;
|
|
172
|
-
hydraBaseUrl?: string | null;
|
|
173
|
-
prefWebBaseUrl?: string | null;
|
|
174
|
-
kbApiBaseUrl?: string | null;
|
|
175
|
-
hcApiBaseUrl?: string | null;
|
|
176
|
-
cloudPrefWebBaseUrl?: string | null;
|
|
177
|
-
kbUiBaseUrl?: string | null;
|
|
178
|
-
wallGeneratorBaseUrl?: string | null;
|
|
179
|
-
usdBaseUrl?: string | null;
|
|
180
|
-
};
|
|
169
|
+
services: {
|
|
170
|
+
baseUrl: string;
|
|
171
|
+
urlResolutionMode?: "legacy" | "explicit" | null;
|
|
172
|
+
hydraBaseUrl?: string | null;
|
|
173
|
+
prefWebBaseUrl?: string | null;
|
|
174
|
+
kbApiBaseUrl?: string | null;
|
|
175
|
+
hcApiBaseUrl?: string | null;
|
|
176
|
+
cloudPrefWebBaseUrl?: string | null;
|
|
177
|
+
kbUiBaseUrl?: string | null;
|
|
178
|
+
wallGeneratorBaseUrl?: string | null;
|
|
179
|
+
usdBaseUrl?: string | null;
|
|
180
|
+
};
|
|
181
181
|
|
|
182
182
|
maker: {
|
|
183
183
|
name?: string | null;
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
},
|
|
5
5
|
"description": ".NET WebAssembly runtime package that centralizes logic for building product configurators, exposing a simple API for integration into ecommerce platforms.",
|
|
6
6
|
"types": "main.d.ts",
|
|
7
|
-
"version": "4.0.
|
|
7
|
+
"version": "4.0.5",
|
|
8
8
|
"files": [
|
|
9
9
|
"_framework/**",
|
|
10
10
|
"**/*.js",
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|