웹 사이트에서 이미지 배경 애니메이션을 위한 라이브러리. three.js로 작성되었으며 WebGL을 사용합니다.
https://github.com/aeroheim/midori
https://aeroheim.github.io/midori/
다음을 지원합니다.
import { BackgroundRenderer, loadImage, isWebGLSupported } from 'midori-bg'; // check WebGL support - usually unnecessary unless your browser requirements are dated if (isWebGLSupported) { // pass in a canvas DOM element const renderer = new BackgroundRenderer(document.getElementById('canvas')); // the loadImage function returns a promise which you can use to load your images. // the path can be a url or local path to a file. Make sure to check CORS if using a url. loadImage('url/to/image') // set background .then((image) => renderer.setBackground(image)) // handle errors .catch(err => console.error(err)); }
등록된 댓글이 없습니다.