Skip to content

Commit 7ead561

Browse files
committed
fix: change the name back to EngineView
1 parent e93f7b8 commit 7ead561

File tree

9 files changed

+10308
-3605
lines changed

9 files changed

+10308
-3605
lines changed

Apps/BRNPlayground/ios/Podfile.lock

Lines changed: 418 additions & 1005 deletions
Large diffs are not rendered by default.

Modules/@babylonjs/react-native-iosandroid/android/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ dependencies {
183183
if (isNewArchitectureEnabled()) {
184184
react {
185185
jsRootDir = file("../../react-native/spec")
186-
libraryName = "BabylonModuleSpec"
186+
libraryName = "BabylonReactNative"
187187
codegenJavaPackageName = "com.babylonreactnative"
188188
}
189189
}

Modules/@babylonjs/react-native-iosandroid/android/src/fabric/java/com/babylonreactnative/EngineViewManager.java

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,23 @@
77
import com.facebook.react.uimanager.SimpleViewManager;
88
import com.facebook.react.uimanager.ThemedReactContext;
99
import com.facebook.react.uimanager.ViewManagerDelegate;
10-
import com.facebook.react.viewmanagers.EngineViewNativeComponentManagerDelegate;
11-
import com.facebook.react.viewmanagers.EngineViewNativeComponentManagerInterface;
10+
import com.facebook.react.viewmanagers.EngineViewManagerDelegate;
11+
import com.facebook.react.viewmanagers.EngineViewManagerInterface;
1212

1313
@ReactModule(name = EngineViewManager.NAME)
14-
public final class EngineViewManager extends SimpleViewManager<EngineView> implements EngineViewNativeComponentManagerInterface<EngineView> {
14+
public final class EngineViewManager extends SimpleViewManager<EngineView> implements EngineViewManagerInterface<EngineView> {
1515
private final ViewManagerDelegate<EngineView> mDelegate;
1616

17-
static final String NAME = "EngineViewNativeComponent";
17+
static final String NAME = "EngineView";
18+
1819
@NonNull
1920
@Override
2021
public String getName() {
2122
return EngineViewManager.NAME;
2223
}
2324

2425
public EngineViewManager() {
25-
mDelegate = new EngineViewNativeComponentManagerDelegate<>(this);
26+
mDelegate = new EngineViewManagerDelegate<>(this);
2627
}
2728

2829
@Nullable
@@ -37,12 +38,6 @@ protected EngineView createViewInstance(@NonNull ThemedReactContext reactContext
3738
return new EngineView(reactContext);
3839
}
3940

40-
@Override
41-
public void onDropViewInstance(@NonNull EngineView view) {
42-
super.onDropViewInstance(view);
43-
// TODO: Native view specific cleanup
44-
}
45-
4641
@Override
4742
public void setIsTransparent(EngineView view, boolean value) {
4843
view.setIsTransparent(value);

Modules/@babylonjs/react-native-iosandroid/android/src/paper/java/com/babylonreactnative/EngineViewManager.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public final class EngineViewManager extends SimpleViewManager<EngineView> {
2020
@NonNull
2121
@Override
2222
public String getName() {
23-
return "EngineViewNativeComponent";
23+
return "EngineView";
2424
}
2525

2626
@ReactProp(name = "isTransparent")

Modules/@babylonjs/react-native-iosandroid/ios/BabylonModule.mm

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#import <React/RCTInvalidating.h>
66

77
#ifdef RCT_NEW_ARCH_ENABLED
8-
#import <BabylonModuleSpec/BabylonModuleSpec.h>
8+
#import <BabylonReactNative/BabylonReactNative.h>
99
#endif
1010

1111
#import <Foundation/Foundation.h>
@@ -35,6 +35,7 @@ @implementation BabylonModule
3535
});
3636
}
3737

38+
3839
RCT_EXPORT_METHOD(resetView:(RCTPromiseResolveBlock)resolve reject:(RCTPromiseRejectBlock)reject) {
3940
dispatch_async(dispatch_get_main_queue(), ^{
4041
[BabylonNativeInterop resetView];

Modules/@babylonjs/react-native-iosandroid/ios/Fabric/BabylonEngineViewComponentView.mm

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55
#include <UIKit/UIKit.h>
66
#include "react/renderer/componentregistry/ComponentDescriptorProvider.h"
77

8-
#import <react/renderer/components/BabylonModuleSpec/ComponentDescriptors.h>
9-
#import <react/renderer/components/BabylonModuleSpec/EventEmitters.h>
10-
#import <react/renderer/components/BabylonModuleSpec/Props.h>
11-
#import <react/renderer/components/BabylonModuleSpec/RCTComponentViewHelpers.h>
8+
#import <react/renderer/components/BabylonReactNative/ComponentDescriptors.h>
9+
#import <react/renderer/components/BabylonReactNative/EventEmitters.h>
10+
#import <react/renderer/components/BabylonReactNative/Props.h>
11+
#import <react/renderer/components/BabylonReactNative/RCTComponentViewHelpers.h>
1212

1313
#import "RCTFabricComponentsPlugins.h"
1414

@@ -17,20 +17,20 @@
1717

1818
using namespace facebook::react;
1919

20-
@interface BabylonEngineViewComponentView () <RCTEngineViewNativeComponentViewProtocol>
20+
@interface BabylonEngineViewComponentView () <RCTEngineViewViewProtocol>
2121
@end
2222

2323
@implementation BabylonEngineViewComponentView {
2424
EngineView* _engineView;
2525
}
2626

2727
+ (ComponentDescriptorProvider)componentDescriptorProvider {
28-
return concreteComponentDescriptorProvider<EngineViewNativeComponentComponentDescriptor>();
28+
return concreteComponentDescriptorProvider<EngineViewComponentDescriptor>();
2929
}
3030

3131
- (instancetype)initWithFrame:(CGRect)frame {
3232
if (self = [super initWithFrame:frame]) {
33-
static const auto defaultProps = std::make_shared<const EngineViewNativeComponentProps>();
33+
static const auto defaultProps = std::make_shared<const EngineViewProps>();
3434
_props = defaultProps;
3535
_engineView = [[EngineView alloc] init];
3636
_engineView.translatesAutoresizingMaskIntoConstraints = false;
@@ -48,8 +48,8 @@ - (instancetype)initWithFrame:(CGRect)frame {
4848

4949
- (void)updateProps:(Props::Shared const &)props oldProps:(Props::Shared const &)oldProps
5050
{
51-
const auto &oldViewProps = *std::static_pointer_cast<EngineViewNativeComponentProps const>(_props);
52-
const auto &newViewProps = *std::static_pointer_cast<EngineViewNativeComponentProps const>(props);
51+
const auto &oldViewProps = *std::static_pointer_cast<EngineViewProps const>(_props);
52+
const auto &newViewProps = *std::static_pointer_cast<EngineViewProps const>(props);
5353

5454
if (oldViewProps.isTransparent != newViewProps.isTransparent) {
5555
[_engineView setIsTransparentFlag:[NSNumber numberWithBool:newViewProps.isTransparent]];
@@ -74,7 +74,7 @@ - (void)takeSnapshot {
7474

7575
@end
7676

77-
Class<RCTComponentViewProtocol> EngineViewNativeComponentCls(void) {
77+
Class<RCTComponentViewProtocol> EngineViewCls(void) {
7878
return BabylonEngineViewComponentView.class;
7979
}
8080

0 commit comments

Comments
 (0)