Skip to content

Releases: WoodNeck/css-camera

Release v1.0.1

20 Sep 02:12
Compare
Choose a tag to compare

🚑 Hotfix

  • Camera properties will be set after making a new instance of CSSCamera.
    • In short, update(0) will be called immediately.
  • So, you don't have to call camera.update(0) after making new instance.
    • But, if you have to animate after initializing, you still have to use camera.update(0).then(() => {...});
// Before
const camera = new CSSCamera("#space", { ... });
camera.update(0); // This had to be called, which is not in a spec.

// After
const camera = new CSSCamera("#space", { ... });
// Now you don't have to call update(0);

// But if you want to animate right after making an instance
// You still have to
camera.update(0).then(() => {
  camera.focus(someElement);
  camera.update(2000);
});