Download the PHP package rimelek/columns3d without Composer

On this page you can find all versions of the php package rimelek/columns3d. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package columns3d

Description

Using this library you can create images of different type of columns. If you use linear gradient on the column's wall, you can draw 3D-like shapes. It is mainly just for fun and learn algorithms used by the library.

See some examples: examples.md

Installation

php composer.phar require rimelek/columns3d:2.*

Requirements

Usage

Drawable elements

To start drawing you need to define a canvas

use Rimelek\Columns3D\Canvas;
use Rimelek\Columns3D\CanvasConfiguration;
use Rimelek\Columns3D\Color;

$cc = new CanvasConfiguration();
$cc->setHeight(300);
$cc->setWidth(300);
$cc->setType(Canvas::TYPE_JPEG); //Canvas::TYPE_PNG and Canvas::TYPE_GIF are also supported
$cc->setQuality(50); // Only in case of JPEG
$cc->setColor(new Color(255, 0, 0)); //RGB

$canvas = new Canvas($cc);

All methods of CanvasConfiguration are optional.

You can add elements to the canvas with addElement().

use Rimelek\Columns3D\PositionedElement;

// ...

$canvas->addElement(new Positionedelement($drawable, /*x*/ 200, /*y*/ 200));

$drawable object must implement Rimelek\Columns3D\Drawable\DrawableInterface

Currently 2 classes are available:

StripedPattern

This is to add a striped background. For now, it does not support customization.

use Rimelek\Columns3D\Drawable\StripedPattern;

// ...

$background = new StripedPattern();
$canvas->addElement(new Positionedelement($background, 150, 150)); // background and the center of the canvas

Column

use Rimelek\Columns3D\Drawable\Column;
use Rimelek\Columns3D\Drawable\ColumnConfiguration;
use Rimelek\Columns3D\LinearGradient;

// ...

$colc = new ColumnConfiguration();
$colc->setRadius(100);
$colc->setVeticalAngle(0.2); //This is for 3D. Define it between 0 and 1. Greater values mean you look at the column from higher.
$colc->setHeigh(300);
$colc->setWallGradient(new LinearGradient(new Color(0, 0, 0), new Color(255, 255, 255))); 
$colc->setColor(new Color(200 200, 200));

$column = new Column($colc);
$canvas->addElement(new PositionedElement($column, 200, 200));

All methods of ColumnConfiguration are optional.

Generator classes

There are two generator classes too.

PositionGenerator

It is to generate positions of an ellipse to use it in a foreach loop.

$positionGenerator = new PositionGenerator($centerX, $centerY, $step /* Default is 1*/);
foreach ($positionGenerator->call(/* start degree*/ -150, /* end degree */ -30) as list($x, $y)) {
    $this->addElement(new PositionedElement($drawable, 200 + $x, 200 + $y));
}

ColumnCircleGenerator

Itt uses PositionGenerator to generate circle made of columns.

$columnCircleGenerator = new ColumnCircleGenerator($positionGenerator, $columnConfiguration);
foreach($columnCircleGenerator->call(/*degree*/$from, /*degree*/$to, $centerX, $centerY) as $e) {
    $canvas->addElement($e);
}

All versions of columns3d with dependencies

PHP Build Version
Package Version
Requires php Version >=7.0
ext-gd Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package rimelek/columns3d contains the following files

Loading the files please wait ...