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
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "magic-script-cli",
"description": "Magic Script Toolkit",
"version": "2.3.6",
"version": "2.4.0",
"author": "Magic Leap",
"license": "Apache-2.0",
"bin": {
Expand Down
2 changes: 1 addition & 1 deletion template/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@
"semistandard": "^13.0.1"
},
"dependencies": {
"magic-script-polyfills": "^2.6.2"
"magic-script-polyfills": "^2.10.2"
}
}
6 changes: 3 additions & 3 deletions template_components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
"semistandard": "^13.0.1"
},
"dependencies": {
"magic-script-components": "^2.0.2",
"magic-script-components-lumin": "^1.0.11",
"magic-script-polyfills": "^2.7.1"
"magic-script-components": "^3.0.0",
"magic-script-components-lumin": "^2.0.0",
"magic-script-polyfills": "^2.10.2"
}
}
4 changes: 2 additions & 2 deletions template_multiplatform_components/lumin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"semistandard": "^13.0.1"
},
"dependencies": {
"magic-script-components-lumin": "^1.0.11",
"magic-script-polyfills": "^2.7.1"
"magic-script-components-lumin": "^2.0.0",
"magic-script-polyfills": "^2.10.2"
}
}
8 changes: 6 additions & 2 deletions template_multiplatform_components/lumin/src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,12 @@ import "magic-script-polyfills";
import process from "./global-scope.js";
import React from "react";
import mxs from "magic-script-components-lumin";

import { Platform, PlaneDetector, FileSystem } from "magic-script-components";
// Load main app logic from the app class.
import MyApp from '../../src/app.js';

mxs.bootstrap(<MyApp type='landscape' volumeSize={[1, 1, 1]} />);
Platform.setPlatformInformation(new mxs.PlatformInformation());
Platform.setLinking(new mxs.NativeLinking());
PlaneDetector.setNativePlaneDetector(new mxs.NativePlaneDetector());
FileSystem.setNativeFileSystem(new mxs.NativeFileSystem());
mxs.bootstrap(<MyApp type='landscape'/>);
3 changes: 2 additions & 1 deletion template_multiplatform_components/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"dependencies": {
"magic-script-components": "2.0.2"
"magic-script-components": "^3.0.0",
"react": "16.8.3"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import com.facebook.react.ReactNativeHost;
import com.facebook.react.ReactPackage;
import com.facebook.soloader.SoLoader;
import com.rnfs.RNFSPackage;

import java.util.List;

Expand Down
20 changes: 0 additions & 20 deletions template_multiplatform_components/reactnative/android/init.js

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
rootProject.name = 'Template'
apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings)
include ':app'
include ':react-native-fs'
project(':react-native-fs').projectDir = new File(settingsDir, '../node_modules/react-native-fs/android')
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
import { AppRegistry } from 'react-native';
import { ReactNativeMagicScript } from 'magic-script-components-react-native';
import { AppRegistry, Linking } from 'react-native';
import { ReactNativeMagicScript, NativeFileSystem, NativePlaneDetector, PlatformInformation } from 'magic-script-components-react-native';
import ReactNativeApp from '../react-native/ReactNativeApp';
import { FileSystem, PlaneDetector, Platform } from 'magic-script-components';

const MagicScript = {
registerApp: (name, appComponent, debug = false) => {
Platform.setPlatformInformation(new PlatformInformation());
Platform.setLinking(Linking);
PlaneDetector.setNativePlaneDetector(new NativePlaneDetector());
FileSystem.setNativeFileSystem(new NativeFileSystem());
AppRegistry.registerComponent(name, () => ReactNativeApp);
ReactNativeMagicScript.render(appComponent, { name: 'root' }, null, debug);
}
Expand Down
1 change: 1 addition & 0 deletions template_multiplatform_components/reactnative/ios/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ target 'Template' do
pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec'
pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec'
pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'
pod 'RNFS', :path => '../node_modules/react-native-fs'

use_native_modules!

Expand Down
4 changes: 2 additions & 2 deletions template_multiplatform_components/reactnative/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
"react-test-renderer": "16.8.3"
},
"dependencies": {
"react": "16.8.3",
"react-native": "0.60.5",
"magic-script-components-react-native": "^1.0.5"
"react-native-fs": "^2.16.6",
"magic-script-components-react-native": "^2.0.0"
}
}
15 changes: 8 additions & 7 deletions template_multiplatform_components/src/app.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
//
import React from 'react';
import { View, Text } from 'magic-script-components';
import { Prism, Scene, Text } from 'magic-script-components';

export default class MyApp extends React.Component {
constructor (props) {
Expand All @@ -13,11 +12,13 @@ export default class MyApp extends React.Component {

render () {
return (
<View name="main-view">
<Text textSize={0.1} localPosition={[-0.3, 0, 0]}>
Hello Magic Script
</Text>
</View>
<Scene>
<Prism size={[1.0, 1.0, 1.0]}>
<Text textSize={0.1} localPosition={[-0.3, 0, 0]}>
Hello Magic Script
</Text>
</Prism>
</Scene>
);
}
}
2 changes: 1 addition & 1 deletion template_overlay_typescript/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@
"typescript": "^3.6.4"
},
"dependencies": {
"magic-script-polyfills": "^2.0.0"
"magic-script-polyfills": "^2.10.2"
}
}
6 changes: 3 additions & 3 deletions template_overlay_typescript_components/lumin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
},
"dependencies": {
"eslint-plugin-react": "^7.15.1",
"magic-script-components": "^2.0.2",
"magic-script-components-lumin": "^1.0.13",
"magic-script-polyfills": "^2.7.1"
"magic-script-components": "^3.0.0",
"magic-script-components-lumin": "^2.0.0",
"magic-script-polyfills": "^2.10.2"
}
}
2 changes: 1 addition & 1 deletion template_overlay_typescript_components/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"dependencies": {
"magic-script-components": "^2.0.2"
"magic-script-components": "^3.0.0"
},
"devDependencies": {
"@types/react": "16.8.24"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
"dependencies": {
"react": "16.8.3",
"react-native": "0.60.5",
"magic-script-components-react-native": "^1.0.5"
"react-native-fs": "^2.16.6",
"magic-script-components-react-native": "^2.0.0"
},
"jest": {
"preset": "react-native",
Expand Down