UNPKG

polygonjs-engine

Version:

node-based webgl 3D engine https://polygonjs.com

109 lines (106 loc) 7.85 kB
/** * Imports a video * * @remarks * TIP: to ensure that your video starts as soon as possible, make sure to pre-process it with a tool like qt-faststart. There are many places where you can find it, but here are some suggestions: * * - download it from [https://pypi.org/project/qtfaststart/](https://pypi.org/project/qtfaststart/) * - download it from [https://manpages.debian.org/stretch/ffmpeg/qt-faststart.1.en.html](https://manpages.debian.org/stretch/ffmpeg/qt-faststart.1.en.html) * - with ffmpeg, you can use the following command line: `ffmpeg -i in.mp4 -c copy -map 0 -movflags +faststart out.mp4 ` In a future version of this node, it will also be possible to link it to a video tag that could already be in your html DOM. This way, you could sets multiple source tags (one with mp4 and one with ogv) instead of a single url. */ import { Constructor } from '../../../types/GlobalTypes'; import { TypedCopNode } from './_Base'; import { BaseParamType } from '../../params/_Base'; import { NodeParamsConfig } from '../utils/params/ParamsConfig'; import { TextureParamsController } from './utils/TextureParamsController'; export declare function VideoCopParamConfig<TBase extends Constructor>(Base: TBase): { new (...args: any[]): { /** @param url to fetch the video from */ url: import("../utils/params/ParamsConfig").ParamTemplate<import("../../poly/ParamType").ParamType.STRING>; /** @param reload the video */ reload: import("../utils/params/ParamsConfig").ParamTemplate<import("../../poly/ParamType").ParamType.BUTTON>; /** @param play the video */ play: import("../utils/params/ParamsConfig").ParamTemplate<import("../../poly/ParamType").ParamType.BOOLEAN>; /** @param set the video muted attribute */ muted: import("../utils/params/ParamsConfig").ParamTemplate<import("../../poly/ParamType").ParamType.BOOLEAN>; /** @param set the video loop attribute */ loop: import("../utils/params/ParamsConfig").ParamTemplate<import("../../poly/ParamType").ParamType.BOOLEAN>; /** @param set the video time */ videoTime: import("../utils/params/ParamsConfig").ParamTemplate<import("../../poly/ParamType").ParamType.FLOAT>; /** @param seek the video at the time specified in vide_time */ setVideoTime: import("../utils/params/ParamsConfig").ParamTemplate<import("../../poly/ParamType").ParamType.BUTTON>; }; } & TBase; declare const VideoCopParamsConfig_base: { new (...args: any[]): { tencoding: import("../utils/params/ParamsConfig").ParamTemplate<import("../../poly/ParamType").ParamType.BOOLEAN>; encoding: import("../utils/params/ParamsConfig").ParamTemplate<import("../../poly/ParamType").ParamType.INTEGER>; tmapping: import("../utils/params/ParamsConfig").ParamTemplate<import("../../poly/ParamType").ParamType.BOOLEAN>; mapping: import("../utils/params/ParamsConfig").ParamTemplate<import("../../poly/ParamType").ParamType.INTEGER>; twrap: import("../utils/params/ParamsConfig").ParamTemplate<import("../../poly/ParamType").ParamType.BOOLEAN>; wrapS: import("../utils/params/ParamsConfig").ParamTemplate<import("../../poly/ParamType").ParamType.INTEGER>; wrapT: import("../utils/params/ParamsConfig").ParamTemplate<import("../../poly/ParamType").ParamType.INTEGER>; wrapSep: import("../utils/params/ParamsConfig").ParamTemplate<import("../../poly/ParamType").ParamType.SEPARATOR>; tminfilter: import("../utils/params/ParamsConfig").ParamTemplate<import("../../poly/ParamType").ParamType.BOOLEAN>; minFilter: import("../utils/params/ParamsConfig").ParamTemplate<import("../../poly/ParamType").ParamType.INTEGER>; tmagfilter: import("../utils/params/ParamsConfig").ParamTemplate<import("../../poly/ParamType").ParamType.BOOLEAN>; magFilter: import("../utils/params/ParamsConfig").ParamTemplate<import("../../poly/ParamType").ParamType.INTEGER>; tanisotropy: import("../utils/params/ParamsConfig").ParamTemplate<import("../../poly/ParamType").ParamType.BOOLEAN>; useRendererMaxAnisotropy: import("../utils/params/ParamsConfig").ParamTemplate<import("../../poly/ParamType").ParamType.BOOLEAN>; anisotropy: import("../utils/params/ParamsConfig").ParamTemplate<import("../../poly/ParamType").ParamType.INTEGER>; useCameraRenderer: import("../utils/params/ParamsConfig").ParamTemplate<import("../../poly/ParamType").ParamType.BOOLEAN>; anisotropySep: import("../utils/params/ParamsConfig").ParamTemplate<import("../../poly/ParamType").ParamType.SEPARATOR>; tflipY: import("../utils/params/ParamsConfig").ParamTemplate<import("../../poly/ParamType").ParamType.BOOLEAN>; flipY: import("../utils/params/ParamsConfig").ParamTemplate<import("../../poly/ParamType").ParamType.BOOLEAN>; ttransform: import("../utils/params/ParamsConfig").ParamTemplate<import("../../poly/ParamType").ParamType.BOOLEAN>; offset: import("../utils/params/ParamsConfig").ParamTemplate<import("../../poly/ParamType").ParamType.VECTOR2>; repeat: import("../utils/params/ParamsConfig").ParamTemplate<import("../../poly/ParamType").ParamType.VECTOR2>; rotation: import("../utils/params/ParamsConfig").ParamTemplate<import("../../poly/ParamType").ParamType.FLOAT>; center: import("../utils/params/ParamsConfig").ParamTemplate<import("../../poly/ParamType").ParamType.VECTOR2>; }; } & { new (...args: any[]): { /** @param url to fetch the video from */ url: import("../utils/params/ParamsConfig").ParamTemplate<import("../../poly/ParamType").ParamType.STRING>; /** @param reload the video */ reload: import("../utils/params/ParamsConfig").ParamTemplate<import("../../poly/ParamType").ParamType.BUTTON>; /** @param play the video */ play: import("../utils/params/ParamsConfig").ParamTemplate<import("../../poly/ParamType").ParamType.BOOLEAN>; /** @param set the video muted attribute */ muted: import("../utils/params/ParamsConfig").ParamTemplate<import("../../poly/ParamType").ParamType.BOOLEAN>; /** @param set the video loop attribute */ loop: import("../utils/params/ParamsConfig").ParamTemplate<import("../../poly/ParamType").ParamType.BOOLEAN>; /** @param set the video time */ videoTime: import("../utils/params/ParamsConfig").ParamTemplate<import("../../poly/ParamType").ParamType.FLOAT>; /** @param seek the video at the time specified in vide_time */ setVideoTime: import("../utils/params/ParamsConfig").ParamTemplate<import("../../poly/ParamType").ParamType.BUTTON>; }; } & typeof NodeParamsConfig; declare class VideoCopParamsConfig extends VideoCopParamsConfig_base { } export declare class VideoCopNode extends TypedCopNode<VideoCopParamsConfig> { params_config: VideoCopParamsConfig; static type(): string; requiredModules(): Promise<void | import("../../poly/registers/modules/_BaseRegister").ModuleName[]>; private _video; private _texture_loader; readonly texture_params_controller: TextureParamsController; initializeNode(): void; cook(): Promise<void>; private cook_for_video; resolved_url(): string; static PARAM_CALLBACK_video_update_time(node: VideoCopNode): void; static PARAM_CALLBACK_video_update_play(node: VideoCopNode): void; static PARAM_CALLBACK_video_update_muted(node: VideoCopNode): void; static PARAM_CALLBACK_video_update_loop(node: VideoCopNode): void; private video_update_time; private video_update_muted; private video_update_loop; private video_update_play; static PARAM_CALLBACK_reload(node: VideoCopNode, param: BaseParamType): void; private param_callback_reload; private _load_texture; } export {};