Repository: playcanvas/engine
File: src/scene/mesh-instance.js (JavaScript)

Code before:
 * **Example**
 *
 * - {@link https://playcanvas.github.io/#compute/indirect-draw compute/indirect-draw}
 *
 * @category Graphics
 */
class MeshInstance {
    /**
     * Enable shadow casting for this mesh instance. Use this property to enable/disable shadow
     * casting without overhead of removing from scene. Note that this property does not add the
     * mesh instance to appropriate list of shadow casters on a {@link Layer}, but allows mesh to
     * be skipped from shadow casting while it is in the list already. Defaults to false.
     *
     * @type {boolean}
     */
    castShadow = false;

    /**
     * Mask that enables or disables shadow casting for each shadow cascade
     * used by a mesh instance under a {@link LIGHTTYPE_DIRECTIONAL}.
     * This property takes effect only when the {@link castShadow} is enabled.
     * Defaults to {@link SHADOW_CASCADE_ALL}.
     *
     * @type {number}
     */
    shadowCascadeFlags = SHADOW_CASCADE_ALL;

    /**
     * Controls whether the mesh instance can be culled by frustum culling (see
     * {@link CameraComponent#frustumCulling}). Defaults to true.
     *
     * @type {boolean}
     */
    cull = true;

    /**
     * Determines the rendering order of mesh instances. Only used when mesh instances are added to
     * a {@link Layer} with {@link Layer#opaqueSortMode} or {@link Layer#transparentSortMode}
     * (depending on the material) set to {@link SORTMODE_MANUAL}.
     *
     * @type {number}
     */
    drawOrder = 0;

    /**
     * @type {number}
     * @ignore
     */
    _drawBucket = 127;

    /**

Review comment (suggestion):
I'd rename it to `shadowCascadeMask`.
And possible text:
```
Specifies a bitmask that controls which shadow cascades a mesh instance contributes to when rendered with a {@link LIGHTTYPE_DIRECTIONAL} light source. This setting is only effective if the {@link castShadow} property is enabled. Defaults to {@link SHADOW_CASCADE_ALL}, which means the mesh casts shadows into all available cascades.
```

Code after:
 * **Example**
 *
 * - {@link https://playcanvas.github.io/#compute/indirect-draw compute/indirect-draw}
 *
 * @category Graphics
 */
class MeshInstance {
    /**
     * Enable shadow casting for this mesh instance. Use this property to enable/disable shadow
     * casting without overhead of removing from scene. Note that this property does not add the
     * mesh instance to appropriate list of shadow casters on a {@link Layer}, but allows mesh to
     * be skipped from shadow casting while it is in the list already. Defaults to false.
     *
     * @type {boolean}
     */
    castShadow = false;

    /**
     * Specifies a bitmask that controls which shadow cascades a mesh instance contributes
     * to when rendered with a {@link LIGHTTYPE_DIRECTIONAL} light source.
     * This setting is only effective if the {@link castShadow} property is enabled.
     * Defaults to {@link SHADOW_CASCADE_ALL}, which means the mesh casts shadows into all available cascades.
     *
     * @type {number}
     */
    shadowCascadeMask = SHADOW_CASCADE_ALL;

    /**
     * Controls whether the mesh instance can be culled by frustum culling (see
     * {@link CameraComponent#frustumCulling}). Defaults to true.
     *
     * @type {boolean}
     */
    cull = true;

    /**
     * Determines the rendering order of mesh instances. Only used when mesh instances are added to
     * a {@link Layer} with {@link Layer#opaqueSortMode} or {@link Layer#transparentSortMode}
     * (depending on the material) set to {@link SORTMODE_MANUAL}.
     *
     * @type {number}
     */
    drawOrder = 0;

    /**
     * @type {number}
     * @ignore
     */
    _drawBucket = 127;

    /**