urpflanze
TypeScript icon, indicating that this package has built-in type declarations

0.3.3 • Public • Published

A library for developers who want to approach to creative coding, for artists who want to approach to programming or for anyone else who wants to play with math.

Full docs and Examples

Installation

The most immediate way to include Urpflanze in your project is to use an online hosted version.

CDN

Full version

<script src="https://cdn.jsdelivr.net/npm/urpflanze"></script>

Customizable version

<script src="https://cdn.jsdelivr.net/npm/urpflanze[@version]/build/urpflanze[-light][.min].js"></script>

NPM

To install it just run the command:

npm i --save urpflanze

At the end you can include Urpflanze in your code

import * as Urpflanze from 'urpflanze'

const scene = new Urpflanze.Scene()

// or

import { Scene } from 'urpflanze'

const scene = new Scene()

use urpflanze/dist/index-light for light version

Example

Hello Rect!

const scene = new Urpflanze.Scene()

const rect = new Urpflanze.Rect({
	repetitions: 8,
	distance: 100,
	sideLength: 20,
})
scene.add(rect) // Add rect to scene

const drawer = new Urpflanze.DrawerCanvas(scene, document.body)
drawer.draw() // Draw scene on canvas

Output

Example output

Full docs and Examples

/urpflanze/

    Package Sidebar

    Install

    npm i urpflanze

    Weekly Downloads

    4

    Version

    0.3.3

    License

    GPL-3.0-or-later

    Unpacked Size

    4.3 MB

    Total Files

    234

    Last publish

    Collaborators

    • genbs