【问题标题】:How to use blendMode divide width PIXI.js?如何使用 blendMode 划分宽度 PIXI.js?
【发布时间】:2015-01-28 04:38:34
【问题描述】:

我想在 PIXI.js 中使用除法混合模式。怎么做?

我已经尝试了所有其他可用的 blendModes,但没有一个足以满足我想要制作的效果。 http://i.stack.imgur.com/YlqVm.jpg

使用基于 pixi.js 的移相器:

base = game.add.sprite(350, 350, 'base');
base.anchor.set(0.5);
base.tint = '0x7f4f2c';
blur = game.add.sprite(350, 350, 'blur');
blur.anchor.set(0.5);
blur.blendMode = PIXI.blendModes.DIVIDE; // Of course it doesn't work because pixi doesn't have it

【问题讨论】:

  • 链接不够,请将代码添加到您的问题中
  • 我已经添加了代码,但对你没有帮助...

标签: sprite blending pixi.js


【解决方案1】:

我以某种方式尝试反转图像并使用 pixi 中可用的 COLOR_DODGE 混合模式并且它有效。这是一个非常幸运的事情。效果不是 100% 相等,但在这种情况下非常接近且足够好。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2011-10-01
    • 1970-01-01
    • 2014-01-04
    • 2014-04-06
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多