New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@arch-inc/fabricjs-layer

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@arch-inc/fabricjs-layer

A simple layer implementation for Fabric.js

  • 0.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
5
decreased by-54.55%
Maintainers
1
Weekly downloads
 
Created
Source

fabricjs-layer

build npm version

fabricjs-layer is a simple layer implementation for Fabric.js v3.x and v4.x.

fabricjs-layer は Fabric.js v3.x および v4.x 用のシンプルなレイヤー実装です。

Usage / 使い方

<canvas id="main" width="720" height="480"></canvas>
<script src="https://cdnjs.cloudflare.com/ajax/libs/fabric.js/3.6.2/fabric.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@arch-inc/fabricjs-layer@latest/dist/index.js"></script>
<script>
  // Create a Fabric.js canvas
  let canvas = new fabric.Canvas(document.getElementById("main"), {
    isDrawingMode: true
  });

  // Create layer manager
  let manager = new fabricLayer.LayerManager(canvas);

  // Add layers
  for (let i = 0; i++; i < 5) {
    manager.addLayer();
  }

  // Set active layer
  manager.activeLayer = manager.getLayer(3);

  // Remove layer
  manager.removeLayer(manager.getLayer(2));

  // Move layer
  manager.moveLayer(manager.activeLayerIndex, manager.activeLayerIndex + 1);

  // Dispose layer manager
  manager.dispose();
</script>

If you use Webpack or other similar solutions, simply install the npm package and start using it.

TypeScript definitions are available by default. (e.g., Layer.d.ts)

Webpack 等を使っている場合は npm install でインストールできます。TypeScript の型定義がついてきます。

npm i @arch-inc/fabricjs-layer
import { LayerGroup } from "@arch-inc/fabricjs-layer";

API Documentation / API ドキュメント

All of the exported classes and interfaces are listed in TypeDoc.

このモジュールが export しているすべてのクラスとインタフェースは TypeDoc で閲覧できます。

Credits / 開発者

Staying in touch / 開発者に連絡

Library in action / 利用例

  • Demo site: GitHub Pages accompanied with this library

Copyright (c) 2021 Arch Inc. (Jun Kato)

Keywords

FAQs

Package last updated on 28 Jan 2021

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