Answer the question
In order to leave comments, you need to log in
How to embed WebGL in the desired canvas?
Good afternoon
There is a full screen effect
https://codepen.io/ko-yelie/pen/oNvWYpw
I can’t figure out how to stick it into my canvas in the place I need
Answer the question
In order to leave comments, you need to log in
No way, the KGL library does not provide for
this.
You can try to make a fork and publish it for yourself (in git or npm), if you're lucky, but the author will accept the pull request quickly.
Or try a tricky trick - replace document.body before initializing Kgl, but this can break something
var origBody = document.body;
document.body = yourTargetParent;
const webgl = new Kgl...
document.body = origBody;
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question