Skip to content
Snippets Groups Projects
Commit 520af504 authored by giagitom's avatar giagitom
Browse files

Throw an error if wboit and dpoit are both enabled

parent 4bee1305
No related branches found
No related tags found
No related merge requests found
...@@ -133,6 +133,9 @@ namespace Canvas3DContext { ...@@ -133,6 +133,9 @@ namespace Canvas3DContext {
export function fromCanvas(canvas: HTMLCanvasElement, assetManager: AssetManager, attribs: Partial<Attribs> = {}): Canvas3DContext { export function fromCanvas(canvas: HTMLCanvasElement, assetManager: AssetManager, attribs: Partial<Attribs> = {}): Canvas3DContext {
const a = { ...DefaultAttribs, ...attribs }; const a = { ...DefaultAttribs, ...attribs };
if (a.enableWboit && a.enableDpoit) throw new Error('Multiple transparency methods not allowed.');
const { antialias, preserveDrawingBuffer, pixelScale, preferWebGl1 } = a; const { antialias, preserveDrawingBuffer, pixelScale, preferWebGl1 } = a;
const gl = getGLContext(canvas, { const gl = getGLContext(canvas, {
antialias, antialias,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment