User prompt
BlockSparkParticles should be affected by a tiny bit of gravity and also have a 0.5 alpha instead of 0.25
Code edit (6 edits merged)
Please save this source code
User prompt
Please fix the bug: 'self.parent is null' in or related to this line: 'var sparkParticle = new BlockSparkParticle({' Line Number: 873
User prompt
when creating a new crackasset in the blockblank class, also create 2 * BlockSparkParticles
User prompt
create a new BlockSparkParticle class that contains a 10x10 shapeBox asset with 0.25 alpha. The particle travels in a random direction at a speed of 10 and fades out (via tween) over 350ms ↪💡 Consider importing and using the following plugins: @upit/tween.v1, @upit/tween.v1
Code edit (1 edits merged)
Please save this source code
User prompt
before increasing the score in the block onLit function, create a blockLitParticle
User prompt
create a blockLitParticle comprised of a shapeBox asset with starting size of BLOCK_SIZE and alpha of 0.5. Linearly tween the size to 3 * BLOCK_SIZE and the alpha to 0 over 0.5s
Code edit (7 edits merged)
Please save this source code
User prompt
when creating a lavaparticle, randomize its scale between 1 and 1.5
User prompt
randomize the LavaParticle scale between 1 and 1.5
Code edit (1 edits merged)
Please save this source code
User prompt
give the LavaParticle glow a 0.5 alpha, and attach a smaller shapeBox with the same rotation and a black tint and 0.5 alpha as well
User prompt
Replace the LavaParticle glow with a shapeBox asset, retaining the relevant properties
Code edit (4 edits merged)
Please save this source code
User prompt
add an empty, basic Container to the Lava class before creating the slices called the particleContainer
Code edit (1 edits merged)
Please save this source code
User prompt
the glow should have a random rotation (from 0 to pi), and the initial random velocities should be increased by a factor of 10
User prompt
instead of the LavaParticle having a shapeEllipse, use a glow class instance, with a aforementioned properties
User prompt
every tick a lavaSlice has a 5% chance of creating a lava particle along it's length
User prompt
Create a LavaParticle class comprised of a glow instance with anchor of (0.5, 0.5), width and height of 15, 3 layers, tint of 0xFF4D00, and x and y range of 5. The particle should have a random x and y velocities ranging from -0.1 to 0.1 on the x and -1 to -0.2 on the y. Additionally the particle should be affected by gravity and it destroyed when it goes below the game height
User prompt
what is wrong with the line: `self.y = Math.max(0, Math.sin(game.ticks / 60 + self.index) * 10);`
Code edit (7 edits merged)
Please save this source code
User prompt
remove the horizontal line shapebox
Code edit (2 edits merged)
Please save this source code
===================================================================
--- original.js
+++ change.js
@@ -149,9 +149,10 @@
self.y = Math.sin(LK.ticks * LAVA_BOB_PERIOD + config.index * LAVA_BOB_OFFSET) * LAVA_BOB_HEIGHT;
if (Math.random() < 0.0025) {
self.parent.particleContainer.addChild(new LavaParticle({
x: self.x + Math.random() * LAVA_SLICE_WIDTH - LAVA_SLICE_WIDTH / 2,
- y: self.y
+ y: self.y,
+ scale: 1 + Math.random() * 0.5 // Random scale between 1 and 1.5
}));
}
};
return self;
@@ -159,14 +160,13 @@
var LavaParticle = ConfigContainer.expand(function (config) {
var self = ConfigContainer.call(this, config);
// Attach a glow asset with specified properties
self.rotation = Math.random() * Math.PI; // Random rotation between 0 and pi
- var randomScale = 1 + Math.random() * 0.5; // Random scale between 1 and 1.5
self.attachAsset('shapeBox', {
anchorX: 0.5,
anchorY: 0.5,
- width: 20 * randomScale,
- height: 20 * randomScale,
+ width: 20,
+ height: 20,
tint: 0xFF4D00,
alpha: 0.5
});
// Attach a smaller shapeBox with black tint and 0.5 alpha