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
var engine = new BABYLON.NativeEngine(); | |
var scene = new BABYLON.Scene(engine); | |
CreateBoxAsync(scene).then(function () { | |
//CreateSpheresAsync(scene).then(function () { | |
//BABYLON.SceneLoader.AppendAsync("https://raw.githubusercontent.com/KhronosGroup/glTF-Sample-Models/master/2.0/Box/glTF/Box.gltf").then(function () { | |
//BABYLON.SceneLoader.AppendAsync("https://raw.githubusercontent.com/KhronosGroup/glTF-Sample-Models/master/2.0/BoxTextured/glTF/BoxTextured.gltf").then(function () { | |
//BABYLON.SceneLoader.AppendAsync("https://raw.githubusercontent.com/KhronosGroup/glTF-Sample-Models/master/2.0/Suzanne/glTF/Suzanne.gltf").then(function () { | |
//BABYLON.SceneLoader.AppendAsync("https://raw.githubusercontent.com/KhronosGroup/glTF-Sample-Models/master/2.0/Avocado/glTF/Avocado.gltf").then(function () { | |
//BABYLON.SceneLoader.AppendAsync("https://raw.githubusercontent.com/KhronosGroup/glTF-Sample-Models/master/2.0/BoomBox/glTF/BoomBox.gltf").then(function () { |
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
android { | |
defaultConfig { | |
applicationId "com.android.babylonnative.playground" | |
minSdkVersion "${platformVersion}" | |
targetSdkVersion 31 | |
ndkVersion "23.1.7779620" | |
if (project.hasProperty("NDK_VERSION")) { | |
def NDKVersion = project.property("NDK_VERSION") | |
ndkVersion "${NDK_VERSION}" | |
} |
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
externalNativeBuild { | |
cmake { | |
version '3.29.3+' | |
path 'CMakeLists.txt' | |
buildStagingDirectory "../../../../Build/Android" | |
} | |
} |
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
<manifest xmlns:android="http://schemas.android.com/apk/res/android"> | |
<application | |
android:allowBackup="false" | |
android:fullBackupContent="false" | |
android:icon="@mipmap/ic_launcher" | |
android:label="@string/playground_activity"> | |
<activity android:name="PlaygroundActivity" | |
android:exported="true" <!--この行を新規追加 --> | |
android:theme="@android:style/Theme.NoTitleBar.Fullscreen" | |
android:launchMode="singleTask" |
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
%%変更前 | |
\newcommand{\small}{% | |
\ifnarrowbaselines | |
\jsc@setfontsize\small\@ixpt{11}% | |
\else | |
\jsc@setfontsize\small\@ixpt{13}% | |
\fi | |
%%変更後 | |
\newcommand{\small}{% |
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
%%変更前 | |
%% サンプルコードをさらに小さく | |
\renewenvironment{reviewemlist}{% | |
\medskip\footnotesize\begin{shaded}\ifdefined\reviewlistxkanjiskip\xkanjiskip=\reviewlistxkanjiskip\fi\setlength{\baselineskip}{1.2zw}\begin{alltt}}{% | |
\end{alltt}\end{shaded}} | |
\renewenvironment{reviewlist}{% | |
\begin{shaded}\footnotesize\ifdefined\reviewlistxkanjiskip\xkanjiskip=\reviewlistxkanjiskip\fi\setlength{\baselineskip}{1.2zw}\begin{alltt}}{% | |
\end{alltt}\end{shaded}\par\vspace*{0.5zw}} |
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
% 変更前 | |
\newcommand{\footnotesize}{% | |
\ifnarrowbaselines | |
\jsc@setfontsize\footnotesize\@viiipt{9.5}% | |
\else | |
\jsc@setfontsize\footnotesize\@viiipt{11}% | |
\fi | |
% 変更後 | |
\newcommand{\footnotesize}{% |
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
const xrHelper = await scene.createDefaultXRExperienceAsync({ | |
floorMeshes: [environment.ground], | |
teleportationOptions: { | |
timeToTeleport :1000, | |
} | |
}); |
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
func _integrate_forces(state): | |
var delta = state.get_step() | |
var lv = state.get_linear_velocity() | |
var g = state.get_total_gravity() | |
# get_total_gravity returns zero for the first few frames, leading to errors. | |
if g == Vector3.ZERO: | |
g = gravity | |
lv += g * delta # Apply gravity. | |
var up = -g.normalized() |
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
for(var n=0;n<character_parts.length;n++){ | |
mirrorMaterial.reflectionTexture.renderList.push(character_parts[n]); | |
} |
NewerOlder