Hello guys,
I recently discovered the latest fuse samples and Im very impressed especially of the native interop accelerometer sample.
Its really great to move a circle just with handmovements, but Im not sure how I can access the x and y values from javascript in order to make it available for if conditions and make it a bit smooth.
<App Background="#3C4959">
<Panel>
<Circle Width="40" Height="40" Fill="#F2AF5C">
<InteractiveTransform ux:Name="transform" />
</Circle>
<AccelerometerExampleMovement Target="transform" />
</Panel>
</App>
On the uno stage it seems clear, that the event immediately pasts the coordinates into the InteractiveTransform, which directly communicates with the ux object properties.
...
public InteractiveTransform Target { get; private set; }
void AccUpdated(object sender, AccelerometerUpdatedArgs args)
{
float3 acceleration = args.Value;
Target.Translation = acceleration.XY * 10;
Target.ZoomFactor = acceleration.Z * 0.2f + 0.2f;
}
...
How can I extract it with a JS native module, or maybe even on ux stage?