|
@@ -50,6 +50,7 @@ function Renderer(container, context) { |
|
|
var globalParams; |
|
|
var globalParams; |
|
|
var sides = ['f', 'b', 'u', 'd', 'l', 'r']; |
|
|
var sides = ['f', 'b', 'u', 'd', 'l', 'r']; |
|
|
var fallbackSides = ['f', 'r', 'b', 'l', 'u', 'd']; |
|
|
var fallbackSides = ['f', 'r', 'b', 'l', 'u', 'd']; |
|
|
|
|
|
var planarBlob; |
|
|
|
|
|
|
|
|
if (context) |
|
|
if (context) |
|
|
gl = context; |
|
|
gl = context; |
|
@@ -986,6 +987,10 @@ function Renderer(container, context) { |
|
|
multiresDraw(!isPreview); |
|
|
multiresDraw(!isPreview); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
canvas.toBlob(function(blob) { |
|
|
|
|
|
planarBlob = blob; |
|
|
|
|
|
}, 'image/jpeg'); |
|
|
|
|
|
|
|
|
if (params.returnImage !== undefined) { |
|
|
if (params.returnImage !== undefined) { |
|
|
if (window.createImageBitmap && params.returnImage == 'ImageBitmap') { |
|
|
if (window.createImageBitmap && params.returnImage == 'ImageBitmap') { |
|
|
return createImageBitmap(canvas); |
|
|
return createImageBitmap(canvas); |
|
@@ -1042,7 +1047,19 @@ function Renderer(container, context) { |
|
|
this.getCanvas = function() { |
|
|
this.getCanvas = function() { |
|
|
return canvas; |
|
|
return canvas; |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* Retrieve renderer's PlanarImg url. |
|
|
|
|
|
* @memberof Renderer |
|
|
|
|
|
* @instance |
|
|
|
|
|
* @returns {HTMLElement} Renderer's PlanarImg url. |
|
|
|
|
|
*/ |
|
|
|
|
|
this.getPlanarImg = function() { |
|
|
|
|
|
if(planarBlob){ |
|
|
|
|
|
return URL.createObjectURL(planarBlob); |
|
|
|
|
|
} |
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* Sorting method for multires nodes. |
|
|
* Sorting method for multires nodes. |
|
|
* @private |
|
|
* @private |
|
|