Skip to content

Commit

Permalink
Fixed Automatic setting of source dimensions based on source type
Browse files Browse the repository at this point in the history
  • Loading branch information
ydaniv committed Jan 2, 2025
1 parent 5b77688 commit 0c97f8f
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 8 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
### 0.14.9 (2025-01-02)

_Fixed:_

- Automatic setting of source dimensions based on source type.

### 0.14.8 (2024-12-24)

_Fixed:_
Expand Down
4 changes: 2 additions & 2 deletions dist/index.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -3509,8 +3509,8 @@ class Kampos {
media = source;
}

const isVideo = typeof media === 'HTMLVideoElement';
const isCanvas = typeof media === 'HTMLCanvasElement';
const isVideo = media instanceof HTMLVideoElement;
const isCanvas = media instanceof HTMLCanvasElement;

if (width && height) {
this.dimensions = { width, height };
Expand Down
4 changes: 2 additions & 2 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset='utf-8'>
<title>kampos 0.14.6 | Documentation</title>
<title>kampos 0.14.8 | Documentation</title>
<meta name='description' content='Tiny and fast effects compositor on WebGL'>
<meta name='viewport' content='width=device-width,initial-scale=1'>
<link href='assets/bass.css' rel='stylesheet'>
Expand All @@ -15,7 +15,7 @@
<div id='split-left' class='overflow-auto fs0 height-viewport-100'>
<div class='py1 px2'>
<h3 class='mb0 no-anchor'>kampos</h3>
<div class='mb1'><code>0.14.6</code></div>
<div class='mb1'><code>0.14.8</code></div>
<input
placeholder='Filter'
id='filter-input'
Expand Down
4 changes: 2 additions & 2 deletions index.umd.js
Original file line number Diff line number Diff line change
Expand Up @@ -3513,8 +3513,8 @@ void main() {
media = source;
}

const isVideo = typeof media === 'HTMLVideoElement';
const isCanvas = typeof media === 'HTMLCanvasElement';
const isVideo = media instanceof HTMLVideoElement;
const isCanvas = media instanceof HTMLCanvasElement;

if (width && height) {
this.dimensions = { width, height };
Expand Down
4 changes: 2 additions & 2 deletions src/kampos.js
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,8 @@ export class Kampos {
media = source;
}

const isVideo = typeof media === 'HTMLVideoElement';
const isCanvas = typeof media === 'HTMLCanvasElement';
const isVideo = media instanceof HTMLVideoElement;
const isCanvas = media instanceof HTMLCanvasElement;

if (width && height) {
this.dimensions = { width, height };
Expand Down

0 comments on commit 0c97f8f

Please sign in to comment.