Skip to content

Latest commit

 

History

History
81 lines (56 loc) · 1.43 KB

readme.md

File metadata and controls

81 lines (56 loc) · 1.43 KB

three-fisheye

install

npm install three-fisheye --save

features

original Fisheye

Perspective

Equirectangular

stable API

abstract class Fisheye{
  /** source */
  src: HTMLImageElement | HTMLCanvasElement | HTMLVideoElement | null;

  /** ajast center */
  centerX: number;
  centerY: number;
  radius: number;

  /** GL canvas */
  canvas: HTMLCanvasElement;

  /** canvas size */
  width: number;
  height: number;

  destructor(): void;
  render(): void;
}

class Fisheye2Perspective extends Fisheye {
  /** direction of view */
  pitch: number;
  yaw: number;
  zoom: number;
  constructor();
  drag(type: "start" | "move", offsetX: number, offsetY: number): any;
}

class Fisheye2Equirectangular extends Fisheye{
  constructor();
}

usage

see src/test.ts and src/example_perspective.ts

develop

npm run setup # install cli tools
npm run init  # install libraries
npm run build # build js code
npm run lint  # tslint
npm run doc   # typedoc
npm run check # type check
npm run test  # build test
npm run example # build example

license

MIT