replate-camera 0.18.3 → 0.18.4

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.
Files changed (85) hide show
  1. package/android/app/src/main/java/com/replatecamera/ReplateCameraCaptureController.kt +2 -0
  2. package/android/app/src/main/java/com/replatecamera/ReplateCameraController.kt +9 -0
  3. package/android/app/src/main/java/com/replatecamera/ReplateCameraView.kt +13 -2
  4. package/android/lib/build/intermediates/compile_library_classes_jar/debug/classes.jar +0 -0
  5. package/android/lib/build/intermediates/runtime_library_classes_dir/debug/com/replatecamera/DeviceTargetInfo.class +0 -0
  6. package/android/lib/build/intermediates/runtime_library_classes_dir/debug/com/replatecamera/ReplateCameraCaptureController$processAndSaveImage$1.class +0 -0
  7. package/android/lib/build/intermediates/runtime_library_classes_dir/debug/com/replatecamera/ReplateCameraCaptureController$processTargetedDevice$1$1.class +0 -0
  8. package/android/lib/build/intermediates/runtime_library_classes_dir/debug/com/replatecamera/ReplateCameraCaptureController$triggerAutoCaptureIfNewAngle$1$1.class +0 -0
  9. package/android/lib/build/intermediates/runtime_library_classes_dir/debug/com/replatecamera/ReplateCameraCaptureController$triggerAutoCaptureIfNewAngle$1.class +0 -0
  10. package/android/lib/build/intermediates/runtime_library_classes_dir/debug/com/replatecamera/ReplateCameraCaptureController.class +0 -0
  11. package/android/lib/build/intermediates/runtime_library_classes_dir/debug/com/replatecamera/ReplateCameraController$Companion.class +0 -0
  12. package/android/lib/build/intermediates/runtime_library_classes_dir/debug/com/replatecamera/ReplateCameraController.class +0 -0
  13. package/android/lib/build/intermediates/runtime_library_classes_dir/debug/com/replatecamera/ReplateCameraView$Companion.class +0 -0
  14. package/android/lib/build/intermediates/runtime_library_classes_dir/debug/com/replatecamera/ReplateCameraView$GestureListener.class +0 -0
  15. package/android/lib/build/intermediates/runtime_library_classes_dir/debug/com/replatecamera/ReplateCameraView$ScaleListener.class +0 -0
  16. package/android/lib/build/intermediates/runtime_library_classes_dir/debug/com/replatecamera/ReplateCameraView$initializeSceneView$1$1.class +0 -0
  17. package/android/lib/build/intermediates/runtime_library_classes_dir/debug/com/replatecamera/ReplateCameraView$makeUnlitMaterial$1.class +0 -0
  18. package/android/lib/build/intermediates/runtime_library_classes_dir/debug/com/replatecamera/ReplateCameraView$makeUnlitMaterial$2$1.class +0 -0
  19. package/android/lib/build/intermediates/runtime_library_classes_dir/debug/com/replatecamera/ReplateCameraView$makeUnlitMaterial$3.class +0 -0
  20. package/android/lib/build/intermediates/runtime_library_classes_dir/debug/com/replatecamera/ReplateCameraView$prebuildBaseMaterial$1.class +0 -0
  21. package/android/lib/build/intermediates/runtime_library_classes_dir/debug/com/replatecamera/ReplateCameraView$selectBestCameraConfig$$inlined$compareBy$1.class +0 -0
  22. package/android/lib/build/intermediates/runtime_library_classes_dir/debug/com/replatecamera/ReplateCameraView$selectBestCameraConfig$$inlined$thenBy$1.class +0 -0
  23. package/android/lib/build/intermediates/runtime_library_classes_dir/debug/com/replatecamera/ReplateCameraView$updateSphereColor$4.class +0 -0
  24. package/android/lib/build/intermediates/runtime_library_classes_dir/debug/com/replatecamera/ReplateCameraView.class +0 -0
  25. package/android/lib/build/intermediates/runtime_library_classes_dir/debug/com/replatecamera/SafeCallbackHandler.class +0 -0
  26. package/android/lib/build/intermediates/runtime_library_classes_jar/debug/classes.jar +0 -0
  27. package/android/lib/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab +0 -0
  28. package/android/lib/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.values.at +0 -0
  29. package/android/lib/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab +0 -0
  30. package/android/lib/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.values.at +0 -0
  31. package/android/lib/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab +0 -0
  32. package/android/lib/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.values.at +0 -0
  33. package/android/lib/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab +0 -0
  34. package/android/lib/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.values.at +0 -0
  35. package/android/lib/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab +0 -0
  36. package/android/lib/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.values +0 -0
  37. package/android/lib/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.values.at +0 -0
  38. package/android/lib/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.values.s +1 -1
  39. package/android/lib/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab +0 -0
  40. package/android/lib/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.values.at +0 -0
  41. package/android/lib/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab +0 -0
  42. package/android/lib/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.values.at +0 -0
  43. package/android/lib/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab +0 -0
  44. package/android/lib/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.values.at +0 -0
  45. package/android/lib/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/counters.tab +1 -1
  46. package/android/lib/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab +0 -0
  47. package/android/lib/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.values.at +0 -0
  48. package/android/lib/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab +0 -0
  49. package/android/lib/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.keystream +0 -0
  50. package/android/lib/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.keystream.len +0 -0
  51. package/android/lib/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.len +0 -0
  52. package/android/lib/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.values.at +0 -0
  53. package/android/lib/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab_i +0 -0
  54. package/android/lib/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab +0 -0
  55. package/android/lib/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.keystream +0 -0
  56. package/android/lib/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.keystream.len +0 -0
  57. package/android/lib/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.len +0 -0
  58. package/android/lib/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.values +0 -0
  59. package/android/lib/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.values.at +0 -0
  60. package/android/lib/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.values.s +1 -1
  61. package/android/lib/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab_i +0 -0
  62. package/android/lib/build/kotlin/compileDebugKotlin/cacheable/last-build.bin +0 -0
  63. package/android/lib/build/kotlin/compileDebugKotlin/local-state/build-history.bin +0 -0
  64. package/android/lib/build/tmp/kotlin-classes/debug/com/replatecamera/DeviceTargetInfo.class +0 -0
  65. package/android/lib/build/tmp/kotlin-classes/debug/com/replatecamera/ReplateCameraCaptureController$processAndSaveImage$1.class +0 -0
  66. package/android/lib/build/tmp/kotlin-classes/debug/com/replatecamera/ReplateCameraCaptureController$processTargetedDevice$1$1.class +0 -0
  67. package/android/lib/build/tmp/kotlin-classes/debug/com/replatecamera/ReplateCameraCaptureController$triggerAutoCaptureIfNewAngle$1$1.class +0 -0
  68. package/android/lib/build/tmp/kotlin-classes/debug/com/replatecamera/ReplateCameraCaptureController$triggerAutoCaptureIfNewAngle$1.class +0 -0
  69. package/android/lib/build/tmp/kotlin-classes/debug/com/replatecamera/ReplateCameraCaptureController.class +0 -0
  70. package/android/lib/build/tmp/kotlin-classes/debug/com/replatecamera/ReplateCameraController$Companion.class +0 -0
  71. package/android/lib/build/tmp/kotlin-classes/debug/com/replatecamera/ReplateCameraController.class +0 -0
  72. package/android/lib/build/tmp/kotlin-classes/debug/com/replatecamera/ReplateCameraView$Companion.class +0 -0
  73. package/android/lib/build/tmp/kotlin-classes/debug/com/replatecamera/ReplateCameraView$GestureListener.class +0 -0
  74. package/android/lib/build/tmp/kotlin-classes/debug/com/replatecamera/ReplateCameraView$ScaleListener.class +0 -0
  75. package/android/lib/build/tmp/kotlin-classes/debug/com/replatecamera/ReplateCameraView$initializeSceneView$1$1.class +0 -0
  76. package/android/lib/build/tmp/kotlin-classes/debug/com/replatecamera/ReplateCameraView$makeUnlitMaterial$1.class +0 -0
  77. package/android/lib/build/tmp/kotlin-classes/debug/com/replatecamera/ReplateCameraView$makeUnlitMaterial$2$1.class +0 -0
  78. package/android/lib/build/tmp/kotlin-classes/debug/com/replatecamera/ReplateCameraView$makeUnlitMaterial$3.class +0 -0
  79. package/android/lib/build/tmp/kotlin-classes/debug/com/replatecamera/ReplateCameraView$prebuildBaseMaterial$1.class +0 -0
  80. package/android/lib/build/tmp/kotlin-classes/debug/com/replatecamera/ReplateCameraView$selectBestCameraConfig$$inlined$compareBy$1.class +0 -0
  81. package/android/lib/build/tmp/kotlin-classes/debug/com/replatecamera/ReplateCameraView$selectBestCameraConfig$$inlined$thenBy$1.class +0 -0
  82. package/android/lib/build/tmp/kotlin-classes/debug/com/replatecamera/ReplateCameraView$updateSphereColor$4.class +0 -0
  83. package/android/lib/build/tmp/kotlin-classes/debug/com/replatecamera/ReplateCameraView.class +0 -0
  84. package/android/lib/build/tmp/kotlin-classes/debug/com/replatecamera/SafeCallbackHandler.class +0 -0
  85. package/package.json +1 -1
