Skip to content

Commit

Permalink
Merge pull request #11 from Feu-Secret/tokenmagic-dev
Browse files Browse the repository at this point in the history
Update 0.1.3d
  • Loading branch information
Feu-Secret authored Jul 16, 2020
2 parents f279334 + 89fa7ff commit 309a32e
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 7 deletions.
Binary file modified .vs/Tokenmagic/v16/.suo
Binary file not shown.
3 changes: 1 addition & 2 deletions .vs/VSWorkspaceState.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,13 @@
"\\tokenmagic",
"\\tokenmagic\\fx",
"\\tokenmagic\\fx\\filters",
"\\tokenmagic\\fx\\filters\\proto",
"\\tokenmagic\\fx\\glsl",
"\\tokenmagic\\fx\\glsl\\fragmentshaders",
"\\tokenmagic\\fx\\glsl\\vertexshaders",
"\\tokenmagic\\libs",
"\\tokenmagic\\module",
"\\tokenmagic\\updates"
],
"SelectedNode": "\\README.md",
"SelectedNode": "\\tokenmagic\\fx\\glsl\\fragmentshaders\\forcefield.js",
"PreviewInSolutionExplorer": false
}
Binary file modified .vs/slnx.sqlite
Binary file not shown.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Token Magic FX - Update v0.1.3c-alpha
# Token Magic FX - Update v0.1.3d-alpha

## FX

Expand All @@ -18,6 +18,7 @@ The new filters have been added to the TokenMagic macro compendium.
- Some internal improvements and refactoring.
- Freezing when a scene is updated
- Crash when a scene with animated tokens or tiles is deleted (with active players/GM in the scene)
- autoDestroy and autoDisable properties not working properly.

# Token Magic FX - Update v0.1.2-alpha

Expand Down
Binary file modified Tokenmagic.zip
Binary file not shown.
2 changes: 1 addition & 1 deletion tokenmagic/fx/filters/proto/FilterProto.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ PIXI.Filter.prototype.setTMParams = function (params) {
}

PIXI.Filter.prototype.getPlaceable = function () {
return this.placeableImg;
return getPlaceableById(this.placeableId, this.placeableType);
}

PIXI.Filter.prototype.getPlaceableType = function () {
Expand Down
8 changes: 6 additions & 2 deletions tokenmagic/fx/glsl/fragmentshaders/forcefield.js
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ vec4 blenderVec3(int blend, vec4 fColv4, vec4 sColv4)
else if (blend == 10) { fCol = all(lessThanEqual(sCol, vec3(0.5, 0.5, 0.5))) ? (2. * fCol * sCol + fCol * fCol * (1. - 2. * sCol)) : sqrt(fCol) * (2. * sCol - 1.) + (2. * fCol) * (1. - sCol); }
else if (blend == 11) { fCol = fCol / (1.0 - sCol + 0.00001); }
else if (blend == 12) { fCol = 1.0 - (1.0 - fCol) / sCol + 0.00001; }
else if (blend == 13) { fCol = fCol + sCol; }
else if (blend == 13) { fCol = fCol + sCol; return vec4(fCol,0.6); }
else { fCol = fCol + sCol; }
return vec4(fCol,(fColv4.a+sColv4.a)/2.);
Expand Down Expand Up @@ -629,11 +629,15 @@ void main()
vec4 final = clamp(ambientLight(clamp(colorized, 0., 1.)*intensity, uv, posLight-vec2(0.5,0.5)),0.,1.);
//if ( r <= 1. && pixel.a < 1. ) {
// pixel.rgb = vec3(1.);
//}
gl_FragColor =
r > 1.0
? pixel*(1.-a)
: (pixel.a < 1.
? mix(blenderVec3(2, pixel, final),blenderVec3(blend, pixel, final),pixel.a)
? mix(blenderVec3(13, pixel, final),blenderVec3(blend, pixel, final),pixel.a)
: blenderVec3(blend, pixel, final));
}
`;
2 changes: 1 addition & 1 deletion tokenmagic/module.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "tokenmagic",
"title": "Tokenmagic",
"description": "<p>Add graphic filters and animations on your tokens and tiles.</p>",
"version": "0.1.3c",
"version": "0.1.3d",
"compatibleCoreVersion": "0.6.5",
"minimumCoreVersion": "0.6.0",
"author": "SecretFire",
Expand Down
5 changes: 5 additions & 0 deletions tokenmagic/updates/UPDATE-0.1.3d.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Token Magic FX - Update v0.1.3d-alpha

*Fixed regression :*
- autoDestroy and autoDisable properties not working properly.

0 comments on commit 309a32e

Please sign in to comment.