-
-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Nothing drawn on canvas #33
Comments
Can you try wrapping the draw call in a setTimeout on android ? 🤔 |
I did, to no avail |
Do I need to somehow install the native code for android? I ran |
For iOS I sadly cannot test it because: |
@Mwni fixed iOS there was plans to release a new pod but sadly I did not so the package had the wrong version update to let gl;
let canvas;
export function canvasReady(args) {
console.log('canvas ready');
canvas = args.object;
gl = canvas.getContext('webgl'); // 'webgl' || 'webgl2'
gl.viewport(0, 0, gl.drawingBufferWidth, gl.drawingBufferHeight);
// Set the clear color to darkish green.
gl.clearColor(0.0, 0.5, 0.0, 1.0);
// Clear the context with the newly set color. This is
// the function call that actually does the drawing.
gl.clear(gl.COLOR_BUFFER_BIT);
} |
The pod version |
Okay so the gl context drew fine on both platforms ? Then it would be on my end to fix for android also that package version is the npm package not a pod |
Yes, gl worked fine. For 2d context on android, I have not tested it on an actual android device, I will let you know once I have, but I'm assuming it will work there. On a tangent, I did not find where I can specifically fund this development, would it be through the OpenJS foundation? |
You can fund it through github sponsors or opencollective |
@triniwiz For android it working 2d but the canvas is broken layout it look like I draw a circle the result is cicle with broken it look like house tiles |
@HakobiDev can you share a screenshot please |
Can you try updating to the latest |
@triniwiz thanks! I will also check it out. |
Just tried the latest alpha. The rendering is still broken. Noise is now replaced by black squares and it still tiles for some reason rather than displaying drawn image normally. |
@OzymandiasTheGreat real device or emulator ? |
Real device running android 10. My machine doesn't handle the emulator well. |
Please try with the latest , reopen if the issue still persists |
What could be the cause for the canvas remaining blank after calling draw functions? The setup is the core example given in the readme.
ready
event fires and thecanvas
aswell as thectx
of the event are presentThis is on Android emulator, I will try iOS tomorrow.
The text was updated successfully, but these errors were encountered: