doc: add more information about webgl problems
This commit is contained in:
parent
5a03fafd1c
commit
b144aafcb3
|
@ -33,6 +33,13 @@ npm run dev
|
|||
|
||||
### Known issues
|
||||
|
||||
#### Canvas
|
||||
When `preserveDrawingBuffer` is set to false, we save 1x1 empty image because problems with access to drawing buffer.
|
||||
see [https://stackoverflow.com/a/27747016](https://stackoverflow.com/a/27747016)
|
||||
```
|
||||
can.getContext("webgl2", { preserveDrawingBuffer: true })
|
||||
```
|
||||
|
||||
#### Shadow root
|
||||
Open shadow root is not always displayed or parsed correctly - but at least it matches mht quality or sometimes it's better.
|
||||
Saving fragment / adding pin to shadow root is not working right now.
|
||||
|
|
|
@ -68,7 +68,9 @@ export class HtmlFactory {
|
|||
const gl = render.ctx as WebGLRenderingContext;
|
||||
if (gl.getContextAttributes()?.preserveDrawingBuffer) {
|
||||
imgData = ref.toDataURL('image/png', 80);
|
||||
fnConsoleLog('HtmlFactory->computeCanvas->preserveDrawingBuffer', true);
|
||||
} else {
|
||||
fnConsoleLog('HtmlFactory->computeCanvas->preserveDrawingBuffer', false);
|
||||
/* TODO capture webgl texture without preserveDrawingBuffer
|
||||
const texture = gl.createTexture();
|
||||
gl.bindTexture(gl.TEXTURE_2D, texture);
|
||||
|
|
|
@ -64,6 +64,10 @@ export class SyncGatherChangesCommand implements ICommand<Promise<ServerChangeDt
|
|||
|
||||
const comments = this.commentChanges(pageObj.comments.data);
|
||||
changes.push(...comments);
|
||||
if (!pageObj.draw.data) {
|
||||
pageObj.draw = { data: [] };
|
||||
await BrowserStorageWrapper.set(`${ObjectStoreKeys.OBJECT_ID}:${this.obj.id}`, this.obj);
|
||||
}
|
||||
const draw = this.drawChanges(pageObj.draw.data);
|
||||
changes.push(...draw);
|
||||
return changes;
|
||||
|
|
Loading…
Reference in New Issue