diff --git a/mobile/android/app/build.gradle b/mobile/android/app/build.gradle index b4da8e5..f19596b 100644 --- a/mobile/android/app/build.gradle +++ b/mobile/android/app/build.gradle @@ -95,11 +95,11 @@ def enableProguardInReleaseBuilds = false android { buildToolsVersion "27.0.3" - compileSdkVersion 25 + compileSdkVersion 27 defaultConfig { applicationId "com.deightonar" - minSdkVersion 23 + minSdkVersion 24 targetSdkVersion 27 versionCode 1 versionName "1.0.0" diff --git a/mobile/src/ARViewer/ARViewer.js b/mobile/src/ARViewer/ARViewer.js index bd9f017..0aa2f98 100644 --- a/mobile/src/ARViewer/ARViewer.js +++ b/mobile/src/ARViewer/ARViewer.js @@ -22,14 +22,17 @@ const shapes = { order: { source: require("./models/hardhat_obj.obj"), resources: [require("./models/hardhat.mtl")], + scale: [0.5, 0.5, 0.5], }, complaint: { source: require("./models/question_obj.obj"), resources: [require("./models/question.mtl")], + scale: [1, 1, 1], }, inspection: { source: require("./models/clipboard_obj.obj"), resources: [require("./models/clipboard.mtl")], + scale: [1, 1, 1], }, } @@ -48,7 +51,6 @@ class WorkItemSceneAR extends React.Component { this.state = { position: [0, 0, 0], rotation: [0, 0, 0], - scale: [0.2, 0.2, 0.2], shouldBillboard: true, trackingInitialized: false, haveAnchor: false, @@ -85,8 +87,8 @@ class WorkItemSceneAR extends React.Component { (result.transform.position[2] - position[2]) * (result.transform.position[2] - position[2]) ) - if (distance > 0.2 && distance < 10) { - // If we found a plane greater than .2 and less than 10 meters away then choose it! + if (distance > 1 && distance < 15) { + // If we found a plane a decent distance away, choose it! hitResultPosition = result.transform.position break } @@ -95,7 +97,7 @@ class WorkItemSceneAR extends React.Component { // then we'll use it as the initial display point let d = distance(position, result.transform.position) - if (d > 0.2 && d < 10) { + if (d > 1 && d < 15) { hitResultPosition = result.transform.position } } @@ -180,13 +182,12 @@ class WorkItemSceneAR extends React.Component { ref={(ref) => (this.arNode = ref)} transformBehaviors={shouldBillboard ? "billboardY" : []} position={position} - scale={scale} rotation={rotation}> - {/* - // TODO: Search feature - - - - - */} (this.sectionList = ref)} style={{ width: "100%", flexGrow: 1 }}