Skip to content

Commit

Permalink
⛽ Add napalm puddle fire effect
Browse files Browse the repository at this point in the history
  • Loading branch information
paulcscharf committed Dec 5, 2023
1 parent 5be8cde commit b369926
Show file tree
Hide file tree
Showing 3 changed files with 77 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,11 @@
id: "animatedPointLight",
parameters: {
animation: {
timeScale: 2,
timeScale: 0.5,
keyFrames: [
{ duration: 0.0, radius: 0.75, color: "00ffd385" },
{ duration: 0.025, radius: 0.8, color: "88ffd385" },
{ duration: 0.1, radius: 1.2, color: "aaff7c39" },
{ duration: 0.1, radius: 1.2, color: "aac05629" },
{ duration: 0.1, radius: 1.2, color: "66753822" },
{ duration: 0.025, radius: 1, color: "00753822" }
{ duration: 0.0, radius: 1.5, color: "00ffd385" },
{ duration: 0.05, radius: 1.5, color: "aaff7c39" },
{ duration: 0.1, radius: 1.5, color: "aac05629" },
],
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
{
id: "napalmPuddle-fire-effect",
components: [
{ id: "particles", parameters: { } },
{ id: "particlesMoveLinear" },
{ id: "particlesGravity", parameters: { factor: -0.25 } },
{ id: "particlesDrag", parameters: { linear: 5, angular: 1 } },

{ id: "toggleOnTriggers", parameters: {
name: "toggleSpawning",
stopOnParent : [ "objectDeleting" ],
}},

{ id: "particlesClampVelocity", parameters: {
minZ: 0,
maxZ: 0.2
}},

{ id: "particlesSpawnContinuously", parameters: {
toggle: "toggleSpawning",
interval: 0.07,
intervalNoise: 0.2,
count: 1,

offset: [0, 0, 0.05],
offsetNoise: 0,

lifeTime: 1.2,
lifeTimeNoise: 0.3,

velocity: [0, 0, 0],
velocityNoise: 0,
randomVelocity: 0.7,
randomVelocityNoise: 0.5,

orientationNoise: 1,
angularVelocity: 90,
angularVelocityNoise: 1,
randomAngularVelocitySign: true,
} },

{ id: "particlesKeyFrames", parameters: {
scaleToParticleLifeTime: true,
animation: {
keyFrames: [
{ duration: 0, size: 1, color: "00753822" },
{ duration: 0.3, size: 0.2, color: "FFffd385" },
{ duration: 0.1, size: 0.22, color: "FFff7c39" },
{ duration: 0.1, size: 0.35, color: "66c05629" },
{ duration: 0.1, size: 0.5, color: "00753822" },
],
}
} },

{ id: "particlesDraw", parameters: {
sprite: "default.large-particles.flame3",
drawMode: "sprite",
shader: "flame",
drawGroupOrderKey : 2,
reverseOrder: true
} },

{ id: "particlesDrawLight", parameters: {
color: "White",
radius: 1.3,
intensity: 0.2,
colorMode: "fromParticleColor",
} },

{ id: "particlesDeleteIf", parameters: { parentIsDeleted: true, noParticles: true } }
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,6 @@
effectDuration: 4
}
},
{
id: "sprite",
parameters: {
sprite: "particle.mote",
drawGroup: "IgnoreDepth",
color: "FFFFD500",
size: 0.15,
},
}
{ id: "child", parameters: { object: "napalmPuddle-fire-effect", surviveParent: true } },
]
}

0 comments on commit b369926

Please sign in to comment.