@vib3code/sdk 2.0.1
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/CHANGELOG.md +118 -0
- package/DOCS/BLUEPRINT_EXECUTION_PLAN_2026-01-07.md +34 -0
- package/DOCS/CI_TESTING.md +38 -0
- package/DOCS/CLI_ONBOARDING.md +75 -0
- package/DOCS/CONTROL_REFERENCE.md +64 -0
- package/DOCS/DEV_TRACK_ANALYSIS.md +77 -0
- package/DOCS/DEV_TRACK_PLAN_2026-01-07.md +42 -0
- package/DOCS/DEV_TRACK_SESSION_2026-01-31.md +220 -0
- package/DOCS/ENV_SETUP.md +189 -0
- package/DOCS/EXPORT_FORMATS.md +417 -0
- package/DOCS/GPU_DISPOSAL_GUIDE.md +21 -0
- package/DOCS/LICENSING_TIERS.md +275 -0
- package/DOCS/MASTER_PLAN_2026-01-31.md +570 -0
- package/DOCS/OBS_SETUP_GUIDE.md +98 -0
- package/DOCS/PROJECT_SETUP.md +66 -0
- package/DOCS/RENDERER_LIFECYCLE.md +40 -0
- package/DOCS/REPO_MANIFEST.md +121 -0
- package/DOCS/SESSION_014_PLAN.md +195 -0
- package/DOCS/SESSION_LOG_2026-01-07.md +56 -0
- package/DOCS/STRATEGIC_BLUEPRINT_2026-01-07.md +72 -0
- package/DOCS/SYSTEM_AUDIT_2026-01-30.md +738 -0
- package/DOCS/SYSTEM_INVENTORY.md +520 -0
- package/DOCS/TELEMETRY_EXPORTS.md +34 -0
- package/DOCS/WEBGPU_STATUS.md +38 -0
- package/DOCS/XR_BENCHMARKS.md +608 -0
- package/LICENSE +21 -0
- package/README.md +426 -0
- package/docs/.nojekyll +0 -0
- package/docs/01-dissolution_of_euclidean_hegemony.html +346 -0
- package/docs/02-hyperspatial_ego_death.html +346 -0
- package/docs/03-post_cartesian_sublime.html +346 -0
- package/docs/04-crystalline_void_meditation.html +346 -0
- package/docs/05-quantum_decoherence_ballet.html +346 -0
- package/docs/06-dissolution_of_euclidean_hegemony.html +346 -0
- package/docs/07-hyperspatial_ego_death.html +346 -0
- package/docs/08-post_cartesian_sublime.html +346 -0
- package/docs/09-crystalline_void_meditation.html +346 -0
- package/docs/10-quantum_decoherence_ballet.html +346 -0
- package/docs/11-dissolution_of_euclidean_hegemony.html +346 -0
- package/docs/12-hyperspatial_ego_death.html +346 -0
- package/docs/13-post_cartesian_sublime.html +346 -0
- package/docs/index.html +794 -0
- package/docs/test-hub.html +441 -0
- package/docs/url-state.js +102 -0
- package/docs/vib3-exports/01-quantum-quantum-tetrahedron-lattice.html +489 -0
- package/docs/vib3-exports/02-quantum-quantum-hypersphere-matrix.html +489 -0
- package/docs/vib3-exports/03-quantum-quantum-hypertetra-fractal.html +489 -0
- package/docs/vib3-exports/04-faceted-faceted-crystal-structure.html +407 -0
- package/docs/vib3-exports/05-faceted-faceted-klein-bottle.html +407 -0
- package/docs/vib3-exports/06-faceted-faceted-hypertetra-torus.html +407 -0
- package/docs/vib3-exports/07-holographic-holographic-wave-field.html +457 -0
- package/docs/vib3-exports/08-holographic-holographic-hypersphere-sphere.html +457 -0
- package/docs/vib3-exports/09-holographic-holographic-hypertetra-crystal.html +457 -0
- package/docs/vib3-exports/index.html +238 -0
- package/docs/webgpu-live.html +702 -0
- package/package.json +367 -0
- package/src/advanced/AIPresetGenerator.js +777 -0
- package/src/advanced/MIDIController.js +703 -0
- package/src/advanced/OffscreenWorker.js +1051 -0
- package/src/advanced/WebGPUCompute.js +1051 -0
- package/src/advanced/WebXRRenderer.js +680 -0
- package/src/agent/cli/AgentCLI.js +615 -0
- package/src/agent/cli/index.js +14 -0
- package/src/agent/index.js +73 -0
- package/src/agent/mcp/MCPServer.js +950 -0
- package/src/agent/mcp/index.js +9 -0
- package/src/agent/mcp/tools.js +548 -0
- package/src/agent/telemetry/EventStream.js +669 -0
- package/src/agent/telemetry/Instrumentation.js +618 -0
- package/src/agent/telemetry/TelemetryExporters.js +427 -0
- package/src/agent/telemetry/TelemetryService.js +464 -0
- package/src/agent/telemetry/index.js +52 -0
- package/src/benchmarks/BenchmarkRunner.js +381 -0
- package/src/benchmarks/MetricsCollector.js +299 -0
- package/src/benchmarks/index.js +9 -0
- package/src/benchmarks/scenes.js +259 -0
- package/src/cli/index.js +675 -0
- package/src/config/ApiConfig.js +88 -0
- package/src/core/CanvasManager.js +217 -0
- package/src/core/ErrorReporter.js +117 -0
- package/src/core/ParameterMapper.js +333 -0
- package/src/core/Parameters.js +396 -0
- package/src/core/RendererContracts.js +200 -0
- package/src/core/UnifiedResourceManager.js +370 -0
- package/src/core/VIB3Engine.js +636 -0
- package/src/core/renderers/FacetedRendererAdapter.js +32 -0
- package/src/core/renderers/HolographicRendererAdapter.js +29 -0
- package/src/core/renderers/QuantumRendererAdapter.js +29 -0
- package/src/core/renderers/RendererLifecycleManager.js +63 -0
- package/src/creative/ColorPresetsSystem.js +980 -0
- package/src/creative/ParameterTimeline.js +1061 -0
- package/src/creative/PostProcessingPipeline.js +1113 -0
- package/src/creative/TransitionAnimator.js +683 -0
- package/src/export/CSSExporter.js +226 -0
- package/src/export/CardGeneratorBase.js +279 -0
- package/src/export/ExportManager.js +580 -0
- package/src/export/FacetedCardGenerator.js +279 -0
- package/src/export/HolographicCardGenerator.js +543 -0
- package/src/export/LottieExporter.js +552 -0
- package/src/export/QuantumCardGenerator.js +315 -0
- package/src/export/SVGExporter.js +519 -0
- package/src/export/ShaderExporter.js +903 -0
- package/src/export/TradingCardGenerator.js +3055 -0
- package/src/export/TradingCardManager.js +181 -0
- package/src/export/VIB3PackageExporter.js +559 -0
- package/src/export/index.js +14 -0
- package/src/export/systems/TradingCardSystemFaceted.js +494 -0
- package/src/export/systems/TradingCardSystemHolographic.js +452 -0
- package/src/export/systems/TradingCardSystemQuantum.js +411 -0
- package/src/faceted/FacetedSystem.js +963 -0
- package/src/features/CollectionManager.js +433 -0
- package/src/gallery/CollectionManager.js +240 -0
- package/src/gallery/GallerySystem.js +485 -0
- package/src/geometry/GeometryFactory.js +314 -0
- package/src/geometry/GeometryLibrary.js +72 -0
- package/src/geometry/buffers/BufferBuilder.js +338 -0
- package/src/geometry/buffers/index.js +18 -0
- package/src/geometry/generators/Crystal.js +420 -0
- package/src/geometry/generators/Fractal.js +298 -0
- package/src/geometry/generators/KleinBottle.js +197 -0
- package/src/geometry/generators/Sphere.js +192 -0
- package/src/geometry/generators/Tesseract.js +160 -0
- package/src/geometry/generators/Tetrahedron.js +225 -0
- package/src/geometry/generators/Torus.js +304 -0
- package/src/geometry/generators/Wave.js +341 -0
- package/src/geometry/index.js +142 -0
- package/src/geometry/warp/HypersphereCore.js +211 -0
- package/src/geometry/warp/HypertetraCore.js +386 -0
- package/src/geometry/warp/index.js +57 -0
- package/src/holograms/HolographicVisualizer.js +1073 -0
- package/src/holograms/RealHolographicSystem.js +966 -0
- package/src/holograms/variantRegistry.js +69 -0
- package/src/integrations/FigmaPlugin.js +854 -0
- package/src/integrations/OBSMode.js +754 -0
- package/src/integrations/ThreeJsPackage.js +660 -0
- package/src/integrations/TouchDesignerExport.js +552 -0
- package/src/integrations/frameworks/Vib3React.js +591 -0
- package/src/integrations/frameworks/Vib3Svelte.js +654 -0
- package/src/integrations/frameworks/Vib3Vue.js +628 -0
- package/src/llm/LLMParameterInterface.js +240 -0
- package/src/llm/LLMParameterUI.js +577 -0
- package/src/math/Mat4x4.js +708 -0
- package/src/math/Projection.js +341 -0
- package/src/math/Rotor4D.js +637 -0
- package/src/math/Vec4.js +476 -0
- package/src/math/constants.js +164 -0
- package/src/math/index.js +68 -0
- package/src/math/projections.js +54 -0
- package/src/math/rotations.js +196 -0
- package/src/quantum/QuantumEngine.js +906 -0
- package/src/quantum/QuantumVisualizer.js +1103 -0
- package/src/reactivity/ReactivityConfig.js +499 -0
- package/src/reactivity/ReactivityManager.js +586 -0
- package/src/reactivity/SpatialInputSystem.js +1783 -0
- package/src/reactivity/index.js +93 -0
- package/src/render/CommandBuffer.js +465 -0
- package/src/render/MultiCanvasBridge.js +340 -0
- package/src/render/RenderCommand.js +514 -0
- package/src/render/RenderResourceRegistry.js +523 -0
- package/src/render/RenderState.js +552 -0
- package/src/render/RenderTarget.js +512 -0
- package/src/render/ShaderLoader.js +253 -0
- package/src/render/ShaderProgram.js +599 -0
- package/src/render/UnifiedRenderBridge.js +496 -0
- package/src/render/backends/WebGLBackend.js +1108 -0
- package/src/render/backends/WebGPUBackend.js +1409 -0
- package/src/render/commands/CommandBufferExecutor.js +607 -0
- package/src/render/commands/RenderCommandBuffer.js +661 -0
- package/src/render/commands/index.js +17 -0
- package/src/render/index.js +367 -0
- package/src/scene/Disposable.js +498 -0
- package/src/scene/MemoryPool.js +618 -0
- package/src/scene/Node4D.js +697 -0
- package/src/scene/ResourceManager.js +599 -0
- package/src/scene/Scene4D.js +540 -0
- package/src/scene/index.js +98 -0
- package/src/schemas/error.schema.json +84 -0
- package/src/schemas/extension.schema.json +88 -0
- package/src/schemas/index.js +214 -0
- package/src/schemas/parameters.schema.json +142 -0
- package/src/schemas/tool-pack.schema.json +44 -0
- package/src/schemas/tool-response.schema.json +127 -0
- package/src/shaders/common/fullscreen.vert.glsl +5 -0
- package/src/shaders/common/fullscreen.vert.wgsl +17 -0
- package/src/shaders/common/geometry24.glsl +65 -0
- package/src/shaders/common/geometry24.wgsl +54 -0
- package/src/shaders/common/rotation4d.glsl +85 -0
- package/src/shaders/common/rotation4d.wgsl +86 -0
- package/src/shaders/common/uniforms.glsl +44 -0
- package/src/shaders/common/uniforms.wgsl +48 -0
- package/src/shaders/faceted/faceted.frag.glsl +129 -0
- package/src/shaders/faceted/faceted.frag.wgsl +164 -0
- package/src/shaders/holographic/holographic.frag.glsl +406 -0
- package/src/shaders/holographic/holographic.frag.wgsl +185 -0
- package/src/shaders/quantum/quantum.frag.glsl +513 -0
- package/src/shaders/quantum/quantum.frag.wgsl +361 -0
- package/src/testing/ParallelTestFramework.js +519 -0
- package/src/testing/__snapshots__/exportFormats.test.js.snap +24 -0
- package/src/testing/exportFormats.test.js +8 -0
- package/src/testing/projections.test.js +14 -0
- package/src/testing/rotations.test.js +37 -0
- package/src/ui/InteractivityMenu.js +516 -0
- package/src/ui/StatusManager.js +96 -0
- package/src/ui/adaptive/renderers/webgpu/BufferLayout.ts +252 -0
- package/src/ui/adaptive/renderers/webgpu/PolytopeInstanceBuffer.ts +144 -0
- package/src/ui/adaptive/renderers/webgpu/TripleBufferedUniform.ts +170 -0
- package/src/ui/adaptive/renderers/webgpu/WebGPURenderer.ts +735 -0
- package/src/ui/adaptive/renderers/webgpu/index.ts +112 -0
- package/src/variations/VariationManager.js +431 -0
- package/src/viewer/AudioReactivity.js +505 -0
- package/src/viewer/CardBending.js +481 -0
- package/src/viewer/GalleryUI.js +832 -0
- package/src/viewer/ReactivityManager.js +590 -0
- package/src/viewer/TradingCardExporter.js +600 -0
- package/src/viewer/ViewerPortal.js +374 -0
- package/src/viewer/index.js +12 -0
- package/src/wasm/WasmLoader.js +296 -0
- package/src/wasm/index.js +132 -0
- package/tools/agentic/mcpTools.js +88 -0
- package/tools/cli/agent-cli.js +92 -0
- package/tools/export/formats.js +24 -0
- package/tools/math/rotation-baseline.mjs +64 -0
- package/tools/shader-sync-verify.js +937 -0
- package/tools/telemetry/manifestPipeline.js +141 -0
- package/tools/telemetry/telemetryEvents.js +35 -0
- package/types/adaptive-sdk.d.ts +185 -0
- package/types/advanced/AIPresetGenerator.d.ts +81 -0
- package/types/advanced/MIDIController.d.ts +100 -0
- package/types/advanced/OffscreenWorker.d.ts +82 -0
- package/types/advanced/WebGPUCompute.d.ts +52 -0
- package/types/advanced/WebXRRenderer.d.ts +77 -0
- package/types/advanced/index.d.ts +46 -0
- package/types/core/ErrorReporter.d.ts +50 -0
- package/types/core/VIB3Engine.d.ts +204 -0
- package/types/creative/ColorPresetsSystem.d.ts +91 -0
- package/types/creative/ParameterTimeline.d.ts +74 -0
- package/types/creative/PostProcessingPipeline.d.ts +109 -0
- package/types/creative/TransitionAnimator.d.ts +71 -0
- package/types/creative/index.d.ts +35 -0
- package/types/integrations/FigmaPlugin.d.ts +46 -0
- package/types/integrations/OBSMode.d.ts +74 -0
- package/types/integrations/ThreeJsPackage.d.ts +62 -0
- package/types/integrations/TouchDesignerExport.d.ts +36 -0
- package/types/integrations/Vib3React.d.ts +74 -0
- package/types/integrations/Vib3Svelte.d.ts +63 -0
- package/types/integrations/Vib3Vue.d.ts +55 -0
- package/types/integrations/index.d.ts +52 -0
- package/types/reactivity/SpatialInputSystem.d.ts +173 -0
- package/types/reactivity/index.d.ts +394 -0
- package/types/render/CommandBuffer.d.ts +169 -0
- package/types/render/RenderCommand.d.ts +312 -0
- package/types/render/RenderState.d.ts +279 -0
- package/types/render/RenderTarget.d.ts +254 -0
- package/types/render/ShaderProgram.d.ts +277 -0
- package/types/render/UnifiedRenderBridge.d.ts +143 -0
- package/types/render/WebGLBackend.d.ts +168 -0
- package/types/render/WebGPUBackend.d.ts +186 -0
- package/types/render/index.d.ts +141 -0
|
@@ -0,0 +1,636 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* VIB3+ Engine - Unified Visualization System
|
|
3
|
+
* Coordinates Quantum, Faceted, and Holographic systems
|
|
4
|
+
* Supports 24 geometries per system with full 6D rotation
|
|
5
|
+
*
|
|
6
|
+
* Backend selection: Faceted supports WebGL/WebGPU via UnifiedRenderBridge.
|
|
7
|
+
* Quantum and Holographic use direct WebGL (5-layer canvas architecture).
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
import { ParameterManager } from './Parameters.js';
|
|
11
|
+
import { CanvasManager } from './CanvasManager.js';
|
|
12
|
+
import { QuantumEngine } from '../quantum/QuantumEngine.js';
|
|
13
|
+
import { FacetedSystem } from '../faceted/FacetedSystem.js';
|
|
14
|
+
import { RealHolographicSystem } from '../holograms/RealHolographicSystem.js';
|
|
15
|
+
import { ReactivityManager } from '../reactivity/ReactivityManager.js';
|
|
16
|
+
import { ReactivityConfig } from '../reactivity/ReactivityConfig.js';
|
|
17
|
+
import { SpatialInputSystem } from '../reactivity/SpatialInputSystem.js';
|
|
18
|
+
|
|
19
|
+
export class VIB3Engine {
|
|
20
|
+
/**
|
|
21
|
+
* @param {object} [options]
|
|
22
|
+
* @param {boolean} [options.preferWebGPU=true] - Prefer WebGPU with WebGL fallback
|
|
23
|
+
* @param {boolean} [options.debug=false] - Enable debug logging
|
|
24
|
+
* @param {object|ReactivityConfig} [options.reactivityConfig] - Initial reactivity config
|
|
25
|
+
*/
|
|
26
|
+
constructor(options = {}) {
|
|
27
|
+
this.activeSystem = null; // Only one system active at a time
|
|
28
|
+
this.currentSystemName = 'quantum';
|
|
29
|
+
this.parameters = new ParameterManager();
|
|
30
|
+
this.initialized = false;
|
|
31
|
+
this.canvasManager = null;
|
|
32
|
+
|
|
33
|
+
/** @type {boolean} Whether to prefer WebGPU (default: true, falls back to WebGL) */
|
|
34
|
+
this.preferWebGPU = options.preferWebGPU !== false;
|
|
35
|
+
|
|
36
|
+
/** @type {boolean} Debug mode */
|
|
37
|
+
this.debug = options.debug || false;
|
|
38
|
+
|
|
39
|
+
/** @type {ReactivityManager} Reactivity system for audio/tilt/interaction */
|
|
40
|
+
this.reactivity = new ReactivityManager((name, value) => {
|
|
41
|
+
this.parameters.setParameter(name, value);
|
|
42
|
+
this.updateCurrentSystemParameters();
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
/** @type {SpatialInputSystem} Universal spatial input (evolved tilt/perspective/gamepad) */
|
|
46
|
+
this.spatialInput = new SpatialInputSystem({
|
|
47
|
+
sensitivity: options.spatialSensitivity || 1.0,
|
|
48
|
+
smoothing: options.spatialSmoothing || 0.15,
|
|
49
|
+
onParameterUpdate: (name, value) => {
|
|
50
|
+
this.parameters.setParameter(name, value);
|
|
51
|
+
this.updateCurrentSystemParameters();
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
// Load initial reactivity config if provided
|
|
56
|
+
if (options.reactivityConfig) {
|
|
57
|
+
this.reactivity.loadConfig(options.reactivityConfig);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
// Load initial spatial profile if provided
|
|
61
|
+
if (options.spatialProfile) {
|
|
62
|
+
this.spatialInput.loadProfile(options.spatialProfile);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Initialize the VIB3+ engine
|
|
68
|
+
*/
|
|
69
|
+
async initialize(containerId = 'vib3-container') {
|
|
70
|
+
console.log('Initializing VIB3+ Engine');
|
|
71
|
+
|
|
72
|
+
// Create CanvasManager
|
|
73
|
+
try {
|
|
74
|
+
this.canvasManager = new CanvasManager(containerId);
|
|
75
|
+
} catch (error) {
|
|
76
|
+
console.error('CanvasManager initialization failed:', error);
|
|
77
|
+
return false;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
// Initialize starting system
|
|
81
|
+
await this.switchSystem(this.currentSystemName);
|
|
82
|
+
|
|
83
|
+
// Sync base parameters to reactivity manager
|
|
84
|
+
this.reactivity.setBaseParameters(this.parameters.getAllParameters());
|
|
85
|
+
|
|
86
|
+
this.initialized = true;
|
|
87
|
+
console.log('VIB3+ Engine initialized');
|
|
88
|
+
return true;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* Create and initialize a specific system
|
|
93
|
+
* CRITICAL: Engines find canvases by ID in DOM, not passed as parameters!
|
|
94
|
+
*/
|
|
95
|
+
async createSystem(systemName) {
|
|
96
|
+
console.log(`Creating ${systemName} system...`);
|
|
97
|
+
|
|
98
|
+
// Create canvases with correct IDs in DOM
|
|
99
|
+
const canvasIds = this.canvasManager.createSystemCanvases(systemName);
|
|
100
|
+
|
|
101
|
+
let system = null;
|
|
102
|
+
try {
|
|
103
|
+
switch (systemName) {
|
|
104
|
+
case 'quantum':
|
|
105
|
+
system = new QuantumEngine();
|
|
106
|
+
if (this.preferWebGPU) {
|
|
107
|
+
try {
|
|
108
|
+
const bridgeOk = await system.initWithBridge({
|
|
109
|
+
preferWebGPU: true,
|
|
110
|
+
debug: this.debug
|
|
111
|
+
});
|
|
112
|
+
if (bridgeOk) {
|
|
113
|
+
console.log('Quantum: WebGPU bridge active');
|
|
114
|
+
break;
|
|
115
|
+
}
|
|
116
|
+
} catch (_e) { /* fall through */ }
|
|
117
|
+
console.warn('Quantum: WebGPU bridge failed, falling back to WebGL');
|
|
118
|
+
system = new QuantumEngine();
|
|
119
|
+
}
|
|
120
|
+
break;
|
|
121
|
+
|
|
122
|
+
case 'faceted':
|
|
123
|
+
system = new FacetedSystem();
|
|
124
|
+
if (this.preferWebGPU) {
|
|
125
|
+
const canvas = document.getElementById('content-canvas');
|
|
126
|
+
if (canvas) {
|
|
127
|
+
try {
|
|
128
|
+
const bridgeOk = await system.initWithBridge(canvas, {
|
|
129
|
+
preferWebGPU: true,
|
|
130
|
+
debug: this.debug
|
|
131
|
+
});
|
|
132
|
+
if (bridgeOk) {
|
|
133
|
+
console.log('Faceted: WebGPU bridge active');
|
|
134
|
+
break;
|
|
135
|
+
}
|
|
136
|
+
} catch (_e) { /* fall through */ }
|
|
137
|
+
console.warn('Faceted: WebGPU bridge failed, falling back to WebGL');
|
|
138
|
+
system = new FacetedSystem();
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
const facetedSuccess = system.initialize();
|
|
143
|
+
if (!facetedSuccess) {
|
|
144
|
+
throw new Error('Faceted system initialization failed');
|
|
145
|
+
}
|
|
146
|
+
break;
|
|
147
|
+
|
|
148
|
+
case 'holographic':
|
|
149
|
+
system = new RealHolographicSystem();
|
|
150
|
+
if (this.preferWebGPU) {
|
|
151
|
+
try {
|
|
152
|
+
const bridgeOk = await system.initWithBridge({
|
|
153
|
+
preferWebGPU: true,
|
|
154
|
+
debug: this.debug
|
|
155
|
+
});
|
|
156
|
+
if (bridgeOk) {
|
|
157
|
+
console.log('Holographic: WebGPU bridge active');
|
|
158
|
+
break;
|
|
159
|
+
}
|
|
160
|
+
} catch (_e) { /* fall through */ }
|
|
161
|
+
console.warn('Holographic: WebGPU bridge failed, falling back to WebGL');
|
|
162
|
+
system = new RealHolographicSystem();
|
|
163
|
+
}
|
|
164
|
+
break;
|
|
165
|
+
|
|
166
|
+
default:
|
|
167
|
+
throw new Error(`Unknown system: ${systemName}`);
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
// Register WebGL contexts with CanvasManager for cleanup
|
|
171
|
+
canvasIds.forEach(canvasId => {
|
|
172
|
+
const canvas = document.getElementById(canvasId);
|
|
173
|
+
if (canvas) {
|
|
174
|
+
const gl = canvas.getContext('webgl') || canvas.getContext('webgl2');
|
|
175
|
+
if (gl) {
|
|
176
|
+
this.canvasManager.registerContext(canvasId, gl);
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
});
|
|
180
|
+
|
|
181
|
+
// Apply current parameters
|
|
182
|
+
system.updateParameters(this.parameters.getAllParameters());
|
|
183
|
+
system.setActive(true);
|
|
184
|
+
|
|
185
|
+
console.log(`${systemName} system created and activated`);
|
|
186
|
+
return system;
|
|
187
|
+
|
|
188
|
+
} catch (error) {
|
|
189
|
+
console.error(`${systemName} system creation failed:`, error);
|
|
190
|
+
throw error;
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
/**
|
|
195
|
+
* Switch between visualization systems
|
|
196
|
+
* DESTROYS old system and CREATES new system (proper WebGL cleanup)
|
|
197
|
+
*/
|
|
198
|
+
async switchSystem(systemName) {
|
|
199
|
+
if (!['quantum', 'faceted', 'holographic'].includes(systemName)) {
|
|
200
|
+
console.error('Unknown system:', systemName);
|
|
201
|
+
return false;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
console.log(`Switching from ${this.currentSystemName} to ${systemName}`);
|
|
205
|
+
|
|
206
|
+
// Destroy active system if exists
|
|
207
|
+
if (this.activeSystem) {
|
|
208
|
+
if (this.activeSystem.setActive) {
|
|
209
|
+
this.activeSystem.setActive(false);
|
|
210
|
+
}
|
|
211
|
+
if (this.activeSystem.destroy) {
|
|
212
|
+
this.activeSystem.destroy();
|
|
213
|
+
}
|
|
214
|
+
this.activeSystem = null;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
// Create and initialize new system
|
|
218
|
+
try {
|
|
219
|
+
this.activeSystem = await this.createSystem(systemName);
|
|
220
|
+
this.currentSystemName = systemName;
|
|
221
|
+
console.log(`Switched to ${systemName} system`);
|
|
222
|
+
return true;
|
|
223
|
+
} catch (error) {
|
|
224
|
+
console.error(`Failed to switch to ${systemName}:`, error);
|
|
225
|
+
return false;
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
/**
|
|
230
|
+
* Get the active backend type for the current system
|
|
231
|
+
* @returns {'webgl'|'webgpu'|'direct-webgl'|null}
|
|
232
|
+
*/
|
|
233
|
+
getActiveBackendType() {
|
|
234
|
+
if (this.activeSystem && this.activeSystem.getBackendType) {
|
|
235
|
+
return this.activeSystem.getBackendType();
|
|
236
|
+
}
|
|
237
|
+
return null;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
/**
|
|
241
|
+
* Update parameters for active system
|
|
242
|
+
*/
|
|
243
|
+
updateCurrentSystemParameters() {
|
|
244
|
+
const params = this.parameters.getAllParameters();
|
|
245
|
+
|
|
246
|
+
if (this.activeSystem && this.activeSystem.updateParameters) {
|
|
247
|
+
this.activeSystem.updateParameters(params);
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
/**
|
|
252
|
+
* Update a single parameter
|
|
253
|
+
*/
|
|
254
|
+
setParameter(name, value) {
|
|
255
|
+
this.parameters.setParameter(name, value);
|
|
256
|
+
this.reactivity.setBaseParameter(name, value);
|
|
257
|
+
this.updateCurrentSystemParameters();
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
/**
|
|
261
|
+
* Update multiple parameters
|
|
262
|
+
*/
|
|
263
|
+
setParameters(params) {
|
|
264
|
+
this.parameters.setParameters(params);
|
|
265
|
+
this.reactivity.setBaseParameters(params);
|
|
266
|
+
this.updateCurrentSystemParameters();
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
/**
|
|
270
|
+
* Get current parameter value
|
|
271
|
+
*/
|
|
272
|
+
getParameter(name) {
|
|
273
|
+
return this.parameters.getParameter(name);
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
/**
|
|
277
|
+
* Get all parameters
|
|
278
|
+
*/
|
|
279
|
+
getAllParameters() {
|
|
280
|
+
return this.parameters.getAllParameters();
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
/**
|
|
284
|
+
* Randomize all parameters
|
|
285
|
+
*/
|
|
286
|
+
randomizeAll() {
|
|
287
|
+
this.parameters.randomizeAll();
|
|
288
|
+
this.updateCurrentSystemParameters();
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
/**
|
|
292
|
+
* Reset to defaults
|
|
293
|
+
*/
|
|
294
|
+
resetAll() {
|
|
295
|
+
this.parameters.resetToDefaults();
|
|
296
|
+
this.updateCurrentSystemParameters();
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
/**
|
|
300
|
+
* Get current system name
|
|
301
|
+
*/
|
|
302
|
+
getCurrentSystem() {
|
|
303
|
+
return this.currentSystemName;
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
/**
|
|
307
|
+
* Get active system instance
|
|
308
|
+
*/
|
|
309
|
+
getActiveSystemInstance() {
|
|
310
|
+
return this.activeSystem;
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
// ========================================================================
|
|
314
|
+
// Reactivity
|
|
315
|
+
// ========================================================================
|
|
316
|
+
|
|
317
|
+
/**
|
|
318
|
+
* Get the ReactivityManager instance
|
|
319
|
+
* @returns {ReactivityManager}
|
|
320
|
+
*/
|
|
321
|
+
getReactivityManager() {
|
|
322
|
+
return this.reactivity;
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
/**
|
|
326
|
+
* Load a reactivity configuration
|
|
327
|
+
* @param {object|ReactivityConfig} config
|
|
328
|
+
* @returns {{ valid: boolean, errors: string[] }}
|
|
329
|
+
*/
|
|
330
|
+
loadReactivityConfig(config) {
|
|
331
|
+
return this.reactivity.loadConfig(config);
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
/**
|
|
335
|
+
* Get current reactivity configuration
|
|
336
|
+
* @returns {object}
|
|
337
|
+
*/
|
|
338
|
+
getReactivityConfig() {
|
|
339
|
+
return this.reactivity.getConfig();
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
/**
|
|
343
|
+
* Start reactivity processing (audio/tilt/interaction)
|
|
344
|
+
*/
|
|
345
|
+
startReactivity() {
|
|
346
|
+
this.reactivity.setBaseParameters(this.parameters.getAllParameters());
|
|
347
|
+
this.reactivity.start();
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
/**
|
|
351
|
+
* Stop reactivity processing
|
|
352
|
+
*/
|
|
353
|
+
stopReactivity() {
|
|
354
|
+
this.reactivity.stop();
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
/**
|
|
358
|
+
* Check if reactivity is active
|
|
359
|
+
* @returns {boolean}
|
|
360
|
+
*/
|
|
361
|
+
isReactivityActive() {
|
|
362
|
+
return this.reactivity.isActive;
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
/**
|
|
366
|
+
* Feed audio data into the reactivity system
|
|
367
|
+
* @param {number} bass - Bass level 0-1
|
|
368
|
+
* @param {number} mid - Mid level 0-1
|
|
369
|
+
* @param {number} high - High level 0-1
|
|
370
|
+
* @param {number} [energy] - Overall energy (computed if omitted)
|
|
371
|
+
*/
|
|
372
|
+
setAudioInput(bass, mid, high, energy) {
|
|
373
|
+
this.reactivity.setAudioInput(bass, mid, high, energy);
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
/**
|
|
377
|
+
* Feed device tilt data into the reactivity system
|
|
378
|
+
* @param {number} alpha - Z-axis rotation (0-360)
|
|
379
|
+
* @param {number} beta - X-axis rotation (-180 to 180)
|
|
380
|
+
* @param {number} gamma - Y-axis rotation (-90 to 90)
|
|
381
|
+
*/
|
|
382
|
+
setTiltInput(alpha, beta, gamma) {
|
|
383
|
+
this.reactivity.setTiltInput(alpha, beta, gamma);
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
/**
|
|
387
|
+
* Feed mouse position into the reactivity system
|
|
388
|
+
* @param {number} x - Normalized X (0-1)
|
|
389
|
+
* @param {number} y - Normalized Y (0-1)
|
|
390
|
+
* @param {number} [velocityX=0]
|
|
391
|
+
* @param {number} [velocityY=0]
|
|
392
|
+
*/
|
|
393
|
+
setMouseInput(x, y, velocityX = 0, velocityY = 0) {
|
|
394
|
+
this.reactivity.setMouseInput(x, y, velocityX, velocityY);
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
/**
|
|
398
|
+
* Trigger a click event in the reactivity system
|
|
399
|
+
* @param {number} [intensity=1.0]
|
|
400
|
+
*/
|
|
401
|
+
triggerClick(intensity = 1.0) {
|
|
402
|
+
this.reactivity.triggerClick(intensity);
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
/**
|
|
406
|
+
* Feed scroll delta into the reactivity system
|
|
407
|
+
* @param {number} delta
|
|
408
|
+
*/
|
|
409
|
+
setScrollDelta(delta) {
|
|
410
|
+
this.reactivity.setScrollDelta(delta);
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
/**
|
|
414
|
+
* Feed touch data into the reactivity system
|
|
415
|
+
* @param {Touch[]} touches
|
|
416
|
+
* @param {number} [pinchScale=1]
|
|
417
|
+
* @param {number} [rotation=0]
|
|
418
|
+
*/
|
|
419
|
+
setTouchInput(touches, pinchScale = 1, rotation = 0) {
|
|
420
|
+
this.reactivity.setTouchInput(touches, pinchScale, rotation);
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
// ========================================================================
|
|
424
|
+
// Spatial Input System
|
|
425
|
+
// ========================================================================
|
|
426
|
+
|
|
427
|
+
/**
|
|
428
|
+
* Get the SpatialInputSystem instance
|
|
429
|
+
* @returns {SpatialInputSystem}
|
|
430
|
+
*/
|
|
431
|
+
getSpatialInputSystem() {
|
|
432
|
+
return this.spatialInput;
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
/**
|
|
436
|
+
* Enable spatial input with a named profile
|
|
437
|
+
* @param {string} [profile='cardTilt'] - Profile name
|
|
438
|
+
* @returns {boolean}
|
|
439
|
+
*/
|
|
440
|
+
enableSpatialInput(profile = 'cardTilt') {
|
|
441
|
+
this.spatialInput.loadProfile(profile);
|
|
442
|
+
this.spatialInput.enable();
|
|
443
|
+
return true;
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
/**
|
|
447
|
+
* Disable spatial input
|
|
448
|
+
*/
|
|
449
|
+
disableSpatialInput() {
|
|
450
|
+
this.spatialInput.disable();
|
|
451
|
+
}
|
|
452
|
+
|
|
453
|
+
/**
|
|
454
|
+
* Switch spatial input profile
|
|
455
|
+
* @param {string} profile - Profile name
|
|
456
|
+
*/
|
|
457
|
+
setSpatialProfile(profile) {
|
|
458
|
+
this.spatialInput.loadProfile(profile);
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
/**
|
|
462
|
+
* Feed external spatial data (for programmatic/API use)
|
|
463
|
+
* @param {object} data - Spatial state data {pitch, yaw, roll, x, y, z}
|
|
464
|
+
*/
|
|
465
|
+
feedSpatialInput(data) {
|
|
466
|
+
this.spatialInput.feedInput('programmatic', data);
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
/**
|
|
470
|
+
* Set spatial input sensitivity
|
|
471
|
+
* @param {number} value - 0.1 to 5.0
|
|
472
|
+
*/
|
|
473
|
+
setSpatialSensitivity(value) {
|
|
474
|
+
this.spatialInput.setSensitivity(value);
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
/**
|
|
478
|
+
* Toggle dramatic spatial mode (8x amplification)
|
|
479
|
+
* @param {boolean} enabled
|
|
480
|
+
*/
|
|
481
|
+
setSpatialDramaticMode(enabled) {
|
|
482
|
+
this.spatialInput.setDramaticMode(enabled);
|
|
483
|
+
}
|
|
484
|
+
|
|
485
|
+
// ========================================================================
|
|
486
|
+
// Geometry
|
|
487
|
+
// ========================================================================
|
|
488
|
+
|
|
489
|
+
/**
|
|
490
|
+
* Get geometry names for current system
|
|
491
|
+
*/
|
|
492
|
+
getGeometryNames() {
|
|
493
|
+
return [
|
|
494
|
+
// Base geometries (0-7)
|
|
495
|
+
'Tetrahedron',
|
|
496
|
+
'Hypercube',
|
|
497
|
+
'Sphere',
|
|
498
|
+
'Torus',
|
|
499
|
+
'Klein Bottle',
|
|
500
|
+
'Fractal',
|
|
501
|
+
'Wave',
|
|
502
|
+
'Crystal',
|
|
503
|
+
// Hypersphere Core (8-15)
|
|
504
|
+
'Hypersphere Core (Tetrahedron)',
|
|
505
|
+
'Hypersphere Core (Hypercube)',
|
|
506
|
+
'Hypersphere Core (Sphere)',
|
|
507
|
+
'Hypersphere Core (Torus)',
|
|
508
|
+
'Hypersphere Core (Klein)',
|
|
509
|
+
'Hypersphere Core (Fractal)',
|
|
510
|
+
'Hypersphere Core (Wave)',
|
|
511
|
+
'Hypersphere Core (Crystal)',
|
|
512
|
+
// Hypertetrahedron Core (16-23)
|
|
513
|
+
'Hypertetrahedron Core (Tetrahedron)',
|
|
514
|
+
'Hypertetrahedron Core (Hypercube)',
|
|
515
|
+
'Hypertetrahedron Core (Sphere)',
|
|
516
|
+
'Hypertetrahedron Core (Torus)',
|
|
517
|
+
'Hypertetrahedron Core (Klein)',
|
|
518
|
+
'Hypertetrahedron Core (Fractal)',
|
|
519
|
+
'Hypertetrahedron Core (Wave)',
|
|
520
|
+
'Hypertetrahedron Core (Crystal)'
|
|
521
|
+
];
|
|
522
|
+
}
|
|
523
|
+
|
|
524
|
+
/**
|
|
525
|
+
* Export current state
|
|
526
|
+
*/
|
|
527
|
+
exportState() {
|
|
528
|
+
return {
|
|
529
|
+
system: this.currentSystemName,
|
|
530
|
+
parameters: this.parameters.getAllParameters(),
|
|
531
|
+
reactivity: this.reactivity.getConfig(),
|
|
532
|
+
reactivityActive: this.reactivity.isActive,
|
|
533
|
+
spatialInput: this.spatialInput.exportConfig(),
|
|
534
|
+
spatialActive: this.spatialInput.enabled,
|
|
535
|
+
backend: this.getActiveBackendType(),
|
|
536
|
+
timestamp: new Date().toISOString(),
|
|
537
|
+
version: '1.2.0'
|
|
538
|
+
};
|
|
539
|
+
}
|
|
540
|
+
|
|
541
|
+
/**
|
|
542
|
+
* Import state
|
|
543
|
+
*/
|
|
544
|
+
async importState(state) {
|
|
545
|
+
if (!state || typeof state !== 'object') {
|
|
546
|
+
console.warn('VIB3Engine: importState received invalid state');
|
|
547
|
+
return;
|
|
548
|
+
}
|
|
549
|
+
|
|
550
|
+
// Size guard: reject excessively large state objects (> 256 KB serialized)
|
|
551
|
+
try {
|
|
552
|
+
const serialized = JSON.stringify(state);
|
|
553
|
+
if (serialized.length > 256 * 1024) {
|
|
554
|
+
console.warn('VIB3Engine: importState rejected — state exceeds 256 KB');
|
|
555
|
+
return;
|
|
556
|
+
}
|
|
557
|
+
} catch {
|
|
558
|
+
console.warn('VIB3Engine: importState received non-serializable state');
|
|
559
|
+
return;
|
|
560
|
+
}
|
|
561
|
+
|
|
562
|
+
// Depth guard: reject deeply nested objects (max depth 6)
|
|
563
|
+
const maxDepth = (obj, depth = 0) => {
|
|
564
|
+
if (depth > 6) return depth;
|
|
565
|
+
if (!obj || typeof obj !== 'object') return depth;
|
|
566
|
+
let max = depth;
|
|
567
|
+
for (const v of Object.values(obj)) {
|
|
568
|
+
max = Math.max(max, maxDepth(v, depth + 1));
|
|
569
|
+
if (max > 6) return max;
|
|
570
|
+
}
|
|
571
|
+
return max;
|
|
572
|
+
};
|
|
573
|
+
if (maxDepth(state) > 6) {
|
|
574
|
+
console.warn('VIB3Engine: importState rejected — state nesting exceeds depth 6');
|
|
575
|
+
return;
|
|
576
|
+
}
|
|
577
|
+
|
|
578
|
+
if (state.system && typeof state.system === 'string') {
|
|
579
|
+
await this.switchSystem(state.system);
|
|
580
|
+
}
|
|
581
|
+
if (state.parameters && typeof state.parameters === 'object' && !Array.isArray(state.parameters)) {
|
|
582
|
+
// Only allow known parameter keys through
|
|
583
|
+
const safeParams = {};
|
|
584
|
+
for (const [key, value] of Object.entries(state.parameters)) {
|
|
585
|
+
if (typeof value === 'number' && Number.isFinite(value)) {
|
|
586
|
+
safeParams[key] = value;
|
|
587
|
+
}
|
|
588
|
+
}
|
|
589
|
+
this.parameters.setParameters(safeParams);
|
|
590
|
+
this.reactivity.setBaseParameters(safeParams);
|
|
591
|
+
this.updateCurrentSystemParameters();
|
|
592
|
+
}
|
|
593
|
+
if (state.reactivity && typeof state.reactivity === 'object' && !Array.isArray(state.reactivity)) {
|
|
594
|
+
this.reactivity.loadConfig(state.reactivity);
|
|
595
|
+
}
|
|
596
|
+
if (state.reactivityActive) {
|
|
597
|
+
this.startReactivity();
|
|
598
|
+
}
|
|
599
|
+
if (state.spatialInput && typeof state.spatialInput === 'object') {
|
|
600
|
+
this.spatialInput.importConfig(state.spatialInput);
|
|
601
|
+
}
|
|
602
|
+
if (state.spatialActive) {
|
|
603
|
+
this.spatialInput.enable();
|
|
604
|
+
}
|
|
605
|
+
}
|
|
606
|
+
|
|
607
|
+
/**
|
|
608
|
+
* Destroy engine and clean up
|
|
609
|
+
*/
|
|
610
|
+
destroy() {
|
|
611
|
+
// Stop and destroy spatial input
|
|
612
|
+
if (this.spatialInput) {
|
|
613
|
+
this.spatialInput.destroy();
|
|
614
|
+
}
|
|
615
|
+
|
|
616
|
+
// Stop and destroy reactivity
|
|
617
|
+
if (this.reactivity) {
|
|
618
|
+
this.reactivity.destroy();
|
|
619
|
+
}
|
|
620
|
+
|
|
621
|
+
// Destroy active system
|
|
622
|
+
if (this.activeSystem && this.activeSystem.destroy) {
|
|
623
|
+
this.activeSystem.destroy();
|
|
624
|
+
}
|
|
625
|
+
this.activeSystem = null;
|
|
626
|
+
|
|
627
|
+
// Destroy canvas manager
|
|
628
|
+
if (this.canvasManager) {
|
|
629
|
+
this.canvasManager.destroy();
|
|
630
|
+
}
|
|
631
|
+
this.canvasManager = null;
|
|
632
|
+
|
|
633
|
+
this.initialized = false;
|
|
634
|
+
console.log('VIB3+ Engine destroyed');
|
|
635
|
+
}
|
|
636
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { RendererContract } from '../RendererContracts.js';
|
|
2
|
+
import { FacetedSystem } from '../../faceted/FacetedSystem.js';
|
|
3
|
+
|
|
4
|
+
export class FacetedRendererAdapter extends RendererContract {
|
|
5
|
+
constructor(system = new FacetedSystem()) {
|
|
6
|
+
super();
|
|
7
|
+
this.system = system;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
init(context = {}) {
|
|
11
|
+
const initialized = this.system.initialize(context.canvas ?? null);
|
|
12
|
+
if (!initialized) {
|
|
13
|
+
throw new Error('Faceted renderer failed to initialize.');
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
resize() {
|
|
18
|
+
this.system.setupCanvasSize();
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
render() {
|
|
22
|
+
this.system.renderFrame();
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
setActive(active) {
|
|
26
|
+
this.system.setActive(active);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
dispose() {
|
|
30
|
+
this.system.stop();
|
|
31
|
+
}
|
|
32
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { RendererContract } from '../RendererContracts.js';
|
|
2
|
+
import { HolographicSystem } from '../../holograms/HolographicSystem.js';
|
|
3
|
+
|
|
4
|
+
export class HolographicRendererAdapter extends RendererContract {
|
|
5
|
+
constructor(system = new HolographicSystem({ autoStart: false })) {
|
|
6
|
+
super();
|
|
7
|
+
this.system = system;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
init() {
|
|
11
|
+
return true;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
resize() {
|
|
15
|
+
// Visualizers handle their own resizing.
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
render() {
|
|
19
|
+
this.system.renderFrame();
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
setActive(active) {
|
|
23
|
+
this.system.setActive(active);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
dispose() {
|
|
27
|
+
this.system.setActive(false);
|
|
28
|
+
}
|
|
29
|
+
}
|