论坛

由用户创建的信息 Evgeny Rodygin
18 September 2015 18:58
Hello and welcome to the forum,

I've created a simple example for you. If you click the button, Suzanne will start playing animation. Feel free to ask questions about the code.

Good look in learning Blend4Web!
18 September 2015 18:12

Ответ на сообщение пользователя Will Welker
I finished this one today, Animation, Nodes and Sound.
https://www.youtube.com/watch?v=LhZr89Xyo6s

It shows how to use node logic for animation sound and page redirects.
Project page
Direct link

I am getting some erratic behavior on the page redirect. I have traced it to a DNS issue. The redirect does not work if the player is loaded in an iframe. So I have my domain name pointed to another domain. So for example: This Link takes you to the same location but using the primary DNS name. It seems to work fine from there. I will get it sorted out so williamwelker.com is the primary domain name for that acount.
Hi Will,

That's another great video! I think, someone will find your tutorials the best training material on Blend4Web in English right now
As of your problem on redirecting to other pages. Most of sites do not allow loading their content in i-frame on other domains. So do blend4web.com. Maybe, you can change it on your website? Because now the first link is kinda broken.
18 September 2015 12:44
Hello,
Ответ на сообщение пользователя paul
Can this process assign control for the features movements to a users mouse cursor for an interactive element? Thanks
This can be done with JavaScript mouse events and shape keys. It will look very similar to what is happening in this example.
(you can check the code by clicking the "View Code" button in the left-bottom angle of the screen)

The difference is that in morphing example we use html sliders and you have to use mouse position.
18 September 2015 12:31
Just out of interest, the Unity guys did a coding sprint with their WebGL exporter, and had mentioned that they got quite good size optimisations etc.
I don't think that 75mb for empty scene is good result anyway Even if it is reduced thrice (that's the info from the Unity blog, and there haven't been actual user tests as far as I know), there are still 25mb of data needed to be downloaded to see nothing.
18 September 2015 12:06
Hello and welcome to the forum!

This task is more about server interaction rather than Blend4web API. You can easily extract camera position from Blend4Web scene and send it with POST message to the server. What is going to happen on the server side is a completely independent story, but I think it's not a very complex challenge to write a script for setting camera position in Blender with something like this:

scene.camera.rotation_mode = 'QUATERNION'
scene.camera.rotation_quaternion[0] = rx
scene.camera.rotation_quaternion[0] = ry
scene.camera.rotation_quaternion[0] = rz
scene.camera.rotation_quaternion[0] = rw

scene.camera.location.x = tx
scene.camera.location.y = ty
scene.camera.location.z = tz
17 September 2015 10:47
Hello Nils,

Yes, sketchfab automatically downscales NPOT textures. In you example instead of 700x700 texture they use 512x512. I think, we can add such an option for NPOT textures.
16 September 2015 15:14

Ответ на сообщение пользователя crazyFolker
Hi Evgeny,

Here's a link to the export, showing the problem…

http://www.gameskinners.com/blend4web/bugs/select1/


And here's the .blend file ( select the Plane / ground, and either turn on "Selectable", or turn off "Enable Outlining" to be able to rotate the scene again when you re-export.

http://www.gameskinners.com/blend4web/bugs/select1/Learning.blend

Yes. There is a bug over here. Thank you.
We've already fixed it. In 15.09 this will be okay.
16 September 2015 15:06
Nice examples, though I was able to open them only on Windows in IE. =)
Almost everything can be done with our Logic editor but we are going to improve flexibility anyway. Thanks for suggestions!
16 September 2015 11:36
Well. Actually, all this stuff would be much easier to solve with bones API which will come at the end of this month.

I tried with removing the constraints at the beginning of the event handler code, applying a rotation and reconstraining the object again.
This method works fine for me, but you need to take the parent's rotation into account when you are going to apply constraint again.
15 September 2015 16:26
A separate type of mouse down + ray-cast event would be handy for the system to disable the camera movement, in the case where the user clicks on a 3D slider or similar - so, when they click on the slider and drag, the camera doesn't rotate / move.
If I understood you correctly you are speaking about 3d sliders which are a part of the scene. That's an interesting use case. We'll discuss suitability of mouse_down events.