| @@ -38,7 +38,7 @@ canvas.emscripten | |||||
| </head> | </head> | ||||
| <body> | <body> | ||||
| <div class="emscripten_border"> | |||||
| <div class="emscripten_border" id="id_div_embed_data"> | |||||
| <canvas class="emscripten" id="id_cvas_render" oncontextmenu="event.preventDefault()"></canvas> | <canvas class="emscripten" id="id_cvas_render" oncontextmenu="event.preventDefault()"></canvas> | ||||
| </div> | </div> | ||||
| @@ -172,6 +172,7 @@ canvas.emscripten | |||||
| <!-- --> | <!-- --> | ||||
| <script type='text/javascript'> | <script type='text/javascript'> | ||||
| //This call NEEDS TO BE after the .js include, because "cwrap" is set in it. | |||||
| Module.do_wrapup(); | Module.do_wrapup(); | ||||
| //Parent communication datas | //Parent communication datas | ||||
| @@ -142,7 +142,7 @@ canvas.emscripten | |||||
| Module.setStatus('All downloads complete.', 1, 1); | Module.setStatus('All downloads complete.', 1, 1); | ||||
| }, | }, | ||||
| //IMPORTANT : This is the C -> Javascript wraping, add your functions list here. | //IMPORTANT : This is the C -> Javascript wraping, add your functions list here. | ||||
| wrapup_list: [ {src_obj: null, func_name: 'DoSendMessage', c_func_name: 'C_Send', return_var: 'number', args: ['number', 'string'] } ], | |||||
| wrapup_list: [ {src_obj: null, func_name: 'DoSendMessage', c_func_name: 'C_Send', return_var: 'number', args: ['string'] } ], | |||||
| do_wrapup: function() | do_wrapup: function() | ||||
| { | { | ||||
| for (var i = 0; i < this.wrapup_list.length; i++) | for (var i = 0; i < this.wrapup_list.length; i++) | ||||
| @@ -158,7 +158,7 @@ canvas.emscripten | |||||
| //Module <-> Page communication setup | //Module <-> Page communication setup | ||||
| SendMessage:function(message) | SendMessage:function(message) | ||||
| { | { | ||||
| this.DoSendMessage(0, message); | |||||
| this.DoSendMessage(message); | |||||
| }, | }, | ||||
| ModuleSendMessage:function(message) | ModuleSendMessage:function(message) | ||||
| { | { | ||||
| @@ -127,19 +127,19 @@ function machinchose() { return 'test machin '; } | |||||
| function IsUsingNaCl() { return window.chrome; } | function IsUsingNaCl() { return window.chrome; } | ||||
| </script> | </script> | ||||
| <script src="./utils.js"></script> | |||||
| <script src="./progressstatus.js"></script> | |||||
| <script src="./javascript/utils.js"></script> | |||||
| <script src="./javascript/progressstatus.js"></script> | |||||
| <script type="text/javascript"> | <script type="text/javascript"> | ||||
| //Used by typedictionnary.js | //Used by typedictionnary.js | ||||
| function GetCmdDictionnary() { return CodeDictionnary[g_code_id]; } | function GetCmdDictionnary() { return CodeDictionnary[g_code_id]; } | ||||
| g_code_id = 1; | g_code_id = 1; | ||||
| </script> | </script> | ||||
| <script src="./typedictionnary.js"></script> | |||||
| <script src="./javascript/typedictionnary.js"></script> | |||||
| <!-- Init Scene setup dictionnary --> | <!-- Init Scene setup dictionnary --> | ||||
| <script type="text/javascript"> | <script type="text/javascript"> | ||||
| CodeDictionnary[g_code_id--] = new TypeDictionnary("SceneSetup"); | CodeDictionnary[g_code_id--] = new TypeDictionnary("SceneSetup"); | ||||
| </script> | </script> | ||||
| <script src="./scenesetup.js"></script> | |||||
| <script src="./scenesetupdictionnary.js"></script> | |||||
| <!-- Init Easy mesh dictionnary --> | <!-- Init Easy mesh dictionnary --> | ||||
| <script type="text/javascript"> | <script type="text/javascript"> | ||||
| CodeDictionnary[g_code_id] = new TypeDictionnary("EasyMesh"); | CodeDictionnary[g_code_id] = new TypeDictionnary("EasyMesh"); | ||||
| @@ -208,7 +208,7 @@ function machinchose() { return 'test machin '; } | |||||
| //NaCl Specific | //NaCl Specific | ||||
| if (IsUsingNaCl()) | if (IsUsingNaCl()) | ||||
| { | { | ||||
| DynLoadFile("naclloading.js"); | |||||
| DynLoadFile("./javascript/naclloading.js"); | |||||
| g_frame_embed.src = 'meshviewer.nacl.html'; | g_frame_embed.src = 'meshviewer.nacl.html'; | ||||
| } | } | ||||
| else | else | ||||
| @@ -85,19 +85,19 @@ | |||||
| <None Include="easymeshdictionnary.js"> | <None Include="easymeshdictionnary.js"> | ||||
| <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild> | <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild> | ||||
| </None> | </None> | ||||
| <None Include="naclloading.js"> | |||||
| <None Include="scenesetupdictionnary.js"> | |||||
| <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild> | <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild> | ||||
| </None> | </None> | ||||
| <None Include="progressstatus.js"> | |||||
| <None Include="javascript/naclloading.js"> | |||||
| <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild> | <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild> | ||||
| </None> | </None> | ||||
| <None Include="utils.js"> | |||||
| <None Include="javascript/progressstatus.js"> | |||||
| <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild> | <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild> | ||||
| </None> | </None> | ||||
| <None Include="scenesetupdictionnary.js"> | |||||
| <None Include="javascript/utils.js"> | |||||
| <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild> | <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild> | ||||
| </None> | </None> | ||||
| <None Include="typedictionnary.js"> | |||||
| <None Include="javascript/typedictionnary.js"> | |||||
| <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild> | <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild> | ||||
| </None> | </None> | ||||
| </ItemGroup> | </ItemGroup> | ||||