Skip to content

carlodurso/cinematic-slider

Repository files navigation

```markdown
# Canvas Image Slider

This project is a customizable canvas-based image and video slider with audio and plugin support. It has been inspired by the work of [Dario Fuzinato](https://codepen.io/fuzinato/pen/PwLLjB).

## Demo
[View the demo](https://cinematic-slider.web.app/)

## Features

- Supports both images and videos
- Dynamic canvas rendering and responsive resizing
- Customizable audio controls
- Plugin-based effects for enhanced transitions
- Text overlays (headings and subtitles)

## Installation

You can run this project locally by either:

1. Simply opening the `index.html` file directly in your browser.
2. Setting up a local server such as `http-server`:

   ```bash
   npm install -g http-server
   http-server
   ```

   Then, open `http://localhost:8080` in your browser.

## Usage

To customize the slider, modify the `mediaInfo` array in the `media.js` file with your own media URLs, headings, and subtitles. You can also enable or disable options such as auto-cycling, navigation arrows, and audio.

### Example Media Data Structure:

```javascript
const mediaInfo = [
  {
    src: 'path/to/image1.jpg',
    heading: 'First Slide',
    subtitle: 'This is the first slide.'
  },
  {
    src: 'path/to/video.mp4',
    heading: 'Second Slide',
    subtitle: 'This is a video slide.'
  }
];
```

## Plugin Extensions

The slider can be easily extended by writing custom JavaScript plugins or using existing libraries like GSAP. To include additional libraries, simply load them in the HTML file.

### Example Plugin Integration:

```javascript
import { SomeCustomPlugin } from './plugins/someCustomPlugin.js';
let plugin = [new SomeCustomPlugin()];
```

## License

This project is licensed under the [Creative Commons License](https://creativecommons.org/licenses/).
```

Feel free to adjust this file as needed for your specific project setup!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published