Ah, thanks for this.
Strangely I did not have to set the readable attribute to true at all - the pixels were already available in the asset image without doing so. Perhaps it is because I'm reading the pixel values directly upon loading, prior to using it as a texture in a 3D scene, so it is still stored as a html Image.
I'm struggling to read meaningful values from an image asset's Image.getPixels() method on the WebGL platform - everything is just set to 0,0,0,0;
The very first line of WebGLImage.getPixels() is
if (frameBuffer == null) return null;
so clearly the frameBuffer has to be set first - this only seems to happen in createTexture() when renderTarget is set to true, and renderTarget is not set to true for preloaded Assets.
Even so, I set renderTarget to true ( I had to change it's access to public ), called createTexure(), then getPixels(), but I still get an array of complete zeros.
Any clues as to how to read the pixles from an image asset?
Are there any tutorials or guides as to how to compile a simple 3D project to Unity3D platform?
I tried 'khamake unity3d', but that just gave unknown platform unity3d error below:
C:\Users\jlewis\Dropbox\facefinding\Kha\projects\Sample8>"C:\Program Files\nodejs\node" Kha/make unity3d
Using Kha from C:\Kha\projects\Sample8\Kha
Creating Kha project.
Exporting asset 1 of 2 (suzanne.obj).
Exporting asset 2 of 2 (uvmap.png).
Compiling shader 1 of 2 (simple.frag.glsl).
Unknown profile unity3d
Is there a way to prevent keystrokes entered into my kha app from passing thru to the browser? I'm thinking particularly of arrow keys - as these can cause the app to be scrolled in the browser.
I tried adding
at the end of kha.SystemImpl.keydown(), which worked, but prevented onKeyPress listeners from working.
From https://github.com/Kode/Kha/wiki/Feature-Matrix I notice that there is no current support for audio on iOS. I appreciate that this is an open source project, but I'm more of a graphics dev, (for web), so not really in much of a position to offer skills in this area.
What is the plan for audio on iOS?
(Sorry for the lack of image for my profile, but the BB back end was giving me errors in uploading a headshot:
Command failed: Unzul�ssiger Parameter - 128x128^