mirror of
https://github.com/Mojang/bedrock-samples.git
synced 2024-09-22 08:31:23 +00:00
61 lines
2.2 KiB
JSON
61 lines
2.2 KiB
JSON
{
|
|
"format_version": "1.10.0",
|
|
"particle_effect": {
|
|
"description": {
|
|
"identifier": "minecraft:trial_spawner_detection",
|
|
"basic_render_parameters": {
|
|
"material": "particles_alpha",
|
|
"texture": "textures/particles/trial_spawner_atlas"
|
|
}
|
|
},
|
|
"components": {
|
|
"minecraft:emitter_initialization": {
|
|
"creation_expression": "variable.player_count = 1;"
|
|
},
|
|
"minecraft:emitter_rate_instant": {
|
|
"num_particles": "30 + math.min(variable.player_count, 10) * 5"
|
|
},
|
|
"minecraft:emitter_lifetime_once": {
|
|
"active_time": 1
|
|
},
|
|
"minecraft:emitter_shape_box": {
|
|
"offset": [ "0.5 + math.random(-0.65, 0.65)", "0.1 + math.random(0.0, 0.8)", "0.5 + math.random(-0.65, 0.65)" ],
|
|
"half_dimensions": [ 0, 0, 0 ],
|
|
"direction": [ 0, 1, 0 ]
|
|
},
|
|
"minecraft:particle_lifetime_expression": {
|
|
"max_lifetime": "variable.lifetime = math.ceil(8.0 / math.random(0.75, 1.5)); return math.max(variable.lifetime, 1.0)/10.0;"
|
|
},
|
|
"minecraft:particle_initial_speed": "math.random(1,4)",
|
|
"minecraft:particle_motion_dynamic": {
|
|
"linear_acceleration": [ 0, "math.random(1.0,1.5)", 0 ]
|
|
},
|
|
"minecraft:particle_initialization": {
|
|
"per_render_expression": "variable.quadSizeY = (variable.particle_random_1 * 0.1125) + 0.11; variable.quadSizeX = variable.quadSizeY / 6.0;"
|
|
},
|
|
"minecraft:particle_appearance_billboard": {
|
|
"size": [
|
|
"return variable.quadSizeX * math.clamp(variable.particle_age / variable.particle_lifetime * 32, 0, 1);",
|
|
"return variable.quadSizeY * math.clamp(variable.particle_age / variable.particle_lifetime * 32, 0, 1);"
|
|
],
|
|
"facing_camera_mode": "lookat_y",
|
|
"uv": {
|
|
"texture_width": 8,
|
|
"texture_height": 8,
|
|
"flipbook": {
|
|
"base_UV": [ 0, 0 ],
|
|
"size_UV": [ 1, 6 ],
|
|
"step_UV": [ 1, 0 ],
|
|
"frames_per_second": 5,
|
|
"max_frame": 5,
|
|
"stretch_to_lifetime": true
|
|
}
|
|
}
|
|
},
|
|
"minecraft:particle_appearance_tinting": {
|
|
"color": [ 1, 1, 1, 1 ]
|
|
}
|
|
}
|
|
}
|
|
}
|