面向HTML5的Canvas库 jCanvaScript

码农软件 · 软件分类 · HTML5开发相关 · 2019-03-08 16:14:28

软件介绍

jCanvaScript是一个面向HTML5画布(canvas)的Javascript类库,它提供了许多方法用于简化处理HTML5画布(canvas)元素的内容,只要支持canvas和Javascript的浏览器都可以使用它,包括iPhone、iPad和Android等平台。

jCanvaScript主要特点

  • 完全面向对象
  • 支持对canvas环境的操作
  • 支持对象的鼠标事件
  • 支持对象的键盘事件
  • 拖拽支持
  • 提供对象管理的简易方法
  • 支持简单的对象动画

示例代码:

var interval_1=0;
function startShow()
{
    var r = Math.floor(Math.random() * (254));
    var g = Math.floor(Math.random() * (254));
    var b = Math.floor(Math.random() * (254));
    var x = Math.floor(Math.random() * (439));
    var y = Math.floor(Math.random() * (554));
    fillStyle = "rgba("+r+", "+g+", "+b+", 0.5)";
    jc.circle(x,y,1,fillStyle,1)
        .animate({radius:100,alpha:0},1500,function(){
            this.del();
        });
}

function onload_1()
{
    jc.start(idCanvas,25);
    interval_1=setInterval("startShow()",200);
}

function start_1(idCanvas)
{
    if(interval_1)return;
    onload_1();
}

function stop_1(idCanvas)
{
    clearInterval(interval_1);
    interval_1=0;
    jc.clear(idCanvas);
}

本文地址:https://codercto.com/soft/d/906.html

How to Build a Billion Dollar App

How to Build a Billion Dollar App

George Berkowski / Little, Brown Book Group / 2015-4-1 / USD 24.95

Apps have changed the way we communicate, shop, play, interact and travel and their phenomenal popularity has presented possibly the biggest business opportunity in history. In How to Build a Billi......一起来看看 《How to Build a Billion Dollar App》 这本书的介绍吧!

HTML 压缩/解压工具
HTML 压缩/解压工具

在线压缩/解压 HTML 代码

HEX CMYK 转换工具
HEX CMYK 转换工具

HEX CMYK 互转工具

HEX HSV 转换工具
HEX HSV 转换工具

HEX HSV 互换工具