@@ -119,6 +119,7 @@ class ReplateCameraCaptureController(
119
119
  try {
120
120
  val uri = Uri.fromFile(file)
121
121
  saveExif(uri, json)
122
+ ReplateCameraView.capturedPhotoPaths.add(file.absolutePath)
122
123
  val totalAngles = ReplateCameraView.photosFromDifferentAnglesTaken
123
124
  logI("SAVED: auto-capture JPEG uri=$uri totalAngles=$totalAngles")
124
125
  Handler(Looper.getMainLooper()).post {
@@ -206,6 +207,7 @@ class ReplateCameraCaptureController(
206
207
  try {
207
208
  val uri = Uri.fromFile(file)
208
209
  saveExif(uri, json)
210
+ ReplateCameraView.capturedPhotoPaths.add(file.absolutePath)
209
211
  logI("SAVED: manual takePhoto JPEG uri=$uri")
210
212
  callback.resolve(uri.toString())
211
213
  } catch (e: Exception) {
@@ -4,6 +4,7 @@ import android.app.ActivityManager
4
4
  import android.os.Handler
5
5
  import android.os.Looper
6
6
  import android.util.Log
7
+ import com.facebook.react.bridge.Arguments
7
8
  import com.facebook.react.bridge.Callback
8
9
  import com.facebook.react.bridge.Promise
9
10
  import com.facebook.react.bridge.ReactApplicationContext
@@ -226,6 +227,14 @@ class ReplateCameraController(private val reactContext: ReactApplicationContext)
226
227
  }
227
228
  }
228
229
 
230
+ @ReactMethod
231
+ fun getCapturedPhotoPaths(promise: Promise) {
232
+ val paths = ReplateCameraView.capturedPhotoPaths.toList()
233
+ val array = Arguments.createArray()
234
+ paths.forEach { array.pushString(it) }
235
+ promise.resolve(array)
236
+ }
237
+
229
238
  @ReactMethod
230
239
  fun reset() {
231
240
  Log.i(TAG, "reset requested")
@@ -44,6 +44,7 @@ import com.google.ar.core.exceptions.UnavailableException
44
44
  import com.google.ar.sceneform.*
45
45
  import com.google.ar.sceneform.math.Vector3
46
46
  import com.google.ar.sceneform.math.Quaternion
47
+ import com.google.ar.sceneform.rendering.CameraStream
47
48
  import com.google.ar.sceneform.rendering.Color
48
49
  import com.google.ar.sceneform.rendering.Material
49
50
  import com.google.ar.sceneform.rendering.MaterialFactory
@@ -57,6 +58,7 @@ import com.gorisse.thomas.sceneform.light.LightEstimationConfig
57
58
  import java.io.ByteArrayOutputStream
58
59
  import java.io.File
59
60
  import java.io.FileOutputStream
61
+ import java.util.Collections
60
62
  import java.util.LinkedList
61
63
  import java.util.EnumSet
62
64
  import kotlin.math.acos
@@ -113,6 +115,7 @@ class ReplateCameraView @JvmOverloads constructor(
113
115
  // Stats
114
116
  var totalPhotosTaken = 0
115
117
  var photosFromDifferentAnglesTaken = 0
118
+ val capturedPhotoPaths: MutableList<String> = Collections.synchronizedList(mutableListOf())
116
119
 
117
120
  fun getCurrentInstance(): ReplateCameraView? = instance
118
121
  }
@@ -473,6 +476,7 @@ class ReplateCameraView @JvmOverloads constructor(
473
476
  // Ensure the debug overlay stays on top of the ArSceneView
474
477
  debugOverlayTextView?.bringToFront()
475
478
  sceneView._lightEstimationConfig = LightEstimationConfig.DISABLED
479
+ sceneView.cameraStream.depthOcclusionMode = CameraStream.DepthOcclusionMode.DEPTH_OCCLUSION_ENABLED
476
480
 
477
481
  // Initialize controllers only when scene view is ready.
478
482
  cameraController = ReplateCameraCaptureController(context, sceneView, this)
@@ -558,7 +562,10 @@ class ReplateCameraView @JvmOverloads constructor(
558
562
  private fun applySessionConfiguration(session: Session, existingConfig: Config? = null) {
559
563
  selectBestCameraConfig(session)
560
564
  val config = existingConfig ?: Config(session)
561
- config.focusMode = Config.FocusMode.AUTO
565
+ config.focusMode = Config.FocusMode.FIXED
566
+ if (session.isDepthModeSupported(Config.DepthMode.AUTOMATIC)) {
567
+ config.depthMode = Config.DepthMode.AUTOMATIC
568
+ }
562
569
  // After anchor placement disable plane finding so ARCore stops updating planes
563
570
  // (prevents world re-alignment from affecting the anchor). Light estimation stays
564
571
  // enabled so Sceneform has ambient light and materials render with correct colors.
@@ -602,7 +609,10 @@ class ReplateCameraView @JvmOverloads constructor(
602
609
  CameraConfig.TargetFps.TARGET_FPS_30,
603
610
  CameraConfig.TargetFps.TARGET_FPS_60
604
611
  )
605
- depthSensorUsage = EnumSet.of(CameraConfig.DepthSensorUsage.DO_NOT_USE)
612
+ depthSensorUsage = EnumSet.of(
613
+ CameraConfig.DepthSensorUsage.DO_NOT_USE,
614
+ CameraConfig.DepthSensorUsage.REQUIRE_AND_USE
615
+ )
606
616
  }
607
617
  val configs = session.getSupportedCameraConfigs(filter).ifEmpty {
608
618
  session.getSupportedCameraConfigs()
@@ -1583,6 +1593,7 @@ class ReplateCameraView @JvmOverloads constructor(
1583
1593
  }
1584
1594
  if (!isSessionPaused) {
1585
1595
  logD("resumeSession ignored: already resumed")
1596
+ capturedPhotoPaths.clear()
1586
1597
  return
1587
1598
  }
1588
1599
  logI("RESUME [start]")
@@ -1 +1 @@
1
- ������Đ
1
+ ������Đ՚Ԕ��
@@ -1 +1 @@
1
- �C��C��T
1
+ �C��C��T�Z�6�<
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "replate-camera",
3
- "version": "0.18.3",
3
+ "version": "0.18.4",
4
4
  "description": "Camera component for Replate Manager",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",