Readonly Wearable OnlyonTriggered when internet availability changed.
Example js
// @input Component.Text textObject
global.deviceInfoSystem.onInternetStatusChanged.add(function(eventData) {
script.textObject.text = eventData.isInternetAvailable
? "UPDATED: Internet is available"
: "UPDATED: No internet";
});
Example ts
@component
export class NewScript extends BaseScriptComponent {
@input textObject: Text;
onAwake() {
this.textObject.text = global.deviceInfoSystem.isInternetAvailable()
? "Internet is available"
: "No internet";
global.deviceInfoSystem.onInternetStatusChanged.add((args) => {
this.textObject.text = args.isInternetAvailable
? "UPDATED: Internet is available"
: "UPDATED: No internet";
});
}
}
ReadonlyperformanceReturns the PerformanceIndexes object, which provides performance information about the device.
ReadonlyscreenSpecifies the device pixel ratio. Can be used to set rendering at the real screen resolution.
Provides the tracking camera's DeviceCamera.
Wearable OnlyGet the DeviceCamera object for the given camera ID which provides intrinsics/extrinsics of the camera.
Returns the name of this object's type.
Returns whether the current Lens is running in CameraKit.
Returns whether the current Lens is running in a desktop computer.
Returns whether the current Lens is running in Lens Studio.
Returns true if the device has access to the internet.
// @input Component.Text textObject
script.textObject.text = global.deviceInfoSystem.isInternetAvailable()
? "Internet is available"
: "No internet";
@component
export class NewScript extends BaseScriptComponent {
@input textObject: Text;
onAwake() {
this.textObject.text = global.deviceInfoSystem.isInternetAvailable()
? "Internet is available"
: "No internet";
}
}
Returns whether the current Lens is running in a mobile device.
Returns true if the object matches or derives from the passed in type.
Returns true if this object is the same as other. Useful for checking if two references point to the same thing.
Returns whether the current Lens is running in a Spectacles device.
Accepts a callback which indicates whether the current device is capable of providing both front and rear camera texture simultaneously.
Provides information about the device running the Lens. Accessible through
global.deviceInfoSystem.Example