@p100-web/core 100.2.14 → 100.2.16

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