Coder Social home page Coder Social logo

cameralayer's Introduction

CameraLayer

Framer.js layer displaying camera image.

Working with Framer Studio

  1. Download CameraLayer.coffee.

    Place it into modules folder under your Framer Studio project. (details)

  2. Write a code.

# Load CameraLayer
CameraLayer = require "CameraLayer"

# Create a layer
camera = new CameraLayer

# Start accessing to the camera
camera.start()

But nothing happens in Framer Studio. See the next step. 3. View your prototype with Google Chrome.

Framer Studio doesn't support the camera access. You always have to view your prototype with Google Chrome.

Instructions:

  1. Click Mirror button in Framer Studio's toolbar.
  2. Click Copy Link in the menu.
  3. Paste the copied link into the location bar of Google Chrome, then replace the IP address such like x.x.x.x:8000 to localhost:8000 (*), and press enter.

* From version 47, Google Chrome deprecates the camera access from insecure origins. This means that your prototype have to be hosted by HTTPS or localhost.

For non-Framer Studio environment

Download CameraLayer.js, and load it after framer.js.

CameraLayer is available under Framer namespace by loading the script:

Utils.domLoadScriptSync('./CameraLayer.js');

var camera = new Framer.CameraLayer();
camera.start();

Also it can be loaded by module system such as Browserify or Webpack:

var CameraLayer = require('./CameraLayer');
var camera = new CameraLayer();
camera.start();

cameralayer's People

Contributors

ktcy avatar

Watchers

 avatar  avatar

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.