Download the PHP package kostamax27/debugdraw without Composer

On this page you can find all versions of the php package kostamax27/debugdraw. 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 debugdraw

DebugDraw

Draw lines, boxes, spheres, arrows, text and other shapes on the client from a PocketMine-MP plugin.

Usage

draw() returns a DrawnShape<T> where T is the class you passed in, so $box->shape is a BoxShape and $box->update(new LineShape(...)) fails static analysis. drawAll(), removeAll() and clear() send one packet for the whole list. The viewer is dropped when the player quits.

Shapes

Namespace kostamax27\debugdraw\shape. Every class is final readonly, validates its arguments in the constructor and takes an optional trailing ?ShapeStyle $style = null.

Class Constructor
LineShape (Vector3 $location, Vector3 $end)
BoxShape (Vector3 $location, Vector3 $bound) min corner and size
SphereShape (Vector3 $location, int $segments = 20)
CircleShape (Vector3 $location, int $segments = 20)
TextShape (Vector3 $location, string $text, bool $use_rotation = false, ?Color $background_color = null, float $line_gap_height = 0.0, bool $depth_test = true, bool $show_backface = true, bool $show_text_backface = true)
ArrowShape (Vector3 $location, Vector3 $end, ?float $head_length = null, ?float $head_radius = null, ?int $segments = null)
CylinderShape (Vector3 $location, Vector2 $radius_x, Vector2 $radius_z, float $height, int $segments = 20)
PyramidShape (Vector3 $location, float $width, float $height, ?float $depth = null)
EllipsoidShape (Vector3 $location, Vector3 $radii, int $segments_per_axis = 20)
ConeShape (Vector3 $location, Vector2 $radii, float $height, int $segments = 20)

Options shared by all shapes live in ShapeStyle: scale (default 1), rotation, duration (seconds, client removes the shape itself), max_render_distance, color (default white), dimension_id (DimensionIds::*, default overworld), attached_entity_id (runtime id). location is the centre of a shape, except for LineShape and ArrowShape where it is the start point and BoxShape where it is the min corner. The client hides a shape once the player is further from its location than its render distance; max_render_distance can only lower that limit, not raise it, so a long line has to be split into segments to stay visible along its whole length. Each shape has withScale(), withRotation(), withDuration(), withMaxRenderDistance(), withColor(), withDimension(), attachedTo() and withStyle(), all returning a new instance of the same class.

Broadcasting

Examples

1. Chunk borders (F3 + G)

Chunk borders as drawn by Minecraft: Java Edition (F3 + G, ChunkBorderRenderer). Red lines mark the corners of the neighbouring chunks, yellow and cyan lines split the current chunk every 2 and 4 blocks, blue lines mark the chunk corners and every subchunk, and the subchunk the player stands in is boxed. Bedrock has no line width, so the thick lines are drawn like the thin ones.

See demo image

2. Clock

An analog clock showing the server's local time. The face (ring, ticks, digits) is drawn once, the three hands are updated in place every tick. $facing is the side the clock is looked at from: Facing::UP lays it on the ground for a viewer above, Facing::SOUTH hangs it on a wall for a viewer standing south of it and looking north. Seen from the other side it runs backwards, like a real clock would.

See demo https://github.com/user-attachments/assets/b5412735-0b7c-440e-a209-8d4795834733

All versions of debugdraw with dependencies

PHP Build Version
Package Version
Requires php Version ^8.4
pocketmine/pocketmine-mp Version ^5.0.0
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 kostamax27/debugdraw contains the following files

Loading the files please wait ...