npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

dibujo

v5.0.22

Published

![alt text](https://raw.githubusercontent.com/LuisHerasme/DibujoJs/master/logo/dibujoJs.png)

Downloads

27

Readme

alt text

Instalation

How to use it

  const render = new dibujo.Render()

Scene

const scene = new dibujo.Scene('#FF00FF')
  const rect = new dibujo.Rect({
    position: new dibujo.Vector(10, 10),
    width: 100,
    height: 100,
    color: 'blue'
  })
  
  scene.add(rect)
 render.setScene(scene)

Graphics

  • Rect
  • Circle
  • Picture
  • Line
  • Poligon
  • Text
  • Arc

Picture

  const picture = new dibujo.Picture({
    position: new dibujo.Vector(10, 10),
    width: 100,
    height: 100,
    src: './apple.png'
  })

| Param | Type | Description | | --- | --- | --- | | position | object | This object contains the position of the image | | src | string | This will be the location where the image is saved | | width | number | The width | | opacity | number | The opacity | | height | number | The height |

Rect

  const rect = new dibujo.Rect({
    position: new dibujo.Vector(10, 10),
    width: 100,
    height: 100,
    color: 'blue'
  })

| Param | Type | Description | | --- | --- | --- | | position | object | This object contains the position of the rect | | color | string | The color of the rect | | width | number | The width | | height | number | The height | | stroke | boolean | Draw stroke | | lineColor | number | Stroke color | | lineWidth | number | Line width |

Text

  const text = new dibujo.Text({
    position: new dibujo.Vector(10, 10),
    content: 'Hello World'
  })

| Param | Type | Description | | --- | --- | --- | | position | Point | The coordinates of the text | | content | string | The content | | style | object | This is the style of the text |

Line

  const line = new dibujo.Line({
    start: new dibujo.Vector(10, 10),
    end: new dibujo.Vector(20, 20),
    color: 'blue'
  })

| Param | Type | Description | | --- | --- | --- | | start | Point | The start coordinate of the line | | end | Point | The end coordinate of the line | | color | string | This is the color of the line |

Poligon

  const poli = new dibujo.Poligon({
    cords: [
      {x: 10, y: 10},
      {x: 20, y: 20},
      {x: 10, y: 20}
    ],
    color: 'blue'
  })

| Param | Type | Description | | --- | --- | --- | | cords | Array | Array of the vertex of the poligon | | fill | boolean | Fill the poligon | | stroke | boolean | Stroke the poligon | | strokeColor | string | This is the color of the lines of the poligon | | color | string | This is the color of the poligon |

Circle

  const circle = new dibujo.Circle({
    position: new dibujo.Vector(10, 10),
    radius: 10,
    color: 'blue'
  })

| Param | Type | Description | | --- | --- | --- | | position | Point | Position of the circle | | radius | number | Radius of the circle | | color | string | Color of the circle | | stroke | boolean | Show stroke | | lineWidth | number | Width of the line | | lineColor | string | Color of the line |

Arc

  const arc = new dibujo.Arc({
    position: new dibujo.Vector(10, 10),
    radius: 10,
    color: 'blue'
  })

| Param | Type | Description | | --- | --- | --- | | color | string | Color of the arc | | position | Point | Position of the arc | | radius | number | Radius of the arc | | lineWidth | number | Width of the line | | stroke | boolean | Show stroke | | lineColor | string | Color of the line | | eAngl | number | End angle of the arc | | aAngl | number | Start angle of the arc |