@remotion/motion-blur
Advanced tools
Comparing version 4.0.0-prefetch.12 to 4.0.0-retry.8
@@ -0,1 +1,3 @@ | ||
export { CameraMotionBlur, CameraMotionBlurProps } from './CameraMotionBlur'; | ||
export { MotionBlur, MotionBlurProps } from './MotionBlur'; | ||
export { Trail, TrailProps } from './Trail'; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.MotionBlur = void 0; | ||
exports.Trail = exports.MotionBlur = exports.CameraMotionBlur = void 0; | ||
var CameraMotionBlur_1 = require("./CameraMotionBlur"); | ||
Object.defineProperty(exports, "CameraMotionBlur", { enumerable: true, get: function () { return CameraMotionBlur_1.CameraMotionBlur; } }); | ||
var MotionBlur_1 = require("./MotionBlur"); | ||
Object.defineProperty(exports, "MotionBlur", { enumerable: true, get: function () { return MotionBlur_1.MotionBlur; } }); | ||
var Trail_1 = require("./Trail"); | ||
Object.defineProperty(exports, "Trail", { enumerable: true, get: function () { return Trail_1.Trail; } }); |
import React from 'react'; | ||
export declare type MotionBlurProps = { | ||
children: React.ReactNode; | ||
layers: number; | ||
lagInFrames: number; | ||
import type { TrailProps } from './Trail'; | ||
export declare type MotionBlurProps = Omit<TrailProps, 'trailOpacity'> & { | ||
blurOpacity: number; | ||
}; | ||
/** | ||
* @deprecated The component has been renamed "Trail" instead: https://remotion.dev/docs/motion-blur/trail | ||
*/ | ||
export declare const MotionBlur: React.FC<MotionBlurProps>; |
@@ -5,16 +5,7 @@ "use strict"; | ||
const jsx_runtime_1 = require("react/jsx-runtime"); | ||
const remotion_1 = require("remotion"); | ||
const MotionBlur = ({ children, layers, lagInFrames, blurOpacity, }) => { | ||
const frame = (0, remotion_1.useCurrentFrame)(); | ||
if (typeof layers !== 'number' || | ||
Number.isNaN(layers) || | ||
!Number.isFinite(layers)) { | ||
throw new TypeError(`"layers" must be a number, but got ${JSON.stringify(layers)}`); | ||
} | ||
if (layers % 1 !== 0) { | ||
throw new TypeError(`"layers" must be an integer, but got ${JSON.stringify(layers)}`); | ||
} | ||
if (layers < 0) { | ||
throw new TypeError(`"layers" must be non-negative, but got ${JSON.stringify(layers)}`); | ||
} | ||
const Trail_1 = require("./Trail"); | ||
/** | ||
* @deprecated The component has been renamed "Trail" instead: https://remotion.dev/docs/motion-blur/trail | ||
*/ | ||
const MotionBlur = ({ blurOpacity, ...rest }) => { | ||
if (typeof blurOpacity !== 'number' || | ||
@@ -25,13 +16,4 @@ Number.isNaN(blurOpacity) || | ||
} | ||
if (typeof lagInFrames !== 'number' || | ||
Number.isNaN(lagInFrames) || | ||
!Number.isFinite(lagInFrames)) { | ||
throw new TypeError(`"lagInFrames" must be a number, but got ${JSON.stringify(lagInFrames)}`); | ||
} | ||
return ((0, jsx_runtime_1.jsxs)(remotion_1.AbsoluteFill, { children: [new Array(layers).fill(true).map((_, i) => { | ||
return ((0, jsx_runtime_1.jsx)(remotion_1.AbsoluteFill, { style: { | ||
opacity: blurOpacity - ((i + 1) / layers) * blurOpacity, | ||
}, children: (0, jsx_runtime_1.jsx)(remotion_1.Freeze, { frame: frame - lagInFrames * i, children: children }) }, `frame-${i.toString()}`)); | ||
}), children] })); | ||
return (0, jsx_runtime_1.jsx)(Trail_1.Trail, { ...rest, trailOpacity: blurOpacity }); | ||
}; | ||
exports.MotionBlur = MotionBlur; |
@@ -39,4 +39,4 @@ # Remotion License | ||
You are required to obtain a company license to use Remotion if you are not within the group of entities eligible for a free license. This license will enable you to use Remotion for the allowed use cases specified in the free license, and give you access to prioritized support. | ||
You are required to obtain a company license to use Remotion if you are not within the group of entities eligible for a free license. This license will enable you to use Remotion for the allowed use cases specified in the free license, and give you access to prioritized support (read the [Support Policy](/docs/support)). | ||
Visit [companies.remotion.dev](https://companies.remotion.dev) for pricing and to buy a license. |
{ | ||
"name": "@remotion/motion-blur", | ||
"version": "4.0.0-prefetch.12+c7eb5bd76", | ||
"version": "4.0.0-retry.8+c5430346e", | ||
"description": "Motion blur effect for Remotion", | ||
@@ -23,3 +23,3 @@ "main": "dist/index.js", | ||
"dependencies": { | ||
"remotion": "4.0.0-prefetch.12+c7eb5bd76" | ||
"remotion": "4.0.0-retry.8+c5430346e" | ||
}, | ||
@@ -32,3 +32,3 @@ "peerDependencies": { | ||
"@jonny/eslint-config": "3.0.266", | ||
"@types/react": "18.0.1", | ||
"@types/react": "18.0.23", | ||
"eslint": "8.25.0", | ||
@@ -39,3 +39,3 @@ "prettier": "^2.7.1", | ||
"react-dom": "18.0.0", | ||
"remotion": "3.2.30", | ||
"remotion": "3.2.39", | ||
"typescript": "^4.7.0" | ||
@@ -51,3 +51,3 @@ }, | ||
}, | ||
"gitHead": "c7eb5bd76f2f89677f007a54e1bc5d3e3403094f" | ||
"gitHead": "c5430346ee9385f740948246b3d0774913f9ad6c" | ||
} |
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
10294
13
154