macaw-threejs
Version:
Macaw Three.js is ready to use library to connect Three.js with your project.<br/> Under the hood is a fully optimized, clean Three.js set up to make it easy to implement effects for images (future text, etc.). With effects out of the box, you don't even
27 lines (26 loc) • 736 B
TypeScript
import * as THREE from "three";
import type { Uniform } from "../Effect";
import type { MacawCore } from "../Core";
interface Props {
core: MacawCore;
element: HTMLImageElement;
id: string;
}
export declare class MacawImage {
element: HTMLImageElement;
mesh?: THREE.Mesh;
material?: THREE.ShaderMaterial;
texture?: THREE.Texture;
private _core;
private _id;
constructor(props: Props);
cleanUp(): void;
setPosition(resize?: boolean): void;
refreshMaterial(additionalUniforms?: Uniform): void;
setUniforms(): void;
create(): Promise<void>;
private _clickEvent;
private _calculateMeshPositionY;
private _calculateMeshPositionX;
}
export {};