1.0.6 • Published 7 years ago

three-fisheye v1.0.6

Weekly downloads
5
License
MIT
Repository
github
Last release
7 years ago

three-fisheye

install

npm install three-fisheye --save

features

original Fisheye

npm.io

Perspective

npm.io

Equirectangular

npm.io

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

1.0.6

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago