mirror of
https://github.com/boxgaming/qbjs.git
synced 2024-05-12 08:00:12 +00:00
samples update
This commit is contained in:
parent
fe0bf4a223
commit
1c3d787ce4
Binary file not shown.
Before Width: | Height: | Size: 32 KiB |
Binary file not shown.
Before Width: | Height: | Size: 44 KiB |
Binary file not shown.
Before Width: | Height: | Size: 55 KiB |
|
@ -2,9 +2,13 @@ Export Render
|
||||||
|
|
||||||
IncludeJS "https://cdnjs.cloudflare.com/ajax/libs/camanjs/4.0.0/caman.full.min.js"
|
IncludeJS "https://cdnjs.cloudflare.com/ajax/libs/camanjs/4.0.0/caman.full.min.js"
|
||||||
|
|
||||||
Sub Render(opts)
|
Dim lastOpts As Object
|
||||||
|
|
||||||
|
Sub Render(opts, imageId)
|
||||||
$If Javascript Then
|
$If Javascript Then
|
||||||
Caman("#gx-canvas", function() {
|
var complete = false;
|
||||||
|
if (imageId == undefined) { imageId = 0; }
|
||||||
|
Caman(QB.getImage(imageId), function() {
|
||||||
if (opts.brightness) { this.brightness(opts.brightness); }
|
if (opts.brightness) { this.brightness(opts.brightness); }
|
||||||
if (opts.contrast) { this.contrast(opts.contrast); }
|
if (opts.contrast) { this.contrast(opts.contrast); }
|
||||||
if (opts.saturation) { this.saturation(opts.saturation); }
|
if (opts.saturation) { this.saturation(opts.saturation); }
|
||||||
|
@ -18,6 +22,9 @@ $If Javascript Then
|
||||||
if (opts.sharpen) { this.sharpen(opts.sharpen); }
|
if (opts.sharpen) { this.sharpen(opts.sharpen); }
|
||||||
if (opts.blur) { this.stackBlur(opts.blur); }
|
if (opts.blur) { this.stackBlur(opts.blur); }
|
||||||
this.render();
|
this.render();
|
||||||
|
lastOpts = opts;
|
||||||
|
complete = true;
|
||||||
});
|
});
|
||||||
|
while (!complete) { await GX.sleep(10); }
|
||||||
$End If
|
$End If
|
||||||
End Sub
|
End Sub
|
Loading…
Reference in a new issue