Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

expo-graphics-rnge

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

expo-graphics-rnge

Tools for building universal graphic based components in Expo

  • 1.2.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
6
decreased by-14.29%
Maintainers
1
Weekly downloads
 
Created
Source

NPM


expo-graphics

Tools to help simplify and manage GL/AR state.

Installation

yarn add expo-graphics

Usage

Import the library into your JavaScript file:

import ExpoGraphics from 'expo-graphics';

Components

ExpoGraphics.View

A view that assists with common GL and AR tasks.

Props
PropertyTypeDefaultDescription
isArEnabled?booleannullEnables an ARKit context: iOS Only
isArRunningStateEnabled?booleannullAdds a toggle for ARKit running state: iOS Only
isArCameraStateEnabled?booleannullRenders information related to ARKit the tracking state: iOS Only
arTrackingConfiguration?AR.TrackingConfigurationnullEnables an ARKit context: iOS Only
arRunningProps?object{}Props for optional ARRunningState: iOS Only
arCameraProps?object{}Props for optional ARCameraState: iOS Only
isShadowsEnabled?booleanfalseOverrides the render buffer allowing for shadows, this works by default on Android: iOS Only
onContextCreate({gl, canvas?, width, height, scale, arSession?}) => PromisenullCalled with the newly created GL context, and optional arSession
onShouldReloadContext() => booleannullA delegate function that requests permission to reload the GL context when the app returns to the foreground
onResize(layout: Layout) => voidnullInvoked when the view changes size, or the device orientation changes, returning the {x, y, width, height, scale}
shouldIgnoreSafeGuards?booleannullThis prevents the app from stopping when run in a simulator, or when AR is run in devices that don't support AR

ExpoGraphics.ARCameraState

Information related to the AR camera's tracking state.

Props
PropertyTypeDefaultDescription
titleStyle?objectnullThe style of the title Text
subtitleStyle?objectnullThe style of the subtitle Text
trackingStateStyles?{[AR.TrackingState]: object}nullThe title text style used with each TrackingState
[AR.TrackingStateReason.None]{title:string, subtitle:string}{ title: 'Having trouble collecting data' }Used when the AR camera isn't available
[AR.TrackingStateReason.Initializing]{title:string, subtitle:string}{ title: 'Initializing, subtitle: 'Move the camera around for better results' }The camera is starting to collect data
[AR.TrackingStateReason.ExcessiveMotion]{title:string, subtitle:string}{ title: 'Excessive motion', subtitle: 'Try moving your camera slower' }The device is moving too fast
[AR.TrackingStateReason.InsufficientFeatures]{title:string, subtitle:string}{title: 'insufficient features', subtitle: 'Try moving your camera around more'}The camera hasn't collected enough data
[AR.TrackingStateReason.Relocalizing]{title:string, subtitle:string}{ title: 'Having trouble collecting data' }The camera is reseting

ExpoGraphics.ARRunningState

A button used for toggling the AR state

Props
PropertyTypeDefaultDescription
onPress?FunctionnullCalled whenever the button is toggled.

Keywords

FAQs

Package last updated on 11 Jul 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc