Fix documentation following implementation of particle trails

This commit is contained in:
Marcel Admiraal 2021-05-01 09:56:32 +01:00
parent 4a7679e4dd
commit fcf8071ec9
7 changed files with 90 additions and 12 deletions

View File

@ -364,6 +364,8 @@
<member name="transparency" type="int" setter="set_transparency" getter="get_transparency" enum="BaseMaterial3D.Transparency" default="0">
If [code]true[/code], transparency is enabled on the body. See also [member blend_mode].
</member>
<member name="use_particle_trails" type="bool" setter="set_flag" getter="get_flag" default="false">
</member>
<member name="use_point_size" type="bool" setter="set_flag" getter="get_flag" default="false">
If [code]true[/code], render point size can be changed.
[b]Note:[/b] this is only effective for objects whose geometry is point-based rather than triangle-based. See also [member point_size].
@ -655,7 +657,9 @@
<constant name="FLAG_SUBSURFACE_MODE_SKIN" value="18" enum="Flags">
Enables the skin mode for subsurface scattering which is used to improve the look of subsurface scattering when used for human skin.
</constant>
<constant name="FLAG_MAX" value="19" enum="Flags">
<constant name="FLAG_PARTICLE_TRAILS_MODE" value="19" enum="Flags">
</constant>
<constant name="FLAG_MAX" value="20" enum="Flags">
Represents the size of the [enum Flags] enum.
</constant>
<constant name="DIFFUSE_BURLEY" value="0" enum="DiffuseMode">

View File

@ -108,7 +108,7 @@
Returns the Y value for the point that would exist at the X position [code]offset[/code] along the curve.
</description>
</method>
<method name="interpolate_baked">
<method name="interpolate_baked" qualifiers="const">
<return type="float">
</return>
<argument index="0" name="offset" type="float">

View File

@ -87,18 +87,22 @@
<member name="draw_passes" type="int" setter="set_draw_passes" getter="get_draw_passes" default="1">
The number of draw passes when rendering particles.
</member>
<member name="draw_skin" type="Skin" setter="set_skin" getter="get_skin">
</member>
<member name="emitting" type="bool" setter="set_emitting" getter="is_emitting" default="true">
If [code]true[/code], particles are being emitted.
</member>
<member name="explosiveness" type="float" setter="set_explosiveness_ratio" getter="get_explosiveness_ratio" default="0.0">
Time ratio between each emission. If [code]0[/code], particles are emitted continuously. If [code]1[/code], all particles are emitted simultaneously.
</member>
<member name="fixed_fps" type="int" setter="set_fixed_fps" getter="get_fixed_fps" default="0">
<member name="fixed_fps" type="int" setter="set_fixed_fps" getter="get_fixed_fps" default="30">
The particle system's frame rate is fixed to a value. For instance, changing the value to 2 will make the particles render at 2 frames per second. Note this does not slow down the simulation of the particle system itself.
</member>
<member name="fract_delta" type="bool" setter="set_fractional_delta" getter="get_fractional_delta" default="true">
If [code]true[/code], results in fractional delta calculation which has a smoother particles display effect.
</member>
<member name="interpolate" type="bool" setter="set_interpolate" getter="get_interpolate" default="true">
</member>
<member name="lifetime" type="float" setter="set_lifetime" getter="get_lifetime" default="1.0">
Amount of time each particle will exist.
</member>
@ -122,6 +126,12 @@
</member>
<member name="sub_emitter" type="NodePath" setter="set_sub_emitter" getter="get_sub_emitter" default="NodePath(&quot;&quot;)">
</member>
<member name="trail_enabled" type="bool" setter="set_enable_trail" getter="is_trail_enabled" default="false">
</member>
<member name="trail_length_secs" type="float" setter="set_trail_length" getter="get_trail_length" default="0.3">
</member>
<member name="transform_align" type="int" setter="set_transform_align" getter="get_transform_align" enum="GPUParticles3D.TransformAlign" default="0">
</member>
<member name="visibility_aabb" type="AABB" setter="set_visibility_aabb" getter="get_visibility_aabb" default="AABB( -4, -4, -4, 8, 8, 8 )">
The [AABB] that determines the node's region which needs to be visible on screen for the particle system to be active.
Grow the box if particles suddenly appear/disappear when the node enters/exits the screen. The [AABB] can be grown via code or with the [b]Particles → Generate AABB[/b] editor tool.
@ -150,5 +160,13 @@
<constant name="MAX_DRAW_PASSES" value="4">
Maximum number of draw passes supported.
</constant>
<constant name="TRANSFORM_ALIGN_DISABLED" value="0" enum="TransformAlign">
</constant>
<constant name="TRANSFORM_ALIGN_Z_BILLBOARD" value="1" enum="TransformAlign">
</constant>
<constant name="TRANSFORM_ALIGN_Y_TO_VELOCITY" value="2" enum="TransformAlign">
</constant>
<constant name="TRANSFORM_ALIGN_Z_BILLBOARD_Y_TO_VELOCITY" value="3" enum="TransformAlign">
</constant>
</constants>
</class>

