Struggling to center a Three.js object within a DIV
Here is the code I'm working with:
import * as THREE from 'https://cdn.skypack.dev/pin/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="44302c3621210432746a75767c6a74692d003d32001e2016072b3d167d001c2576361323">[email protected]</a>/mode=imports,min/optimized/three.js';
const container = document.getElementById("canvas");
// Rest of the JavaScript code here
Experiencing an issue where the object extends outside the boundaries of the DIV element:
https://i.sstatic.net/Pd7k0.jpg
This has been a persistent problem for me, and despite multiple attempts to rectify it, I have been unable to find a solution. Any guidance or assistance would be greatly appreciated.