npm install @xeokit/webglrenderer Copy
npm install @xeokit/webglrenderer
Configuring a Viewer with a WebGLRenderer to use the browser's WebGL graphics API for storing and rendering models:
import {Scene} from "@xeokit/scene";import {Viewer} from "@xeokit/viewer";import {WebGLRenderer} from "@xeokit/webglrenderer";const myViewer = new Viewer({ id: "myViewer", scene: new Scene(), renderers: new WebGLRenderer({ // Mandatory textureTranscoder: new KTX2TextureTranscoder({ // Optional transcoderPath: "./../dist/basis/" // <------ Path to BasisU transcoder module }) })});//... Copy
import {Scene} from "@xeokit/scene";import {Viewer} from "@xeokit/viewer";import {WebGLRenderer} from "@xeokit/webglrenderer";const myViewer = new Viewer({ id: "myViewer", scene: new Scene(), renderers: new WebGLRenderer({ // Mandatory textureTranscoder: new KTX2TextureTranscoder({ // Optional transcoderPath: "./../dist/basis/" // <------ Path to BasisU transcoder module }) })});//...
xeokit WebGL2 Renderer
Configures a xeokit Viewer to use WebGL2 for graphics
Installation
Usage
Configuring a Viewer with a WebGLRenderer to use the browser's WebGL graphics API for storing and rendering models: