Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,15 @@ buck-out/

# CocoaPods
reactnative/ios/Pods/

# magic-script
lumin/bin/
lumin/.out/
lumin/digest.sha512.signed

# XR SDK
MLXR/XRKit.aar
MLXR/MLXR.framework

# Android bundle
reactnative/android/app/src/main/assets/index.android.bundle
9 changes: 8 additions & 1 deletion common/magic-script/MagicScript.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
import { AppRegistry } from 'react-native';
import { AppRegistry, NativeModules } from 'react-native';
import { XrClientProvider } from 'magic-script-components';
import { ReactNativeMagicScript } from 'magic-script-components-react-native';
import ReactNativeApp from '../react-native/ReactNativeApp';
import { authorize } from 'react-native-app-auth';

XrClientProvider.setXrClient(NativeModules.XrClientBridge);

// Tack on authorize function for react-native only (not needed for lumin)
XrClientProvider.authorize = authorize;

const MagicScript = {
registerApp: (name, appComponent, debug = false) => {
Expand Down
4 changes: 4 additions & 0 deletions lumin/app.package
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
DATAS = "digest.sha512.signed" : "." \
"bin/" : "bin/"\
"../resources/" : "resources/"
OPTIONS = package/minApiLevel/2
7 changes: 7 additions & 0 deletions lumin/babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module.exports = {
'plugins': [
'@babel/plugin-syntax-jsx',
'@babel/plugin-transform-react-jsx',
'@babel/plugin-proposal-class-properties'
]
};
19 changes: 19 additions & 0 deletions lumin/manifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<manifest xmlns:ml="magicleap"
ml:package="com.magicscript.xrsample"
ml:version_name="0.0.1"
ml:version_code="1">
<application ml:visible_name="MagicScriptXRSample"
ml:sdk_version="1.0">
<component ml:name=".fullscreen"
ml:visible_name="MagicScriptXRSample"
ml:binary_name="bin/index.js"
ml:type="Fullscreen">
<mode ml:shareable="true"/>
<icon ml:model_folder=""
ml:portal_folder=""/>
</component>
<uses-privilege ml:name="MagicScript"/>
<uses-privilege ml:name="LowLatencyLightwear"/>
<uses-privilege ml:name="PcfRead"/>
</application>
</manifest>
Loading