blob: 608fa6331759abe1af1a2704f63b30abdabfb756 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
|
// Copyright (C) 2023 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
import QtQuick
import QtQuick3D
import QtQuick3D.Particles3D
import QtQuick3D.Helpers
ParticleSystem3D {
id: flash
ParticleEmitter3D {
id: burstEmitter1
velocity: burstDirection1
particle: modelParticle1
particleScale: 0
particleEndScale: 30
enabled: flash.visible
lifeSpan: 1000
emitBursts: emitBurst1
ModelParticle3D {
id: modelParticle1
sortMode: Particle3D.SortDistance
fadeInDuration: burstEmitter1.lifeSpan / 4
fadeOutDuration: modelParticle1.fadeInDuration * 3
}
VectorDirection3D {
id: burstDirection1
directionVariation.x: 0
directionVariation.z: 0
direction.y: 0
directionVariation.y: 0
}
EmitBurst3D {
id: emitBurst1
duration: 100
amount: 1
time: 0
}
Model {
source: "#Sphere"
castsReflections: true
receivesReflections: true
materials: flashMat
scale.y: 1
receivesShadows: true
castsShadows: true
instancing: modelParticle1.instanceTable
scale.z: 1
scale.x: 1
}
emitRate: 1
particleEndScaleVariation: 0
}
Node {
id: __materialLibrary__
CustomMaterial {
id: flashMat
fragmentShader: "shaders/flash.frag"
depthDrawMode: Material.NeverDepthDraw
shadingMode: CustomMaterial.Shaded
destinationBlend: CustomMaterial.One
cullMode: Material.NoCulling
property color baseColor: "#bbddff"
sourceBlend: CustomMaterial.One
vertexShader: "shaders/flash.vert"
objectName: "Flash Material"
}
}
}
|