You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Example :
the center of ShockwaveFilter used uv coord, the x/y is [0.0 , 1.0].
When user want to use it , have to do some transform.
I know the transform is easy , but uv is the low layer in renderer, it should be black-box for the game coder.
And in real case , e.g. : a stone drop into a water .
The logic of game should be :
// water is a Sprite object.
var filter = new Shockwave(store.position);
water.filters = [filter];
It's easy and clear.
if Shockwave.center use uv coord.
the code maybe like this :
// water is a Sprite object.
var center = new PIXI.Point(0,0);
center.x = store.position.x / app.renderer.width;
center.y = store.position.y / app.renderer.height;
var filter = new Shockwave();
In fact , use app.renderer.width & app.renderer.height is wrong.
it's need use filterArea. but user can't get the filterArea easily.
So I think the filter should use screen/viewport/pixel coord, and filter do transform internal .
The text was updated successfully, but these errors were encountered:
Example :
the center of ShockwaveFilter used uv coord, the x/y is [0.0 , 1.0].
When user want to use it , have to do some transform.
I know the transform is easy , but uv is the low layer in renderer, it should be black-box for the game coder.
And in real case , e.g. : a stone drop into a water .
The logic of game should be :
It's easy and clear.
if Shockwave.center use uv coord.
the code maybe like this :
In fact , use
app.renderer.width & app.renderer.height
is wrong.it's need use filterArea. but user can't get the filterArea easily.
So I think the filter should use screen/viewport/pixel coord, and filter do transform internal .
The text was updated successfully, but these errors were encountered: