🧙♂️
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
document.addEventListener('mlpageorientation', (e) => { | |
//animate turkey model once the page orientation changes to flat. | |
if (window.mlWorld.orientation === 'flat') { | |
turkeyModel.animation = 'fly'; | |
} | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
window.mlWorld.orientation = 'flat' | 'upright' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (tabletState.ValidityCheck.HasFlag(MLInput.TabletDeviceStateMask.HasAdditionalPenTouchData)) | |
{ | |
_pen.localRotation = | |
Quaternion.Euler(-90, 0, 0) * Quaternion.Euler( | |
tabletState.AdditionalPenTouchData[1] | |
, tabletState.AdditionalPenTouchData[0] * -1 | |
, 0); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MLResult result = MLInput.Start(new MLInput.Configuration(false)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
magic-script build -i | |
npm install: installing | |
npm notice created a lockfile as package-lock.json. You should commit this file. | |
npm WARN magic-script-components@2.0.2 requires a peer of @babel/core@^7.6.0 but none is installed. You must install peer dependencies yourself. | |
npm WARN magic-script-components@2.0.2 requires a peer of @babel/plugin-transform-react-jsx@^7.3.0 but none is installed. You must install peer dependencies yourself. | |
npm WARN magic-script-components@2.0.2 requires a peer of @babel/plugin-proposal-class-properties@^7.5.5 but none is installed. You must install peer dependencies yourself. | |
npm WARN magic-script-components@2.0.2 requires a peer of rollup-plugin-babel@^4.3.3 but none is installed. You must install peer dependencies yourself. | |
npm WARN LRE_MagicScript No description | |
npm WARN LRE_MagicScript No repository field. | |
npm WARN LRE_MagicScript No license field. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MagicScript: info: Launching: 'bin/index.js' | |
MagicScript: debug: Starting up the V8 engine | |
MagicScript: debug: Evaluating: 'bin/index.js' | |
MagicScript: debug: Starting inspector websocket server... | |
MagicScript: debug: Starting inspector websocket server... | |
*** 1606408975.343552900 0 18208 mg_start:18468: [listening_ports] -> [0] | |
*** 1606408975.343552900 0 18208 mg_start:18468: [request_timeout_ms] -> [300000] | |
*** 1606408975.345547300 1994400 1976 consume_socket:17649: going idle | |
*** 1606408975.345547300 0 44136 consume_socket:17649: going idle | |
MagicScri*** 1606408975.346545000 997700 7296 consume_socket:17649: pgoing idlet |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
> cd hellomagicscript | |
> magic-script build -h | |
npm install: installing | |
npm notice created a lockfile as package-lock.json. You should commit this file. | |
npm WARN magic-script-components@3.0.0 requires a peer of @babel/core@^7.6.0 but none is installed. You must install peer dependencies yourself. | |
npm WARN magic-script-components@3.0.0 requires a peer of @babel/plugin-transform-react-jsx@^7.3.0 but none is installed. You must install peer dependencies yourself. | |
npm WARN magic-script-components@3.0.0 requires a peer of @babel/plugin-proposal-class-properties@^7.5.5 but none is installed. You must install peer dependencies yourself. | |
npm WARN magic-script-components@3.0.0 requires a peer of rollup-plugin-babel@^4.3.3 but none is installed. You must install peer dependencies yourself. | |
npm WARN magic-script-components@3.0.0 requires a peer of react@^16.9.0 but none is installed. You must install peer dependencies yourself. | |
npm WARN magic-script-components@3.0.0 requires a peer of react-reconciler@^0.21.0 but none is |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
>magic-script init | |
? What is the name of your application? HelloMagicScript | |
? What is the app ID of your application? jp.co.1planet.hellomagicscript | |
? In which folder do you want to save this project? hellomagicscript | |
? Do you want to create Components app? Yes | |
? What app type do you want? Landscape | |
? What platform do you want develop on? (Press <space> to select, <a> to toggle all, <i> to invert selection)Lumin | |
? Use TypeScript? No | |
Start creating project for Components type, target: LUMIN | |
new project name: HelloMagicScript |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export class App extends LandscapeApp { | |
onAppStart (args) { | |
// Create a new prism that's half a meter cubed. | |
const prism = this.requestNewPrism([0.5, 0.5, 0.2]); | |
if (prism.readBoolPropertyFromPcf('isChildPrism')) { | |
// ここでisChildPrismがtrue用のプリズム生成処理を実行するなど... | |
return; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
prism.savePropertyWithPcf('isChildPrism', true); |