Skip to content
Branch: master
Find file History
Latest commit 2cc0974 Jul 31, 2018
Permalink
Type Name Latest commit message Commit time
..
Failed to load latest commit information.
README.md
blur.js
brightness.js
colorize.js
contrast.js
create-image-data.js
gamma.js
grayscale.js
index.js
invert.js
sepia.js
threshold.js

README.md

Interface design reference

Usage

const bitmap = new cax.Bitmap(img)
bitmap.filter('brightness(0.5)')

//or filter rect of bitmap
//bitmap.filter('brightness(0.5)'), { x: 0, y: 0, width: 80, height: 80 }

Todo

horizontalFlip 和 verticalFlip 来制作镜像 spritesheet

new cax.Sprite({
    imgs:[bitmap.flipX()]
})

//bitmap.flipX()
//flipX return的就是 this.cacheCanvas
//bitmap.filpY()
You can’t perform that action at this time.