Repository: 4ian/GDevelop
File: Extensions/3D/JsExtension.js (JavaScript)

Code before:
          _('Animation finished'),
          _(
            'Check if the animation being played by the Sprite object is finished.'
          ),
          _('The animation of _PARAM0_ is finished'),
          _('Animations and images'),
          'res/conditions/animation24.png',
          'res/conditions/animation.png'
        )
        .addParameter('object', _('3D model'), 'Model3DObject', false)
        .markAsSimple()
        .setHidden()
        .setFunctionName('hasAnimationEnded');

      object
        .addScopedAction(
          'SetCrossfadeDuration',
          _('Set cross fade duration'),
          _('Set the duration of the cross fading between two animations.'),
          'Set cross fading duration of _PARAM0_ to _PARAM1_',
          _('Duration'),
          'res/conditions/3d_box.svg',
          'res/conditions/3d_box.svg'
        )
        .addParameter('object', _('3D model'), 'Model3DObject', false)
        .addParameter('number', _('Cross fade duration'), '', false)
        .setFunctionName('setCrossfadeDuration');
    }

    const Cube3DObject = new gd.ObjectJsImplementation();
    Cube3DObject.updateProperty = function (propertyName, newValue) {
      const objectContent = this.content;
      if (
        propertyName === 'width' ||
        propertyName === 'height' ||
        propertyName === 'depth'
      ) {
        objectContent[propertyName] = parseFloat(newValue);
        return true;
      }
      if (
        propertyName === 'frontFaceResourceName' ||
        propertyName === 'backFaceResourceName' ||
        propertyName === 'leftFaceResourceName' ||
        propertyName === 'rightFaceResourceName' ||
        propertyName === 'topFaceResourceName' ||
        propertyName === 'bottomFaceResourceName' ||
        propertyName === 'backFaceUpThroughWhichAxisRotation' ||
        propertyName === 'facesOrientation' ||
        propertyName === 'materialType' ||
        propertyName === 'tint'

Review comment (suggestion):
```suggestion
        .addParameter('number', _('Crossfade duration'), '', false)
```

Code after:
          _('Animation finished'),
          _(
            'Check if the animation being played by the Sprite object is finished.'
          ),
          _('The animation of _PARAM0_ is finished'),
          _('Animations and images'),
          'res/conditions/animation24.png',
          'res/conditions/animation.png'
        )
        .addParameter('object', _('3D model'), 'Model3DObject', false)
        .markAsSimple()
        .setHidden()
        .setFunctionName('hasAnimationEnded');

      object
        .addScopedAction(
          'SetCrossfadeDuration',
          _('Set crossfade duration'),
          _('Set the crossfade duration when switching to a new animation.'),
          _('Set crossfade duration of _PARAM0_ to _PARAM1_'),
          _('Duration'),
          'res/conditions/animation24.png',
          'res/conditions/animation.svg'
        )
        .addParameter('object', _('3D model'), 'Model3DObject', false)
        .addParameter('number', _('Crossfade duration'), '', false)
        .setFunctionName('setCrossfadeDuration');
    }

    const Cube3DObject = new gd.ObjectJsImplementation();
    Cube3DObject.updateProperty = function (propertyName, newValue) {
      const objectContent = this.content;
      if (
        propertyName === 'width' ||
        propertyName === 'height' ||
        propertyName === 'depth'
      ) {
        objectContent[propertyName] = parseFloat(newValue);
        return true;
      }
      if (
        propertyName === 'frontFaceResourceName' ||
        propertyName === 'backFaceResourceName' ||
        propertyName === 'leftFaceResourceName' ||
        propertyName === 'rightFaceResourceName' ||
        propertyName === 'topFaceResourceName' ||
        propertyName === 'bottomFaceResourceName' ||
        propertyName === 'backFaceUpThroughWhichAxisRotation' ||
        propertyName === 'facesOrientation' ||
        propertyName === 'materialType' ||
        propertyName === 'tint'