@holoscript/core 2.0.1 → 2.0.2

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.
Files changed (137) hide show
  1. package/LICENSE +21 -0
  2. package/dist/chunk-3N67RLQP.cjs +1298 -0
  3. package/dist/chunk-3N67RLQP.cjs.map +1 -0
  4. package/dist/chunk-3X2EGU7Z.cjs +52 -0
  5. package/dist/chunk-3X2EGU7Z.cjs.map +1 -0
  6. package/dist/chunk-4CV4JOE5.js +24 -0
  7. package/dist/chunk-4CV4JOE5.js.map +1 -0
  8. package/dist/chunk-4OHVW4XR.cjs +1027 -0
  9. package/dist/chunk-4OHVW4XR.cjs.map +1 -0
  10. package/dist/chunk-CZLDE2OZ.cjs +28 -0
  11. package/dist/chunk-CZLDE2OZ.cjs.map +1 -0
  12. package/{src/HoloScriptRuntime.ts → dist/chunk-EU6CZMGJ.js} +437 -794
  13. package/dist/chunk-EU6CZMGJ.js.map +1 -0
  14. package/dist/chunk-KWYIVRIH.js +344 -0
  15. package/dist/chunk-KWYIVRIH.js.map +1 -0
  16. package/dist/chunk-MCP6D4LT.js +1025 -0
  17. package/dist/chunk-MCP6D4LT.js.map +1 -0
  18. package/dist/chunk-SATNCODL.js +45 -0
  19. package/dist/chunk-SATNCODL.js.map +1 -0
  20. package/dist/chunk-VMZN4EVR.cjs +347 -0
  21. package/dist/chunk-VMZN4EVR.cjs.map +1 -0
  22. package/{src/HoloScriptDebugger.ts → dist/chunk-VYIDLUCV.js} +118 -257
  23. package/dist/chunk-VYIDLUCV.js.map +1 -0
  24. package/dist/chunk-WFI4T3XB.cjs +424 -0
  25. package/dist/chunk-WFI4T3XB.cjs.map +1 -0
  26. package/dist/debugger.cjs +20 -0
  27. package/dist/debugger.cjs.map +1 -0
  28. package/dist/debugger.d.cts +171 -0
  29. package/dist/debugger.d.ts +171 -0
  30. package/dist/debugger.js +7 -0
  31. package/dist/debugger.js.map +1 -0
  32. package/dist/index.cjs +6006 -0
  33. package/dist/index.cjs.map +1 -0
  34. package/dist/index.d.cts +2482 -0
  35. package/dist/index.d.ts +2482 -0
  36. package/dist/index.js +5926 -0
  37. package/dist/index.js.map +1 -0
  38. package/dist/parser.cjs +14 -0
  39. package/dist/parser.cjs.map +1 -0
  40. package/dist/parser.d.cts +139 -0
  41. package/dist/parser.d.ts +139 -0
  42. package/dist/parser.js +5 -0
  43. package/dist/parser.js.map +1 -0
  44. package/dist/runtime.cjs +14 -0
  45. package/dist/runtime.cjs.map +1 -0
  46. package/dist/runtime.d.cts +180 -0
  47. package/dist/runtime.d.ts +180 -0
  48. package/dist/runtime.js +5 -0
  49. package/dist/runtime.js.map +1 -0
  50. package/dist/type-checker.cjs +17 -0
  51. package/dist/type-checker.cjs.map +1 -0
  52. package/dist/type-checker.d.cts +105 -0
  53. package/dist/type-checker.d.ts +105 -0
  54. package/dist/type-checker.js +4 -0
  55. package/dist/type-checker.js.map +1 -0
  56. package/dist/types-D6g4ACjP.d.cts +262 -0
  57. package/dist/types-D6g4ACjP.d.ts +262 -0
  58. package/package.json +11 -8
  59. package/src/HoloScript2DParser.js +0 -227
  60. package/src/HoloScript2DParser.ts +0 -261
  61. package/src/HoloScriptCodeParser.js +0 -1102
  62. package/src/HoloScriptCodeParser.ts +0 -1188
  63. package/src/HoloScriptDebugger.js +0 -458
  64. package/src/HoloScriptParser.js +0 -338
  65. package/src/HoloScriptParser.ts +0 -397
  66. package/src/HoloScriptPlusParser.js +0 -371
  67. package/src/HoloScriptPlusParser.ts +0 -543
  68. package/src/HoloScriptRuntime.js +0 -1399
  69. package/src/HoloScriptRuntime.test.js +0 -351
  70. package/src/HoloScriptRuntime.test.ts +0 -436
  71. package/src/HoloScriptTypeChecker.js +0 -356
  72. package/src/HoloScriptTypeChecker.ts +0 -475
  73. package/src/__tests__/GraphicsServices.test.js +0 -357
  74. package/src/__tests__/GraphicsServices.test.ts +0 -427
  75. package/src/__tests__/HoloScriptPlusParser.test.js +0 -317
  76. package/src/__tests__/HoloScriptPlusParser.test.ts +0 -392
  77. package/src/__tests__/integration.test.js +0 -336
  78. package/src/__tests__/integration.test.ts +0 -416
  79. package/src/__tests__/performance.bench.js +0 -218
  80. package/src/__tests__/performance.bench.ts +0 -262
  81. package/src/__tests__/type-checker.test.js +0 -60
  82. package/src/__tests__/type-checker.test.ts +0 -73
  83. package/src/index.js +0 -217
  84. package/src/index.ts +0 -426
  85. package/src/interop/Interoperability.js +0 -413
  86. package/src/interop/Interoperability.ts +0 -494
  87. package/src/logger.js +0 -42
  88. package/src/logger.ts +0 -57
  89. package/src/parser/EnhancedParser.js +0 -205
  90. package/src/parser/EnhancedParser.ts +0 -251
  91. package/src/parser/HoloScriptPlusParser.js +0 -928
  92. package/src/parser/HoloScriptPlusParser.ts +0 -1089
  93. package/src/runtime/HoloScriptPlusRuntime.js +0 -674
  94. package/src/runtime/HoloScriptPlusRuntime.ts +0 -861
  95. package/src/runtime/PerformanceTelemetry.js +0 -323
  96. package/src/runtime/PerformanceTelemetry.ts +0 -467
  97. package/src/runtime/RuntimeOptimization.js +0 -361
  98. package/src/runtime/RuntimeOptimization.ts +0 -416
  99. package/src/services/HololandGraphicsPipelineService.js +0 -506
  100. package/src/services/HololandGraphicsPipelineService.ts +0 -662
  101. package/src/services/PlatformPerformanceOptimizer.js +0 -356
  102. package/src/services/PlatformPerformanceOptimizer.ts +0 -503
  103. package/src/state/ReactiveState.js +0 -427
  104. package/src/state/ReactiveState.ts +0 -572
  105. package/src/tools/DeveloperExperience.js +0 -376
  106. package/src/tools/DeveloperExperience.ts +0 -438
  107. package/src/traits/AIDriverTrait.js +0 -322
  108. package/src/traits/AIDriverTrait.test.js +0 -329
  109. package/src/traits/AIDriverTrait.test.ts +0 -357
  110. package/src/traits/AIDriverTrait.ts +0 -474
  111. package/src/traits/LightingTrait.js +0 -313
  112. package/src/traits/LightingTrait.test.js +0 -410
  113. package/src/traits/LightingTrait.test.ts +0 -462
  114. package/src/traits/LightingTrait.ts +0 -505
  115. package/src/traits/MaterialTrait.js +0 -194
  116. package/src/traits/MaterialTrait.test.js +0 -286
  117. package/src/traits/MaterialTrait.test.ts +0 -329
  118. package/src/traits/MaterialTrait.ts +0 -324
  119. package/src/traits/RenderingTrait.js +0 -356
  120. package/src/traits/RenderingTrait.test.js +0 -363
  121. package/src/traits/RenderingTrait.test.ts +0 -427
  122. package/src/traits/RenderingTrait.ts +0 -555
  123. package/src/traits/VRTraitSystem.js +0 -740
  124. package/src/traits/VRTraitSystem.ts +0 -1040
  125. package/src/traits/VoiceInputTrait.js +0 -284
  126. package/src/traits/VoiceInputTrait.test.js +0 -226
  127. package/src/traits/VoiceInputTrait.test.ts +0 -252
  128. package/src/traits/VoiceInputTrait.ts +0 -401
  129. package/src/types/AdvancedTypeSystem.js +0 -226
  130. package/src/types/AdvancedTypeSystem.ts +0 -494
  131. package/src/types/HoloScriptPlus.d.ts +0 -853
  132. package/src/types.js +0 -6
  133. package/src/types.ts +0 -369
  134. package/tsconfig.json +0 -23
  135. package/tsup.config.d.ts +0 -2
  136. package/tsup.config.js +0 -18
  137. package/tsup.config.ts +0 -19
