Js-visg-m-s | Manual
| Error Code | Message | Likely Cause & Solution | |------------|---------|------------------------| | E-1001 | INVALID_CANVAS_ID | The canvas selector does not exist. Check DOM readiness. | | E-2104 | SHADER_COMPILATION_FAIL | GPU does not support required precision. Fallback to precision lowp float in shader header. | | E-3207 | M-S_BUFFER_OVERRUN | Incoming data rate > 60 updates/sec. Implement throttling or increase maxStreamLag . | | E-4420 | TEXTURE_DIM_MISMATCH | Texture size not power of two (e.g., 513x513). Resize to 512x512. | React Example import useEffect, useRef from 'react'; import SceneManager from 'js-visg-m-s'; function VisualizationPanel( data ) const canvasRef = useRef(null); const sceneRef = useRef(null);
// Import the module (ES6 syntax) import SceneManager, GeometryBuilder, ColorMap from 'js-visg-m-s'; // Step 1: Obtain a canvas element const canvas = document.getElementById('visg-canvas'); js-visg-m-s manual
// Step 3: Create a test geometry (a 64x64 heightfield) const terrain = GeometryBuilder.fromHeightmap( widthSegments: 64, depthSegments: 64, heightAmplitude: 2.5, textureRepeat: 4 ); | Error Code | Message | Likely Cause
console.log('JS-VISG-M-S successfully deployed!'); Fallback to precision lowp float in shader header
| Property | Returns | Description | |----------|---------|-------------| | avgFrameTime | float | Milliseconds per frame (target <16.6ms for 60fps). | | drawCalls | int | Number of WebGL draw commands per frame. | | vramUsage | string | Approximate GPU memory consumption. | The "M-S" in JS-VISG-M-S stands for Multi-Stream Synchronization . This mode is critical when visualizing concurrent data sources (e.g., temperature + pressure + flow rate over the same geometry). Enabling M-S Mode Pass the multistream: true flag during SceneManager instantiation: