Code Monkey home page Code Monkey logo

facewall's Introduction

facewall

http://tingyinhelen.github.io/facewall

Facewall

API

Class FaceWall

  1. constructor()
  2. init(wall?: Wall | Wall[]): Promise<void>

Class Thumbnail

  1. constructor(thumb: string, orignal?: string)
  2. url(): string
  3. orignalUrl(): string
  4. to(wall: Wall | null): Promise <void>

Class Wall

  1. constructor(thumb?: Thumbnail | Thumbnail[])
  2. add(thumb: Thumbnail | Thumbnail[]): Promise<void>
  3. del(thumb: Thumbnail | Thumbnail[]): Promise<void>
  4. destroy(): Promise<void>

Example:

const canvas = document.getElementById('facewall-canvas')

const facewall = new Facewall(canvas)
await facewall.init()

const wall1 = new Wall() // a Wall class instance
const wall2 = new Wall()  // should be able to accept a Thumbnail list as parameters, like: new Wall([thumb1, thumb2])

await facewall.add(wall1)     // anamition: create a wall in 3d sense dynamicly
await facewall.add(wall2)     // anamition: create a wall in 3d sense dynamicly

const thumb1 = new Thumbnail('image/6-1.jpg', 'image/bigImg6.jpeg')
const thumb2 = new Thumbnail('image/7-2.jpg', 'image/bigImg7.jpeg')

await wall1.add(thumb1)  // anamition: a new face thumb appear
await wall2.add(thumb2)  // anamition: a new face thumb appear

await wall1.del(thumb1)    // anamition: a new face thumb disappear

await thumb2.to(wall1)        // anamition: move thumb2 from wall2 to wall1

await wall2.destroy()         // anamition: disappear

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.