blendMode=add for effects
This commit is contained in:
@@ -152,6 +152,7 @@ export default class App {
|
|||||||
animatePodCreation(originalPod, globalPosition) {
|
animatePodCreation(originalPod, globalPosition) {
|
||||||
const pod = new Pod(originalPod.pod, null, this.tooltip)
|
const pod = new Pod(originalPod.pod, null, this.tooltip)
|
||||||
pod.draw()
|
pod.draw()
|
||||||
|
pod.blendMode = PIXI.BLEND_MODES.ADD
|
||||||
pod.interactive = false
|
pod.interactive = false
|
||||||
const targetPosition = globalPosition
|
const targetPosition = globalPosition
|
||||||
const angle = Math.random()*Math.PI*2
|
const angle = Math.random()*Math.PI*2
|
||||||
@@ -191,6 +192,7 @@ export default class App {
|
|||||||
animatePodDeletion(originalPod, globalPosition) {
|
animatePodDeletion(originalPod, globalPosition) {
|
||||||
const pod = new Pod(originalPod.pod, null, this.tooltip)
|
const pod = new Pod(originalPod.pod, null, this.tooltip)
|
||||||
pod.draw()
|
pod.draw()
|
||||||
|
pod.blendMode = PIXI.BLEND_MODES.ADD
|
||||||
const globalCenter = new PIXI.Point(globalPosition.x + pod.width/2, globalPosition.y + pod.height/2)
|
const globalCenter = new PIXI.Point(globalPosition.x + pod.width/2, globalPosition.y + pod.height/2)
|
||||||
const blur = new PIXI.filters.BlurFilter(4)
|
const blur = new PIXI.filters.BlurFilter(4)
|
||||||
pod.filters = [blur]
|
pod.filters = [blur]
|
||||||
|
|||||||
@@ -232,7 +232,7 @@ export class Pod extends PIXI.Graphics {
|
|||||||
if (this.pod.deleted) {
|
if (this.pod.deleted) {
|
||||||
if (!this.cross) {
|
if (!this.cross) {
|
||||||
const cross = new PIXI.Graphics()
|
const cross = new PIXI.Graphics()
|
||||||
cross.lineStyle(3, 0xff6666, 1)
|
cross.lineStyle(3, 0xff0000, 1)
|
||||||
cross.moveTo(0, 0)
|
cross.moveTo(0, 0)
|
||||||
cross.lineTo(10, 10)
|
cross.lineTo(10, 10)
|
||||||
cross.moveTo(10, 0)
|
cross.moveTo(10, 0)
|
||||||
@@ -241,6 +241,7 @@ export class Pod extends PIXI.Graphics {
|
|||||||
cross.pivot.y = 5
|
cross.pivot.y = 5
|
||||||
cross.x = 5
|
cross.x = 5
|
||||||
cross.y = 5
|
cross.y = 5
|
||||||
|
cross.blendMode = PIXI.BLEND_MODES.ADD
|
||||||
this.addChild(cross)
|
this.addChild(cross)
|
||||||
this.cross = cross
|
this.cross = cross
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user