@p100-web/core 100.2.1 → 100.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (429) hide show
  1. package/dist/AdaptivePerformance.d.ts +20 -0
  2. package/dist/AdaptivePerformance.d.ts.map +1 -0
  3. package/dist/AdaptivePerformance.js +110 -0
  4. package/dist/AdaptivePerformance.js.map +1 -0
  5. package/dist/DevTools.d.ts +4 -0
  6. package/dist/DevTools.d.ts.map +1 -0
  7. package/dist/DevTools.js +10 -0
  8. package/dist/DevTools.js.map +1 -0
  9. package/dist/GameContext.d.ts +202 -0
  10. package/dist/GameContext.d.ts.map +1 -0
  11. package/dist/GameContext.js +698 -0
  12. package/dist/GameContext.js.map +1 -0
  13. package/dist/IAudioListener.d.ts +4 -0
  14. package/dist/IAudioListener.d.ts.map +1 -0
  15. package/dist/IAudioListener.js +2 -0
  16. package/dist/IAudioListener.js.map +1 -0
  17. package/dist/ICameraControls.d.ts +17 -0
  18. package/dist/ICameraControls.d.ts.map +1 -0
  19. package/dist/ICameraControls.js +2 -0
  20. package/dist/ICameraControls.js.map +1 -0
  21. package/dist/IComponentFactory.d.ts +8 -0
  22. package/dist/IComponentFactory.d.ts.map +1 -0
  23. package/dist/IComponentFactory.js +2 -0
  24. package/dist/IComponentFactory.js.map +1 -0
  25. package/dist/IDBApp.d.ts +21 -0
  26. package/dist/IDBApp.d.ts.map +1 -0
  27. package/dist/IDBApp.js +2 -0
  28. package/dist/IDBApp.js.map +1 -0
  29. package/dist/IDBEvent.d.ts +10 -0
  30. package/dist/IDBEvent.d.ts.map +1 -0
  31. package/dist/IDBEvent.js +2 -0
  32. package/dist/IDBEvent.js.map +1 -0
  33. package/dist/IDBFileUsage.d.ts +9 -0
  34. package/dist/IDBFileUsage.d.ts.map +1 -0
  35. package/dist/IDBFileUsage.js +2 -0
  36. package/dist/IDBFileUsage.js.map +1 -0
  37. package/dist/IDBItem.d.ts +9 -0
  38. package/dist/IDBItem.d.ts.map +1 -0
  39. package/dist/IDBItem.js +2 -0
  40. package/dist/IDBItem.js.map +1 -0
  41. package/dist/IDBNode.d.ts +21 -0
  42. package/dist/IDBNode.d.ts.map +1 -0
  43. package/dist/IDBNode.js +42 -0
  44. package/dist/IDBNode.js.map +1 -0
  45. package/dist/IDBScene.d.ts +7 -0
  46. package/dist/IDBScene.d.ts.map +1 -0
  47. package/dist/IDBScene.js +2 -0
  48. package/dist/IDBScene.js.map +1 -0
  49. package/dist/IDBVariable.d.ts +10 -0
  50. package/dist/IDBVariable.d.ts.map +1 -0
  51. package/dist/IDBVariable.js +2 -0
  52. package/dist/IDBVariable.js.map +1 -0
  53. package/dist/IEngine.d.ts +23 -0
  54. package/dist/IEngine.d.ts.map +1 -0
  55. package/dist/IEngine.js +2 -0
  56. package/dist/IEngine.js.map +1 -0
  57. package/dist/IPMaterial.d.ts +12 -0
  58. package/dist/IPMaterial.d.ts.map +1 -0
  59. package/dist/IPMaterial.js +2 -0
  60. package/dist/IPMaterial.js.map +1 -0
  61. package/dist/IPNodeRenderer.d.ts +25 -0
  62. package/dist/IPNodeRenderer.d.ts.map +1 -0
  63. package/dist/IPNodeRenderer.js +2 -0
  64. package/dist/IPNodeRenderer.js.map +1 -0
  65. package/dist/IStats.d.ts +9 -0
  66. package/dist/IStats.d.ts.map +1 -0
  67. package/dist/IStats.js +3 -0
  68. package/dist/IStats.js.map +1 -0
  69. package/dist/MathTools.d.ts +8 -0
  70. package/dist/MathTools.d.ts.map +1 -0
  71. package/dist/MathTools.js +20 -0
  72. package/dist/MathTools.js.map +1 -0
  73. package/dist/PCanvas.d.ts +171 -0
  74. package/dist/PCanvas.d.ts.map +1 -0
  75. package/dist/PCanvas.js +648 -0
  76. package/dist/PCanvas.js.map +1 -0
  77. package/dist/PComponent.d.ts +74 -0
  78. package/dist/PComponent.d.ts.map +1 -0
  79. package/dist/PComponent.js +155 -0
  80. package/dist/PComponent.js.map +1 -0
  81. package/dist/PEnums.d.ts +116 -0
  82. package/dist/PEnums.d.ts.map +1 -0
  83. package/dist/PEnums.js +145 -0
  84. package/dist/PEnums.js.map +1 -0
  85. package/dist/PEvent.d.ts +22 -0
  86. package/dist/PEvent.d.ts.map +1 -0
  87. package/dist/PEvent.js +38 -0
  88. package/dist/PEvent.js.map +1 -0
  89. package/dist/PFileSlot.d.ts +14 -0
  90. package/dist/PFileSlot.d.ts.map +1 -0
  91. package/dist/PFileSlot.js +14 -0
  92. package/dist/PFileSlot.js.map +1 -0
  93. package/dist/PFileUsage.d.ts +11 -0
  94. package/dist/PFileUsage.d.ts.map +1 -0
  95. package/dist/PFileUsage.js +24 -0
  96. package/dist/PFileUsage.js.map +1 -0
  97. package/dist/PItem.d.ts +14 -0
  98. package/dist/PItem.d.ts.map +1 -0
  99. package/dist/PItem.js +36 -0
  100. package/dist/PItem.js.map +1 -0
  101. package/dist/PNode.d.ts +116 -0
  102. package/dist/PNode.d.ts.map +1 -0
  103. package/dist/PNode.js +422 -0
  104. package/dist/PNode.js.map +1 -0
  105. package/dist/PPayload.d.ts +7 -0
  106. package/dist/PPayload.d.ts.map +1 -0
  107. package/dist/PPayload.js +19 -0
  108. package/dist/PPayload.js.map +1 -0
  109. package/dist/PScene.d.ts +8 -0
  110. package/dist/PScene.d.ts.map +1 -0
  111. package/dist/PScene.js +12 -0
  112. package/dist/PScene.js.map +1 -0
  113. package/dist/PTypes.d.ts +50 -0
  114. package/dist/PTypes.d.ts.map +1 -0
  115. package/dist/PTypes.js +2 -0
  116. package/dist/PTypes.js.map +1 -0
  117. package/dist/PVariable.d.ts +29 -0
  118. package/dist/PVariable.d.ts.map +1 -0
  119. package/dist/PVariable.js +52 -0
  120. package/dist/PVariable.js.map +1 -0
  121. package/dist/PVector2.d.ts +14 -0
  122. package/dist/PVector2.d.ts.map +1 -0
  123. package/dist/PVector2.js +25 -0
  124. package/dist/PVector2.js.map +1 -0
  125. package/dist/PVector3.d.ts +19 -0
  126. package/dist/PVector3.d.ts.map +1 -0
  127. package/dist/PVector3.js +44 -0
  128. package/dist/PVector3.js.map +1 -0
  129. package/dist/animations/AnimationTools.d.ts +3 -0
  130. package/dist/animations/AnimationTools.d.ts.map +1 -0
  131. package/dist/animations/AnimationTools.js +12 -0
  132. package/dist/animations/AnimationTools.js.map +1 -0
  133. package/dist/animations/IModelAnimation.d.ts +17 -0
  134. package/dist/animations/IModelAnimation.d.ts.map +1 -0
  135. package/dist/animations/IModelAnimation.js +2 -0
  136. package/dist/animations/IModelAnimation.js.map +1 -0
  137. package/dist/assets/AssetLoader.d.ts +10 -0
  138. package/dist/assets/AssetLoader.d.ts.map +1 -0
  139. package/dist/assets/AssetLoader.js +12 -0
  140. package/dist/assets/AssetLoader.js.map +1 -0
  141. package/dist/index.d.ts +153 -0
  142. package/dist/index.d.ts.map +1 -0
  143. package/dist/index.js +107 -0
  144. package/dist/index.js.map +1 -0
  145. package/dist/media/IDBFile.d.ts +18 -0
  146. package/dist/media/IDBFile.d.ts.map +1 -0
  147. package/dist/media/IDBFile.js +2 -0
  148. package/dist/media/IDBFile.js.map +1 -0
  149. package/dist/media/PFile.d.ts +13 -0
  150. package/dist/media/PFile.d.ts.map +1 -0
  151. package/dist/media/PFile.js +34 -0
  152. package/dist/media/PFile.js.map +1 -0
  153. package/dist/pcomponents/BaseMaterial.d.ts +49 -0
  154. package/dist/pcomponents/BaseMaterial.d.ts.map +1 -0
  155. package/dist/pcomponents/BaseMaterial.js +59 -0
  156. package/dist/pcomponents/BaseMaterial.js.map +1 -0
  157. package/dist/pcomponents/PAnimator.d.ts +42 -0
  158. package/dist/pcomponents/PAnimator.d.ts.map +1 -0
  159. package/dist/pcomponents/PAnimator.js +51 -0
  160. package/dist/pcomponents/PAnimator.js.map +1 -0
  161. package/dist/pcomponents/PBackground.d.ts +37 -0
  162. package/dist/pcomponents/PBackground.d.ts.map +1 -0
  163. package/dist/pcomponents/PBackground.js +45 -0
  164. package/dist/pcomponents/PBackground.js.map +1 -0
  165. package/dist/pcomponents/PBasicMaterial.d.ts +22 -0
  166. package/dist/pcomponents/PBasicMaterial.d.ts.map +1 -0
  167. package/dist/pcomponents/PBasicMaterial.js +30 -0
  168. package/dist/pcomponents/PBasicMaterial.js.map +1 -0
  169. package/dist/pcomponents/PCallAction.d.ts +24 -0
  170. package/dist/pcomponents/PCallAction.d.ts.map +1 -0
  171. package/dist/pcomponents/PCallAction.js +34 -0
  172. package/dist/pcomponents/PCallAction.js.map +1 -0
  173. package/dist/pcomponents/PCameraPosition.d.ts +33 -0
  174. package/dist/pcomponents/PCameraPosition.d.ts.map +1 -0
  175. package/dist/pcomponents/PCameraPosition.js +83 -0
  176. package/dist/pcomponents/PCameraPosition.js.map +1 -0
  177. package/dist/pcomponents/PCameraTarget.d.ts +33 -0
  178. package/dist/pcomponents/PCameraTarget.d.ts.map +1 -0
  179. package/dist/pcomponents/PCameraTarget.js +84 -0
  180. package/dist/pcomponents/PCameraTarget.js.map +1 -0
  181. package/dist/pcomponents/PCollider.d.ts +40 -0
  182. package/dist/pcomponents/PCollider.d.ts.map +1 -0
  183. package/dist/pcomponents/PCollider.js +57 -0
  184. package/dist/pcomponents/PCollider.js.map +1 -0
  185. package/dist/pcomponents/PCompare.d.ts +32 -0
  186. package/dist/pcomponents/PCompare.d.ts.map +1 -0
  187. package/dist/pcomponents/PCompare.js +73 -0
  188. package/dist/pcomponents/PCompare.js.map +1 -0
  189. package/dist/pcomponents/PControllerInput.d.ts +30 -0
  190. package/dist/pcomponents/PControllerInput.d.ts.map +1 -0
  191. package/dist/pcomponents/PControllerInput.js +38 -0
  192. package/dist/pcomponents/PControllerInput.js.map +1 -0
  193. package/dist/pcomponents/PCubeGeometry.d.ts +18 -0
  194. package/dist/pcomponents/PCubeGeometry.d.ts.map +1 -0
  195. package/dist/pcomponents/PCubeGeometry.js +23 -0
  196. package/dist/pcomponents/PCubeGeometry.js.map +1 -0
  197. package/dist/pcomponents/PDebug.d.ts +21 -0
  198. package/dist/pcomponents/PDebug.d.ts.map +1 -0
  199. package/dist/pcomponents/PDebug.js +30 -0
  200. package/dist/pcomponents/PDebug.js.map +1 -0
  201. package/dist/pcomponents/PEnvironment.d.ts +27 -0
  202. package/dist/pcomponents/PEnvironment.d.ts.map +1 -0
  203. package/dist/pcomponents/PEnvironment.js +43 -0
  204. package/dist/pcomponents/PEnvironment.js.map +1 -0
  205. package/dist/pcomponents/PFadeAnimation.d.ts +31 -0
  206. package/dist/pcomponents/PFadeAnimation.d.ts.map +1 -0
  207. package/dist/pcomponents/PFadeAnimation.js +112 -0
  208. package/dist/pcomponents/PFadeAnimation.js.map +1 -0
  209. package/dist/pcomponents/PHud.d.ts +12 -0
  210. package/dist/pcomponents/PHud.d.ts.map +1 -0
  211. package/dist/pcomponents/PHud.js +12 -0
  212. package/dist/pcomponents/PHud.js.map +1 -0
  213. package/dist/pcomponents/PImageCache.d.ts +16 -0
  214. package/dist/pcomponents/PImageCache.d.ts.map +1 -0
  215. package/dist/pcomponents/PImageCache.js +30 -0
  216. package/dist/pcomponents/PImageCache.js.map +1 -0
  217. package/dist/pcomponents/PImageDetector.d.ts +26 -0
  218. package/dist/pcomponents/PImageDetector.d.ts.map +1 -0
  219. package/dist/pcomponents/PImageDetector.js +32 -0
  220. package/dist/pcomponents/PImageDetector.js.map +1 -0
  221. package/dist/pcomponents/PInteger.d.ts +41 -0
  222. package/dist/pcomponents/PInteger.d.ts.map +1 -0
  223. package/dist/pcomponents/PInteger.js +73 -0
  224. package/dist/pcomponents/PInteger.js.map +1 -0
  225. package/dist/pcomponents/PIntegerAnimator.d.ts +37 -0
  226. package/dist/pcomponents/PIntegerAnimator.d.ts.map +1 -0
  227. package/dist/pcomponents/PIntegerAnimator.js +104 -0
  228. package/dist/pcomponents/PIntegerAnimator.js.map +1 -0
  229. package/dist/pcomponents/PLight.d.ts +15 -0
  230. package/dist/pcomponents/PLight.d.ts.map +1 -0
  231. package/dist/pcomponents/PLight.js +19 -0
  232. package/dist/pcomponents/PLight.js.map +1 -0
  233. package/dist/pcomponents/PLightDirectional.d.ts +19 -0
  234. package/dist/pcomponents/PLightDirectional.d.ts.map +1 -0
  235. package/dist/pcomponents/PLightDirectional.js +25 -0
  236. package/dist/pcomponents/PLightDirectional.js.map +1 -0
  237. package/dist/pcomponents/PMaskedMaterial.d.ts +19 -0
  238. package/dist/pcomponents/PMaskedMaterial.d.ts.map +1 -0
  239. package/dist/pcomponents/PMaskedMaterial.js +28 -0
  240. package/dist/pcomponents/PMaskedMaterial.js.map +1 -0
  241. package/dist/pcomponents/PMaterialModifier.d.ts +38 -0
  242. package/dist/pcomponents/PMaterialModifier.d.ts.map +1 -0
  243. package/dist/pcomponents/PMaterialModifier.js +67 -0
  244. package/dist/pcomponents/PMaterialModifier.js.map +1 -0
  245. package/dist/pcomponents/PModelAnnotation.d.ts +47 -0
  246. package/dist/pcomponents/PModelAnnotation.d.ts.map +1 -0
  247. package/dist/pcomponents/PModelAnnotation.js +118 -0
  248. package/dist/pcomponents/PModelAnnotation.js.map +1 -0
  249. package/dist/pcomponents/PModelAnnotations.d.ts +46 -0
  250. package/dist/pcomponents/PModelAnnotations.d.ts.map +1 -0
  251. package/dist/pcomponents/PModelAnnotations.js +127 -0
  252. package/dist/pcomponents/PModelAnnotations.js.map +1 -0
  253. package/dist/pcomponents/PModelGLTF.d.ts +34 -0
  254. package/dist/pcomponents/PModelGLTF.d.ts.map +1 -0
  255. package/dist/pcomponents/PModelGLTF.js +55 -0
  256. package/dist/pcomponents/PModelGLTF.js.map +1 -0
  257. package/dist/pcomponents/PModelNode.d.ts +16 -0
  258. package/dist/pcomponents/PModelNode.d.ts.map +1 -0
  259. package/dist/pcomponents/PModelNode.js +18 -0
  260. package/dist/pcomponents/PModelNode.js.map +1 -0
  261. package/dist/pcomponents/PMoveAnimation.d.ts +27 -0
  262. package/dist/pcomponents/PMoveAnimation.d.ts.map +1 -0
  263. package/dist/pcomponents/PMoveAnimation.js +64 -0
  264. package/dist/pcomponents/PMoveAnimation.js.map +1 -0
  265. package/dist/pcomponents/PMoveToAnimation.d.ts +26 -0
  266. package/dist/pcomponents/PMoveToAnimation.d.ts.map +1 -0
  267. package/dist/pcomponents/PMoveToAnimation.js +80 -0
  268. package/dist/pcomponents/PMoveToAnimation.js.map +1 -0
  269. package/dist/pcomponents/PNumberAnimator.d.ts +41 -0
  270. package/dist/pcomponents/PNumberAnimator.d.ts.map +1 -0
  271. package/dist/pcomponents/PNumberAnimator.js +102 -0
  272. package/dist/pcomponents/PNumberAnimator.js.map +1 -0
  273. package/dist/pcomponents/PPhysicalMaterial.d.ts +28 -0
  274. package/dist/pcomponents/PPhysicalMaterial.d.ts.map +1 -0
  275. package/dist/pcomponents/PPhysicalMaterial.js +34 -0
  276. package/dist/pcomponents/PPhysicalMaterial.js.map +1 -0
  277. package/dist/pcomponents/PPlaneDetector.d.ts +20 -0
  278. package/dist/pcomponents/PPlaneDetector.d.ts.map +1 -0
  279. package/dist/pcomponents/PPlaneDetector.js +24 -0
  280. package/dist/pcomponents/PPlaneDetector.js.map +1 -0
  281. package/dist/pcomponents/PPlaneGeometry.d.ts +20 -0
  282. package/dist/pcomponents/PPlaneGeometry.d.ts.map +1 -0
  283. package/dist/pcomponents/PPlaneGeometry.js +26 -0
  284. package/dist/pcomponents/PPlaneGeometry.js.map +1 -0
  285. package/dist/pcomponents/PProjectRoot.d.ts +42 -0
  286. package/dist/pcomponents/PProjectRoot.d.ts.map +1 -0
  287. package/dist/pcomponents/PProjectRoot.js +93 -0
  288. package/dist/pcomponents/PProjectRoot.js.map +1 -0
  289. package/dist/pcomponents/PRotateAnimation.d.ts +33 -0
  290. package/dist/pcomponents/PRotateAnimation.d.ts.map +1 -0
  291. package/dist/pcomponents/PRotateAnimation.js +80 -0
  292. package/dist/pcomponents/PRotateAnimation.js.map +1 -0
  293. package/dist/pcomponents/PScaleAnimation.d.ts +28 -0
  294. package/dist/pcomponents/PScaleAnimation.d.ts.map +1 -0
  295. package/dist/pcomponents/PScaleAnimation.js +81 -0
  296. package/dist/pcomponents/PScaleAnimation.js.map +1 -0
  297. package/dist/pcomponents/PSceneContainer.d.ts +23 -0
  298. package/dist/pcomponents/PSceneContainer.d.ts.map +1 -0
  299. package/dist/pcomponents/PSceneContainer.js +45 -0
  300. package/dist/pcomponents/PSceneContainer.js.map +1 -0
  301. package/dist/pcomponents/PSceneRoot.d.ts +16 -0
  302. package/dist/pcomponents/PSceneRoot.d.ts.map +1 -0
  303. package/dist/pcomponents/PSceneRoot.js +20 -0
  304. package/dist/pcomponents/PSceneRoot.js.map +1 -0
  305. package/dist/pcomponents/PSlider.d.ts +34 -0
  306. package/dist/pcomponents/PSlider.d.ts.map +1 -0
  307. package/dist/pcomponents/PSlider.js +38 -0
  308. package/dist/pcomponents/PSlider.js.map +1 -0
  309. package/dist/pcomponents/PSound.d.ts +33 -0
  310. package/dist/pcomponents/PSound.d.ts.map +1 -0
  311. package/dist/pcomponents/PSound.js +39 -0
  312. package/dist/pcomponents/PSound.js.map +1 -0
  313. package/dist/pcomponents/PSphereGeometry.d.ts +19 -0
  314. package/dist/pcomponents/PSphereGeometry.d.ts.map +1 -0
  315. package/dist/pcomponents/PSphereGeometry.js +25 -0
  316. package/dist/pcomponents/PSphereGeometry.js.map +1 -0
  317. package/dist/pcomponents/PSprite.d.ts +17 -0
  318. package/dist/pcomponents/PSprite.d.ts.map +1 -0
  319. package/dist/pcomponents/PSprite.js +21 -0
  320. package/dist/pcomponents/PSprite.js.map +1 -0
  321. package/dist/pcomponents/PSpriteSheet.d.ts +28 -0
  322. package/dist/pcomponents/PSpriteSheet.d.ts.map +1 -0
  323. package/dist/pcomponents/PSpriteSheet.js +41 -0
  324. package/dist/pcomponents/PSpriteSheet.js.map +1 -0
  325. package/dist/pcomponents/PText.d.ts +34 -0
  326. package/dist/pcomponents/PText.d.ts.map +1 -0
  327. package/dist/pcomponents/PText.js +43 -0
  328. package/dist/pcomponents/PText.js.map +1 -0
  329. package/dist/pcomponents/PTransform.d.ts +23 -0
  330. package/dist/pcomponents/PTransform.d.ts.map +1 -0
  331. package/dist/pcomponents/PTransform.js +67 -0
  332. package/dist/pcomponents/PTransform.js.map +1 -0
  333. package/dist/pcomponents/PVarList.d.ts +43 -0
  334. package/dist/pcomponents/PVarList.d.ts.map +1 -0
  335. package/dist/pcomponents/PVarList.js +87 -0
  336. package/dist/pcomponents/PVarList.js.map +1 -0
  337. package/dist/pcomponents/PVideoPlayer.d.ts +36 -0
  338. package/dist/pcomponents/PVideoPlayer.d.ts.map +1 -0
  339. package/dist/pcomponents/PVideoPlayer.js +93 -0
  340. package/dist/pcomponents/PVideoPlayer.js.map +1 -0
  341. package/dist/pcomponents/PVisibility.d.ts +38 -0
  342. package/dist/pcomponents/PVisibility.d.ts.map +1 -0
  343. package/dist/pcomponents/PVisibility.js +68 -0
  344. package/dist/pcomponents/PVisibility.js.map +1 -0
  345. package/dist/pcomponents/PXRTools.d.ts +32 -0
  346. package/dist/pcomponents/PXRTools.d.ts.map +1 -0
  347. package/dist/pcomponents/PXRTools.js +43 -0
  348. package/dist/pcomponents/PXRTools.js.map +1 -0
  349. package/dist/ports/IDBInValue.d.ts +6 -0
  350. package/dist/ports/IDBInValue.d.ts.map +1 -0
  351. package/dist/ports/IDBInValue.js +2 -0
  352. package/dist/ports/IDBInValue.js.map +1 -0
  353. package/dist/ports/IDBLink.d.ts +17 -0
  354. package/dist/ports/IDBLink.d.ts.map +1 -0
  355. package/dist/ports/IDBLink.js +2 -0
  356. package/dist/ports/IDBLink.js.map +1 -0
  357. package/dist/ports/IDBPayloadValue.d.ts +5 -0
  358. package/dist/ports/IDBPayloadValue.d.ts.map +1 -0
  359. package/dist/ports/IDBPayloadValue.js +2 -0
  360. package/dist/ports/IDBPayloadValue.js.map +1 -0
  361. package/dist/ports/IValue.d.ts +10 -0
  362. package/dist/ports/IValue.d.ts.map +1 -0
  363. package/dist/ports/IValue.js +2 -0
  364. package/dist/ports/IValue.js.map +1 -0
  365. package/dist/ports/PInEventPort.d.ts +16 -0
  366. package/dist/ports/PInEventPort.d.ts.map +1 -0
  367. package/dist/ports/PInEventPort.js +24 -0
  368. package/dist/ports/PInEventPort.js.map +1 -0
  369. package/dist/ports/PInValue.d.ts +17 -0
  370. package/dist/ports/PInValue.d.ts.map +1 -0
  371. package/dist/ports/PInValue.js +31 -0
  372. package/dist/ports/PInValue.js.map +1 -0
  373. package/dist/ports/PInValuePort.d.ts +18 -0
  374. package/dist/ports/PInValuePort.d.ts.map +1 -0
  375. package/dist/ports/PInValuePort.js +49 -0
  376. package/dist/ports/PInValuePort.js.map +1 -0
  377. package/dist/ports/PLink.d.ts +23 -0
  378. package/dist/ports/PLink.d.ts.map +1 -0
  379. package/dist/ports/PLink.js +50 -0
  380. package/dist/ports/PLink.js.map +1 -0
  381. package/dist/ports/POutEventPort.d.ts +20 -0
  382. package/dist/ports/POutEventPort.d.ts.map +1 -0
  383. package/dist/ports/POutEventPort.js +65 -0
  384. package/dist/ports/POutEventPort.js.map +1 -0
  385. package/dist/ports/POutValuePort.d.ts +13 -0
  386. package/dist/ports/POutValuePort.d.ts.map +1 -0
  387. package/dist/ports/POutValuePort.js +21 -0
  388. package/dist/ports/POutValuePort.js.map +1 -0
  389. package/dist/ports/PPayloadValue.d.ts +16 -0
  390. package/dist/ports/PPayloadValue.d.ts.map +1 -0
  391. package/dist/ports/PPayloadValue.js +28 -0
  392. package/dist/ports/PPayloadValue.js.map +1 -0
  393. package/dist/ports/PPort.d.ts +21 -0
  394. package/dist/ports/PPort.d.ts.map +1 -0
  395. package/dist/ports/PPort.js +25 -0
  396. package/dist/ports/PPort.js.map +1 -0
  397. package/dist/settings/ICameraSettings.d.ts +16 -0
  398. package/dist/settings/ICameraSettings.d.ts.map +1 -0
  399. package/dist/settings/ICameraSettings.js +2 -0
  400. package/dist/settings/ICameraSettings.js.map +1 -0
  401. package/dist/settings/IQualitySettings.d.ts +14 -0
  402. package/dist/settings/IQualitySettings.d.ts.map +1 -0
  403. package/dist/settings/IQualitySettings.js +2 -0
  404. package/dist/settings/IQualitySettings.js.map +1 -0
  405. package/dist/settings/IRenderSetting.d.ts +7 -0
  406. package/dist/settings/IRenderSetting.d.ts.map +1 -0
  407. package/dist/settings/IRenderSetting.js +2 -0
  408. package/dist/settings/IRenderSetting.js.map +1 -0
  409. package/dist/settings/ISetting.d.ts +4 -0
  410. package/dist/settings/ISetting.d.ts.map +1 -0
  411. package/dist/settings/ISetting.js +2 -0
  412. package/dist/settings/ISetting.js.map +1 -0
  413. package/dist/settings/IWebSettings.d.ts +6 -0
  414. package/dist/settings/IWebSettings.d.ts.map +1 -0
  415. package/dist/settings/IWebSettings.js +2 -0
  416. package/dist/settings/IWebSettings.js.map +1 -0
  417. package/dist/settings/Settings_Babylonjs.d.ts +101 -0
  418. package/dist/settings/Settings_Babylonjs.d.ts.map +1 -0
  419. package/dist/settings/Settings_Babylonjs.js +85 -0
  420. package/dist/settings/Settings_Babylonjs.js.map +1 -0
  421. package/dist/settings/Settings_Base.d.ts +11 -0
  422. package/dist/settings/Settings_Base.d.ts.map +1 -0
  423. package/dist/settings/Settings_Base.js +45 -0
  424. package/dist/settings/Settings_Base.js.map +1 -0
  425. package/dist/settings/Settings_Threejs.d.ts +106 -0
  426. package/dist/settings/Settings_Threejs.d.ts.map +1 -0
  427. package/dist/settings/Settings_Threejs.js +165 -0
  428. package/dist/settings/Settings_Threejs.js.map +1 -0
  429. package/package.json +1 -1
