Module @xeokit/webglrenderer - v0.1.0

npm version

xeokit WebGL2 Renderer


Configures a xeokit Viewer to use WebGL2 for graphics


  • Plug a WebGLRenderer into a Viewer to use WebGL for model storage and rendering
  • Compact texture-based model representation
  • Fast full-precision rendering of large models
  • Physically-based materials
  • Multi-canvas
  • Basis-compressed textures
  • Compressed geometry

Installation

npm install @xeokit/webglrenderer

Usage

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
})
})
});

//...

@xeokit/webglrenderer

Index

Classes

Functions