定制 a1essandro/diamond-and-square 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

a1essandro/diamond-and-square

最新稳定版本:v2.3.0

Composer 安装命令:

composer require a1essandro/diamond-and-square

包简介

Algorithm for generating heightmaps

README 文档

README

Build Status Coverage Status Latest Stable Version Total Downloads Latest Unstable Version License

Algorithm for generating heightmaps on PHP.

See also Perlin-Noise algorithm with the similar API.

Algorithm

Steps

Steps

Image source

See more about diamond-square algorithm on wiki

Requirements

This package is only supported on PHP 5.3 and up.

Installing

Installing via Composer

See more getcomposer.org.

Execute command

composer require a1essandro/diamond-and-square ~2.0

Usage example

Standart

$gen = new DiamondAndSquare();
$gen->setSize(7); //real size equal 2 ^ 7 + 1, i.e. 129
$gen->setPersistence(1.7);
$gen->setMapSeed("1hCaHs5hZ");

$map = $gen->generate();

统计信息

  • 总下载量: 197
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 20
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 20
  • Watchers: 3
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-10-03