Safari Version 7.0.3. It also happens on Chrome for me.
I tracked the issue to this line.
// Canvas event setup
var canvas = Module['canvas'];
Adding the following code directly below it fixes the issue.
if(!canvas)
{
canvas = document.createElement("canvas");
Module['canvas'] = canvas;
}
Is this a bug? Is it possible to disable this bit of code with a compiler
flag? My code just does some computations. I don't need a main loop for
graphics drawing.
On Thursday, April 24, 2014 3:41:13 PM UTC-5, Alon Zakai wrote:
>
> Which browser is this on? (Older ones might not have requestPointerLock I
> suppose?)
>
> - Alon
>
>
>
> On Wed, Apr 23, 2014 at 9:58 PM, <[email protected] <javascript:>>wrote:
>
>> Thanks for your response! This is really an amazing project.
>>
>>
>> I tried --preload-file but it's not working for me. It creates the .data
>> file but it's not being loaded. I get this error in the console.
>>
>> TypeError: 'undefined' is not an object (evaluating
>> 'canvas['requestPointerLock']')
>>
>>
>> I also cannot get relative paths to work with --embed-file or
>> --preload-file. If I do something like --preload-file ../Folder/File.txt it
>> doesn't create a .data file.
>>
>>
>> It would be great to have an option to embed as a string. The only
>> escaped character in my text file is the newline character.
>>
>> On Wednesday, April 23, 2014 9:57:11 PM UTC-5, Alon Zakai wrote:
>>
>>> --preload-file will save it as a binary file on the side, which is more
>>> optimal.
>>>
>>> We can't use a string in embed-file because not all characters can be
>>> represented that way without escaping, which i'm not sure how hard would be
>>> to implement. In any case, --preload-file is the recommended approach.
>>>
>>> - Alon
>>>
>>>
>>>
>>> On Wed, Apr 23, 2014 at 5:21 PM, <[email protected]> wrote:
>>>
>>>> I'm using the --embed-file option to embed a 300KB text file but it's
>>>> adding an additional 1.4MB to my Javascript file. Is it possible to
>>>> have it embedded as a string? After looking at the code produced it's
>>>> storing the text file as an array of numbers which also significantly
>>>> increases build time if I use the --closure option too.
>>>>
>>>> --
>>>> You received this message because you are subscribed to the Google
>>>> Groups "emscripten-discuss" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>> an email to [email protected].
>>>> For more options, visit https://groups.google.com/d/optout.
>>>>
>>>
>>> --
>> You received this message because you are subscribed to the Google Groups
>> "emscripten-discuss" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected] <javascript:>.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
--
You received this message because you are subscribed to the Google Groups
"emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.