@p100-web/core 100.0.61
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.
- package/dist/index.d.ts +136 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +101 -0
- package/dist/index.js.map +1 -0
- package/dist/src/AdaptivePerformance.d.ts +20 -0
- package/dist/src/AdaptivePerformance.d.ts.map +1 -0
- package/dist/src/AdaptivePerformance.js +110 -0
- package/dist/src/AdaptivePerformance.js.map +1 -0
- package/dist/src/DBEvent.d.ts +22 -0
- package/dist/src/DBEvent.d.ts.map +1 -0
- package/dist/src/DBEvent.js +19 -0
- package/dist/src/DBEvent.js.map +1 -0
- package/dist/src/DBNode.d.ts +33 -0
- package/dist/src/DBNode.d.ts.map +1 -0
- package/dist/src/DBNode.js +31 -0
- package/dist/src/DBNode.js.map +1 -0
- package/dist/src/DBScene.d.ts +11 -0
- package/dist/src/DBScene.d.ts.map +1 -0
- package/dist/src/DBScene.js +9 -0
- package/dist/src/DBScene.js.map +1 -0
- package/dist/src/DBVariable.d.ts +22 -0
- package/dist/src/DBVariable.d.ts.map +1 -0
- package/dist/src/DBVariable.js +19 -0
- package/dist/src/DBVariable.js.map +1 -0
- package/dist/src/DevTools.d.ts +4 -0
- package/dist/src/DevTools.d.ts.map +1 -0
- package/dist/src/DevTools.js +10 -0
- package/dist/src/DevTools.js.map +1 -0
- package/dist/src/GameContext.d.ts +179 -0
- package/dist/src/GameContext.d.ts.map +1 -0
- package/dist/src/GameContext.js +594 -0
- package/dist/src/GameContext.js.map +1 -0
- package/dist/src/IAudioListener.d.ts +4 -0
- package/dist/src/IAudioListener.d.ts.map +1 -0
- package/dist/src/IAudioListener.js +2 -0
- package/dist/src/IAudioListener.js.map +1 -0
- package/dist/src/ICameraControls.d.ts +14 -0
- package/dist/src/ICameraControls.d.ts.map +1 -0
- package/dist/src/ICameraControls.js +2 -0
- package/dist/src/ICameraControls.js.map +1 -0
- package/dist/src/ICameraNode.d.ts +6 -0
- package/dist/src/ICameraNode.d.ts.map +1 -0
- package/dist/src/ICameraNode.js +2 -0
- package/dist/src/ICameraNode.js.map +1 -0
- package/dist/src/IComponentFactory.d.ts +8 -0
- package/dist/src/IComponentFactory.d.ts.map +1 -0
- package/dist/src/IComponentFactory.js +2 -0
- package/dist/src/IComponentFactory.js.map +1 -0
- package/dist/src/IEngine.d.ts +26 -0
- package/dist/src/IEngine.d.ts.map +1 -0
- package/dist/src/IEngine.js +2 -0
- package/dist/src/IEngine.js.map +1 -0
- package/dist/src/IMaterial.d.ts +5 -0
- package/dist/src/IMaterial.d.ts.map +1 -0
- package/dist/src/IMaterial.js +2 -0
- package/dist/src/IMaterial.js.map +1 -0
- package/dist/src/IPCanvas.d.ts +45 -0
- package/dist/src/IPCanvas.d.ts.map +1 -0
- package/dist/src/IPCanvas.js +2 -0
- package/dist/src/IPCanvas.js.map +1 -0
- package/dist/src/IPNodeRenderer.d.ts +23 -0
- package/dist/src/IPNodeRenderer.d.ts.map +1 -0
- package/dist/src/IPNodeRenderer.js +2 -0
- package/dist/src/IPNodeRenderer.js.map +1 -0
- package/dist/src/IStats.d.ts +9 -0
- package/dist/src/IStats.d.ts.map +1 -0
- package/dist/src/IStats.js +3 -0
- package/dist/src/IStats.js.map +1 -0
- package/dist/src/MathTools.d.ts +4 -0
- package/dist/src/MathTools.d.ts.map +1 -0
- package/dist/src/MathTools.js +7 -0
- package/dist/src/MathTools.js.map +1 -0
- package/dist/src/PAction.d.ts +64 -0
- package/dist/src/PAction.d.ts.map +1 -0
- package/dist/src/PAction.js +209 -0
- package/dist/src/PAction.js.map +1 -0
- package/dist/src/PComponent.d.ts +60 -0
- package/dist/src/PComponent.d.ts.map +1 -0
- package/dist/src/PComponent.js +44 -0
- package/dist/src/PComponent.js.map +1 -0
- package/dist/src/PEnums.d.ts +98 -0
- package/dist/src/PEnums.d.ts.map +1 -0
- package/dist/src/PEnums.js +110 -0
- package/dist/src/PEnums.js.map +1 -0
- package/dist/src/PEvent.d.ts +27 -0
- package/dist/src/PEvent.d.ts.map +1 -0
- package/dist/src/PEvent.js +40 -0
- package/dist/src/PEvent.js.map +1 -0
- package/dist/src/PNode.d.ts +111 -0
- package/dist/src/PNode.d.ts.map +1 -0
- package/dist/src/PNode.js +488 -0
- package/dist/src/PNode.js.map +1 -0
- package/dist/src/PPayload.d.ts +7 -0
- package/dist/src/PPayload.d.ts.map +1 -0
- package/dist/src/PPayload.js +19 -0
- package/dist/src/PPayload.js.map +1 -0
- package/dist/src/PTypes.d.ts +140 -0
- package/dist/src/PTypes.d.ts.map +1 -0
- package/dist/src/PTypes.js +2 -0
- package/dist/src/PTypes.js.map +1 -0
- package/dist/src/PVariable.d.ts +29 -0
- package/dist/src/PVariable.d.ts.map +1 -0
- package/dist/src/PVariable.js +51 -0
- package/dist/src/PVariable.js.map +1 -0
- package/dist/src/PVector2.d.ts +14 -0
- package/dist/src/PVector2.d.ts.map +1 -0
- package/dist/src/PVector2.js +25 -0
- package/dist/src/PVector2.js.map +1 -0
- package/dist/src/PVector3.d.ts +17 -0
- package/dist/src/PVector3.d.ts.map +1 -0
- package/dist/src/PVector3.js +36 -0
- package/dist/src/PVector3.js.map +1 -0
- package/dist/src/animations/IAnimationAction.d.ts +9 -0
- package/dist/src/animations/IAnimationAction.d.ts.map +1 -0
- package/dist/src/animations/IAnimationAction.js +2 -0
- package/dist/src/animations/IAnimationAction.js.map +1 -0
- package/dist/src/animations/IAnimationClip.d.ts +5 -0
- package/dist/src/animations/IAnimationClip.d.ts.map +1 -0
- package/dist/src/animations/IAnimationClip.js +2 -0
- package/dist/src/animations/IAnimationClip.js.map +1 -0
- package/dist/src/animations/IAnimationMixer.d.ts +7 -0
- package/dist/src/animations/IAnimationMixer.d.ts.map +1 -0
- package/dist/src/animations/IAnimationMixer.js +2 -0
- package/dist/src/animations/IAnimationMixer.js.map +1 -0
- package/dist/src/media/IMediaLoader.d.ts +31 -0
- package/dist/src/media/IMediaLoader.d.ts.map +1 -0
- package/dist/src/media/IMediaLoader.js +2 -0
- package/dist/src/media/IMediaLoader.js.map +1 -0
- package/dist/src/media/MediaManager.d.ts +17 -0
- package/dist/src/media/MediaManager.d.ts.map +1 -0
- package/dist/src/media/MediaManager.js +19 -0
- package/dist/src/media/MediaManager.js.map +1 -0
- package/dist/src/media/PFile.d.ts +13 -0
- package/dist/src/media/PFile.d.ts.map +1 -0
- package/dist/src/media/PFile.js +28 -0
- package/dist/src/media/PFile.js.map +1 -0
- package/dist/src/pcomponents/BaseBackground.d.ts +27 -0
- package/dist/src/pcomponents/BaseBackground.d.ts.map +1 -0
- package/dist/src/pcomponents/BaseBackground.js +21 -0
- package/dist/src/pcomponents/BaseBackground.js.map +1 -0
- package/dist/src/pcomponents/BaseMaterial.d.ts +45 -0
- package/dist/src/pcomponents/BaseMaterial.d.ts.map +1 -0
- package/dist/src/pcomponents/BaseMaterial.js +47 -0
- package/dist/src/pcomponents/BaseMaterial.js.map +1 -0
- package/dist/src/pcomponents/PAnimator.d.ts +37 -0
- package/dist/src/pcomponents/PAnimator.d.ts.map +1 -0
- package/dist/src/pcomponents/PAnimator.js +43 -0
- package/dist/src/pcomponents/PAnimator.js.map +1 -0
- package/dist/src/pcomponents/PBasicMaterial.d.ts +23 -0
- package/dist/src/pcomponents/PBasicMaterial.d.ts.map +1 -0
- package/dist/src/pcomponents/PBasicMaterial.js +38 -0
- package/dist/src/pcomponents/PBasicMaterial.js.map +1 -0
- package/dist/src/pcomponents/PCallAction.d.ts +19 -0
- package/dist/src/pcomponents/PCallAction.d.ts.map +1 -0
- package/dist/src/pcomponents/PCallAction.js +25 -0
- package/dist/src/pcomponents/PCallAction.js.map +1 -0
- package/dist/src/pcomponents/PCallActions.d.ts +24 -0
- package/dist/src/pcomponents/PCallActions.d.ts.map +1 -0
- package/dist/src/pcomponents/PCallActions.js +38 -0
- package/dist/src/pcomponents/PCallActions.js.map +1 -0
- package/dist/src/pcomponents/PCameraPosition.d.ts +29 -0
- package/dist/src/pcomponents/PCameraPosition.d.ts.map +1 -0
- package/dist/src/pcomponents/PCameraPosition.js +76 -0
- package/dist/src/pcomponents/PCameraPosition.js.map +1 -0
- package/dist/src/pcomponents/PCameraTarget.d.ts +29 -0
- package/dist/src/pcomponents/PCameraTarget.d.ts.map +1 -0
- package/dist/src/pcomponents/PCameraTarget.js +77 -0
- package/dist/src/pcomponents/PCameraTarget.js.map +1 -0
- package/dist/src/pcomponents/PCollider.d.ts +39 -0
- package/dist/src/pcomponents/PCollider.d.ts.map +1 -0
- package/dist/src/pcomponents/PCollider.js +56 -0
- package/dist/src/pcomponents/PCollider.js.map +1 -0
- package/dist/src/pcomponents/PCompareBoolean.d.ts +23 -0
- package/dist/src/pcomponents/PCompareBoolean.d.ts.map +1 -0
- package/dist/src/pcomponents/PCompareBoolean.js +39 -0
- package/dist/src/pcomponents/PCompareBoolean.js.map +1 -0
- package/dist/src/pcomponents/PCompareNumber.d.ts +25 -0
- package/dist/src/pcomponents/PCompareNumber.d.ts.map +1 -0
- package/dist/src/pcomponents/PCompareNumber.js +45 -0
- package/dist/src/pcomponents/PCompareNumber.js.map +1 -0
- package/dist/src/pcomponents/PCompareString.d.ts +25 -0
- package/dist/src/pcomponents/PCompareString.d.ts.map +1 -0
- package/dist/src/pcomponents/PCompareString.js +43 -0
- package/dist/src/pcomponents/PCompareString.js.map +1 -0
- package/dist/src/pcomponents/PCompareVariable.d.ts +28 -0
- package/dist/src/pcomponents/PCompareVariable.d.ts.map +1 -0
- package/dist/src/pcomponents/PCompareVariable.js +51 -0
- package/dist/src/pcomponents/PCompareVariable.js.map +1 -0
- package/dist/src/pcomponents/PControllerInput.d.ts +30 -0
- package/dist/src/pcomponents/PControllerInput.d.ts.map +1 -0
- package/dist/src/pcomponents/PControllerInput.js +42 -0
- package/dist/src/pcomponents/PControllerInput.js.map +1 -0
- package/dist/src/pcomponents/PCubeGeometry.d.ts +18 -0
- package/dist/src/pcomponents/PCubeGeometry.d.ts.map +1 -0
- package/dist/src/pcomponents/PCubeGeometry.js +22 -0
- package/dist/src/pcomponents/PCubeGeometry.js.map +1 -0
- package/dist/src/pcomponents/PDebug.d.ts +21 -0
- package/dist/src/pcomponents/PDebug.d.ts.map +1 -0
- package/dist/src/pcomponents/PDebug.js +31 -0
- package/dist/src/pcomponents/PDebug.js.map +1 -0
- package/dist/src/pcomponents/PEnvironment.d.ts +28 -0
- package/dist/src/pcomponents/PEnvironment.d.ts.map +1 -0
- package/dist/src/pcomponents/PEnvironment.js +44 -0
- package/dist/src/pcomponents/PEnvironment.js.map +1 -0
- package/dist/src/pcomponents/PFadeAnimation.d.ts +30 -0
- package/dist/src/pcomponents/PFadeAnimation.d.ts.map +1 -0
- package/dist/src/pcomponents/PFadeAnimation.js +94 -0
- package/dist/src/pcomponents/PFadeAnimation.js.map +1 -0
- package/dist/src/pcomponents/PHud.d.ts +12 -0
- package/dist/src/pcomponents/PHud.d.ts.map +1 -0
- package/dist/src/pcomponents/PHud.js +12 -0
- package/dist/src/pcomponents/PHud.js.map +1 -0
- package/dist/src/pcomponents/PImageBackground.d.ts +13 -0
- package/dist/src/pcomponents/PImageBackground.d.ts.map +1 -0
- package/dist/src/pcomponents/PImageBackground.js +18 -0
- package/dist/src/pcomponents/PImageBackground.js.map +1 -0
- package/dist/src/pcomponents/PImageCache.d.ts +22 -0
- package/dist/src/pcomponents/PImageCache.d.ts.map +1 -0
- package/dist/src/pcomponents/PImageCache.js +69 -0
- package/dist/src/pcomponents/PImageCache.js.map +1 -0
- package/dist/src/pcomponents/PImageDetector.d.ts +28 -0
- package/dist/src/pcomponents/PImageDetector.d.ts.map +1 -0
- package/dist/src/pcomponents/PImageDetector.js +38 -0
- package/dist/src/pcomponents/PImageDetector.js.map +1 -0
- package/dist/src/pcomponents/PLight.d.ts +15 -0
- package/dist/src/pcomponents/PLight.d.ts.map +1 -0
- package/dist/src/pcomponents/PLight.js +18 -0
- package/dist/src/pcomponents/PLight.js.map +1 -0
- package/dist/src/pcomponents/PLightDirectional.d.ts +19 -0
- package/dist/src/pcomponents/PLightDirectional.d.ts.map +1 -0
- package/dist/src/pcomponents/PLightDirectional.js +24 -0
- package/dist/src/pcomponents/PLightDirectional.js.map +1 -0
- package/dist/src/pcomponents/PMaskedMaterial.d.ts +20 -0
- package/dist/src/pcomponents/PMaskedMaterial.d.ts.map +1 -0
- package/dist/src/pcomponents/PMaskedMaterial.js +35 -0
- package/dist/src/pcomponents/PMaskedMaterial.js.map +1 -0
- package/dist/src/pcomponents/PModelGLTF.d.ts +33 -0
- package/dist/src/pcomponents/PModelGLTF.d.ts.map +1 -0
- package/dist/src/pcomponents/PModelGLTF.js +53 -0
- package/dist/src/pcomponents/PModelGLTF.js.map +1 -0
- package/dist/src/pcomponents/PMoveAnimation.d.ts +22 -0
- package/dist/src/pcomponents/PMoveAnimation.d.ts.map +1 -0
- package/dist/src/pcomponents/PMoveAnimation.js +44 -0
- package/dist/src/pcomponents/PMoveAnimation.js.map +1 -0
- package/dist/src/pcomponents/PMoveToAnimation.d.ts +26 -0
- package/dist/src/pcomponents/PMoveToAnimation.d.ts.map +1 -0
- package/dist/src/pcomponents/PMoveToAnimation.js +79 -0
- package/dist/src/pcomponents/PMoveToAnimation.js.map +1 -0
- package/dist/src/pcomponents/PPhysicalMaterial.d.ts +27 -0
- package/dist/src/pcomponents/PPhysicalMaterial.d.ts.map +1 -0
- package/dist/src/pcomponents/PPhysicalMaterial.js +41 -0
- package/dist/src/pcomponents/PPhysicalMaterial.js.map +1 -0
- package/dist/src/pcomponents/PPlaneDetector.d.ts +20 -0
- package/dist/src/pcomponents/PPlaneDetector.d.ts.map +1 -0
- package/dist/src/pcomponents/PPlaneDetector.js +26 -0
- package/dist/src/pcomponents/PPlaneDetector.js.map +1 -0
- package/dist/src/pcomponents/PPlaneGeometry.d.ts +20 -0
- package/dist/src/pcomponents/PPlaneGeometry.d.ts.map +1 -0
- package/dist/src/pcomponents/PPlaneGeometry.js +25 -0
- package/dist/src/pcomponents/PPlaneGeometry.js.map +1 -0
- package/dist/src/pcomponents/PProjectRoot.d.ts +38 -0
- package/dist/src/pcomponents/PProjectRoot.d.ts.map +1 -0
- package/dist/src/pcomponents/PProjectRoot.js +82 -0
- package/dist/src/pcomponents/PProjectRoot.js.map +1 -0
- package/dist/src/pcomponents/PRotateAnimation.d.ts +30 -0
- package/dist/src/pcomponents/PRotateAnimation.d.ts.map +1 -0
- package/dist/src/pcomponents/PRotateAnimation.js +72 -0
- package/dist/src/pcomponents/PRotateAnimation.js.map +1 -0
- package/dist/src/pcomponents/PScaleAnimation.d.ts +28 -0
- package/dist/src/pcomponents/PScaleAnimation.d.ts.map +1 -0
- package/dist/src/pcomponents/PScaleAnimation.js +75 -0
- package/dist/src/pcomponents/PScaleAnimation.js.map +1 -0
- package/dist/src/pcomponents/PSceneContainer.d.ts +22 -0
- package/dist/src/pcomponents/PSceneContainer.d.ts.map +1 -0
- package/dist/src/pcomponents/PSceneContainer.js +50 -0
- package/dist/src/pcomponents/PSceneContainer.js.map +1 -0
- package/dist/src/pcomponents/PSceneRoot.d.ts +16 -0
- package/dist/src/pcomponents/PSceneRoot.d.ts.map +1 -0
- package/dist/src/pcomponents/PSceneRoot.js +22 -0
- package/dist/src/pcomponents/PSceneRoot.js.map +1 -0
- package/dist/src/pcomponents/PSlider.d.ts +28 -0
- package/dist/src/pcomponents/PSlider.d.ts.map +1 -0
- package/dist/src/pcomponents/PSlider.js +37 -0
- package/dist/src/pcomponents/PSlider.js.map +1 -0
- package/dist/src/pcomponents/PSound.d.ts +34 -0
- package/dist/src/pcomponents/PSound.d.ts.map +1 -0
- package/dist/src/pcomponents/PSound.js +44 -0
- package/dist/src/pcomponents/PSound.js.map +1 -0
- package/dist/src/pcomponents/PSphereGeometry.d.ts +19 -0
- package/dist/src/pcomponents/PSphereGeometry.d.ts.map +1 -0
- package/dist/src/pcomponents/PSphereGeometry.js +24 -0
- package/dist/src/pcomponents/PSphereGeometry.js.map +1 -0
- package/dist/src/pcomponents/PSprite.d.ts +19 -0
- package/dist/src/pcomponents/PSprite.d.ts.map +1 -0
- package/dist/src/pcomponents/PSprite.js +26 -0
- package/dist/src/pcomponents/PSprite.js.map +1 -0
- package/dist/src/pcomponents/PSpriteAnimation.d.ts +25 -0
- package/dist/src/pcomponents/PSpriteAnimation.d.ts.map +1 -0
- package/dist/src/pcomponents/PSpriteAnimation.js +29 -0
- package/dist/src/pcomponents/PSpriteAnimation.js.map +1 -0
- package/dist/src/pcomponents/PText.d.ts +35 -0
- package/dist/src/pcomponents/PText.d.ts.map +1 -0
- package/dist/src/pcomponents/PText.js +48 -0
- package/dist/src/pcomponents/PText.js.map +1 -0
- package/dist/src/pcomponents/PTransform.d.ts +22 -0
- package/dist/src/pcomponents/PTransform.d.ts.map +1 -0
- package/dist/src/pcomponents/PTransform.js +37 -0
- package/dist/src/pcomponents/PTransform.js.map +1 -0
- package/dist/src/pcomponents/PVarList.d.ts +26 -0
- package/dist/src/pcomponents/PVarList.d.ts.map +1 -0
- package/dist/src/pcomponents/PVarList.js +52 -0
- package/dist/src/pcomponents/PVarList.js.map +1 -0
- package/dist/src/pcomponents/PVarReader.d.ts +19 -0
- package/dist/src/pcomponents/PVarReader.d.ts.map +1 -0
- package/dist/src/pcomponents/PVarReader.js +26 -0
- package/dist/src/pcomponents/PVarReader.js.map +1 -0
- package/dist/src/pcomponents/PVarWriter.d.ts +25 -0
- package/dist/src/pcomponents/PVarWriter.d.ts.map +1 -0
- package/dist/src/pcomponents/PVarWriter.js +46 -0
- package/dist/src/pcomponents/PVarWriter.js.map +1 -0
- package/dist/src/pcomponents/PVideoBackground.d.ts +36 -0
- package/dist/src/pcomponents/PVideoBackground.d.ts.map +1 -0
- package/dist/src/pcomponents/PVideoBackground.js +89 -0
- package/dist/src/pcomponents/PVideoBackground.js.map +1 -0
- package/dist/src/pcomponents/PVideoMaterial.d.ts +26 -0
- package/dist/src/pcomponents/PVideoMaterial.d.ts.map +1 -0
- package/dist/src/pcomponents/PVideoMaterial.js +40 -0
- package/dist/src/pcomponents/PVideoMaterial.js.map +1 -0
- package/dist/src/pcomponents/PVideoPlayer.d.ts +31 -0
- package/dist/src/pcomponents/PVideoPlayer.d.ts.map +1 -0
- package/dist/src/pcomponents/PVideoPlayer.js +70 -0
- package/dist/src/pcomponents/PVideoPlayer.js.map +1 -0
- package/dist/src/pcomponents/PVisibility.d.ts +33 -0
- package/dist/src/pcomponents/PVisibility.d.ts.map +1 -0
- package/dist/src/pcomponents/PVisibility.js +62 -0
- package/dist/src/pcomponents/PVisibility.js.map +1 -0
- package/dist/src/pcomponents/PXRTools.d.ts +32 -0
- package/dist/src/pcomponents/PXRTools.d.ts.map +1 -0
- package/dist/src/pcomponents/PXRTools.js +45 -0
- package/dist/src/pcomponents/PXRTools.js.map +1 -0
- package/dist/src/settings/Settings_Base.d.ts +7 -0
- package/dist/src/settings/Settings_Base.d.ts.map +1 -0
- package/dist/src/settings/Settings_Base.js +18 -0
- package/dist/src/settings/Settings_Base.js.map +1 -0
- package/dist/src/settings/Settings_Threejs.d.ts +9 -0
- package/dist/src/settings/Settings_Threejs.d.ts.map +1 -0
- package/dist/src/settings/Settings_Threejs.js +172 -0
- package/dist/src/settings/Settings_Threejs.js.map +1 -0
- package/package.json +23 -0
|
@@ -0,0 +1,594 @@
|
|
|
1
|
+
import { Platform, PProperties, Language } from "./PEnums";
|
|
2
|
+
import PEvent from "./PEvent";
|
|
3
|
+
import PNode from "./PNode";
|
|
4
|
+
import { PVariable } from "./PVariable";
|
|
5
|
+
var Workers;
|
|
6
|
+
(function (Workers) {
|
|
7
|
+
Workers[Workers["None"] = 0] = "None";
|
|
8
|
+
Workers[Workers["System"] = 1] = "System";
|
|
9
|
+
Workers[Workers["CameraControls"] = 2] = "CameraControls";
|
|
10
|
+
Workers[Workers["Animating"] = 4] = "Animating";
|
|
11
|
+
Workers[Workers["Updators"] = 8] = "Updators";
|
|
12
|
+
Workers[Workers["Admin"] = 16] = "Admin";
|
|
13
|
+
Workers[Workers["SceneLoader"] = 32] = "SceneLoader";
|
|
14
|
+
Workers[Workers["AdaptivePerformance"] = 64] = "AdaptivePerformance";
|
|
15
|
+
})(Workers || (Workers = {}));
|
|
16
|
+
export { Workers };
|
|
17
|
+
export default class GameContext {
|
|
18
|
+
_owner;
|
|
19
|
+
_mediaManager;
|
|
20
|
+
_root = null;
|
|
21
|
+
_pcanvas = null;
|
|
22
|
+
_running = false;
|
|
23
|
+
_pnodeRenderer;
|
|
24
|
+
_engine;
|
|
25
|
+
_audioListener = null;
|
|
26
|
+
_componentFactory;
|
|
27
|
+
editor = false;
|
|
28
|
+
debug_fastVideo = false;
|
|
29
|
+
isAdmin() {
|
|
30
|
+
return false;
|
|
31
|
+
}
|
|
32
|
+
s3Url = "https://p100-pw.s3.eu-north-1.amazonaws.com/";
|
|
33
|
+
constructor(owner, platform, mediaManager, engine) {
|
|
34
|
+
this._owner = owner;
|
|
35
|
+
this._platform = platform;
|
|
36
|
+
this._mediaManager = mediaManager;
|
|
37
|
+
this._engine = engine;
|
|
38
|
+
this._pnodeRenderer = engine.setupNodeRenderer();
|
|
39
|
+
this._componentFactory = engine.getComponentFactory();
|
|
40
|
+
}
|
|
41
|
+
getOwner() {
|
|
42
|
+
return this._owner;
|
|
43
|
+
}
|
|
44
|
+
//
|
|
45
|
+
// PRENDERER
|
|
46
|
+
//
|
|
47
|
+
getIEngine() {
|
|
48
|
+
return this._engine;
|
|
49
|
+
}
|
|
50
|
+
getEngine() {
|
|
51
|
+
return this._engine;
|
|
52
|
+
}
|
|
53
|
+
getNodeRenderer() {
|
|
54
|
+
return this._pnodeRenderer;
|
|
55
|
+
}
|
|
56
|
+
//
|
|
57
|
+
// PCANVAS
|
|
58
|
+
//
|
|
59
|
+
getCanvas() {
|
|
60
|
+
return this._pcanvas;
|
|
61
|
+
}
|
|
62
|
+
getPCanvas() {
|
|
63
|
+
return this._pcanvas;
|
|
64
|
+
}
|
|
65
|
+
getCanvasElement() {
|
|
66
|
+
return this._pcanvas?.getCanvasElement() || null;
|
|
67
|
+
}
|
|
68
|
+
setPCanvas(canvas) {
|
|
69
|
+
if (this._pcanvas !== null && canvas !== null) {
|
|
70
|
+
this.error("GameContext already had a canvas");
|
|
71
|
+
return;
|
|
72
|
+
}
|
|
73
|
+
this._pcanvas = canvas;
|
|
74
|
+
}
|
|
75
|
+
//
|
|
76
|
+
// MEDIA LOADERS
|
|
77
|
+
//
|
|
78
|
+
_imageLoader = null;
|
|
79
|
+
_audioLoader = null;
|
|
80
|
+
_modelLoader = null;
|
|
81
|
+
_videoLoader = null;
|
|
82
|
+
_environtmentLoader = null;
|
|
83
|
+
hasMediaQueue() {
|
|
84
|
+
return (this._imageLoader?.hasQueue() ||
|
|
85
|
+
this._videoLoader?.hasQueue() ||
|
|
86
|
+
this._modelLoader?.hasQueue() ||
|
|
87
|
+
this._environtmentLoader?.hasQueue() ||
|
|
88
|
+
this._audioLoader?.hasQueue() ||
|
|
89
|
+
false);
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Return media loader, created if needed.
|
|
93
|
+
*/
|
|
94
|
+
imageLoader() {
|
|
95
|
+
if (this._imageLoader === null)
|
|
96
|
+
this._imageLoader = this._engine.setupImageLoader(this);
|
|
97
|
+
return this._imageLoader;
|
|
98
|
+
}
|
|
99
|
+
videoLoader() {
|
|
100
|
+
if (this._videoLoader === null)
|
|
101
|
+
this._videoLoader = this._engine.setupVideoLoader(this);
|
|
102
|
+
return this._videoLoader;
|
|
103
|
+
}
|
|
104
|
+
modelLoader() {
|
|
105
|
+
if (this._modelLoader === null)
|
|
106
|
+
this._modelLoader = this._engine.setupModelLoader(this);
|
|
107
|
+
return this._modelLoader;
|
|
108
|
+
}
|
|
109
|
+
audioLoader() {
|
|
110
|
+
if (this._audioLoader === null)
|
|
111
|
+
this._audioLoader = this._engine.setupAudioLoader(this);
|
|
112
|
+
return this._audioLoader;
|
|
113
|
+
}
|
|
114
|
+
environmentLoader() {
|
|
115
|
+
if (this._environtmentLoader === null)
|
|
116
|
+
this._environtmentLoader = this._engine.setupEnvironmentLoader(this);
|
|
117
|
+
return this._environtmentLoader;
|
|
118
|
+
}
|
|
119
|
+
//
|
|
120
|
+
// IEmitter
|
|
121
|
+
//
|
|
122
|
+
getContext() {
|
|
123
|
+
return this;
|
|
124
|
+
}
|
|
125
|
+
//
|
|
126
|
+
// LIFE CYCLE
|
|
127
|
+
//
|
|
128
|
+
/**
|
|
129
|
+
* Init and render scene
|
|
130
|
+
*/
|
|
131
|
+
enable() {
|
|
132
|
+
this._sceneLoaderCounter = 0;
|
|
133
|
+
if (this._root) {
|
|
134
|
+
if (this._root.hasValidPlatform()) {
|
|
135
|
+
this._root.enable();
|
|
136
|
+
this._root.update();
|
|
137
|
+
const pcanvas = this.getCanvas();
|
|
138
|
+
if (pcanvas) {
|
|
139
|
+
this.setWorkFlag(Workers.System);
|
|
140
|
+
pcanvas.enable();
|
|
141
|
+
this.clearWorkFlag(Workers.System);
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
else {
|
|
145
|
+
this.error("Root is not enabled or valid platform");
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
disable() {
|
|
150
|
+
this.disableInput();
|
|
151
|
+
this._root?.disable();
|
|
152
|
+
}
|
|
153
|
+
/**
|
|
154
|
+
* use hard = true if we want to tear down and free all resources. Not
|
|
155
|
+
* to use while restarting.
|
|
156
|
+
*/
|
|
157
|
+
dispose(hard) {
|
|
158
|
+
if (hard) {
|
|
159
|
+
this._modelLoader?.dispose();
|
|
160
|
+
this._audioLoader?.dispose();
|
|
161
|
+
this._videoLoader?.dispose();
|
|
162
|
+
this._imageLoader?.dispose();
|
|
163
|
+
this._imageLoader = null;
|
|
164
|
+
this._videoLoader = null;
|
|
165
|
+
this._modelLoader = null;
|
|
166
|
+
this._environtmentLoader = null;
|
|
167
|
+
this._audioLoader = null;
|
|
168
|
+
}
|
|
169
|
+
// Dispose ALL nodes, not just mounted ones
|
|
170
|
+
for (const node of this._nodes) {
|
|
171
|
+
node.dispose(false);
|
|
172
|
+
}
|
|
173
|
+
this._root = null;
|
|
174
|
+
this._nodes = [];
|
|
175
|
+
this._scenes = [];
|
|
176
|
+
this._mediaManager.dispose();
|
|
177
|
+
if (hard) {
|
|
178
|
+
this._pcanvas?.dispose();
|
|
179
|
+
this._pcanvas = null;
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
isLoading() {
|
|
183
|
+
return this.hasMediaQueue();
|
|
184
|
+
}
|
|
185
|
+
_sceneLoaderCounter = 0;
|
|
186
|
+
increaseSceneLoader() {
|
|
187
|
+
this._sceneLoaderCounter++;
|
|
188
|
+
if (this._sceneLoaderCounter === 1) {
|
|
189
|
+
this.setWorkFlag(Workers.SceneLoader);
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
decreaseSceneLoader() {
|
|
193
|
+
this._sceneLoaderCounter--;
|
|
194
|
+
if (this._sceneLoaderCounter === 0) {
|
|
195
|
+
this.clearWorkFlag(Workers.SceneLoader);
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
async play() {
|
|
199
|
+
if (this._root === null)
|
|
200
|
+
return;
|
|
201
|
+
if (this._running === true) {
|
|
202
|
+
console.error("play() GameContext was already running.");
|
|
203
|
+
return;
|
|
204
|
+
}
|
|
205
|
+
const pRootComponent = this._root.findComponent("PProjectRoot");
|
|
206
|
+
if (pRootComponent === null) {
|
|
207
|
+
this.error("play() PProjectRoot not found");
|
|
208
|
+
return;
|
|
209
|
+
}
|
|
210
|
+
this.increaseSceneLoader();
|
|
211
|
+
for (const variable of Object.values(this._variables)) {
|
|
212
|
+
variable.reset();
|
|
213
|
+
}
|
|
214
|
+
this._running = true;
|
|
215
|
+
this.setupAudioListener();
|
|
216
|
+
this._root.play();
|
|
217
|
+
pRootComponent.native_OnPlay();
|
|
218
|
+
await this._imageLoader?.queue();
|
|
219
|
+
await this._videoLoader?.queue();
|
|
220
|
+
await this._modelLoader?.queue();
|
|
221
|
+
await this._audioLoader?.queue();
|
|
222
|
+
pRootComponent.native_OnPlaying();
|
|
223
|
+
this._pcanvas.onSceneRunning();
|
|
224
|
+
this.decreaseSceneLoader();
|
|
225
|
+
}
|
|
226
|
+
stop() {
|
|
227
|
+
if (this._root === null)
|
|
228
|
+
return;
|
|
229
|
+
if (this._running === false)
|
|
230
|
+
return;
|
|
231
|
+
this._running = false;
|
|
232
|
+
for (const variable of Object.values(this._variables)) {
|
|
233
|
+
variable.reset();
|
|
234
|
+
}
|
|
235
|
+
this._root.stop();
|
|
236
|
+
}
|
|
237
|
+
//
|
|
238
|
+
// WORKER
|
|
239
|
+
//
|
|
240
|
+
_workFlags = 0;
|
|
241
|
+
isWorking() {
|
|
242
|
+
return this._workFlags > 0;
|
|
243
|
+
}
|
|
244
|
+
setWorkFlag(worker) {
|
|
245
|
+
const wasWorking = this._workFlags > 0;
|
|
246
|
+
this._workFlags = this._workFlags | worker;
|
|
247
|
+
// console.log(
|
|
248
|
+
// "setWorkState (" + Workers[worker] + ") _workFlags: ",
|
|
249
|
+
// this._workFlags
|
|
250
|
+
// );
|
|
251
|
+
if (!wasWorking && this._workFlags > 0) {
|
|
252
|
+
this._pcanvas.onWorkStarted(this._workFlags);
|
|
253
|
+
this.getOwner().setWorkState(true);
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
clearWorkFlag(flag) {
|
|
257
|
+
const wasWorking = this._workFlags > 0;
|
|
258
|
+
this._workFlags = this._workFlags & ~flag;
|
|
259
|
+
// console.log(
|
|
260
|
+
// "clearWorkState (" + Workers[flag] + ") _workState: ",
|
|
261
|
+
// this._workFlags
|
|
262
|
+
// );
|
|
263
|
+
if (wasWorking && this._workFlags === 0) {
|
|
264
|
+
this._pcanvas.onWorkStopped(flag);
|
|
265
|
+
this.getOwner().setWorkState(false);
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
/**
|
|
269
|
+
* Render a single frame if sleeping
|
|
270
|
+
*/
|
|
271
|
+
snooze() {
|
|
272
|
+
this._pcanvas.snooze();
|
|
273
|
+
}
|
|
274
|
+
//
|
|
275
|
+
// Event System
|
|
276
|
+
//
|
|
277
|
+
_events = {};
|
|
278
|
+
registerEvent = (dbEvent) => {
|
|
279
|
+
const dupe = this._events[dbEvent._id];
|
|
280
|
+
if (dupe) {
|
|
281
|
+
dupe.name = dbEvent.name;
|
|
282
|
+
dupe.dataType = dbEvent.dataType;
|
|
283
|
+
dupe.description = dbEvent.description;
|
|
284
|
+
dupe.external = dbEvent.external;
|
|
285
|
+
}
|
|
286
|
+
else {
|
|
287
|
+
const pevent = new PEvent(dbEvent);
|
|
288
|
+
this._events[dbEvent._id] = pevent;
|
|
289
|
+
}
|
|
290
|
+
this._events = {
|
|
291
|
+
...this._events,
|
|
292
|
+
};
|
|
293
|
+
};
|
|
294
|
+
getEvents() {
|
|
295
|
+
return this._events;
|
|
296
|
+
}
|
|
297
|
+
unregisterEvent = (dbEvent) => {
|
|
298
|
+
delete this._events[dbEvent._id];
|
|
299
|
+
this._events = {
|
|
300
|
+
...this._events,
|
|
301
|
+
};
|
|
302
|
+
};
|
|
303
|
+
getEvent(id) {
|
|
304
|
+
return this._events[id] || null;
|
|
305
|
+
}
|
|
306
|
+
getExternalEvent(name) {
|
|
307
|
+
return (Object.values(this._events).find((e) => e.external && e.name === name) ||
|
|
308
|
+
null);
|
|
309
|
+
}
|
|
310
|
+
//
|
|
311
|
+
// NATIVE EVENTS
|
|
312
|
+
//
|
|
313
|
+
onClick = (node, ctrl, shift) => {
|
|
314
|
+
this._owner?.onClick(node, ctrl, shift);
|
|
315
|
+
};
|
|
316
|
+
onHoverEnter = (node) => {
|
|
317
|
+
this._owner?.onHoverEnter(node);
|
|
318
|
+
};
|
|
319
|
+
onHoverExit = (node) => {
|
|
320
|
+
this._owner?.onHoverExit(node);
|
|
321
|
+
};
|
|
322
|
+
//
|
|
323
|
+
// VARIABLES
|
|
324
|
+
//
|
|
325
|
+
_variables = {};
|
|
326
|
+
registerVariable = (dbVariable) => {
|
|
327
|
+
const dupe = this._variables[dbVariable._id];
|
|
328
|
+
if (dupe) {
|
|
329
|
+
dupe.name = dbVariable.name;
|
|
330
|
+
dupe.dataType = dbVariable.dataType;
|
|
331
|
+
dupe.description = dbVariable.description;
|
|
332
|
+
dupe.value = dbVariable.value;
|
|
333
|
+
dupe.runtime_value = dbVariable.value;
|
|
334
|
+
}
|
|
335
|
+
else {
|
|
336
|
+
const pvariable = new PVariable(dbVariable);
|
|
337
|
+
this._variables[dbVariable._id] = pvariable;
|
|
338
|
+
}
|
|
339
|
+
this._variables = {
|
|
340
|
+
...this._variables,
|
|
341
|
+
};
|
|
342
|
+
};
|
|
343
|
+
unregisterVariable = (dbVariable) => {
|
|
344
|
+
delete this._variables[dbVariable._id];
|
|
345
|
+
this._variables = {
|
|
346
|
+
...this._variables,
|
|
347
|
+
};
|
|
348
|
+
};
|
|
349
|
+
getVariables() {
|
|
350
|
+
return this._variables;
|
|
351
|
+
}
|
|
352
|
+
getVariable(id) {
|
|
353
|
+
return this._variables[id] || null;
|
|
354
|
+
}
|
|
355
|
+
//
|
|
356
|
+
// PCOMPONENTS
|
|
357
|
+
//
|
|
358
|
+
createComponents(pnode, components) {
|
|
359
|
+
return components
|
|
360
|
+
.map((c) => this._componentFactory.component(c, pnode, this))
|
|
361
|
+
.filter((c) => c !== null);
|
|
362
|
+
}
|
|
363
|
+
//
|
|
364
|
+
// NODES
|
|
365
|
+
//
|
|
366
|
+
_nodes = [];
|
|
367
|
+
createPNodeTree(dbItem, dbNodes, parent) {
|
|
368
|
+
const pnode = new PNode(dbItem, this, this._pnodeRenderer);
|
|
369
|
+
pnode.updateByComponent();
|
|
370
|
+
this._nodes.push(pnode);
|
|
371
|
+
if (parent) {
|
|
372
|
+
parent.add(pnode);
|
|
373
|
+
}
|
|
374
|
+
const res = dbNodes.filter((n) => n._parent === dbItem._id);
|
|
375
|
+
for (const childNode of res) {
|
|
376
|
+
this.createPNodeTree(childNode, dbNodes, pnode);
|
|
377
|
+
}
|
|
378
|
+
return pnode;
|
|
379
|
+
}
|
|
380
|
+
createRootNode(dbRoot, dbNodes) {
|
|
381
|
+
// Create root PNode
|
|
382
|
+
const root = this.createPNodeTree(dbRoot, dbNodes);
|
|
383
|
+
root.updateAbstract();
|
|
384
|
+
return root;
|
|
385
|
+
}
|
|
386
|
+
findNode(id) {
|
|
387
|
+
return this._nodes.find((n) => n.id === id) || null;
|
|
388
|
+
}
|
|
389
|
+
findNodeInAction(id, action) {
|
|
390
|
+
const node = this._nodes.find((n) => n.id === id) || null;
|
|
391
|
+
if (!node)
|
|
392
|
+
return null;
|
|
393
|
+
return node.getLocalInAction(action);
|
|
394
|
+
}
|
|
395
|
+
rerenderNode(_node) {
|
|
396
|
+
// Editor
|
|
397
|
+
}
|
|
398
|
+
getRoot() {
|
|
399
|
+
return this._root;
|
|
400
|
+
}
|
|
401
|
+
setRoot(root) {
|
|
402
|
+
this._root = root;
|
|
403
|
+
}
|
|
404
|
+
//
|
|
405
|
+
// SCENES
|
|
406
|
+
//
|
|
407
|
+
_scenes = [];
|
|
408
|
+
_loadedSceneIds = [];
|
|
409
|
+
isSceneLoaded(sceneId) {
|
|
410
|
+
return this._loadedSceneIds.indexOf(sceneId) >= 0;
|
|
411
|
+
}
|
|
412
|
+
getScene(id) {
|
|
413
|
+
return this._scenes.find((s) => s.sceneId === id) || null;
|
|
414
|
+
}
|
|
415
|
+
registerScene(dbNode, dbNodes) {
|
|
416
|
+
// Create scene PNodes
|
|
417
|
+
const scene = this.createPNodeTree(dbNode, dbNodes);
|
|
418
|
+
scene.updateAbstract();
|
|
419
|
+
this._scenes.push(scene);
|
|
420
|
+
return scene;
|
|
421
|
+
}
|
|
422
|
+
async loadScene(root, loader, onLoadedEvent = null) {
|
|
423
|
+
if (!root.sceneId)
|
|
424
|
+
throw new Error("No had no scene id");
|
|
425
|
+
if (this.isSceneLoaded(root.sceneId))
|
|
426
|
+
throw new Error("Scene was already loaded");
|
|
427
|
+
this.increaseSceneLoader();
|
|
428
|
+
this._loadedSceneIds.push(root.sceneId);
|
|
429
|
+
loader.add(root);
|
|
430
|
+
root.enable();
|
|
431
|
+
// console.log('root: ', root);
|
|
432
|
+
root.update();
|
|
433
|
+
this._owner.onLoadScene(root);
|
|
434
|
+
if (this.isRunning()) {
|
|
435
|
+
root.play();
|
|
436
|
+
}
|
|
437
|
+
await this.imageLoader()?.queue();
|
|
438
|
+
await this.videoLoader()?.queue();
|
|
439
|
+
await this.modelLoader()?.queue();
|
|
440
|
+
await this.audioLoader()?.queue();
|
|
441
|
+
if (onLoadedEvent !== null)
|
|
442
|
+
onLoadedEvent.emit(root.id, this);
|
|
443
|
+
if (this.isRunning()) {
|
|
444
|
+
const pscene = root.findComponent("PSceneRoot");
|
|
445
|
+
pscene.outevent_onSceneLoaded?.emit(root.id, this);
|
|
446
|
+
}
|
|
447
|
+
this.decreaseSceneLoader();
|
|
448
|
+
}
|
|
449
|
+
unloadScene(root) {
|
|
450
|
+
if (this.isRunning()) {
|
|
451
|
+
root.stop();
|
|
452
|
+
}
|
|
453
|
+
this._loadedSceneIds = this._loadedSceneIds.filter((id) => id !== root.sceneId);
|
|
454
|
+
root.disable();
|
|
455
|
+
root.removeFromParent();
|
|
456
|
+
this._owner.onUnloadScene(root);
|
|
457
|
+
}
|
|
458
|
+
_unloadScene(node) {
|
|
459
|
+
for (const child of node.children) {
|
|
460
|
+
this._unloadScene(child);
|
|
461
|
+
}
|
|
462
|
+
if (node.hasProperty(PProperties.SceneRoot)) {
|
|
463
|
+
this.unloadScene(node);
|
|
464
|
+
}
|
|
465
|
+
}
|
|
466
|
+
/**
|
|
467
|
+
* Unload all loaded scenes
|
|
468
|
+
*/
|
|
469
|
+
unloadScenes() {
|
|
470
|
+
if (!this._root)
|
|
471
|
+
throw new Error("Missing root");
|
|
472
|
+
this._unloadScene(this._root);
|
|
473
|
+
}
|
|
474
|
+
//
|
|
475
|
+
// LAYERS
|
|
476
|
+
//
|
|
477
|
+
_mask = 1;
|
|
478
|
+
mask = () => {
|
|
479
|
+
return this._mask;
|
|
480
|
+
};
|
|
481
|
+
/**
|
|
482
|
+
* Camera layer changed
|
|
483
|
+
*/
|
|
484
|
+
setLayers(mask) {
|
|
485
|
+
this._mask = mask;
|
|
486
|
+
// Loop through nodes and update visiblity
|
|
487
|
+
if (this._root) {
|
|
488
|
+
this._root.update();
|
|
489
|
+
}
|
|
490
|
+
}
|
|
491
|
+
//
|
|
492
|
+
// PLATFORM
|
|
493
|
+
//
|
|
494
|
+
_platform = Platform.Threejs;
|
|
495
|
+
setPlatform(platform) {
|
|
496
|
+
this._platform = platform;
|
|
497
|
+
}
|
|
498
|
+
platform() {
|
|
499
|
+
return this._platform;
|
|
500
|
+
}
|
|
501
|
+
//
|
|
502
|
+
// LANGUAGES
|
|
503
|
+
//
|
|
504
|
+
_language = Language.English;
|
|
505
|
+
setLanguage(language) {
|
|
506
|
+
this._language = language;
|
|
507
|
+
}
|
|
508
|
+
language() {
|
|
509
|
+
return this._language;
|
|
510
|
+
}
|
|
511
|
+
//
|
|
512
|
+
// RUNNING
|
|
513
|
+
//
|
|
514
|
+
isRunning() {
|
|
515
|
+
return this._root !== null ? this._root.isRunning() : false;
|
|
516
|
+
}
|
|
517
|
+
//
|
|
518
|
+
// CAMERA
|
|
519
|
+
//
|
|
520
|
+
getCameraNode() {
|
|
521
|
+
return this._pcanvas?.getCameraNode();
|
|
522
|
+
}
|
|
523
|
+
setCameraControlSettings(cameraSettings) {
|
|
524
|
+
const cameraControls = this._engine.setupCameraControls(this, cameraSettings);
|
|
525
|
+
this._pcanvas.setCameraControls(cameraControls);
|
|
526
|
+
}
|
|
527
|
+
getCameraControls() {
|
|
528
|
+
return this._pcanvas?.getCameraControls() || null;
|
|
529
|
+
}
|
|
530
|
+
//
|
|
531
|
+
// AUDIO
|
|
532
|
+
//
|
|
533
|
+
setupAudioListener() {
|
|
534
|
+
if (this._audioListener === null) {
|
|
535
|
+
this._audioListener = this._engine.setupAudioListener();
|
|
536
|
+
}
|
|
537
|
+
}
|
|
538
|
+
getAudioListener() {
|
|
539
|
+
return this._audioListener;
|
|
540
|
+
}
|
|
541
|
+
//
|
|
542
|
+
// INTERACTION
|
|
543
|
+
//
|
|
544
|
+
_inputEnabled = false;
|
|
545
|
+
enableInput() {
|
|
546
|
+
if (this._inputEnabled || !this._pcanvas)
|
|
547
|
+
return;
|
|
548
|
+
this._inputEnabled = true;
|
|
549
|
+
this._pcanvas?.getCameraControls()?.enable();
|
|
550
|
+
this._pcanvas.enableRaycaster();
|
|
551
|
+
}
|
|
552
|
+
disableInput() {
|
|
553
|
+
if (!this._inputEnabled || !this._pcanvas)
|
|
554
|
+
return;
|
|
555
|
+
this._inputEnabled = false;
|
|
556
|
+
this._pcanvas?.getCameraControls()?.disable();
|
|
557
|
+
this._pcanvas.disableRaycaster();
|
|
558
|
+
}
|
|
559
|
+
isInputEnabled() {
|
|
560
|
+
return this._inputEnabled;
|
|
561
|
+
}
|
|
562
|
+
//
|
|
563
|
+
// Media Manager
|
|
564
|
+
//
|
|
565
|
+
requestFile(id, node) {
|
|
566
|
+
if (!id)
|
|
567
|
+
return null;
|
|
568
|
+
const file = this._mediaManager.requestFile(id);
|
|
569
|
+
if (!file) {
|
|
570
|
+
this.error("File not found: " + id + ", node: " + node?.name);
|
|
571
|
+
console.log(node);
|
|
572
|
+
}
|
|
573
|
+
return file;
|
|
574
|
+
}
|
|
575
|
+
releaseFile(file) {
|
|
576
|
+
return this._mediaManager.releaseFile(file);
|
|
577
|
+
}
|
|
578
|
+
//
|
|
579
|
+
// TWEENS
|
|
580
|
+
//
|
|
581
|
+
addTween(tween) {
|
|
582
|
+
this._pcanvas?.addTween(tween);
|
|
583
|
+
}
|
|
584
|
+
//
|
|
585
|
+
// NOTIFICATIONS
|
|
586
|
+
//
|
|
587
|
+
error(msg, details) {
|
|
588
|
+
this._owner.error(msg, details);
|
|
589
|
+
}
|
|
590
|
+
catch(error) {
|
|
591
|
+
this._owner.catch(error);
|
|
592
|
+
}
|
|
593
|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kBAAkB,GAAG,EAAE,GAAG,UAAU,GAAG,IAAI,EAAE,IAAI,CAAC,CAAC;YAC9D,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QACpB,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IAED,WAAW,CAAC,IAAW;QACrB,OAAO,IAAI,CAAC,aAAa,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;IAC9C,CAAC;IAED,EAAE;IACF,UAAU;IACV,EAAE;IAEF,QAAQ,CAAC,KAAY;QACnB,IAAI,CAAC,QAAQ,EAAE,QAAQ,CAAC,KAAK,CAAC,CAAC;IACjC,CAAC;IAED,EAAE;IACF,iBAAiB;IACjB,EAAE;IAEF,KAAK,CAAC,GAAW,EAAE,OAAa;QAC9B,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;IAClC,CAAC;IAED,KAAK,CAAC,KAAU;QACd,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IAC3B,CAAC;CACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IAudioListener.d.ts","sourceRoot":"","sources":["../../src/IAudioListener.ts"],"names":[],"mappings":"AAAA,UAAU,cAAc;CAEvB;AAED,OAAO,EAAE,KAAK,cAAc,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IAudioListener.js","sourceRoot":"","sources":["../../src/IAudioListener.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { IVector3 } from "./PVector3";
|
|
2
|
+
interface ICameraControls {
|
|
3
|
+
dispose(): void;
|
|
4
|
+
enable(): void;
|
|
5
|
+
disable(): void;
|
|
6
|
+
getTarget(): IVector3;
|
|
7
|
+
setTarget(target: IVector3): void;
|
|
8
|
+
lookAtTarget(): void;
|
|
9
|
+
setPosition(position: IVector3): void;
|
|
10
|
+
getPosition(): IVector3;
|
|
11
|
+
setDamping(value: number): void;
|
|
12
|
+
}
|
|
13
|
+
export { type ICameraControls };
|
|
14
|
+
//# sourceMappingURL=ICameraControls.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ICameraControls.d.ts","sourceRoot":"","sources":["../../src/ICameraControls.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,UAAU,eAAe;IACvB,OAAO,IAAI,IAAI,CAAC;IAChB,MAAM,IAAI,IAAI,CAAC;IACf,OAAO,IAAI,IAAI,CAAC;IAEhB,SAAS,IAAI,QAAQ,CAAC;IACtB,SAAS,CAAC,MAAM,EAAE,QAAQ,GAAG,IAAI,CAAC;IAClC,YAAY,IAAI,IAAI,CAAC;IAErB,WAAW,CAAC,QAAQ,EAAE,QAAQ,GAAG,IAAI,CAAC;IACtC,WAAW,IAAI,QAAQ,CAAC;IAExB,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;CACjC;AAED,OAAO,EAAE,KAAK,eAAe,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ICameraControls.js","sourceRoot":"","sources":["../../src/ICameraControls.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ICameraNode.d.ts","sourceRoot":"","sources":["../../src/ICameraNode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,YAAY,CAAC;AAE3C,UAAU,WAAW;IACnB,QAAQ,EAAE,QAAQ,CAAC;CACpB;AAED,OAAO,EAAE,KAAK,WAAW,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ICameraNode.js","sourceRoot":"","sources":["../../src/ICameraNode.ts"],"names":[],"mappings":""}
|