Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

flying-canvas

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

flying-canvas

flying-canvas

  • 1.2.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
9
increased by800%
Maintainers
1
Weekly downloads
 
Created
Source

flying-canvas Build Status

yarn version NuGet version

flying-canvas is awesome. LOL!

flying-canvas demo image Check out the live example: https://www.subidote.com/flying-canvas

Use it this way

1 Download and Install flying-canvas

2 Include dependences

2.1 Include flying-canvas.min.js by referencing the necessary files

You will find .js and .css files in dist folder.

<script src="../dist/flying-canvas.min.js"></script>
<link rel="stylesheet" href="../dist/flying-canvas.min.css">
2.2 Initialize the plugin
<script>
    flyingCanvas.init({
        showWings: false,
        animation: false
    });
</script>

When the canvas pane bumps into the edges a function can be executed specifying bumpIntoEdgeFn

<script>
    flyingCanvas.init({
        showWings: false,
        bumpIntoEdgeFn: function(){
            console.log("Choca 1!");
        },
        animation: false
    });
</script>
2.3 Show a picture

Use src: "./void.png" to load a pinture in the canvas.

<script>
    flyingCanvas.init({
        src: "./void.png"
    });
</script>
2.3 Awesome
<script>
    flyingCanvas.init({
        width: 200,
        height: 400,
        showWings: false,
        bumpIntoEdgeFn: function(){
            console.log("Choca 1!");
        },
        zIndex: 300,
        awesome: 2 // This will render the picture of the column
    });
</script>

3 Configuration options

optiondefaultdescription
flyingCanvas.init()-Initializes the component allowing several parameters in json format.
width350Width of the canvas.
height400Height of the canvas.
pictureFrameWidth75Working on this now!
srcnullRoute to an image.
flyingCanvas.loadImage()-Loads new images this way: flyingCanvas.loadImage("newImage.jpg").
flyingCanvas.clearImage()-Removes the image
animationbooleanIn the case of false the component will not have movement when created.
hiddenbooleanIn the case of false the component will be hidden by default.
showWingsbooleanShow wings
awesomeunknownAwesome stuff will happen.
flyingCanvas.start()-Starts the movement of the canvas.
flyingCanvas.stop()-Stops the movement.
flyingCanvas.hide()-Hides the component. Does not destroy. The component will continue running in the background.
flyingCanvas.show()-Shows the component again.

Development

sudo npm install -g eslint

sudo npm install -g grunt-cli

grunt build

License

flying-canvas is MIT licensed.

Keywords

FAQs

Package last updated on 15 Jun 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc