Forum

Offset translation with Anchors/Empty (Custom Element)

28 March 2017 22:21
Hello,
i found a bug with anchors ( or Empties )
I animate 3 cylinders with 1 empty (anchor) parented to each cylinder.
In Blender the animation of empties is correct but in my project (web browser) there is a offset translation of my anchors #2 and #3. The anchor #1 is correct, the #2 have a translation and the #3 have double of #2… it seem to be exponential…
Maybe i did something wrong ?!
(You can download the project in attachment of this topic)
Thank you for your help ;-)
30 March 2017 11:16
Hi!

Please use this setup for anchors:

.anchor {
        background-color:pink;
        text-align: center;
        padding:10px 30px;
        border:2px solid black;
        color:black;
        position: absolute;
    }


:display: inline-block sets some offset to the anchors
30 March 2017 12:56
Reply to post of user Pavel Kotov
Hi!

Please use this setup for anchors:

.anchor {
        background-color:pink;
        text-align: center;
        padding:10px 30px;
        border:2px solid black;
        color:black;
        position: absolute;
    }


:display: inline-block sets some offset to the anchors

Hello,

thank you for the tip finally it wasn't a bug ;-)
but it not seem to be the "display:inline-block;" the problem but the missing of "position:absolute;" css property.
I think it could be good to add "position:absolute;" in the HTML Anchor style for forcing anchors to always be at their correct places, something like :
<div class="anchor" style="transform: translate3d(783.417px, 575.545px, 0px); z-index: 1; visibility: visible; opacity: 1; position:absolute;">ANCHOR #1</div>

What the B4W team think about this ?

Appart of this, i really want to thank you all guys, you all do a really good job !
I'm testing B4W now since a few weeks ago and i'm forced to recognize the good team you are and I really appreciate the bridge you have succeeded to do between Blender and Web pages ! Congratulation for all the team !
 
Please register or log in to leave a reply.