论坛

由用户创建的信息 Aljekhine
16 February 2023 00:00
It seems like a long time ago that the last people wrote in this forum for support. I hope at least somebody reads this.. I'm writing a configurator for furniture. I need two buttons on the sides that are supposed to operate like sliders. I've written all the basic logic (working independently from b4w) and it works (for that "sketch" I've used .svg-images as buttons) . Now I'm working on the 3D implementation. For several reasons it would be nice to have 3D Objects as buttons. The only problem is, that my 3D-buttons are sometimes pushed partly or fully out of the viewport, when I change the aspect ratio of the browser window. Viewport alignment seems to be the perfect solution at first. I've parented my buttons to emptys which are parented to the camera and then I aligned the empties with the viewport. Concerning the positioning, viewport alignment is working like a charm. The buttons appear just perfectly where they're supposed to do. However viewport alignment seems to fix them permanently. I've tried to move the empties vertically via
m_trans.move_local(empty, 0, 0.2, 0);

As I said before, they're meant to work like sliders. Unfortunately nothing happens. I doubt that there's any mistake in my code. Because as soon as I uncheck the Viewport Alignment checkbox in Blender, my code moves the empties again without any problem. However, the buttons then again don't stay in the viewport.
It would have been nice to have 3D Buttons, but not necessary. So I've used svg-images as buttons again and it works. Anyway, it would be nice to know if there's a workaround. Is there any way to align 3D objects with the viewport but not permanently fix them absolutely?
15 November 2017 22:30
I cannot find set_glow_color() in the API no more. I assume something changed since these Posts. Can somebody please explain me how to acces this property. Thank you very much in advance.
17 October 2017 23:18
Sorry, I think I solved the problem myself.
I had to re-export the scenes in Project Manager.
But maybe this post can help somebody else in the future.
17 October 2017 22:40
Hello,

I created a project with blender2.78 and blend4web 16.08.

Everything was working fine. However there were some bugs in Firefox.
So I downloaded and installed the last stable versions. (blender2.79 & blend4web CE 17.08)

When I load json files now, the preloader stops at 44% and the Debugger tells me that an error occured in batch.js Type_Error "shader is null".

I recreated some files using the new blender and blend4web versions…still the same error.

Custom Files however do load.

Can somebody help? Thanks in advance!