@@ -0,0 +1,698 @@
1
+ import PFile from "./media/PFile";
2
+ import { Platform, Language, Coordinates, PortTypes } from "./PEnums";
3
+ import PEvent from "./PEvent";
4
+ import PNode from "./PNode";
5
+ import { PVariable } from "./PVariable";
6
+ import PFileUsage from "./PFileUsage";
7
+ import PScene from "./PScene";
8
+ var Workers;
9
+ (function (Workers) {
10
+ Workers[Workers["None"] = 0] = "None";
11
+ Workers[Workers["System"] = 1] = "System";
12
+ Workers[Workers["CameraControls"] = 2] = "CameraControls";
13
+ Workers[Workers["Animating"] = 4] = "Animating";
14
+ Workers[Workers["Updators"] = 8] = "Updators";
15
+ Workers[Workers["Admin"] = 16] = "Admin";
16
+ Workers[Workers["SceneLoader"] = 32] = "SceneLoader";
17
+ Workers[Workers["AdaptivePerformance"] = 64] = "AdaptivePerformance";
18
+ })(Workers || (Workers = {}));
19
+ export { Workers };
20
+ export default class GameContext {
21
+ _owner;
22
+ _root = null;
23
+ _pcanvas = null;
24
+ _running = false;
25
+ _pnodeRenderer = null;
26
+ _engine = null;
27
+ _audioListener = null;
28
+ _componentFactory = null;
29
+ _assetLoader = null;
30
+ editor = false;
31
+ debug_fastVideo = false;
32
+ isAdmin() {
33
+ return false;
34
+ }
35
+ s3Url = "https://p100-pw.s3.eu-north-1.amazonaws.com/";
36
+ constructor(owner, platform, baseUrl) {
37
+ this._owner = owner;
38
+ this._platform = platform;
39
+ if (baseUrl)
40
+ this.s3Url = baseUrl + "/";
41
+ }
42
+ setEngine(engine) {
43
+ this._engine = engine;
44
+ if (engine) {
45
+ this._pnodeRenderer = engine.setupNodeRenderer(this);
46
+ this._componentFactory = engine.getComponentFactory();
47
+ }
48
+ else {
49
+ this._pnodeRenderer = null;
50
+ this._componentFactory = null;
51
+ }
52
+ }
53
+ getOwner() {
54
+ return this._owner;
55
+ }
56
+ //
57
+ // PID
58
+ //
59
+ pid() {
60
+ console.error("MISSING PID");
61
+ return 0;
62
+ }
63
+ //
64
+ // PRENDERER
65
+ //
66
+ getIEngine() {
67
+ return this._engine;
68
+ }
69
+ getEngine() {
70
+ return this._engine;
71
+ }
72
+ getNodeRenderer() {
73
+ return this._pnodeRenderer;
74
+ }
75
+ //
76
+ // PCANVAS
77
+ //
78
+ getEngineScene() {
79
+ return this._pcanvas.getScene();
80
+ }
81
+ getCanvas() {
82
+ return this._pcanvas;
83
+ }
84
+ getPCanvas() {
85
+ return this._pcanvas;
86
+ }
87
+ getCanvasElement() {
88
+ return this._pcanvas?.getCanvasElement() || null;
89
+ }
90
+ setPCanvas(canvas) {
91
+ if (this._pcanvas !== null && canvas !== null) {
92
+ this.error("GameContext already had a canvas");
93
+ return;
94
+ }
95
+ this._pcanvas = canvas;
96
+ }
97
+ //
98
+ // ASSETS
99
+ //
100
+ assetLoader() {
101
+ if (this._assetLoader === null) {
102
+ this._assetLoader = this._engine.setupAssetLoader(this);
103
+ }
104
+ return this._assetLoader;
105
+ }
106
+ async loadAssetsAsync() {
107
+ return this._assetLoader?.loadAsync();
108
+ }
109
+ //
110
+ // MEDIA LOADERS
111
+ //
112
+ hasMediaQueue() {
113
+ return this._assetLoader?.hasQueue() || false;
114
+ }
115
+ //
116
+ // IEmitter
117
+ //
118
+ getContext() {
119
+ return this;
120
+ }
121
+ //
122
+ // LIFE CYCLE
123
+ //
124
+ /**
125
+ * Init and render scene
126
+ */
127
+ enable() {
128
+ this._sceneLoaderCounter = 0;
129
+ if (this._root) {
130
+ if (this._root.hasValidPlatform()) {
131
+ this._root.enable();
132
+ this._root.update();
133
+ this.setWorkFlag(Workers.System);
134
+ // pcanvas.enable();
135
+ this.clearWorkFlag(Workers.System);
136
+ }
137
+ else {
138
+ this.error("Root is not enabled or valid platform");
139
+ }
140
+ }
141
+ }
142
+ disable() {
143
+ this.disableInput();
144
+ this._root?.disable();
145
+ }
146
+ /**
147
+ * Destroy everything
148
+ */
149
+ dispose() {
150
+ this._assetLoader?.dispose();
151
+ this._assetLoader = null;
152
+ // Dispose ALL nodes, not just mounted ones
153
+ for (const node of this._nodes) {
154
+ node.dispose(false);
155
+ }
156
+ this._root = null;
157
+ this._nodes.length = 0;
158
+ this._events.length = 0;
159
+ this._fileUsages.length = 0;
160
+ this._pfiles.length = 0;
161
+ this._variables.length = 0;
162
+ if (this._audioListener !== null) {
163
+ const audioListener = this._audioListener;
164
+ if (audioListener.dispose) {
165
+ audioListener.dispose();
166
+ }
167
+ }
168
+ this.disposeCanvas();
169
+ }
170
+ /**
171
+ * Call when we need to dispose the old PCanvas and canvas element
172
+ */
173
+ disposeCanvas() {
174
+ this._pcanvas?.dispose();
175
+ this._assetLoader?.dispose();
176
+ this._assetLoader = null;
177
+ this._pcanvas = null;
178
+ this._engine = null;
179
+ }
180
+ /**
181
+ * use hard = true if we want to tear down and free all resources. Not
182
+ * to use while restarting.
183
+ */
184
+ soft_dispose() {
185
+ // Dispose ALL nodes, not just mounted ones
186
+ for (const node of this._nodes) {
187
+ node.dispose(false);
188
+ }
189
+ this._root = null;
190
+ this._nodes = [];
191
+ }
192
+ isLoading() {
193
+ return this.hasMediaQueue();
194
+ }
195
+ _sceneLoaderCounter = 0;
196
+ increaseSceneLoader() {
197
+ this._sceneLoaderCounter++;
198
+ if (this._sceneLoaderCounter === 1) {
199
+ this.setWorkFlag(Workers.SceneLoader);
200
+ }
201
+ }
202
+ decreaseSceneLoader() {
203
+ this._sceneLoaderCounter--;
204
+ if (this._sceneLoaderCounter === 0) {
205
+ this.clearWorkFlag(Workers.SceneLoader);
206
+ }
207
+ }
208
+ async play() {
209
+ if (this._root === null)
210
+ return;
211
+ if (this._running === true) {
212
+ console.error("play() GameContext was already running.");
213
+ return;
214
+ }
215
+ const pRootComponent = this._root.findComponent("PProjectRoot");
216
+ if (pRootComponent === null) {
217
+ this.error("play() PProjectRoot not found");
218
+ return;
219
+ }
220
+ this.increaseSceneLoader();
221
+ for (const variable of Object.values(this._variables)) {
222
+ variable.reset();
223
+ }
224
+ this._running = true;
225
+ await this.setupAudioListener();
226
+ this._root.play();
227
+ pRootComponent.native_OnPlay();
228
+ await this._assetLoader?.loadAsync();
229
+ pRootComponent.native_OnPlaying();
230
+ this._pcanvas?.updateEditorMode(false);
231
+ this._pcanvas.onSceneRunning();
232
+ this.decreaseSceneLoader();
233
+ }
234
+ stop() {
235
+ if (this._root === null)
236
+ return;
237
+ if (this._running === false)
238
+ return;
239
+ this._running = false;
240
+ for (const variable of Object.values(this._variables)) {
241
+ variable.reset();
242
+ }
243
+ this._root.stop();
244
+ this._pcanvas?.updateEditorMode(true);
245
+ }
246
+ //
247
+ // WORKER
248
+ //
249
+ _workFlags = 0;
250
+ isWorking() {
251
+ return this._workFlags > 0;
252
+ }
253
+ setWorkFlag(worker) {
254
+ const wasWorking = this._workFlags > 0;
255
+ this._workFlags = this._workFlags | worker;
256
+ // console.log(
257
+ // "setWorkState (" + Workers[worker] + ") _workFlags: ",
258
+ // this._workFlags
259
+ // );
260
+ if (!wasWorking && this._workFlags > 0 && this._pcanvas !== null) {
261
+ this._pcanvas.onWorkStarted(this._workFlags);
262
+ this.getOwner().setWorkState(true);
263
+ }
264
+ }
265
+ clearWorkFlag(flag) {
266
+ const wasWorking = this._workFlags > 0;
267
+ this._workFlags = this._workFlags & ~flag;
268
+ // console.log(
269
+ // "clearWorkState (" + Workers[flag] + ") _workState: ",
270
+ // this._workFlags
271
+ // );
272
+ if (wasWorking && this._workFlags === 0 && this._pcanvas !== null) {
273
+ this._pcanvas.onWorkStopped(flag);
274
+ this.getOwner().setWorkState(false);
275
+ }
276
+ }
277
+ /**
278
+ * Render a single frame if sleeping
279
+ */
280
+ snooze() {
281
+ this._pcanvas.snooze();
282
+ }
283
+ //
284
+ // NATIVE EVENTS
285
+ //
286
+ onClick = (node, ctrl, shift) => {
287
+ this._owner?.onClick(node, ctrl, shift);
288
+ };
289
+ onHoverEnter = (node) => {
290
+ this._owner?.onHoverEnter(node);
291
+ };
292
+ onHoverExit = (node) => {
293
+ this._owner?.onHoverExit(node);
294
+ };
295
+ //
296
+ // PEVENTS
297
+ //
298
+ _events = [];
299
+ registerEvent(dbEvent) {
300
+ const pevent = new PEvent(dbEvent);
301
+ this._events.push(pevent);
302
+ return pevent;
303
+ }
304
+ getEvents() {
305
+ return this._events;
306
+ }
307
+ getEvent(id) {
308
+ console.log("dont use getEvent(id: string)");
309
+ return this._events.find((e) => e._id == id) || null;
310
+ }
311
+ getEventByPid(pid) {
312
+ return this._events.find((e) => e.pid === pid) || null;
313
+ }
314
+ getExternalEvent(name) {
315
+ return this._events.find((e) => e.external && e.name === name) || null;
316
+ }
317
+ //
318
+ // PVARIABLES
319
+ //
320
+ _variables = [];
321
+ registerVariable(dbVariable) {
322
+ const pvariable = new PVariable(dbVariable);
323
+ this._variables.push(pvariable);
324
+ return pvariable;
325
+ }
326
+ getVariables() {
327
+ return this._variables;
328
+ }
329
+ getVariableByPid(pid) {
330
+ return this._variables.find((v) => v.pid === pid) || null;
331
+ }
332
+ getVariable(id) {
333
+ console.error("do not use getVariable(id: string)");
334
+ return this._variables.find((v) => v._id === id) || null;
335
+ }
336
+ //
337
+ // FILES
338
+ //
339
+ // This is overriden by EGameContext
340
+ _pfiles = [];
341
+ // This is overriden by EGameContext
342
+ registerFile(dbItem) {
343
+ const item = new PFile(dbItem);
344
+ this._pfiles.push(item);
345
+ return item;
346
+ }
347
+ //
348
+ // FILE USAGES
349
+ //
350
+ _fileUsages = [];
351
+ registerFileUsage(dbItem) {
352
+ const item = new PFileUsage(dbItem);
353
+ this._fileUsages.push(item);
354
+ return item;
355
+ }
356
+ findFileUsage(nodePid, componentPid, slot) {
357
+ return (this._fileUsages.find((f) => f.node === nodePid && f.component === componentPid && f.slot === slot) || null);
358
+ }
359
+ findFile(id) {
360
+ return this._pfiles.find((f) => f._id === id) || null;
361
+ }
362
+ /**
363
+ * Called when a component slot changes value. Used in admin.
364
+ */
365
+ setFileSlot(_fileSlot, _id) {
366
+ return null;
367
+ }
368
+ //
369
+ // PLINKS
370
+ //
371
+ linkPorts(links, showErrors) {
372
+ // Link nodes to their ports
373
+ for (const link of links) {
374
+ const outPort = this.findOutEventPort(link.outPortType, link.outPid, link.outComponentPid, link.outPortId);
375
+ const inPort = this.findInEventPort(link.inPortType, link.inPid, link.inComponentPid, link.inPortId);
376
+ if (!outPort) {
377
+ if (showErrors)
378
+ this.error("[Link Ports] out port not found");
379
+ continue;
380
+ }
381
+ if (!inPort) {
382
+ if (showErrors)
383
+ this.error("[Link Ports] in port not found");
384
+ continue;
385
+ }
386
+ // Link
387
+ outPort.link(this, inPort, link);
388
+ }
389
+ }
390
+ //
391
+ // PCOMPONENTS
392
+ //
393
+ createComponents(pnode, components) {
394
+ return components
395
+ .map((c) => this._componentFactory.component(c, pnode, this))
396
+ .filter((c) => c !== null);
397
+ }
398
+ //
399
+ // NODES
400
+ //
401
+ _nodes = [];
402
+ createPNodeTree(dbItem, dbNodes, parent) {
403
+ const pnode = new PNode(dbItem, this, this._pnodeRenderer);
404
+ pnode.updateByComponent();
405
+ this._nodes.push(pnode);
406
+ if (parent) {
407
+ parent.add(pnode);
408
+ }
409
+ const res = dbNodes.filter((n) => n.parent === dbItem.pid);
410
+ for (const childNode of res) {
411
+ this.createPNodeTree(childNode, dbNodes, pnode);
412
+ }
413
+ return pnode;
414
+ }
415
+ /**
416
+ * [CREATE NODES]
417
+ * Create root node. For project or new nodes
418
+ */
419
+ createRootNode(dbRoot, dbNodes) {
420
+ // Create root PNode
421
+ const root = this.createPNodeTree(dbRoot, dbNodes);
422
+ root.traverse((n) => n.linkPorts());
423
+ return root;
424
+ }
425
+ findNode(id) {
426
+ return this._nodes.find((n) => n._id === id) || null;
427
+ }
428
+ findNodeByPid(pid) {
429
+ return this._nodes.find((n) => n.pid === pid) || null;
430
+ }
431
+ rerenderNode(_node) {
432
+ // Editor
433
+ }
434
+ editor_render() { }
435
+ getRoot() {
436
+ return this._root;
437
+ }
438
+ setRoot(root) {
439
+ this._root = root;
440
+ }
441
+ //
442
+ // PORTS & LINKS
443
+ //
444
+ findInEventPort(portType, pid, component, portId) {
445
+ // Supports only
446
+ if (portType === PortTypes.Event) {
447
+ const pevent = this.getEventByPid(pid);
448
+ if (pevent)
449
+ return pevent.inPort;
450
+ }
451
+ else if (portType === PortTypes.Variable) {
452
+ const pvariable = this.getVariableByPid(pid);
453
+ if (pvariable)
454
+ return pvariable.inPort;
455
+ }
456
+ else if (portType === PortTypes.PNode) {
457
+ const pnode = this.findNodeByPid(pid);
458
+ if (pnode) {
459
+ const pcomponent = pnode.findComponentByPid(component);
460
+ if (pcomponent)
461
+ return (pcomponent.inEventPorts.find((p) => p.portId === portId) || null);
462
+ }
463
+ }
464
+ return null;
465
+ }
466
+ findOutEventPort(portType, pid, component, portId) {
467
+ // Supports only
468
+ if (portType === PortTypes.Event) {
469
+ const pevent = this.getEventByPid(pid);
470
+ if (pevent)
471
+ return pevent.outPort;
472
+ }
473
+ else if (portType === PortTypes.Variable) {
474
+ const pvariable = this.getVariableByPid(pid);
475
+ if (pvariable)
476
+ return pvariable.outPort;
477
+ }
478
+ else if (portType === PortTypes.PNode) {
479
+ const pnode = this.findNodeByPid(pid);
480
+ if (pnode) {
481
+ const pcomponent = pnode.findComponentByPid(component);
482
+ if (pcomponent)
483
+ return (pcomponent.outEventPorts.find((p) => p.portId === portId) || null);
484
+ }
485
+ }
486
+ return null;
487
+ }
488
+ findOutValuePort(link) {
489
+ // Supports only
490
+ if (link.portType === PortTypes.PNode) {
491
+ const pnode = this.findNodeByPid(link.pid);
492
+ if (pnode) {
493
+ const pcomponent = pnode.findComponentByPid(link.componentPid);
494
+ if (pcomponent) {
495
+ return (pcomponent.outValuePorts.find((v) => v.portId === link.portId) ||
496
+ null);
497
+ }
498
+ }
499
+ }
500
+ else if (link.portType === PortTypes.Variable) {
501
+ const pvariable = this.getVariableByPid(link.pid);
502
+ if (pvariable)
503
+ return pvariable.outValue;
504
+ }
505
+ else {
506
+ console.error("Unsupported valuePortType", link);
507
+ }
508
+ return null;
509
+ }
510
+ //
511
+ // SCENES
512
+ //
513
+ _loadedScenePids = [];
514
+ _scenes = [];
515
+ registerScene = (dbScene) => {
516
+ const pscene = new PScene(dbScene);
517
+ this._scenes.push(pscene);
518
+ return pscene;
519
+ };
520
+ getScene(pid) {
521
+ return this._scenes.find((s) => s.pid === pid) || null;
522
+ }
523
+ isSceneLoaded(scenePid) {
524
+ return this._loadedScenePids.includes(scenePid);
525
+ }
526
+ getSceneRoot(pid) {
527
+ return (this._nodes.find((s) => s.parentPid === 0 && s.scenePid === pid) || null);
528
+ }
529
+ async loadScene(scenePid, loader, loadAssets, onLoadedEvent = null) {
530
+ const root = this.getSceneRoot(scenePid);
531
+ const pscene = this.getScene(scenePid);
532
+ if (!pscene || !root || !root.scenePid)
533
+ throw new Error("Scene not found");
534
+ if (pscene.isLoaded)
535
+ throw new Error("Scene was already loaded");
536
+ pscene.isLoaded = true;
537
+ this.increaseSceneLoader();
538
+ this._loadedScenePids.push(root.scenePid);
539
+ loader.add(root);
540
+ root.enable();
541
+ root.update();
542
+ this._owner.onLoadScene(root);
543
+ if (this.isRunning()) {
544
+ root.play();
545
+ }
546
+ if (loadAssets) {
547
+ await this._assetLoader?.loadAsync();
548
+ }
549
+ if (onLoadedEvent !== null)
550
+ onLoadedEvent.emit(root._id);
551
+ if (this.isRunning()) {
552
+ const pscene = root.findComponent("PSceneRoot");
553
+ pscene.outport_onSceneLoaded?.emit(root._id);
554
+ }
555
+ this.decreaseSceneLoader();
556
+ }
557
+ __unloadScene(pscene, root) {
558
+ if (!pscene.isLoaded)
559
+ throw new Error("Scene was not loaded");
560
+ pscene.isLoaded = false;
561
+ if (this.isRunning()) {
562
+ root.stop();
563
+ }
564
+ this._loadedScenePids = this._loadedScenePids.filter((id) => id !== root.scenePid);
565
+ this._owner.onUnloadScene(root);
566
+ root.disable();
567
+ root.removeFromParent();
568
+ }
569
+ unloadScene(pscene) {
570
+ const root = this.getSceneRoot(pscene.pid);
571
+ this.__unloadScene(pscene, root);
572
+ }
573
+ unloadSceneNode(root) {
574
+ const pscene = this.getScene(root.scenePid);
575
+ this.__unloadScene(pscene, root);
576
+ }
577
+ //
578
+ // LAYERS
579
+ //
580
+ _mask = 1;
581
+ mask = () => {
582
+ return this._mask;
583
+ };
584
+ /**
585
+ * Camera layer changed
586
+ */
587
+ setLayers(mask) {
588
+ this._mask = mask;
589
+ // Loop through nodes and update visiblity
590
+ if (this._root) {
591
+ this._root.update();
592
+ }
593
+ }
594
+ //
595
+ // COORDINATE SYSTEM
596
+ //
597
+ _coordinates = Coordinates.LeftHanded;
598
+ setCoordinates(coordinates) {
599
+ this._coordinates = coordinates;
600
+ }
601
+ /**
602
+ * Return coordinats of the selected engine
603
+ */
604
+ getEngineCoordinates() {
605
+ return this._engine.getCoordinates();
606
+ }
607
+ getCoordinates() {
608
+ return this._coordinates;
609
+ }
610
+ isInverted() {
611
+ return this._engine.getCoordinates() !== this._coordinates;
612
+ }
613
+ //
614
+ // PLATFORM
615
+ //
616
+ _platform = Platform.Threejs;
617
+ setPlatform(platform) {
618
+ this._platform = platform;
619
+ }
620
+ platform() {
621
+ return this._platform;
622
+ }
623
+ //
624
+ // LANGUAGES
625
+ //
626
+ _language = Language.English;
627
+ setLanguage(language) {
628
+ this._language = language;
629
+ }
630
+ language() {
631
+ return this._language;
632
+ }
633
+ //
634
+ // RUNNING
635
+ //
636
+ isRunning() {
637
+ return this._running;
638
+ }
639
+ //
640
+ // CAMERA
641
+ //
642
+ setCameraControlSettings(cameraSettings) {
643
+ const cameraControls = this._engine.setupCameraControls(this, cameraSettings);
644
+ this._pcanvas.setCameraControls(cameraControls);
645
+ return cameraControls;
646
+ }
647
+ getCameraControls() {
648
+ return this._pcanvas?.getCameraControls() || null;
649
+ }
650
+ //
651
+ // AUDIO
652
+ //
653
+ async setupAudioListener() {
654
+ if (this._audioListener === null) {
655
+ this._audioListener = await this._engine.setupAudioListener();
656
+ }
657
+ }
658
+ getAudioListener() {
659
+ return this._audioListener;
660
+ }
661
+ //
662
+ // INTERACTION
663
+ //
664
+ _inputEnabled = false;
665
+ enableInput() {
666
+ if (this._inputEnabled || !this._pcanvas)
667
+ return;
668
+ this._inputEnabled = true;
669
+ this._pcanvas.getCameraControls()?.enable();
670
+ this._pcanvas.enableRaycaster();
671
+ }
672
+ disableInput() {
673
+ if (!this._inputEnabled || !this._pcanvas)
674
+ return;
675
+ this._inputEnabled = false;
676
+ this._pcanvas.getCameraControls()?.disable();
677
+ this._pcanvas.disableRaycaster();
678
+ }
679
+ isInputEnabled() {
680
+ return this._inputEnabled;
681
+ }
682
+ //
683
+ // TWEENS
684
+ //
685
+ addTween(tween) {
686
+ this._pcanvas?.addTween(tween);
687
+ }
688
+ //
689
+ // NOTIFICATIONS
690
+ //
691
+ error(msg, details) {
692
+ this._owner.error(msg, details);
693
+ }
694
+ catch(error) {
695
+ this._owner.catch(error);
696
+ }
697
+ }
698
+ //# sourceMappingURL=GameContext.js.map