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.
- package/android/app/src/main/java/com/replatecamera/ReplateCameraCaptureController.kt +2 -0
- package/android/app/src/main/java/com/replatecamera/ReplateCameraController.kt +9 -0
- package/android/app/src/main/java/com/replatecamera/ReplateCameraView.kt +13 -2
- package/android/lib/build/intermediates/compile_library_classes_jar/debug/classes.jar +0 -0
- package/android/lib/build/intermediates/runtime_library_classes_dir/debug/com/replatecamera/DeviceTargetInfo.class +0 -0
- package/android/lib/build/intermediates/runtime_library_classes_dir/debug/com/replatecamera/ReplateCameraCaptureController$processAndSaveImage$1.class +0 -0
- package/android/lib/build/intermediates/runtime_library_classes_dir/debug/com/replatecamera/ReplateCameraCaptureController$processTargetedDevice$1$1.class +0 -0
- package/android/lib/build/intermediates/runtime_library_classes_dir/debug/com/replatecamera/ReplateCameraCaptureController$triggerAutoCaptureIfNewAngle$1$1.class +0 -0
- package/android/lib/build/intermediates/runtime_library_classes_dir/debug/com/replatecamera/ReplateCameraCaptureController$triggerAutoCaptureIfNewAngle$1.class +0 -0
- package/android/lib/build/intermediates/runtime_library_classes_dir/debug/com/replatecamera/ReplateCameraCaptureController.class +0 -0
- package/android/lib/build/intermediates/runtime_library_classes_dir/debug/com/replatecamera/ReplateCameraController$Companion.class +0 -0
- package/android/lib/build/intermediates/runtime_library_classes_dir/debug/com/replatecamera/ReplateCameraController.class +0 -0
- package/android/lib/build/intermediates/runtime_library_classes_dir/debug/com/replatecamera/ReplateCameraView$Companion.class +0 -0
- package/android/lib/build/intermediates/runtime_library_classes_dir/debug/com/replatecamera/ReplateCameraView$GestureListener.class +0 -0
- package/android/lib/build/intermediates/runtime_library_classes_dir/debug/com/replatecamera/ReplateCameraView$ScaleListener.class +0 -0
- package/android/lib/build/intermediates/runtime_library_classes_dir/debug/com/replatecamera/ReplateCameraView$initializeSceneView$1$1.class +0 -0
- package/android/lib/build/intermediates/runtime_library_classes_dir/debug/com/replatecamera/ReplateCameraView$makeUnlitMaterial$1.class +0 -0
- package/android/lib/build/intermediates/runtime_library_classes_dir/debug/com/replatecamera/ReplateCameraView$makeUnlitMaterial$2$1.class +0 -0
- package/android/lib/build/intermediates/runtime_library_classes_dir/debug/com/replatecamera/ReplateCameraView$makeUnlitMaterial$3.class +0 -0
- package/android/lib/build/intermediates/runtime_library_classes_dir/debug/com/replatecamera/ReplateCameraView$prebuildBaseMaterial$1.class +0 -0
- package/android/lib/build/intermediates/runtime_library_classes_dir/debug/com/replatecamera/ReplateCameraView$selectBestCameraConfig$$inlined$compareBy$1.class +0 -0
- package/android/lib/build/intermediates/runtime_library_classes_dir/debug/com/replatecamera/ReplateCameraView$selectBestCameraConfig$$inlined$thenBy$1.class +0 -0
- package/android/lib/build/intermediates/runtime_library_classes_dir/debug/com/replatecamera/ReplateCameraView$updateSphereColor$4.class +0 -0
- package/android/lib/build/intermediates/runtime_library_classes_dir/debug/com/replatecamera/ReplateCameraView.class +0 -0
- package/android/lib/build/intermediates/runtime_library_classes_dir/debug/com/replatecamera/SafeCallbackHandler.class +0 -0
- package/android/lib/build/intermediates/runtime_library_classes_jar/debug/classes.jar +0 -0
- package/android/lib/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab +0 -0
- package/android/lib/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.values.at +0 -0
- package/android/lib/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab +0 -0
- package/android/lib/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.values.at +0 -0
- package/android/lib/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab +0 -0
- package/android/lib/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.values.at +0 -0
- package/android/lib/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab +0 -0
- package/android/lib/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.values.at +0 -0
- package/android/lib/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab +0 -0
- package/android/lib/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.values +0 -0
- package/android/lib/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.values.at +0 -0
- package/android/lib/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.values.s +1 -1
- package/android/lib/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab +0 -0
- package/android/lib/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.values.at +0 -0
- package/android/lib/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab +0 -0
- package/android/lib/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.values.at +0 -0
- package/android/lib/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab +0 -0
- package/android/lib/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.values.at +0 -0
- package/android/lib/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/counters.tab +1 -1
- package/android/lib/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab +0 -0
- package/android/lib/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.values.at +0 -0
- package/android/lib/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab +0 -0
- package/android/lib/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.keystream +0 -0
- package/android/lib/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.keystream.len +0 -0
- package/android/lib/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.len +0 -0
- package/android/lib/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.values.at +0 -0
- package/android/lib/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab_i +0 -0
- package/android/lib/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab +0 -0
- package/android/lib/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.keystream +0 -0
- package/android/lib/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.keystream.len +0 -0
- package/android/lib/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.len +0 -0
- package/android/lib/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.values +0 -0
- package/android/lib/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.values.at +0 -0
- package/android/lib/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.values.s +1 -1
- package/android/lib/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab_i +0 -0
- package/android/lib/build/kotlin/compileDebugKotlin/cacheable/last-build.bin +0 -0
- package/android/lib/build/kotlin/compileDebugKotlin/local-state/build-history.bin +0 -0
- package/android/lib/build/tmp/kotlin-classes/debug/com/replatecamera/DeviceTargetInfo.class +0 -0
- package/android/lib/build/tmp/kotlin-classes/debug/com/replatecamera/ReplateCameraCaptureController$processAndSaveImage$1.class +0 -0
- package/android/lib/build/tmp/kotlin-classes/debug/com/replatecamera/ReplateCameraCaptureController$processTargetedDevice$1$1.class +0 -0
- package/android/lib/build/tmp/kotlin-classes/debug/com/replatecamera/ReplateCameraCaptureController$triggerAutoCaptureIfNewAngle$1$1.class +0 -0
- package/android/lib/build/tmp/kotlin-classes/debug/com/replatecamera/ReplateCameraCaptureController$triggerAutoCaptureIfNewAngle$1.class +0 -0
- package/android/lib/build/tmp/kotlin-classes/debug/com/replatecamera/ReplateCameraCaptureController.class +0 -0
- package/android/lib/build/tmp/kotlin-classes/debug/com/replatecamera/ReplateCameraController$Companion.class +0 -0
- package/android/lib/build/tmp/kotlin-classes/debug/com/replatecamera/ReplateCameraController.class +0 -0
- package/android/lib/build/tmp/kotlin-classes/debug/com/replatecamera/ReplateCameraView$Companion.class +0 -0
- package/android/lib/build/tmp/kotlin-classes/debug/com/replatecamera/ReplateCameraView$GestureListener.class +0 -0
- package/android/lib/build/tmp/kotlin-classes/debug/com/replatecamera/ReplateCameraView$ScaleListener.class +0 -0
- package/android/lib/build/tmp/kotlin-classes/debug/com/replatecamera/ReplateCameraView$initializeSceneView$1$1.class +0 -0
- package/android/lib/build/tmp/kotlin-classes/debug/com/replatecamera/ReplateCameraView$makeUnlitMaterial$1.class +0 -0
- package/android/lib/build/tmp/kotlin-classes/debug/com/replatecamera/ReplateCameraView$makeUnlitMaterial$2$1.class +0 -0
- package/android/lib/build/tmp/kotlin-classes/debug/com/replatecamera/ReplateCameraView$makeUnlitMaterial$3.class +0 -0
- package/android/lib/build/tmp/kotlin-classes/debug/com/replatecamera/ReplateCameraView$prebuildBaseMaterial$1.class +0 -0
- package/android/lib/build/tmp/kotlin-classes/debug/com/replatecamera/ReplateCameraView$selectBestCameraConfig$$inlined$compareBy$1.class +0 -0
- package/android/lib/build/tmp/kotlin-classes/debug/com/replatecamera/ReplateCameraView$selectBestCameraConfig$$inlined$thenBy$1.class +0 -0
- package/android/lib/build/tmp/kotlin-classes/debug/com/replatecamera/ReplateCameraView$updateSphereColor$4.class +0 -0
- package/android/lib/build/tmp/kotlin-classes/debug/com/replatecamera/ReplateCameraView.class +0 -0
- package/android/lib/build/tmp/kotlin-classes/debug/com/replatecamera/SafeCallbackHandler.class +0 -0
- 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.
|
|
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(
|
|
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]")
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/android/lib/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/android/lib/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab
CHANGED
|
Binary file
|
package/android/lib/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.values
CHANGED
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
������Đ՚Ԕ��
|
|
Binary file
|
|
Binary file
|
package/android/lib/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab
CHANGED
|
Binary file
|
|
Binary file
|
package/android/lib/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab
CHANGED
|
Binary file
|
|
Binary file
|
package/android/lib/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/counters.tab
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
19
|
|
2
2
|
0
|
package/android/lib/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab
CHANGED
|
Binary file
|
|
Binary file
|
package/android/lib/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/android/lib/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.len
CHANGED
|
Binary file
|
|
Binary file
|
package/android/lib/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab_i
CHANGED
|
Binary file
|
package/android/lib/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/android/lib/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.len
CHANGED
|
Binary file
|
package/android/lib/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.values
CHANGED
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
�C��C��T
|
|
1
|
+
�C��C��T�Z�6�<
|
package/android/lib/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab_i
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/android/lib/build/tmp/kotlin-classes/debug/com/replatecamera/ReplateCameraController.class
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/android/lib/build/tmp/kotlin-classes/debug/com/replatecamera/ReplateCameraView.class
CHANGED
|
Binary file
|