does not work
03 March 2018 20:04
Hi
download this folder and send it to the project folder. Do not you see, it does not work. I edited the walk.Js before.
Salut
téléchargez ce dossier puis envoyez-le dans le dossier projet. Ne voyez vous donc pas, ça ne fonctionne pas. J'ai édité le walk.Js avant.
link
download this folder and send it to the project folder. Do not you see, it does not work. I edited the walk.Js before.
Salut
téléchargez ce dossier puis envoyez-le dans le dossier projet. Ne voyez vous donc pas, ça ne fonctionne pas. J'ai édité le walk.Js avant.
link
04 March 2018 00:11
Here are my modifications:
The fixed project is attached too. It had a syntax error: you can't use export if your js is included to html with script type="text/javascript", There should be type="module". Also, there was brackets not on their places.
diff -rupN walk/walk.html walk1/walk.html
— walk/walk.html 2018-03-03 19:20:06.000000000 +0300
+++ walk1/walk.html 2018-03-03 23:59:02.293882969 +0300
@@ -10,7 +10,7 @@
<link rel="stylesheet" href="walk.css" type="text/css">
-<script type="text/javascript" src="..\..\dist\b4w.js"></script>
+<script type="text/javascript" src="../../dist/b4w.js"></script>
<script type="text/javascript" src="walk.js"></script>
diff -rupN walk/walk.js walk1/walk.js
— walk/walk.js 2018-03-03 19:47:15.000000000 +0300
+++ walk1/walk.js 2018-03-03 23:58:31.733790857 +0300
@@ -28,14 +28,14 @@ var _vec3_tmp3 = new Float32Array(3);
var _quat_tmp = new Float32Array(4);
-var APP_ASSETS_PATH = m_cfg.get_std_assets_path() + "walk/walk/";
+var APP_ASSETS_PATH = m_cfg.get_std_assets_path("walk");
var STEP = 1.5;
var ROT_ANGLE = 3 * Math.PI / 5;
var AXIS_THRESHOLD = 0.1;
var ANIM_SPEED = 3.5;
var COLLISION_RAD = 6 * 6;
-}
-export function init() {
+
+exports.init = function() {
m_app.init({
canvas_container_id: "main_canvas_container",
callback: init_cb,
@@ -245,10 +245,6 @@ function create_interface() {
}
}
-
-}
-
-
});
// import the app module and start the app by calling the init method
The fixed project is attached too. It had a syntax error: you can't use export if your js is included to html with script type="text/javascript", There should be type="module". Also, there was brackets not on their places.
Alexander (Blend4Web Team)
twitter