WoodNeck
@woodneck
// Prerequisite:
// Create your scene as you like
const card = document.querySelector("#card");
const cardButton = document.querySelector("#card-button");
// First, make camera
const camera = new CSSCamera("#space");
// Call its method, then update it!
cardButton.onclick = () => {
// Move camera in front of "card"
camera.focus(card);
camera.update(2000);
}