Work and stuff
This commit is contained in:
Binary file not shown.
@@ -0,0 +1,8 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 3fea3da2da0476a44bf2b5e54374c12e
|
||||||
|
timeCreated: 1464303369
|
||||||
|
licenseType: Free
|
||||||
|
NativeFormatImporter:
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,78 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: f8e9876551e887d449dbb0e0116f0bc2
|
||||||
|
timeCreated: 1464303263
|
||||||
|
licenseType: Free
|
||||||
|
ModelImporter:
|
||||||
|
serializedVersion: 19
|
||||||
|
fileIDToRecycleName:
|
||||||
|
100000: default
|
||||||
|
100002: //RootNode
|
||||||
|
400000: default
|
||||||
|
400002: //RootNode
|
||||||
|
2300000: default
|
||||||
|
3300000: default
|
||||||
|
4300000: default
|
||||||
|
materials:
|
||||||
|
importMaterials: 1
|
||||||
|
materialName: 0
|
||||||
|
materialSearch: 1
|
||||||
|
animations:
|
||||||
|
legacyGenerateAnimations: 4
|
||||||
|
bakeSimulation: 0
|
||||||
|
resampleRotations: 1
|
||||||
|
optimizeGameObjects: 0
|
||||||
|
motionNodeName:
|
||||||
|
animationImportErrors:
|
||||||
|
animationImportWarnings:
|
||||||
|
animationRetargetingWarnings:
|
||||||
|
animationDoRetargetingWarnings: 0
|
||||||
|
animationCompression: 1
|
||||||
|
animationRotationError: 0.5
|
||||||
|
animationPositionError: 0.5
|
||||||
|
animationScaleError: 0.5
|
||||||
|
animationWrapMode: 0
|
||||||
|
extraExposedTransformPaths: []
|
||||||
|
clipAnimations: []
|
||||||
|
isReadable: 1
|
||||||
|
meshes:
|
||||||
|
lODScreenPercentages: []
|
||||||
|
globalScale: 1
|
||||||
|
meshCompression: 0
|
||||||
|
addColliders: 0
|
||||||
|
importBlendShapes: 1
|
||||||
|
swapUVChannels: 0
|
||||||
|
generateSecondaryUV: 0
|
||||||
|
useFileUnits: 1
|
||||||
|
optimizeMeshForGPU: 1
|
||||||
|
keepQuads: 0
|
||||||
|
weldVertices: 1
|
||||||
|
secondaryUVAngleDistortion: 8
|
||||||
|
secondaryUVAreaDistortion: 15.000001
|
||||||
|
secondaryUVHardAngle: 88
|
||||||
|
secondaryUVPackMargin: 4
|
||||||
|
useFileScale: 1
|
||||||
|
tangentSpace:
|
||||||
|
normalSmoothAngle: 60
|
||||||
|
normalImportMode: 0
|
||||||
|
tangentImportMode: 3
|
||||||
|
importAnimation: 1
|
||||||
|
copyAvatar: 0
|
||||||
|
humanDescription:
|
||||||
|
human: []
|
||||||
|
skeleton: []
|
||||||
|
armTwist: 0.5
|
||||||
|
foreArmTwist: 0.5
|
||||||
|
upperLegTwist: 0.5
|
||||||
|
legTwist: 0.5
|
||||||
|
armStretch: 0.05
|
||||||
|
legStretch: 0.05
|
||||||
|
feetSpacing: 0
|
||||||
|
rootMotionBoneName:
|
||||||
|
hasTranslationDoF: 0
|
||||||
|
lastHumanDescriptionAvatarSource: {instanceID: 0}
|
||||||
|
animationType: 0
|
||||||
|
humanoidOversampling: 1
|
||||||
|
additionalBone: 0
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 69 KiB |
@@ -0,0 +1,57 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 2cb6a82d0e4fbff4fab0ceab7d1af00d
|
||||||
|
timeCreated: 1464303263
|
||||||
|
licenseType: Free
|
||||||
|
TextureImporter:
|
||||||
|
fileIDToRecycleName: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
mipmaps:
|
||||||
|
mipMapMode: 0
|
||||||
|
enableMipMap: 1
|
||||||
|
linearTexture: 0
|
||||||
|
correctGamma: 0
|
||||||
|
fadeOut: 0
|
||||||
|
borderMipMap: 0
|
||||||
|
mipMapFadeDistanceStart: 1
|
||||||
|
mipMapFadeDistanceEnd: 3
|
||||||
|
bumpmap:
|
||||||
|
convertToNormalMap: 0
|
||||||
|
externalNormalMap: 0
|
||||||
|
heightScale: 0.25
|
||||||
|
normalMapFilter: 0
|
||||||
|
isReadable: 0
|
||||||
|
grayScaleToAlpha: 0
|
||||||
|
generateCubemap: 0
|
||||||
|
cubemapConvolution: 0
|
||||||
|
cubemapConvolutionSteps: 7
|
||||||
|
cubemapConvolutionExponent: 1.5
|
||||||
|
seamlessCubemap: 0
|
||||||
|
textureFormat: -1
|
||||||
|
maxTextureSize: 2048
|
||||||
|
textureSettings:
|
||||||
|
filterMode: -1
|
||||||
|
aniso: -1
|
||||||
|
mipBias: -1
|
||||||
|
wrapMode: -1
|
||||||
|
nPOTScale: 1
|
||||||
|
lightmap: 0
|
||||||
|
rGBM: 0
|
||||||
|
compressionQuality: 50
|
||||||
|
allowsAlphaSplitting: 0
|
||||||
|
spriteMode: 0
|
||||||
|
spriteExtrude: 1
|
||||||
|
spriteMeshType: 1
|
||||||
|
alignment: 0
|
||||||
|
spritePivot: {x: 0.5, y: 0.5}
|
||||||
|
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||||
|
spritePixelsToUnits: 100
|
||||||
|
alphaIsTransparency: 0
|
||||||
|
textureType: -1
|
||||||
|
buildTargetSettings: []
|
||||||
|
spriteSheet:
|
||||||
|
sprites: []
|
||||||
|
outline: []
|
||||||
|
spritePackingTag:
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
Binary file not shown.
@@ -0,0 +1,8 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: e56c3c4ce0da74d4196c9d005840f90a
|
||||||
|
timeCreated: 1464303602
|
||||||
|
licenseType: Free
|
||||||
|
NativeFormatImporter:
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
Binary file not shown.
+44
-8
@@ -8,11 +8,13 @@ public class Measurement : MonoBehaviour {
|
|||||||
public Vector3 EndPosition;
|
public Vector3 EndPosition;
|
||||||
private float HoleSize = 0.1f;
|
private float HoleSize = 0.1f;
|
||||||
private Vector3 lineUp = new Vector3(0, 1, 0);
|
private Vector3 lineUp = new Vector3(0, 1, 0);
|
||||||
|
private float DefaultLineWith = 0.005f;
|
||||||
|
|
||||||
private Vector3 LocalStartPosition;
|
private Vector3 LocalStartPosition;
|
||||||
private Vector3 LocalEndPosition;
|
private Vector3 LocalEndPosition;
|
||||||
|
|
||||||
|
private float LineWidth;
|
||||||
|
|
||||||
// Use this for initialization
|
// Use this for initialization
|
||||||
void Start () {
|
void Start () {
|
||||||
|
|
||||||
@@ -32,8 +34,14 @@ public class Measurement : MonoBehaviour {
|
|||||||
|
|
||||||
Vector3 middlePosition = (LocalStartPosition + (LocalEndPosition - LocalStartPosition) / 2.0f);
|
Vector3 middlePosition = (LocalStartPosition + (LocalEndPosition - LocalStartPosition) / 2.0f);
|
||||||
|
|
||||||
|
float smallestScale = Mathf.Min(transform.lossyScale.x, Mathf.Min(transform.lossyScale.y, transform.lossyScale.z));
|
||||||
|
|
||||||
Vector3 startToEnd = LocalEndPosition - LocalStartPosition;
|
if (smallestScale < 0.4f)
|
||||||
|
{
|
||||||
|
HoleSize = 0.0f;
|
||||||
|
}
|
||||||
|
|
||||||
|
Vector3 startToEnd = LocalEndPosition - LocalStartPosition;
|
||||||
float magnitude = startToEnd.magnitude;
|
float magnitude = startToEnd.magnitude;
|
||||||
Vector3 direction = Vector3.Normalize(LocalEndPosition - LocalStartPosition);
|
Vector3 direction = Vector3.Normalize(LocalEndPosition - LocalStartPosition);
|
||||||
|
|
||||||
@@ -45,7 +53,8 @@ public class Measurement : MonoBehaviour {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
Transform textTransform = transform.FindChild("Text");
|
|
||||||
|
Transform textTransform = transform.FindChild("Text");
|
||||||
textTransform.position = middlePosition;
|
textTransform.position = middlePosition;
|
||||||
|
|
||||||
if (Camera.current != null)
|
if (Camera.current != null)
|
||||||
@@ -58,15 +67,14 @@ public class Measurement : MonoBehaviour {
|
|||||||
|
|
||||||
Vector3 inverseScale = new Vector3(1.0f / transform.lossyScale.x, 1.0f / transform.lossyScale.y, 1.0f / transform.lossyScale.z);
|
Vector3 inverseScale = new Vector3(1.0f / transform.lossyScale.x, 1.0f / transform.lossyScale.y, 1.0f / transform.lossyScale.z);
|
||||||
|
|
||||||
float textMagnitude = Vector3.Scale(startToEnd, inverseScale).magnitude;
|
|
||||||
|
|
||||||
|
|
||||||
textMagnitude = transform.InverseTransformVector(startToEnd).magnitude;
|
float textMagnitude = transform.InverseTransformVector(startToEnd).magnitude;
|
||||||
|
|
||||||
textMesh.text = textMagnitude.ToString("0.00") + "m";
|
textMesh.text = textMagnitude.ToString("0.00") + "m";
|
||||||
|
|
||||||
|
|
||||||
textMesh.characterSize = Mathf.Max(0.001f * Math.Min(1.0f , magnitude), 0.0005f);
|
textMesh.characterSize = Mathf.Max(0.001f * Math.Min(1.0f , textMagnitude), 0.002f);
|
||||||
|
|
||||||
HoleSize = Mathf.Max(0.1f * Math.Min(1.0f, magnitude), 0.05f);
|
HoleSize = Mathf.Max(0.1f * Math.Min(1.0f, magnitude), 0.05f);
|
||||||
|
|
||||||
@@ -76,11 +84,39 @@ public class Measurement : MonoBehaviour {
|
|||||||
line1BaseRenderer.SetPosition(0, LocalStartPosition + lineUp * 0.01f);
|
line1BaseRenderer.SetPosition(0, LocalStartPosition + lineUp * 0.01f);
|
||||||
line1BaseRenderer.SetPosition(1, LocalStartPosition - lineUp * 0.01f);
|
line1BaseRenderer.SetPosition(1, LocalStartPosition - lineUp * 0.01f);
|
||||||
|
|
||||||
|
|
||||||
Transform line2BaseTransform = transform.FindChild("Line2Base");
|
Transform line2BaseTransform = transform.FindChild("Line2Base");
|
||||||
LineRenderer line2BaseRenderer = line2BaseTransform.GetComponent<LineRenderer>();
|
LineRenderer line2BaseRenderer = line2BaseTransform.GetComponent<LineRenderer>();
|
||||||
|
|
||||||
line2BaseRenderer.SetPosition(0, LocalEndPosition + lineUp * 0.01f);
|
line2BaseRenderer.SetPosition(0, LocalEndPosition + lineUp * 0.01f);
|
||||||
line2BaseRenderer.SetPosition(1, LocalEndPosition - lineUp * 0.01f);
|
line2BaseRenderer.SetPosition(1, LocalEndPosition - lineUp * 0.01f);
|
||||||
}
|
|
||||||
|
|
||||||
|
LineWidth = Mathf.Min(DefaultLineWith*smallestScale, 0.003f);
|
||||||
|
|
||||||
|
line1Renderer.SetWidth(LineWidth, LineWidth);
|
||||||
|
line2Renderer.SetWidth(LineWidth, LineWidth);
|
||||||
|
line1BaseRenderer.SetWidth(LineWidth, LineWidth);
|
||||||
|
line2BaseRenderer.SetWidth(LineWidth, LineWidth);
|
||||||
|
|
||||||
|
|
||||||
|
if (smallestScale < 0.4f)
|
||||||
|
{
|
||||||
|
Transform lineMiddleTransform = transform.FindChild("LineMiddle");
|
||||||
|
LineRenderer lineMiddleRenderer = line1BaseTransform.GetComponent<LineRenderer>();
|
||||||
|
lineMiddleRenderer.SetWidth(LineWidth, LineWidth);
|
||||||
|
|
||||||
|
Vector3 upDistance = new Vector3(0, 2.0f, 0);
|
||||||
|
upDistance = upDistance*smallestScale;
|
||||||
|
|
||||||
|
textTransform.position = middlePosition + upDistance*1.1f;
|
||||||
|
textMesh.characterSize = 0.005f;
|
||||||
|
|
||||||
|
lineMiddleRenderer.SetPosition(0, middlePosition);
|
||||||
|
lineMiddleRenderer.SetPosition(1, middlePosition + upDistance);
|
||||||
|
} else {
|
||||||
|
Transform lineMiddleTransform = transform.FindChild("LineMiddle");
|
||||||
|
LineRenderer lineMiddleRenderer = line1BaseTransform.GetComponent<LineRenderer>();
|
||||||
|
lineMiddleRenderer.SetWidth(0, 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
@@ -1,6 +1,6 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: a7d26e19677bc284ab16a6f03e80ca88
|
guid: 66d65a5aac553914d8a0eb512c72326a
|
||||||
timeCreated: 1464281370
|
timeCreated: 1464300490
|
||||||
licenseType: Free
|
licenseType: Free
|
||||||
ModelImporter:
|
ModelImporter:
|
||||||
serializedVersion: 19
|
serializedVersion: 19
|
||||||
|
|||||||
Reference in New Issue
Block a user