Resize ThreeKit player?

Is there a way to trigger a resize for the ThreeKit player?

By default it seems to be taking up the full width and height of my container which is great when resizing larger, but when I resize to a smaller dimension my container cannot go smaller because the threekit player takes up a set defined width

Hi Aaron,
apologies if I’m misunderstanding your question, the player can be resized with CSS targeting the div that the player is attached to.


Hiya Ian,

If the player is in a container that fills up the width of its parent then it never shrinks down because the canvas gets a set width and height from JS.

The results is the container div cannot go smaller because a child elm has a set size.

Hi Arron, I’m not sure I’m following your issue. When you initialize the player, you target a div:

el: document.getElementById("player")

You should give that div style in order to make the player responsive to different screen sizes. If you have tried that and it doesn’t work, can you provide a code snippet of how your divs are laid out and their styles?

It sounds like there is a style conflict somewhere preventing the player to resize - it typically resizes on its own or based on the styles applied to it.