@@ -1,506 +0,0 @@
1
- /**
2
- * Hololand Graphics Pipeline Service
3
- *
4
- * Core service for managing graphics rendering pipeline in Hololand.
5
- * Integrates HoloScript graphics traits with Hololand's rendering backend.
6
- *
7
- * Responsibilities:
8
- * - Material management and asset pipeline
9
- * - Light management and shadow mapping
10
- * - GPU memory optimization
11
- * - Performance monitoring and profiling
12
- * - Cross-platform optimization (mobile/VR/desktop)
13
- */
14
- // ============================================================================
15
- // Hololand Graphics Pipeline Service
16
- // ============================================================================
17
- export class HololandGraphicsPipelineService {
18
- constructor(platform = 'desktop') {
19
- this.materialCache = new Map();
20
- this.textureCache = new Map();
21
- this.shaderCache = new Map();
22
- this.memoryBudget = 512; // MB default
23
- this.memoryUsed = 0;
24
- this.platformConfig = this.getPlatformConfig(platform);
25
- this.metrics = this.initializeMetrics();
26
- }
27
- /**
28
- * Initialize graphics pipeline with configuration
29
- */
30
- initialize(config) {
31
- if (config.material) {
32
- this.initializeMaterials(config.material);
33
- }
34
- if (config.lighting) {
35
- this.initializeLighting(config.lighting);
36
- }
37
- if (config.rendering) {
38
- this.initializeRendering(config.rendering);
39
- }
40
- }
41
- /**
42
- * Initialize materials from configuration
43
- */
44
- initializeMaterials(materialConfig) {
45
- // Create material assets
46
- const material = this.createMaterialAsset(materialConfig);
47
- this.materialCache.set(material.id, material);
48
- // Pre-compile shaders
49
- material.shaders.forEach((shader) => {
50
- this.compileShader(shader);
51
- });
52
- // Load textures
53
- material.textures.forEach((texture) => {
54
- this.loadTexture(texture);
55
- });
56
- }
57
- /**
58
- * Initialize lighting from configuration
59
- */
60
- initializeLighting(lightingConfig) {
61
- // Configure shadow mapping
62
- if (lightingConfig.shadows) {
63
- this.setupShadowMapping(lightingConfig);
64
- }
65
- // Configure global illumination
66
- if (lightingConfig.globalIllumination) {
67
- this.setupGlobalIllumination(lightingConfig.globalIllumination);
68
- }
69
- }
70
- /**
71
- * Initialize rendering from configuration
72
- */
73
- initializeRendering(renderingConfig) {
74
- // Apply quality preset
75
- if (renderingConfig.quality) {
76
- this.applyQualityPreset(renderingConfig.quality);
77
- }
78
- // Configure platform-specific settings
79
- if (renderingConfig.platform) {
80
- this.platformConfig = this.getPlatformConfig(renderingConfig.platform);
81
- }
82
- // Enable optimizations
83
- if (renderingConfig.lod !== false) {
84
- this.enableLOD();
85
- }
86
- if (renderingConfig.culling !== false) {
87
- this.enableCulling();
88
- }
89
- if (renderingConfig.instancing !== false) {
90
- this.platformConfig.instancingEnabled = true;
91
- }
92
- }
93
- /**
94
- * Create material asset from configuration
95
- */
96
- createMaterialAsset(config) {
97
- const id = `mat_${Date.now()}_${Math.random()}`;
98
- const asset = {
99
- id,
100
- name: config.name || 'Material',
101
- material: null, // Would be actual MaterialTrait
102
- shaders: this.generateShaders(config),
103
- textures: this.loadTexturesFromConfig(config),
104
- instances: 0,
105
- gpuMemory: 0,
106
- lastUsed: Date.now(),
107
- };
108
- // Estimate GPU memory
109
- asset.gpuMemory = this.estimateMaterialMemory(asset);
110
- this.memoryUsed += asset.gpuMemory;
111
- return asset;
112
- }
113
- /**
114
- * Generate shaders from material configuration
115
- */
116
- generateShaders(config) {
117
- const shaders = [];
118
- // Generate PBR shader
119
- if (config.type === 'pbr' || config.pbr) {
120
- shaders.push(this.generatePBRShader(config));
121
- }
122
- return shaders;
123
- }
124
- /**
125
- * Generate PBR shader program
126
- */
127
- generatePBRShader(config) {
128
- const vertexShader = `
129
- #version 300 es
130
- precision highp float;
131
-
132
- in vec3 aPosition;
133
- in vec3 aNormal;
134
- in vec2 aTexCoord;
135
- in vec3 aTangent;
136
-
137
- uniform mat4 uMatrix;
138
- uniform mat4 uNormalMatrix;
139
- uniform mat4 uProjectionMatrix;
140
-
141
- out vec3 vPosition;
142
- out vec3 vNormal;
143
- out vec2 vTexCoord;
144
- out mat3 vTBN;
145
-
146
- void main() {
147
- vPosition = (uMatrix * vec4(aPosition, 1.0)).xyz;
148
- vNormal = normalize((uNormalMatrix * vec4(aNormal, 0.0)).xyz);
149
- vTexCoord = aTexCoord;
150
-
151
- vec3 T = normalize((uNormalMatrix * vec4(aTangent, 0.0)).xyz);
152
- vec3 B = cross(vNormal, T);
153
- vTBN = mat3(T, B, vNormal);
154
-
155
- gl_Position = uProjectionMatrix * uMatrix * vec4(aPosition, 1.0);
156
- }
157
- `;
158
- const fragmentShader = `
159
- #version 300 es
160
- precision highp float;
161
-
162
- in vec3 vPosition;
163
- in vec3 vNormal;
164
- in vec2 vTexCoord;
165
- in mat3 vTBN;
166
-
167
- uniform sampler2D uBaseColorMap;
168
- uniform sampler2D uNormalMap;
169
- uniform sampler2D uRoughnessMap;
170
- uniform sampler2D uMetallicMap;
171
- uniform sampler2D uAOMap;
172
-
173
- uniform vec3 uViewPos;
174
- uniform float uMetallic;
175
- uniform float uRoughness;
176
-
177
- out vec4 FragColor;
178
-
179
- const float PI = 3.14159265359;
180
-
181
- vec3 fresnelSchlick(float cosTheta, vec3 F0) {
182
- return F0 + (1.0 - F0) * pow(clamp(1.0 - cosTheta, 0.0, 1.0), 5.0);
183
- }
184
-
185
- void main() {
186
- vec3 baseColor = texture(uBaseColorMap, vTexCoord).rgb;
187
- vec3 normal = normalize(vTBN * (texture(uNormalMap, vTexCoord).rgb * 2.0 - 1.0));
188
- float roughness = texture(uRoughnessMap, vTexCoord).r;
189
- float metallic = texture(uMetallicMap, vTexCoord).r;
190
- float ao = texture(uAOMap, vTexCoord).r;
191
-
192
- vec3 N = normalize(normal);
193
- vec3 V = normalize(uViewPos - vPosition);
194
-
195
- vec3 F0 = vec3(0.04);
196
- F0 = mix(F0, baseColor, metallic);
197
-
198
- // Simplified lighting (full PBR in production)
199
- vec3 lightDir = normalize(vec3(0.5, 1.0, 0.5));
200
- float NdotL = max(dot(N, lightDir), 0.0);
201
-
202
- vec3 result = baseColor * NdotL * ao;
203
-
204
- // Tone mapping
205
- result = result / (result + vec3(1.0));
206
- result = pow(result, vec3(1.0 / 2.2));
207
-
208
- FragColor = vec4(result, 1.0);
209
- }
210
- `;
211
- return {
212
- id: `shader_pbr_${Date.now()}`,
213
- name: 'PBRShader',
214
- vertexShader,
215
- fragmentShader,
216
- uniforms: {
217
- uMatrix: 'mat4',
218
- uNormalMatrix: 'mat4',
219
- uProjectionMatrix: 'mat4',
220
- uViewPos: 'vec3',
221
- uMetallic: 'float',
222
- uRoughness: 'float',
223
- uBaseColorMap: 'sampler2D',
224
- uNormalMap: 'sampler2D',
225
- uRoughnessMap: 'sampler2D',
226
- uMetallicMap: 'sampler2D',
227
- uAOMap: 'sampler2D',
228
- },
229
- compiled: false,
230
- compilationTime: 0,
231
- };
232
- }
233
- /**
234
- * Load textures from configuration
235
- */
236
- loadTexturesFromConfig(config) {
237
- const textures = [];
238
- if (config.textures) {
239
- config.textures.forEach((tex) => {
240
- textures.push({
241
- id: `tex_${Date.now()}_${Math.random()}`,
242
- path: tex.path,
243
- format: this.selectTextureFormat(config.compression),
244
- width: 2048,
245
- height: 2048,
246
- mipLevels: 8,
247
- gpuMemory: this.estimateTextureMemory(2048, 2048, this.selectTextureFormat(config.compression)),
248
- loaded: false,
249
- });
250
- });
251
- }
252
- return textures;
253
- }
254
- /**
255
- * Select appropriate texture format based on compression type
256
- */
257
- selectTextureFormat(compression) {
258
- switch (compression) {
259
- case 'dxt':
260
- return 'BC3';
261
- case 'astc':
262
- return 'ASTC';
263
- case 'basis':
264
- return 'PVRTC';
265
- default:
266
- return 'RGBA8';
267
- }
268
- }
269
- /**
270
- * Estimate texture memory usage
271
- */
272
- estimateTextureMemory(width, height, format) {
273
- const pixels = width * height;
274
- let bytesPerPixel = 4; // RGBA8
275
- switch (format) {
276
- case 'RGB565':
277
- bytesPerPixel = 2;
278
- break;
279
- case 'BC1':
280
- case 'BC3':
281
- case 'ASTC':
282
- bytesPerPixel = 0.5; // Compressed
283
- break;
284
- case 'PVRTC':
285
- bytesPerPixel = 0.25; // Highly compressed
286
- break;
287
- }
288
- // Account for mipmaps (roughly 1.33x base size)
289
- return (pixels * bytesPerPixel * 1.33) / (1024 * 1024);
290
- }
291
- /**
292
- * Estimate material GPU memory
293
- */
294
- estimateMaterialMemory(asset) {
295
- let total = 0;
296
- // Shader memory (typically negligible, but count)
297
- total += 0.1; // 100KB per shader
298
- // Texture memory
299
- asset.textures.forEach((tex) => {
300
- total += tex.gpuMemory;
301
- });
302
- return total;
303
- }
304
- /**
305
- * Compile shader program
306
- */
307
- compileShader(shader) {
308
- const start = performance.now();
309
- // In real implementation, this would compile to WebGL/WebGPU
310
- // For now, just mark as compiled
311
- shader.compiled = true;
312
- shader.compilationTime = performance.now() - start;
313
- this.shaderCache.set(shader.id, shader);
314
- }
315
- /**
316
- * Load texture into GPU memory
317
- */
318
- loadTexture(texture) {
319
- // In real implementation, this would load from disk/network
320
- // For now, just mark as loaded
321
- texture.loaded = true;
322
- this.textureCache.set(texture.id, texture);
323
- }
324
- /**
325
- * Setup shadow mapping
326
- */
327
- setupShadowMapping(config) {
328
- // Configure shadow map resolution and filtering
329
- const shadowQuality = this.platformConfig.shadowQuality;
330
- const shadowResolution = this.shadowResolutionForQuality(shadowQuality);
331
- // Create shadow map textures
332
- // This would allocate GPU memory for shadow maps
333
- }
334
- /**
335
- * Get shadow map resolution for quality level
336
- */
337
- shadowResolutionForQuality(quality) {
338
- switch (quality) {
339
- case 'none':
340
- return 0;
341
- case 'low':
342
- return 512;
343
- case 'medium':
344
- return 1024;
345
- case 'high':
346
- return 2048;
347
- default:
348
- return 1024;
349
- }
350
- }
351
- /**
352
- * Setup global illumination
353
- */
354
- setupGlobalIllumination(config) {
355
- // Create light probes for indirect lighting
356
- const probeCount = config.probes || 16;
357
- // Allocate GPU memory for probes
358
- // Each probe stores 6 faces of cubemap
359
- }
360
- /**
361
- * Apply quality preset
362
- */
363
- applyQualityPreset(quality) {
364
- switch (quality) {
365
- case 'low':
366
- this.platformConfig.maxTextureResolution = 512;
367
- this.platformConfig.shadowQuality = 'none';
368
- this.platformConfig.targetFPS = 30;
369
- break;
370
- case 'medium':
371
- this.platformConfig.maxTextureResolution = 1024;
372
- this.platformConfig.shadowQuality = 'low';
373
- this.platformConfig.targetFPS = 60;
374
- break;
375
- case 'high':
376
- this.platformConfig.maxTextureResolution = 2048;
377
- this.platformConfig.shadowQuality = 'medium';
378
- this.platformConfig.targetFPS = 60;
379
- break;
380
- case 'ultra':
381
- this.platformConfig.maxTextureResolution = 4096;
382
- this.platformConfig.shadowQuality = 'high';
383
- this.platformConfig.targetFPS = 120;
384
- break;
385
- }
386
- }
387
- /**
388
- * Enable LOD system
389
- */
390
- enableLOD() {
391
- // Configure automatic LOD switching based on screen coverage
392
- }
393
- /**
394
- * Enable culling
395
- */
396
- enableCulling() {
397
- // Enable frustum culling and occlusion culling
398
- }
399
- /**
400
- * Get platform-specific configuration
401
- */
402
- getPlatformConfig(platform) {
403
- switch (platform) {
404
- case 'mobile':
405
- return {
406
- platform: 'mobile',
407
- maxGPUMemory: 256,
408
- maxDrawCalls: 200,
409
- maxTextureResolution: 512,
410
- targetFPS: 30,
411
- shadowQuality: 'none',
412
- textureCompression: 'astc',
413
- instancingEnabled: true,
414
- maxLights: 2,
415
- maxShadowCasters: 0,
416
- };
417
- case 'vr':
418
- return {
419
- platform: 'vr',
420
- maxGPUMemory: 512,
421
- maxDrawCalls: 500,
422
- maxTextureResolution: 2048,
423
- targetFPS: 90,
424
- shadowQuality: 'low',
425
- textureCompression: 'basis',
426
- instancingEnabled: true,
427
- maxLights: 4,
428
- maxShadowCasters: 2,
429
- };
430
- case 'desktop':
431
- return {
432
- platform: 'desktop',
433
- maxGPUMemory: 2048,
434
- maxDrawCalls: 2000,
435
- maxTextureResolution: 4096,
436
- targetFPS: 120,
437
- shadowQuality: 'high',
438
- textureCompression: 'none',
439
- instancingEnabled: true,
440
- maxLights: 8,
441
- maxShadowCasters: 4,
442
- };
443
- }
444
- }
445
- /**
446
- * Initialize performance metrics
447
- */
448
- initializeMetrics() {
449
- return {
450
- drawCalls: 0,
451
- trianglesRendered: 0,
452
- gpuFrameTime: 0,
453
- cpuFrameTime: 0,
454
- fps: 60,
455
- gpuMemoryUsed: 0,
456
- textureBinds: 0,
457
- shaderSwitches: 0,
458
- batchCount: 0,
459
- };
460
- }
461
- /**
462
- * Get current GPU memory estimate
463
- */
464
- getGPUMemoryEstimate() {
465
- let textureMemory = 0;
466
- let geometryMemory = 0;
467
- let bufferMemory = 0;
468
- this.textureCache.forEach((tex) => {
469
- if (tex.loaded) {
470
- textureMemory += tex.gpuMemory;
471
- }
472
- });
473
- this.materialCache.forEach((mat) => {
474
- geometryMemory += mat.gpuMemory;
475
- });
476
- const total = textureMemory + geometryMemory + bufferMemory;
477
- return {
478
- textureMemory,
479
- geometryMemory,
480
- bufferMemory,
481
- estimatedTotal: total,
482
- budget: this.platformConfig.maxGPUMemory,
483
- utilization: (total / this.platformConfig.maxGPUMemory) * 100,
484
- };
485
- }
486
- /**
487
- * Get performance metrics
488
- */
489
- getPerformanceMetrics() {
490
- return { ...this.metrics };
491
- }
492
- /**
493
- * Set memory budget
494
- */
495
- setMemoryBudget(budget) {
496
- this.memoryBudget = budget;
497
- this.platformConfig.maxGPUMemory = budget;
498
- }
499
- /**
500
- * Optimize for specific platform
501
- */
502
- optimizePlatform(platform) {
503
- this.platformConfig = this.getPlatformConfig(platform);
504
- }
505
- }
506
- export default HololandGraphicsPipelineService;