Skip to content

Commit

Permalink
feat: add enablePremultipliedAlpha: true option to effekseer
Browse files Browse the repository at this point in the history
  • Loading branch information
Yuki Shimada committed Mar 10, 2023
1 parent 5daad23 commit 444ebe5
Show file tree
Hide file tree
Showing 7 changed files with 544 additions and 163 deletions.
2 changes: 1 addition & 1 deletion src/effekseer/EffekseerComponent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ export class EffekseerComponent extends Component {
this.__isInitialized = true;
const gl = glw!.getRawContext();
const data = Is.exist(this.uri) ? this.uri : this.arrayBuffer;
this.__context.init(gl);
this.__context.init(gl, { enablePremultipliedAlpha: true });

const onLoad = () => {
if (this.playJustAfterLoaded) {
Expand Down
21 changes: 21 additions & 0 deletions vendor/effekseer.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,12 @@ declare namespace effekseer {
*/
readonly exists: boolean;

/**
* Set frame of this effect instance.
* @param {number} frame Frame of this effect instance.
*/
setFrame(frame: number): void;

/**
* Set the location of this effect instance.
* @param {number} x X value of location
Expand Down Expand Up @@ -390,6 +396,15 @@ declare namespace effekseer {
*/
setMatrix(matrixArray: Float32Array): void;

/**
* Set the color of this effect instance.
* @param {number} r R channel value of color
* @param {number} g G channel value of color
* @param {number} b B channel value of color
* @param {number} a A channel value of color
*/
setAllColor(r: number, g: number, b: number, a: number): void;

/**
* Set the target location of this effect instance.
* @param {number} x X value of target location
Expand All @@ -412,6 +427,12 @@ declare namespace effekseer {
*/
setDynamicInput(index: number, value: number): void;

/**
* Sends the specified trigger to the currently playing effect
* @param {number} index trigger index
*/
sendTrigger(index: number): void;

/**
* Set the paused flag of this effect instance.
* if specified true, this effect playing will not advance.
Expand Down
220 changes: 179 additions & 41 deletions vendor/effekseer.js

Large diffs are not rendered by default.

61 changes: 36 additions & 25 deletions vendor/effekseer.min.js

Large diffs are not rendered by default.

Binary file modified vendor/effekseer.wasm
100755 → 100644
Binary file not shown.
281 changes: 225 additions & 56 deletions vendor/effekseer_asmjs.js

Large diffs are not rendered by default.

122 changes: 82 additions & 40 deletions vendor/effekseer_asmjs.min.js

Large diffs are not rendered by default.

0 comments on commit 444ebe5

Please sign in to comment.