View File

@ -0,0 +1,31 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="RibbonTrailMesh" inherits="PrimitiveMesh" version="4.0">
<brief_description>
</brief_description>
<description>
</description>
<tutorials>
</tutorials>
<methods>
</methods>
<members>
<member name="curve" type="Curve" setter="set_curve" getter="get_curve">
</member>
<member name="section_length" type="float" setter="set_section_length" getter="get_section_length" default="0.2">
</member>
<member name="section_segments" type="int" setter="set_section_segments" getter="get_section_segments" default="3">
</member>
<member name="sections" type="int" setter="set_sections" getter="get_sections" default="5">
</member>
<member name="shape" type="int" setter="set_shape" getter="get_shape" enum="RibbonTrailMesh.Shape" default="1">
</member>
<member name="size" type="float" setter="set_size" getter="get_size" default="1.0">
</member>
</members>
<constants>
<constant name="SHAPE_FLAT" value="0" enum="Shape">
</constant>
<constant name="SHAPE_CROSS" value="1" enum="Shape">
</constant>
</constants>
</class>

View File

@ -0,0 +1,27 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="TubeTrailMesh" inherits="PrimitiveMesh" version="4.0">
<brief_description>
</brief_description>
<description>
</description>
<tutorials>
</tutorials>
<methods>
</methods>
<members>
<member name="curve" type="Curve" setter="set_curve" getter="get_curve">
</member>
<member name="radial_steps" type="int" setter="set_radial_steps" getter="get_radial_steps" default="8">
</member>
<member name="radius" type="float" setter="set_radius" getter="get_radius" default="1.0">
</member>
<member name="section_length" type="float" setter="set_section_length" getter="get_section_length" default="0.2">
</member>
<member name="section_rings" type="int" setter="set_section_rings" getter="get_section_rings" default="3">
</member>
<member name="sections" type="int" setter="set_sections" getter="get_sections" default="5">
</member>
</members>
<constants>
</constants>
</class>

View File

@ -605,10 +605,10 @@ void GPUParticles3D::_bind_methods() {
BIND_CONSTANT(MAX_DRAW_PASSES);
BIND_CONSTANT(TRANSFORM_ALIGN_DISABLED);
BIND_CONSTANT(TRANSFORM_ALIGN_Z_BILLBOARD);
BIND_CONSTANT(TRANSFORM_ALIGN_Y_TO_VELOCITY);
BIND_CONSTANT(TRANSFORM_ALIGN_Z_BILLBOARD_Y_TO_VELOCITY);
BIND_ENUM_CONSTANT(TRANSFORM_ALIGN_DISABLED);
BIND_ENUM_CONSTANT(TRANSFORM_ALIGN_Z_BILLBOARD);
BIND_ENUM_CONSTANT(TRANSFORM_ALIGN_Y_TO_VELOCITY);
BIND_ENUM_CONSTANT(TRANSFORM_ALIGN_Z_BILLBOARD_Y_TO_VELOCITY);
}
GPUParticles3D::GPUParticles3D() {

View File

@ -2075,16 +2075,14 @@ void RibbonTrailMesh::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_shape"), &RibbonTrailMesh::get_shape);
ADD_PROPERTY(PropertyInfo(Variant::INT, "shape", PROPERTY_HINT_ENUM, "Flat,Cross"), "set_shape", "get_shape");
ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "size", PROPERTY_HINT_RANGE, "0.001,100.0,0.001,or_greater"), "set_size", "get_size");
ADD_PROPERTY(PropertyInfo(Variant::INT, "sections", PROPERTY_HINT_RANGE, "2,128,1"), "set_sections", "get_sections");
ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "section_length", PROPERTY_HINT_RANGE, "0.001,1024.0,0.001,or_greater"), "set_section_length", "get_section_length");
ADD_PROPERTY(PropertyInfo(Variant::INT, "section_segments", PROPERTY_HINT_RANGE, "1,128,1"), "set_section_segments", "get_section_segments");
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "curve", PROPERTY_HINT_RESOURCE_TYPE, "Curve"), "set_curve", "get_curve");
BIND_ENUM_CONSTANT(SHAPE_FLAT)
BIND_ENUM_CONSTANT(SHAPE_CROSS)
}
RibbonTrailMesh::RibbonTrailMesh() {