• Howdy_McGee

    (@howdy_mcgee)


    Hello,

    I’m having an issue where the initial load of the object/canvas the Object is off-center. It displays the bottom of the object instead of being center in the canvas. Then, as soon as I move it slightly it jumps to center and looks like I want it to look. For whatever reason it’s just the initial load that puts it off-center.

    My DevTools show some warning from threeJS:

    THREE.Box3: .getCenter() target is now required
    THREE.Box3: .getSize() target is now required

    I don’t know anything about threeJS – do you have any recommendations on a script I can run after the threeJS initialization which will re-adjust the object in the canvas to hopefully center this? Open to any and all other suggestions.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author maui2wp

    (@maui2wp)

    @howdy_mcgee
    ATM the best option is to edit your model file (i.e. with blender) and re-center it with the desired view.

    Thread Starter Howdy_McGee

    (@howdy_mcgee)

    Hello,

    Thanks for the reply. I agree that may be one way to go about it. I guess it’s strange to me that as soon as I move the object it immediately centers. The issue only crops up on load. This alone makes me think it’s an issue with either when or how the object is being centered via the library.

    Is there any method I can call to readjust the centering on window.load() or trigger an interaction with the object via JS to have the script re-center the object on it’s own?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Center Object’ is closed to new replies.