mirror of
https://github.com/Mojang/bedrock-samples.git
synced 2025-04-07 09:34:50 +00:00
50 lines
1.7 KiB
JSON
50 lines
1.7 KiB
JSON
{
|
|
"format_version": "1.10.0",
|
|
"particle_effect": {
|
|
"description": {
|
|
"identifier": "minecraft:firefly_particle",
|
|
"basic_render_parameters": {
|
|
"material": "particles_blend",
|
|
"texture": "textures/particle/pixel"
|
|
}
|
|
},
|
|
"components": {
|
|
"minecraft:emitter_initialization": {
|
|
"creation_expression": "v.acceleration_x = math.random( -5, 5 ); v.acceleration_y = math.random( -5, 5 ); v.acceleration_z = math.random( -5, 5 );",
|
|
"per_update_expression": "v.should_change = math.random( 0, 1 ) <= 0.05; v.should_change ? ( v.acceleration_x = math.random( -5, 5 ) ); v.should_change ? ( v.acceleration_y = math.random( -5, 5 ) ); v.should_change ? ( v.acceleration_z = math.random( -5, 5 ) );"
|
|
},
|
|
"minecraft:emitter_rate_instant": {
|
|
"num_particles": 1
|
|
},
|
|
"minecraft:emitter_lifetime_once": {},
|
|
"minecraft:emitter_shape_point": {},
|
|
"minecraft:particle_lifetime_expression": {
|
|
"max_lifetime": "math.random( 10, 15 )"
|
|
},
|
|
"minecraft:particle_initial_speed": 0.5,
|
|
"minecraft:particle_motion_dynamic": {
|
|
"linear_acceleration": ["v.acceleration_x", "v.acceleration_y", "v.acceleration_z"],
|
|
"linear_drag_coefficient": 3
|
|
},
|
|
"minecraft:particle_appearance_billboard": {
|
|
"size": [0.0375, 0.0375],
|
|
"facing_camera_mode": "lookat_xyz"
|
|
},
|
|
"minecraft:particle_motion_collision": {
|
|
"collision_radius": 0.0375,
|
|
"coefficient_of_restitution": 2
|
|
},
|
|
"minecraft:particle_appearance_tinting": {
|
|
"color": {
|
|
"interpolant": "v.particle_age / v.particle_lifetime",
|
|
"gradient": {
|
|
"0.0": "#00FFFFEB",
|
|
"0.3": "#FFFFFFEB",
|
|
"0.5": "#FFFFFFEB",
|
|
"1.0": "#00FFFFEB"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} |