replate-camera 0.1.49 → 0.1.51

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -7,14 +7,13 @@
7
7
  // RCT_EXPORT_VIEW_PROPERTY(rect, NSDictionary)
8
8
  RCT_EXPORT_VIEW_PROPERTY(color, NSString)
9
9
 
10
-
11
10
  @end
12
11
 
13
12
 
14
13
  @interface RCT_EXTERN_MODULE(ReplateCameraController, NSObject)
15
14
 
16
15
  RCT_EXTERN_METHOD(takePhoto:(BOOL*)unlimited
17
- resolver:(RCTPromiseResolveBlock)resolver
16
+ resolver:(RCTPromiseResolveBlock)resolver
18
17
  rejecter:(RCTPromiseRejectBlock)rejecter)
19
18
 
20
19
  RCT_EXTERN_METHOD(getPhotosCount:(RCTPromiseResolveBlock*)resolve
@@ -36,6 +35,8 @@ RCT_EXTERN_METHOD(registerCompletedLowerSpheresCallback:(RCTResponseSenderBlock)
36
35
 
37
36
  RCT_EXTERN_METHOD(registerOpenedTutorialCallback:(RCTResponseSenderBlock)callback)
38
37
 
38
+ RCT_EXTERN_METHOD(reset)
39
+
39
40
  + (BOOL)requiresMainQueueSetup
40
41
  {
41
42
  return NO;
@@ -15,7 +15,6 @@ class ReplateCameraViewManager: RCTViewManager {
15
15
  return false
16
16
  }
17
17
 
18
-
19
18
  }
20
19
 
21
20
  extension UIImage {
@@ -229,7 +228,7 @@ class ReplateCameraView: UIView, ARSessionDelegate {
229
228
  }
230
229
  }
231
230
  }
232
-
231
+
233
232
 
234
233
  func createDot(at position: SIMD3<Float>) -> ModelEntity {
235
234
  // Define the dimensions of the box
@@ -425,10 +424,10 @@ class ReplateCameraView: UIView, ARSessionDelegate {
425
424
  // else { fatalError("See no reference object") }
426
425
  // print(obj)
427
426
  configuration.planeDetection = ARWorldTrackingConfiguration.PlaneDetection.horizontal
428
- // ReplateCameraView.arView.debugOptions = [
429
- // .showAnchorOrigins,
430
- // .showAnchorGeometry
431
- // ]
427
+ // ReplateCameraView.arView.debugOptions = [
428
+ // .showAnchorOrigins,
429
+ // .showAnchorGeometry
430
+ // ]
432
431
  // ReplateCameraView.arView.debugOptions = [.showStatistics]
433
432
  if #available(iOS 16.0, *) {
434
433
  print("recommendedVideoFormatForHighResolutionFrameCapturing")
@@ -512,6 +511,7 @@ class ReplateCameraView: UIView, ARSessionDelegate {
512
511
  }
513
512
 
514
513
  func reset() {
514
+ ReplateCameraView.arView?.session.pause()
515
515
  ReplateCameraView.anchorEntity = nil
516
516
  ReplateCameraView.model = nil
517
517
  ReplateCameraView.spheresModels = []
@@ -525,6 +525,7 @@ class ReplateCameraView: UIView, ARSessionDelegate {
525
525
  ReplateCameraView.spheresHeight = Float(0.15)
526
526
  ReplateCameraView.dragSpeed = CGFloat(7000)
527
527
  ReplateCameraView.arView = nil
528
+
528
529
  }
529
530
 
530
531
  static func generateImpactFeedback(strength: UIImpactFeedbackGenerator.FeedbackStyle) {
@@ -588,6 +589,11 @@ class ReplateCameraController: NSObject {
588
589
  resolver(144 - ReplateCameraView.photosFromDifferentAnglesTaken)
589
590
  }
590
591
 
592
+ @objc
593
+ func reset(){
594
+ ReplateCameraView.INSTANCE.setupAR()
595
+ }
596
+
591
597
  @objc(takePhoto:resolver:rejecter:)
592
598
  func takePhoto(_ unlimited: Bool = false, resolver: @escaping RCTPromiseResolveBlock, rejecter: @escaping RCTPromiseRejectBlock) {
593
599
  var hasCalledBack = false
@@ -763,109 +769,109 @@ class ReplateCameraController: NSObject {
763
769
  }
764
770
 
765
771
  func updateSpheres(deviceTargetInFocus: Int, cameraTransform: simd_float4x4, completion: @escaping (Bool) -> Void) {
766
- // Ensure the function handles a single completion call
767
- var completionCalled = false
768
- func callCompletion(_ result: Bool) {
769
- if !completionCalled {
770
- completionCalled = true
771
- completion(result)
772
- } else {
773
- print("Completion already called")
774
- }
772
+ // Ensure the function handles a single completion call
773
+ var completionCalled = false
774
+ func callCompletion(_ result: Bool) {
775
+ if !completionCalled {
776
+ completionCalled = true
777
+ completion(result)
778
+ } else {
779
+ print("Completion already called")
775
780
  }
776
-
777
- // When the user pinches the screen, spheres are recreated,
778
- // we have to make sure all spheres have been recreated before proceeding
779
- if (ReplateCameraView.spheresModels.count < 144) {
780
- print("[updateSpheres] Spheres not fully initialized. Count: \(ReplateCameraView.spheresModels.count)")
781
+ }
782
+
783
+ // When the user pinches the screen, spheres are recreated,
784
+ // we have to make sure all spheres have been recreated before proceeding
785
+ if (ReplateCameraView.spheresModels.count < 144) {
786
+ print("[updateSpheres] Spheres not fully initialized. Count: \(ReplateCameraView.spheresModels.count)")
787
+ callCompletion(false)
788
+ return
789
+ }
790
+
791
+ guard let anchorNode = ReplateCameraView.anchorEntity else {
792
+ print("[updateSpheres] No anchor entity found.")
793
+ callCompletion(false)
794
+ return
795
+ }
796
+
797
+ // Get the camera's pose
798
+ guard let frame = ReplateCameraView.arView.session.currentFrame else {
799
+ print("[updateSpheres] No current frame available.")
800
+ callCompletion(false)
801
+ return
802
+ }
803
+
804
+ // Calculate the angle between the camera and the anchor
805
+ let angleDegrees = ReplateCameraController.angleBetweenAnchorXAndCamera(anchor: anchorNode,
806
+ cameraTransform: cameraTransform)
807
+ let sphereIndex = max(Int(round(angleDegrees / 5.0)), 0) % 72 // Ensure sphereIndex stays within 0-71 bounds
808
+
809
+ var mesh: ModelEntity?
810
+ var newAngle = false
811
+ var callback: RCTResponseSenderBlock? = nil
812
+ print("Sphere index \(sphereIndex) - Spheres length \(ReplateCameraView.spheresModels.count)")
813
+
814
+ if deviceTargetInFocus == 1 {
815
+ if sphereIndex >= ReplateCameraView.upperSpheresSet.count {
816
+ print("[updateSpheres] Sphere index out of range. Index: \(sphereIndex), Count: \(ReplateCameraView.upperSpheresSet.count)")
781
817
  callCompletion(false)
782
818
  return
783
819
  }
784
820
 
785
- guard let anchorNode = ReplateCameraView.anchorEntity else {
786
- print("[updateSpheres] No anchor entity found.")
787
- callCompletion(false)
788
- return
821
+ if !ReplateCameraView.upperSpheresSet[sphereIndex] {
822
+ ReplateCameraView.upperSpheresSet[sphereIndex] = true
823
+ ReplateCameraView.photosFromDifferentAnglesTaken += 1
824
+ newAngle = true
825
+
826
+ if 72 + sphereIndex >= ReplateCameraView.spheresModels.count {
827
+ print("[updateSpheres] Upper spheresModels index out of range. Index: \(72 + sphereIndex), Count: \(ReplateCameraView.spheresModels.count)")
828
+ callCompletion(false)
829
+ return
830
+ }
831
+ mesh = ReplateCameraView.spheresModels[72 + sphereIndex]
832
+
833
+ if ReplateCameraView.upperSpheresSet.allSatisfy({ $0 }) {
834
+ callback = ReplateCameraController.completedUpperSpheresCallback
835
+ ReplateCameraController.completedUpperSpheresCallback = nil
836
+ }
789
837
  }
790
-
791
- // Get the camera's pose
792
- guard let frame = ReplateCameraView.arView.session.currentFrame else {
793
- print("[updateSpheres] No current frame available.")
838
+ } else if deviceTargetInFocus == 0 {
839
+ if sphereIndex >= ReplateCameraView.lowerSpheresSet.count {
840
+ print("[updateSpheres] Lower sphere index out of range. Index: \(sphereIndex), Count: \(ReplateCameraView.lowerSpheresSet.count)")
794
841
  callCompletion(false)
795
842
  return
796
843
  }
797
-
798
- // Calculate the angle between the camera and the anchor
799
- let angleDegrees = ReplateCameraController.angleBetweenAnchorXAndCamera(anchor: anchorNode,
800
- cameraTransform: cameraTransform)
801
- let sphereIndex = max(Int(round(angleDegrees / 5.0)), 0) % 72 // Ensure sphereIndex stays within 0-71 bounds
802
844
 
803
- var mesh: ModelEntity?
804
- var newAngle = false
805
- var callback: RCTResponseSenderBlock? = nil
806
- print("Sphere index \(sphereIndex) - Spheres length \(ReplateCameraView.spheresModels.count)")
807
-
808
- if deviceTargetInFocus == 1 {
809
- if sphereIndex >= ReplateCameraView.upperSpheresSet.count {
810
- print("[updateSpheres] Sphere index out of range. Index: \(sphereIndex), Count: \(ReplateCameraView.upperSpheresSet.count)")
811
- callCompletion(false)
812
- return
813
- }
845
+ if !ReplateCameraView.lowerSpheresSet[sphereIndex] {
846
+ ReplateCameraView.lowerSpheresSet[sphereIndex] = true
847
+ ReplateCameraView.photosFromDifferentAnglesTaken += 1
848
+ newAngle = true
814
849
 
815
- if !ReplateCameraView.upperSpheresSet[sphereIndex] {
816
- ReplateCameraView.upperSpheresSet[sphereIndex] = true
817
- ReplateCameraView.photosFromDifferentAnglesTaken += 1
818
- newAngle = true
819
-
820
- if 72 + sphereIndex >= ReplateCameraView.spheresModels.count {
821
- print("[updateSpheres] Upper spheresModels index out of range. Index: \(72 + sphereIndex), Count: \(ReplateCameraView.spheresModels.count)")
822
- callCompletion(false)
823
- return
824
- }
825
- mesh = ReplateCameraView.spheresModels[72 + sphereIndex]
826
-
827
- if ReplateCameraView.upperSpheresSet.allSatisfy({ $0 }) {
828
- callback = ReplateCameraController.completedUpperSpheresCallback
829
- ReplateCameraController.completedUpperSpheresCallback = nil
830
- }
831
- }
832
- } else if deviceTargetInFocus == 0 {
833
- if sphereIndex >= ReplateCameraView.lowerSpheresSet.count {
834
- print("[updateSpheres] Lower sphere index out of range. Index: \(sphereIndex), Count: \(ReplateCameraView.lowerSpheresSet.count)")
850
+ if sphereIndex >= ReplateCameraView.spheresModels.count {
851
+ print("[updateSpheres] Lower spheresModels index out of range. Index: \(sphereIndex), Count: \(ReplateCameraView.spheresModels.count)")
835
852
  callCompletion(false)
836
853
  return
837
854
  }
855
+ mesh = ReplateCameraView.spheresModels[sphereIndex]
838
856
 
839
- if !ReplateCameraView.lowerSpheresSet[sphereIndex] {
840
- ReplateCameraView.lowerSpheresSet[sphereIndex] = true
841
- ReplateCameraView.photosFromDifferentAnglesTaken += 1
842
- newAngle = true
843
-
844
- if sphereIndex >= ReplateCameraView.spheresModels.count {
845
- print("[updateSpheres] Lower spheresModels index out of range. Index: \(sphereIndex), Count: \(ReplateCameraView.spheresModels.count)")
846
- callCompletion(false)
847
- return
848
- }
849
- mesh = ReplateCameraView.spheresModels[sphereIndex]
850
-
851
- if ReplateCameraView.lowerSpheresSet.allSatisfy({ $0 }) {
852
- callback = ReplateCameraController.completedLowerSpheresCallback
853
- ReplateCameraController.completedLowerSpheresCallback = nil
854
- }
857
+ if ReplateCameraView.lowerSpheresSet.allSatisfy({ $0 }) {
858
+ callback = ReplateCameraController.completedLowerSpheresCallback
859
+ ReplateCameraController.completedLowerSpheresCallback = nil
855
860
  }
856
861
  }
857
-
858
- DispatchQueue.main.async {
859
- if let mesh = mesh {
860
- let material = SimpleMaterial(color: .green, roughness: 1, isMetallic: false)
861
- mesh.model?.materials[0] = material
862
- ReplateCameraView.generateImpactFeedback(strength: .light)
863
- }
862
+ }
863
+
864
+ DispatchQueue.main.async {
865
+ if let mesh = mesh {
866
+ let material = SimpleMaterial(color: .green, roughness: 1, isMetallic: false)
867
+ mesh.model?.materials[0] = material
868
+ ReplateCameraView.generateImpactFeedback(strength: .light)
864
869
  }
865
-
866
- // Ensure callback execution doesn't interfere with array access
867
- callback?([])
868
- callCompletion(newAngle)
870
+ }
871
+
872
+ // Ensure callback execution doesn't interfere with array access
873
+ callback?([])
874
+ callCompletion(newAngle)
869
875
  }
870
876
 
871
877
  static func getTransformRelativeToAnchor(anchor: AnchorEntity, cameraTransform: simd_float4x4) -> simd_float4x4{
@@ -12,6 +12,7 @@ exports.registerCompletedLowerSpheresCallback = registerCompletedLowerSpheresCal
12
12
  exports.registerCompletedTutorialCallback = registerCompletedTutorialCallback;
13
13
  exports.registerCompletedUpperSpheresCallback = registerCompletedUpperSpheresCallback;
14
14
  exports.registerOpenedTutorialCallback = registerOpenedTutorialCallback;
15
+ exports.reset = reset;
15
16
  exports.takePhoto = takePhoto;
16
17
  var _reactNative = require("react-native");
17
18
  const LINKING_ERROR = `The package 'replate-camera' doesn't seem to be linked. Make sure: \n\n` + _reactNative.Platform.select({
@@ -54,4 +55,7 @@ function registerCompletedLowerSpheresCallback(callback) {
54
55
  function registerOpenedTutorialCallback(callback) {
55
56
  ReplateCameraModule.registerOpenedTutorialCallback(callback);
56
57
  }
58
+ function reset() {
59
+ ReplateCameraModule.reset();
60
+ }
57
61
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_reactNative","require","LINKING_ERROR","Platform","select","ios","default","ComponentName","ReplateCameraView","exports","UIManager","getViewManagerConfig","requireNativeComponent","Error","ReplateCameraModule","NativeModules","ReplateCameraController","Proxy","get","takePhoto","unlimited","getPhotosCount","getRemainingAnglesToScan","isScanComplete","registerCompletedTutorialCallback","callback","registerAnchorSetCallback","registerCompletedUpperSpheresCallback","registerCompletedLowerSpheresCallback","registerOpenedTutorialCallback"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAQA,MAAMC,aAAa,GAChB,yEAAwE,GACzEC,qBAAQ,CAACC,MAAM,CAAC;EAAEC,GAAG,EAAE,gCAAgC;EAAEC,OAAO,EAAE;AAAG,CAAC,CAAC,GACvE,sDAAsD,GACtD,+BAA+B;AAQjC,MAAMC,aAAa,GAAG,mBAAmB;AAElC,MAAMC,iBAAiB,GAAAC,OAAA,CAAAD,iBAAA,GAC5BE,sBAAS,CAACC,oBAAoB,CAACJ,aAAa,CAAC,IAAI,IAAI,GACjD,IAAAK,mCAAsB,EAAqBL,aAAa,CAAC,GACzD,MAAM;EACJ,MAAM,IAAIM,KAAK,CAACX,aAAa,CAAC;AAChC,CAAC;AAEA,MAAMY,mBAAmB,GAAAL,OAAA,CAAAK,mBAAA,GAAGC,0BAAa,CAACC,uBAAuB,GACpED,0BAAa,CAACC,uBAAuB,GACrC,IAAIC,KAAK,CACP,CAAC,CAAC,EACF;EACEC,GAAGA,CAAA,EAAG;IACJ,MAAM,IAAIL,KAAK,CAACX,aAAa,CAAC;EAChC;AACF,CACF,CAAC;AAEE,SAASiB,SAASA,CAACC,SAAkB,EAAmB;EAC7D,OAAON,mBAAmB,CAACK,SAAS,CAACC,SAAS,CAAC;AACjD;AAEO,SAASC,cAAcA,CAAA,EAAoB;EAChD,OAAOP,mBAAmB,CAACO,cAAc,CAAC,CAAC;AAC7C;AAEO,SAASC,wBAAwBA,CAAA,EAAoB;EAC1D,OAAOR,mBAAmB,CAACQ,wBAAwB,CAAC,CAAC;AACvD;AAEO,SAASC,cAAcA,CAAA,EAAqB;EACjD,OAAOT,mBAAmB,CAACS,cAAc,CAAC,CAAC;AAC7C;AAEO,SAASC,iCAAiCA,CAACC,QAAoB,EAAE;EACtEX,mBAAmB,CAACU,iCAAiC,CAACC,QAAQ,CAAC;AACjE;AAEO,SAASC,yBAAyBA,CAACD,QAAoB,EAAE;EAC9DX,mBAAmB,CAACY,yBAAyB,CAACD,QAAQ,CAAC;AACzD;AAEO,SAASE,qCAAqCA,CAACF,QAAoB,EAAE;EAC1EX,mBAAmB,CAACa,qCAAqC,CAACF,QAAQ,CAAC;AACrE;AAEO,SAASG,qCAAqCA,CAACH,QAAoB,EAAE;EAC1EX,mBAAmB,CAACc,qCAAqC,CAACH,QAAQ,CAAC;AACrE;AAEO,SAASI,8BAA8BA,CAACJ,QAAoB,EAAE;EACnEX,mBAAmB,CAACe,8BAA8B,CAACJ,QAAQ,CAAC;AAC9D","ignoreList":[]}
1
+ {"version":3,"names":["_reactNative","require","LINKING_ERROR","Platform","select","ios","default","ComponentName","ReplateCameraView","exports","UIManager","getViewManagerConfig","requireNativeComponent","Error","ReplateCameraModule","NativeModules","ReplateCameraController","Proxy","get","takePhoto","unlimited","getPhotosCount","getRemainingAnglesToScan","isScanComplete","registerCompletedTutorialCallback","callback","registerAnchorSetCallback","registerCompletedUpperSpheresCallback","registerCompletedLowerSpheresCallback","registerOpenedTutorialCallback","reset"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAQA,MAAMC,aAAa,GAChB,yEAAwE,GACzEC,qBAAQ,CAACC,MAAM,CAAC;EAAEC,GAAG,EAAE,gCAAgC;EAAEC,OAAO,EAAE;AAAG,CAAC,CAAC,GACvE,sDAAsD,GACtD,+BAA+B;AAQjC,MAAM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O,SAASI,8BAA8BA,CAACJ,QAAoB,EAAE;EACnEX,mBAAmB,CAACe,8BAA8B,CAACJ,QAAQ,CAAC;AAC9D;AAEO,SAASK,KAAKA,CAAA,EAAG;EACtBhB,mBAAmB,CAACgB,KAAK,CAAC,CAAC;AAC7B","ignoreList":[]}
@@ -39,4 +39,7 @@ export function registerCompletedLowerSpheresCallback(callback) {
39
39
  export function registerOpenedTutorialCallback(callback) {
40
40
  ReplateCameraModule.registerOpenedTutorialCallback(callback);
41
41
  }
42
+ export function reset() {
43
+ ReplateCameraModule.reset();
44
+ }
42
45
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["requireNativeComponent","UIManager","Platform","NativeModules","LINKING_ERROR","select","ios","default","ComponentName","ReplateCameraView","getViewManagerConfig","Error","ReplateCameraModule","ReplateCameraController","Proxy","get","takePhoto","unlimited","getPhotosCount","getRemainingAnglesToScan","isScanComplete","registerCompletedTutorialCallback","callback","registerAnchorSetCallback","registerCompletedUpperSpheresCallback","registerCompletedLowerSpheresCallback","registerOpenedTutorialCallback"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":"AAAA,SACEA,sBAAsB,EACtBC,SAAS,EACTC,QAAQ,EAERC,aAAa,QACR,cAAc;AAErB,MAAMC,aAAa,GAChB,yEAAwE,GACzEF,QAAQ,CAACG,MAAM,CAAC;EAAEC,GAAG,EAAE,gCAAgC;EAAEC,OAAO,EAAE;AAAG,CAAC,CAAC,GACvE,sDAAsD,GACtD,+BAA+B;AAQjC,MAAMC,aAAa,GAAG,mBAAmB;AAEzC,OAAO,MAAMC,iBAAiB,GAC5BR,SAAS,CAACS,oBAAoB,CAACF,aAAa,CAAC,IAAI,IAAI,GACjDR,sBAAsB,CAAqBQ,aAAa,CAAC,GACzD,MAAM;EACJ,MAAM,IAAIG,KAAK,CAACP,aAAa,CAAC;AAChC,CAAC;AAEP,OAAO,MAAMQ,mBAAmB,GAAGT,aAAa,CAACU,uBAAuB,GACpEV,aAAa,CAACU,uBAAuB,GACrC,IAAIC,KAAK,CACP,CAAC,CAAC,EACF;EACEC,GAAGA,CAAA,EAAG;IACJ,MAAM,IAAIJ,KAAK,CAACP,aAAa,CAAC;EAChC;AACF,CACF,CAAC;AAEL,OAAO,SAASY,SAASA,CAACC,SAAkB,EAAmB;EAC7D,OAAOL,mBAAmB,CAACI,SAAS,CAACC,SAAS,CAAC;AACjD;AAEA,OAAO,SAASC,cAAcA,CAAA,EAAoB;EAChD,OAAON,mBAAmB,CAACM,cAAc,CAAC,CAAC;AAC7C;AAEA,OAAO,SAASC,wBAAwBA,CAAA,EAAoB;EAC1D,OAAOP,mBAAmB,CAACO,wBAAwB,CAAC,CAAC;AACvD;AAEA,OAAO,SAASC,cAAcA,CAAA,EAAqB;EACjD,OAAOR,mBAAmB,CAACQ,cAAc,CAAC,CAAC;AAC7C;AAEA,OAAO,SAASC,iCAAiCA,CAACC,QAAoB,EAAE;EACtEV,mBAAmB,CAACS,iCAAiC,CAACC,QAAQ,CAAC;AACjE;AAEA,OAAO,SAASC,yBAAyBA,CAACD,QAAoB,EAAE;EAC9DV,mBAAmB,CAACW,yBAAyB,CAACD,QAAQ,CAAC;AACzD;AAEA,OAAO,SAASE,qCAAqCA,CAACF,QAAoB,EAAE;EAC1EV,mBAAmB,CAACY,qCAAqC,CAACF,QAAQ,CAAC;AACrE;AAEA,OAAO,SAASG,qCAAqCA,CAACH,QAAoB,EAAE;EAC1EV,mBAAmB,CAACa,qCAAqC,CAACH,QAAQ,CAAC;AACrE;AAEA,OAAO,SAASI,8BAA8BA,CAACJ,QAAoB,EAAE;EACnEV,mBAAmB,CAACc,8BAA8B,CAACJ,QAAQ,CAAC;AAC9D","ignoreList":[]}
1
+ {"version":3,"names":["requireNativeComponent","UIManager","Platform","NativeModules","LINKING_ERROR","select","ios","default","ComponentName","ReplateCameraView","getViewManagerConfig","Error","ReplateCameraModule","ReplateCameraController","Proxy","get","takePhoto","unlimited","getPhotosCount","getRemainingAnglesToScan","isScanComplete","registerCompletedTutorialCallback","callback","registerAnchorSetCallback","registerCompletedUpperSpheresCallback","registerCompletedLowerSpheresCallback","registerOpenedTutorialCallback","reset"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":"AAAA,SACEA,sBAAsB,EACtBC,SAAS,EACTC,QAAQ,EAERC,aAAa,QACR,cAAc;AAErB,MAAMC,aAAa,GAChB,yEAAwE,GACzEF,QAAQ,CAACG,MAAM,CAAC;EAAEC,GAAG,EAAE,gCAAgC;EAAEC,OAAO,EAAE;AAAG,CAAC,CAAC,GACvE,sDAAsD,GACtD,+BAA+B;AAQjC,MAAMC,aAAa,GAAG,mBAAmB;AAEzC,OAAO,MAAMC,iBAAiB,GAC5BR,SAAS,CAACS,oBAAoB,CAACF,aAAa,CAAC,IAAI,IAAI,GACjDR,sBAAsB,CAAqBQ,aAAa,CAAC,GACzD,MAAM;EACJ,MAAM,IAAIG,KAAK,CAACP,aAAa,CAAC;AAChC,CAAC;AAEP,OAAO,MAAMQ,mBAAmB,GAAGT,aAAa,CAACU,uBAAuB,GACpEV,aAAa,CAACU,uBAAuB,GACrC,IAAIC,KAAK,CACP,CAAC,CAAC,EACF;EACEC,GAAGA,CAAA,EAAG;IACJ,MAAM,IAAIJ,KAAK,CAACP,aAAa,CAAC;EAChC;AACF,CACF,CAAC;AAEL,OAAO,SAASY,SAASA,CAACC,SAAkB,EAAmB;EAC7D,OAAOL,mBAAmB,CAACI,SAAS,CAACC,SAAS,CAAC;AACjD;AAEA,OAAO,SAASC,cAAcA,CAAA,EAAoB;EAChD,OAAON,mBAAmB,CAACM,cAAc,CAAC,CAAC;AAC7C;AAEA,OAAO,SAASC,wBAAwBA,CAAA,EAAoB;EAC1D,OAAOP,mBAAmB,CAACO,wBAAwB,CAAC,CAAC;AACvD;AAEA,OAAO,SAASC,cAAcA,CAAA,EAAqB;EACjD,OAAOR,mBAAmB,CAACQ,cAAc,CAAC,CAAC;AAC7C;AAEA,OAAO,SAASC,iCAAiCA,CAACC,QAAoB,EAAE;EACtEV,mBAAmB,CAACS,iCAAiC,CAACC,QAAQ,CAAC;AACjE;AAEA,OAAO,SAASC,yBAAyBA,CAACD,QAAoB,EAAE;EAC9DV,mBAAmB,CAACW,yBAAyB,CAACD,QAAQ,CAAC;AACzD;AAEA,OAAO,SAASE,qCAAqCA,CAACF,QAAoB,EAAE;EAC1EV,mBAAmB,CAACY,qCAAqC,CAACF,QAAQ,CAAC;AACrE;AAEA,OAAO,SAASG,qCAAqCA,CAACH,QAAoB,EAAE;EAC1EV,mBAAmB,CAACa,qCAAqC,CAACH,QAAQ,CAAC;AACrE;AAEA,OAAO,SAASI,8BAA8BA,CAACJ,QAAoB,EAAE;EACnEV,mBAAmB,CAACc,8BAA8B,CAACJ,QAAQ,CAAC;AAC9D;AAEA,OAAO,SAASK,KAAKA,CAAA,EAAG;EACtBf,mBAAmB,CAACe,KAAK,CAAC,CAAC;AAC7B","ignoreList":[]}
@@ -14,5 +14,6 @@ export declare function registerAnchorSetCallback(callback: () => void): void;
14
14
  export declare function registerCompletedUpperSpheresCallback(callback: () => void): void;
15
15
  export declare function registerCompletedLowerSpheresCallback(callback: () => void): void;
16
16
  export declare function registerOpenedTutorialCallback(callback: () => void): void;
17
+ export declare function reset(): void;
17
18
  export {};
18
19
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,SAAS,EAEf,MAAM,cAAc,CAAC;AAQtB,KAAK,kBAAkB,GAAG;IAExB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,SAAS,CAAC;CAClB,CAAC;AAIF,eAAO,MAAM,iBAAiB,0EAKvB,CAAC;AAER,eAAO,MAAM,mBAAmB,KAS3B,CAAC;AAEN,wBAAgB,SAAS,CAAC,SAAS,EAAE,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC,CAE7D;AAED,wBAAgB,cAAc,I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,IAAI,QAEzE;AAED,wBAAgB,8BAA8B,CAAC,QAAQ,EAAE,MAAM,IAAI,QAElE;AAED,wBAAgB,KAAK,SAEpB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "replate-camera",
3
- "version": "0.1.49",
3
+ "version": "0.1.51",
4
4
  "description": "Camera component for Replate Manager",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",
package/src/index.tsx CHANGED
@@ -73,3 +73,7 @@ export function registerCompletedLowerSpheresCallback(callback: () => void) {
73
73
  export function registerOpenedTutorialCallback(callback: () => void) {
74
74
  ReplateCameraModule.registerOpenedTutorialCallback(callback);
75
75
  }
76
+
77
+ export function reset() {
78
+ ReplateCameraModule.reset();
79
+ }