@p100-web/core 100.1.1 → 100.1.2
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/AdaptivePerformance.d.ts +20 -0
- package/dist/AdaptivePerformance.d.ts.map +1 -0
- package/dist/AdaptivePerformance.js +110 -0
- package/dist/AdaptivePerformance.js.map +1 -0
- package/dist/DBEvent.d.ts +22 -0
- package/dist/DBEvent.d.ts.map +1 -0
- package/dist/DBEvent.js +19 -0
- package/dist/DBEvent.js.map +1 -0
- package/dist/DBNode.d.ts +33 -0
- package/dist/DBNode.d.ts.map +1 -0
- package/dist/DBNode.js +31 -0
- package/dist/DBNode.js.map +1 -0
- package/dist/DBScene.d.ts +11 -0
- package/dist/DBScene.d.ts.map +1 -0
- package/dist/DBScene.js +9 -0
- package/dist/DBScene.js.map +1 -0
- package/dist/DBVariable.d.ts +22 -0
- package/dist/DBVariable.d.ts.map +1 -0
- package/dist/DBVariable.js +19 -0
- package/dist/DBVariable.js.map +1 -0
- package/dist/DevTools.d.ts +4 -0
- package/dist/DevTools.d.ts.map +1 -0
- package/dist/DevTools.js +10 -0
- package/dist/DevTools.js.map +1 -0
- package/dist/GameContext.d.ts +182 -0
- package/dist/GameContext.d.ts.map +1 -0
- package/dist/GameContext.js +590 -0
- package/dist/GameContext.js.map +1 -0
- package/dist/IAudioListener.d.ts +4 -0
- package/dist/IAudioListener.d.ts.map +1 -0
- package/dist/IAudioListener.js +2 -0
- package/dist/IAudioListener.js.map +1 -0
- package/dist/ICameraControls.d.ts +17 -0
- package/dist/ICameraControls.d.ts.map +1 -0
- package/dist/ICameraControls.js +2 -0
- package/dist/ICameraControls.js.map +1 -0
- package/dist/IComponentFactory.d.ts +8 -0
- package/dist/IComponentFactory.d.ts.map +1 -0
- package/dist/IComponentFactory.js +2 -0
- package/dist/IComponentFactory.js.map +1 -0
- package/dist/IEngine.d.ts +23 -0
- package/dist/IEngine.d.ts.map +1 -0
- package/dist/IEngine.js +2 -0
- package/dist/IEngine.js.map +1 -0
- package/dist/IMaterial.d.ts +5 -0
- package/dist/IMaterial.d.ts.map +1 -0
- package/dist/IMaterial.js +2 -0
- package/dist/IMaterial.js.map +1 -0
- package/dist/IPMaterial.d.ts +10 -0
- package/dist/IPMaterial.d.ts.map +1 -0
- package/dist/IPMaterial.js +2 -0
- package/dist/IPMaterial.js.map +1 -0
- package/dist/IPNodeRenderer.d.ts +27 -0
- package/dist/IPNodeRenderer.d.ts.map +1 -0
- package/dist/IPNodeRenderer.js +2 -0
- package/dist/IPNodeRenderer.js.map +1 -0
- package/dist/IStats.d.ts +9 -0
- package/dist/IStats.d.ts.map +1 -0
- package/dist/IStats.js +3 -0
- package/dist/IStats.js.map +1 -0
- package/dist/MathTools.d.ts +8 -0
- package/dist/MathTools.d.ts.map +1 -0
- package/dist/MathTools.js +20 -0
- package/dist/MathTools.js.map +1 -0
- package/dist/PAction.d.ts +71 -0
- package/dist/PAction.d.ts.map +1 -0
- package/dist/PAction.js +238 -0
- package/dist/PAction.js.map +1 -0
- package/dist/PCanvas.d.ts +161 -0
- package/dist/PCanvas.d.ts.map +1 -0
- package/dist/PCanvas.js +619 -0
- package/dist/PCanvas.js.map +1 -0
- package/dist/PComponent.d.ts +48 -0
- package/dist/PComponent.d.ts.map +1 -0
- package/dist/PComponent.js +70 -0
- package/dist/PComponent.js.map +1 -0
- package/dist/PEnums.d.ts +116 -0
- package/dist/PEnums.d.ts.map +1 -0
- package/dist/PEnums.js +129 -0
- package/dist/PEnums.js.map +1 -0
- package/dist/PEvent.d.ts +27 -0
- package/dist/PEvent.d.ts.map +1 -0
- package/dist/PEvent.js +40 -0
- package/dist/PEvent.js.map +1 -0
- package/dist/PNode.d.ts +133 -0
- package/dist/PNode.d.ts.map +1 -0
- package/dist/PNode.js +555 -0
- package/dist/PNode.js.map +1 -0
- package/dist/POutValue.d.ts +16 -0
- package/dist/POutValue.d.ts.map +1 -0
- package/dist/POutValue.js +26 -0
- package/dist/POutValue.js.map +1 -0
- package/dist/PPayload.d.ts +7 -0
- package/dist/PPayload.d.ts.map +1 -0
- package/dist/PPayload.js +19 -0
- package/dist/PPayload.js.map +1 -0
- package/dist/PTypes.d.ts +36 -0
- package/dist/PTypes.d.ts.map +1 -0
- package/dist/PTypes.js +2 -0
- package/dist/PTypes.js.map +1 -0
- package/dist/PVariable.d.ts +29 -0
- package/dist/PVariable.d.ts.map +1 -0
- package/dist/PVariable.js +51 -0
- package/dist/PVariable.js.map +1 -0
- package/dist/PVector2.d.ts +14 -0
- package/dist/PVector2.d.ts.map +1 -0
- package/dist/PVector2.js +25 -0
- package/dist/PVector2.js.map +1 -0
- package/dist/PVector3.d.ts +18 -0
- package/dist/PVector3.d.ts.map +1 -0
- package/dist/PVector3.js +39 -0
- package/dist/PVector3.js.map +1 -0
- package/dist/animations/IModelAnimation.d.ts +17 -0
- package/dist/animations/IModelAnimation.d.ts.map +1 -0
- package/dist/animations/IModelAnimation.js +2 -0
- package/dist/animations/IModelAnimation.js.map +1 -0
- package/dist/assets/AssetLoader.d.ts +10 -0
- package/dist/assets/AssetLoader.d.ts.map +1 -0
- package/dist/assets/AssetLoader.js +12 -0
- package/dist/assets/AssetLoader.js.map +1 -0
- package/dist/index.d.ts +150 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +110 -0
- package/dist/index.js.map +1 -0
- package/dist/media/MediaManager.d.ts +17 -0
- package/dist/media/MediaManager.d.ts.map +1 -0
- package/dist/media/MediaManager.js +19 -0
- package/dist/media/MediaManager.js.map +1 -0
- package/dist/media/PFile.d.ts +13 -0
- package/dist/media/PFile.d.ts.map +1 -0
- package/dist/media/PFile.js +28 -0
- package/dist/media/PFile.js.map +1 -0
- package/dist/pcomponents/BaseMaterial.d.ts +46 -0
- package/dist/pcomponents/BaseMaterial.d.ts.map +1 -0
- package/dist/pcomponents/BaseMaterial.js +51 -0
- package/dist/pcomponents/BaseMaterial.js.map +1 -0
- package/dist/pcomponents/PAnimator.d.ts +37 -0
- package/dist/pcomponents/PAnimator.d.ts.map +1 -0
- package/dist/pcomponents/PAnimator.js +45 -0
- package/dist/pcomponents/PAnimator.js.map +1 -0
- package/dist/pcomponents/PBackground.d.ts +34 -0
- package/dist/pcomponents/PBackground.d.ts.map +1 -0
- package/dist/pcomponents/PBackground.js +45 -0
- package/dist/pcomponents/PBackground.js.map +1 -0
- package/dist/pcomponents/PBasicMaterial.d.ts +23 -0
- package/dist/pcomponents/PBasicMaterial.d.ts.map +1 -0
- package/dist/pcomponents/PBasicMaterial.js +39 -0
- package/dist/pcomponents/PBasicMaterial.js.map +1 -0
- package/dist/pcomponents/PCallAction.d.ts +19 -0
- package/dist/pcomponents/PCallAction.d.ts.map +1 -0
- package/dist/pcomponents/PCallAction.js +24 -0
- package/dist/pcomponents/PCallAction.js.map +1 -0
- package/dist/pcomponents/PCallActions.d.ts +24 -0
- package/dist/pcomponents/PCallActions.d.ts.map +1 -0
- package/dist/pcomponents/PCallActions.js +37 -0
- package/dist/pcomponents/PCallActions.js.map +1 -0
- package/dist/pcomponents/PCameraPosition.d.ts +29 -0
- package/dist/pcomponents/PCameraPosition.d.ts.map +1 -0
- package/dist/pcomponents/PCameraPosition.js +78 -0
- package/dist/pcomponents/PCameraPosition.js.map +1 -0
- package/dist/pcomponents/PCameraTarget.d.ts +29 -0
- package/dist/pcomponents/PCameraTarget.d.ts.map +1 -0
- package/dist/pcomponents/PCameraTarget.js +79 -0
- package/dist/pcomponents/PCameraTarget.js.map +1 -0
- package/dist/pcomponents/PCollider.d.ts +40 -0
- package/dist/pcomponents/PCollider.d.ts.map +1 -0
- package/dist/pcomponents/PCollider.js +58 -0
- package/dist/pcomponents/PCollider.js.map +1 -0
- package/dist/pcomponents/PCompareBoolean.d.ts +23 -0
- package/dist/pcomponents/PCompareBoolean.d.ts.map +1 -0
- package/dist/pcomponents/PCompareBoolean.js +38 -0
- package/dist/pcomponents/PCompareBoolean.js.map +1 -0
- package/dist/pcomponents/PCompareInteger.d.ts +25 -0
- package/dist/pcomponents/PCompareInteger.d.ts.map +1 -0
- package/dist/pcomponents/PCompareInteger.js +44 -0
- package/dist/pcomponents/PCompareInteger.js.map +1 -0
- package/dist/pcomponents/PCompareNumber.d.ts +25 -0
- package/dist/pcomponents/PCompareNumber.d.ts.map +1 -0
- package/dist/pcomponents/PCompareNumber.js +44 -0
- package/dist/pcomponents/PCompareNumber.js.map +1 -0
- package/dist/pcomponents/PCompareString.d.ts +25 -0
- package/dist/pcomponents/PCompareString.d.ts.map +1 -0
- package/dist/pcomponents/PCompareString.js +42 -0
- package/dist/pcomponents/PCompareString.js.map +1 -0
- package/dist/pcomponents/PCompareVariable.d.ts +28 -0
- package/dist/pcomponents/PCompareVariable.d.ts.map +1 -0
- package/dist/pcomponents/PCompareVariable.js +50 -0
- package/dist/pcomponents/PCompareVariable.js.map +1 -0
- package/dist/pcomponents/PControllerInput.d.ts +30 -0
- package/dist/pcomponents/PControllerInput.d.ts.map +1 -0
- package/dist/pcomponents/PControllerInput.js +41 -0
- package/dist/pcomponents/PControllerInput.js.map +1 -0
- package/dist/pcomponents/PCubeGeometry.d.ts +18 -0
- package/dist/pcomponents/PCubeGeometry.d.ts.map +1 -0
- package/dist/pcomponents/PCubeGeometry.js +23 -0
- package/dist/pcomponents/PCubeGeometry.js.map +1 -0
- package/dist/pcomponents/PDebug.d.ts +23 -0
- package/dist/pcomponents/PDebug.d.ts.map +1 -0
- package/dist/pcomponents/PDebug.js +31 -0
- package/dist/pcomponents/PDebug.js.map +1 -0
- package/dist/pcomponents/PEnvironment.d.ts +27 -0
- package/dist/pcomponents/PEnvironment.d.ts.map +1 -0
- package/dist/pcomponents/PEnvironment.js +43 -0
- package/dist/pcomponents/PEnvironment.js.map +1 -0
- package/dist/pcomponents/PFadeAnimation.d.ts +30 -0
- package/dist/pcomponents/PFadeAnimation.d.ts.map +1 -0
- package/dist/pcomponents/PFadeAnimation.js +98 -0
- package/dist/pcomponents/PFadeAnimation.js.map +1 -0
- package/dist/pcomponents/PHud.d.ts +12 -0
- package/dist/pcomponents/PHud.d.ts.map +1 -0
- package/dist/pcomponents/PHud.js +12 -0
- package/dist/pcomponents/PHud.js.map +1 -0
- package/dist/pcomponents/PImageCache.d.ts +18 -0
- package/dist/pcomponents/PImageCache.d.ts.map +1 -0
- package/dist/pcomponents/PImageCache.js +44 -0
- package/dist/pcomponents/PImageCache.js.map +1 -0
- package/dist/pcomponents/PImageDetector.d.ts +28 -0
- package/dist/pcomponents/PImageDetector.d.ts.map +1 -0
- package/dist/pcomponents/PImageDetector.js +39 -0
- package/dist/pcomponents/PImageDetector.js.map +1 -0
- package/dist/pcomponents/PInteger.d.ts +39 -0
- package/dist/pcomponents/PInteger.d.ts.map +1 -0
- package/dist/pcomponents/PInteger.js +75 -0
- package/dist/pcomponents/PInteger.js.map +1 -0
- package/dist/pcomponents/PIntegerAnimator.d.ts +36 -0
- package/dist/pcomponents/PIntegerAnimator.d.ts.map +1 -0
- package/dist/pcomponents/PIntegerAnimator.js +105 -0
- package/dist/pcomponents/PIntegerAnimator.js.map +1 -0
- package/dist/pcomponents/PLight.d.ts +15 -0
- package/dist/pcomponents/PLight.d.ts.map +1 -0
- package/dist/pcomponents/PLight.js +19 -0
- package/dist/pcomponents/PLight.js.map +1 -0
- package/dist/pcomponents/PLightDirectional.d.ts +19 -0
- package/dist/pcomponents/PLightDirectional.d.ts.map +1 -0
- package/dist/pcomponents/PLightDirectional.js +25 -0
- package/dist/pcomponents/PLightDirectional.js.map +1 -0
- package/dist/pcomponents/PMaskedMaterial.d.ts +20 -0
- package/dist/pcomponents/PMaskedMaterial.d.ts.map +1 -0
- package/dist/pcomponents/PMaskedMaterial.js +33 -0
- package/dist/pcomponents/PMaskedMaterial.js.map +1 -0
- package/dist/pcomponents/PMaterialModifier.d.ts +20 -0
- package/dist/pcomponents/PMaterialModifier.d.ts.map +1 -0
- package/dist/pcomponents/PMaterialModifier.js +22 -0
- package/dist/pcomponents/PMaterialModifier.js.map +1 -0
- package/dist/pcomponents/PModelAnnotation.d.ts +43 -0
- package/dist/pcomponents/PModelAnnotation.d.ts.map +1 -0
- package/dist/pcomponents/PModelAnnotation.js +114 -0
- package/dist/pcomponents/PModelAnnotation.js.map +1 -0
- package/dist/pcomponents/PModelAnnotations.d.ts +42 -0
- package/dist/pcomponents/PModelAnnotations.d.ts.map +1 -0
- package/dist/pcomponents/PModelAnnotations.js +123 -0
- package/dist/pcomponents/PModelAnnotations.js.map +1 -0
- package/dist/pcomponents/PModelGLTF.d.ts +36 -0
- package/dist/pcomponents/PModelGLTF.d.ts.map +1 -0
- package/dist/pcomponents/PModelGLTF.js +61 -0
- package/dist/pcomponents/PModelGLTF.js.map +1 -0
- package/dist/pcomponents/PModelNode.d.ts +16 -0
- package/dist/pcomponents/PModelNode.d.ts.map +1 -0
- package/dist/pcomponents/PModelNode.js +18 -0
- package/dist/pcomponents/PModelNode.js.map +1 -0
- package/dist/pcomponents/PMoveAnimation.d.ts +27 -0
- package/dist/pcomponents/PMoveAnimation.d.ts.map +1 -0
- package/dist/pcomponents/PMoveAnimation.js +65 -0
- package/dist/pcomponents/PMoveAnimation.js.map +1 -0
- package/dist/pcomponents/PMoveToAnimation.d.ts +26 -0
- package/dist/pcomponents/PMoveToAnimation.d.ts.map +1 -0
- package/dist/pcomponents/PMoveToAnimation.js +81 -0
- package/dist/pcomponents/PMoveToAnimation.js.map +1 -0
- package/dist/pcomponents/PPhysicalMaterial.d.ts +29 -0
- package/dist/pcomponents/PPhysicalMaterial.d.ts.map +1 -0
- package/dist/pcomponents/PPhysicalMaterial.js +43 -0
- package/dist/pcomponents/PPhysicalMaterial.js.map +1 -0
- package/dist/pcomponents/PPlaneDetector.d.ts +20 -0
- package/dist/pcomponents/PPlaneDetector.d.ts.map +1 -0
- package/dist/pcomponents/PPlaneDetector.js +27 -0
- package/dist/pcomponents/PPlaneDetector.js.map +1 -0
- package/dist/pcomponents/PPlaneGeometry.d.ts +20 -0
- package/dist/pcomponents/PPlaneGeometry.d.ts.map +1 -0
- package/dist/pcomponents/PPlaneGeometry.js +26 -0
- package/dist/pcomponents/PPlaneGeometry.js.map +1 -0
- package/dist/pcomponents/PProjectRoot.d.ts +38 -0
- package/dist/pcomponents/PProjectRoot.d.ts.map +1 -0
- package/dist/pcomponents/PProjectRoot.js +82 -0
- package/dist/pcomponents/PProjectRoot.js.map +1 -0
- package/dist/pcomponents/PRotateAnimation.d.ts +32 -0
- package/dist/pcomponents/PRotateAnimation.d.ts.map +1 -0
- package/dist/pcomponents/PRotateAnimation.js +81 -0
- package/dist/pcomponents/PRotateAnimation.js.map +1 -0
- package/dist/pcomponents/PScaleAnimation.d.ts +28 -0
- package/dist/pcomponents/PScaleAnimation.d.ts.map +1 -0
- package/dist/pcomponents/PScaleAnimation.js +88 -0
- package/dist/pcomponents/PScaleAnimation.js.map +1 -0
- package/dist/pcomponents/PSceneContainer.d.ts +22 -0
- package/dist/pcomponents/PSceneContainer.d.ts.map +1 -0
- package/dist/pcomponents/PSceneContainer.js +51 -0
- package/dist/pcomponents/PSceneContainer.js.map +1 -0
- package/dist/pcomponents/PSceneRoot.d.ts +16 -0
- package/dist/pcomponents/PSceneRoot.d.ts.map +1 -0
- package/dist/pcomponents/PSceneRoot.js +23 -0
- package/dist/pcomponents/PSceneRoot.js.map +1 -0
- package/dist/pcomponents/PSlider.d.ts +34 -0
- package/dist/pcomponents/PSlider.d.ts.map +1 -0
- package/dist/pcomponents/PSlider.js +39 -0
- package/dist/pcomponents/PSlider.js.map +1 -0
- package/dist/pcomponents/PSound.d.ts +34 -0
- package/dist/pcomponents/PSound.d.ts.map +1 -0
- package/dist/pcomponents/PSound.js +45 -0
- package/dist/pcomponents/PSound.js.map +1 -0
- package/dist/pcomponents/PSphereGeometry.d.ts +19 -0
- package/dist/pcomponents/PSphereGeometry.d.ts.map +1 -0
- package/dist/pcomponents/PSphereGeometry.js +25 -0
- package/dist/pcomponents/PSphereGeometry.js.map +1 -0
- package/dist/pcomponents/PSprite.d.ts +19 -0
- package/dist/pcomponents/PSprite.d.ts.map +1 -0
- package/dist/pcomponents/PSprite.js +27 -0
- package/dist/pcomponents/PSprite.js.map +1 -0
- package/dist/pcomponents/PSpriteSheet.d.ts +27 -0
- package/dist/pcomponents/PSpriteSheet.d.ts.map +1 -0
- package/dist/pcomponents/PSpriteSheet.js +42 -0
- package/dist/pcomponents/PSpriteSheet.js.map +1 -0
- package/dist/pcomponents/PText.d.ts +35 -0
- package/dist/pcomponents/PText.d.ts.map +1 -0
- package/dist/pcomponents/PText.js +49 -0
- package/dist/pcomponents/PText.js.map +1 -0
- package/dist/pcomponents/PTransform.d.ts +23 -0
- package/dist/pcomponents/PTransform.d.ts.map +1 -0
- package/dist/pcomponents/PTransform.js +67 -0
- package/dist/pcomponents/PTransform.js.map +1 -0
- package/dist/pcomponents/PVarList.d.ts +36 -0
- package/dist/pcomponents/PVarList.d.ts.map +1 -0
- package/dist/pcomponents/PVarList.js +71 -0
- package/dist/pcomponents/PVarList.js.map +1 -0
- package/dist/pcomponents/PVarReader.d.ts +19 -0
- package/dist/pcomponents/PVarReader.d.ts.map +1 -0
- package/dist/pcomponents/PVarReader.js +25 -0
- package/dist/pcomponents/PVarReader.js.map +1 -0
- package/dist/pcomponents/PVarWriter.d.ts +25 -0
- package/dist/pcomponents/PVarWriter.d.ts.map +1 -0
- package/dist/pcomponents/PVarWriter.js +45 -0
- package/dist/pcomponents/PVarWriter.js.map +1 -0
- package/dist/pcomponents/PVideoPlayer.d.ts +35 -0
- package/dist/pcomponents/PVideoPlayer.d.ts.map +1 -0
- package/dist/pcomponents/PVideoPlayer.js +94 -0
- package/dist/pcomponents/PVideoPlayer.js.map +1 -0
- package/dist/pcomponents/PVisibility.d.ts +33 -0
- package/dist/pcomponents/PVisibility.d.ts.map +1 -0
- package/dist/pcomponents/PVisibility.js +63 -0
- package/dist/pcomponents/PVisibility.js.map +1 -0
- package/dist/pcomponents/PXRTools.d.ts +32 -0
- package/dist/pcomponents/PXRTools.d.ts.map +1 -0
- package/dist/pcomponents/PXRTools.js +44 -0
- package/dist/pcomponents/PXRTools.js.map +1 -0
- package/dist/settings/ICameraSettings.d.ts +13 -0
- package/dist/settings/ICameraSettings.d.ts.map +1 -0
- package/dist/settings/ICameraSettings.js +2 -0
- package/dist/settings/ICameraSettings.js.map +1 -0
- package/dist/settings/IQualitySettings.d.ts +14 -0
- package/dist/settings/IQualitySettings.d.ts.map +1 -0
- package/dist/settings/IQualitySettings.js +2 -0
- package/dist/settings/IQualitySettings.js.map +1 -0
- package/dist/settings/IRenderSetting.d.ts +7 -0
- package/dist/settings/IRenderSetting.d.ts.map +1 -0
- package/dist/settings/IRenderSetting.js +2 -0
- package/dist/settings/IRenderSetting.js.map +1 -0
- package/dist/settings/ISetting.d.ts +4 -0
- package/dist/settings/ISetting.d.ts.map +1 -0
- package/dist/settings/ISetting.js +2 -0
- package/dist/settings/ISetting.js.map +1 -0
- package/dist/settings/IWebSettings.d.ts +6 -0
- package/dist/settings/IWebSettings.d.ts.map +1 -0
- package/dist/settings/IWebSettings.js +2 -0
- package/dist/settings/IWebSettings.js.map +1 -0
- package/dist/settings/Settings_Babylonjs.d.ts +101 -0
- package/dist/settings/Settings_Babylonjs.d.ts.map +1 -0
- package/dist/settings/Settings_Babylonjs.js +85 -0
- package/dist/settings/Settings_Babylonjs.js.map +1 -0
- package/dist/settings/Settings_Base.d.ts +11 -0
- package/dist/settings/Settings_Base.d.ts.map +1 -0
- package/dist/settings/Settings_Base.js +39 -0
- package/dist/settings/Settings_Base.js.map +1 -0
- package/dist/settings/Settings_Threejs.d.ts +106 -0
- package/dist/settings/Settings_Threejs.d.ts.map +1 -0
- package/dist/settings/Settings_Threejs.js +165 -0
- package/dist/settings/Settings_Threejs.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { PInAction, POutAction } from "../PAction";
|
|
2
|
+
import PComponent from "../PComponent";
|
|
3
|
+
import { Tween } from "@tweenjs/tween.js";
|
|
4
|
+
import PVector3 from "../PVector3";
|
|
5
|
+
export default class PCameraPosition extends PComponent {
|
|
6
|
+
inevent_jump;
|
|
7
|
+
inevent_animate;
|
|
8
|
+
outevent_onAnimated;
|
|
9
|
+
outevent_onJumped;
|
|
10
|
+
duration;
|
|
11
|
+
_tween = null;
|
|
12
|
+
constructor(dbComponent, node, context) {
|
|
13
|
+
super(dbComponent, "PCameraPosition", "Camera Position", node, context);
|
|
14
|
+
this.requireTransform = true;
|
|
15
|
+
this.inevent_jump = node.registerInAction("Jump", dbComponent.inevent_jump, this.callback_onJump);
|
|
16
|
+
this.inevent_animate = node.registerInAction("Animate", dbComponent.inevent_animate, this.callback_onAnimate);
|
|
17
|
+
this.outevent_onAnimated = node.registerOutAction(dbComponent.outevent_onAnimated);
|
|
18
|
+
this.outevent_onJumped = node.registerOutAction(dbComponent.outevent_onJumped);
|
|
19
|
+
this.duration = dbComponent.duration;
|
|
20
|
+
}
|
|
21
|
+
toDB() {
|
|
22
|
+
return {
|
|
23
|
+
...super.toDB(),
|
|
24
|
+
inevent_jump: PInAction.toDB(this.inevent_jump),
|
|
25
|
+
inevent_animate: PInAction.toDB(this.inevent_animate),
|
|
26
|
+
outevent_onAnimated: POutAction.toDB(this.outevent_onAnimated),
|
|
27
|
+
outevent_onJumped: POutAction.toDB(this.outevent_onJumped),
|
|
28
|
+
duration: this.duration,
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
render() { }
|
|
32
|
+
unrender() {
|
|
33
|
+
if (this._tween !== null) {
|
|
34
|
+
this._tween.stop();
|
|
35
|
+
this._tween = null;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
callback_onJump = () => {
|
|
39
|
+
const transform = this.node.findComponent("PTransform");
|
|
40
|
+
const controls = this.context.getCameraControls();
|
|
41
|
+
controls?.setPosition(transform.position);
|
|
42
|
+
controls?.lookAtTarget();
|
|
43
|
+
this.outevent_onJumped?.emit(null, this);
|
|
44
|
+
};
|
|
45
|
+
callback_onAnimate = () => {
|
|
46
|
+
if (this._tween !== null) {
|
|
47
|
+
this._tween.stop();
|
|
48
|
+
}
|
|
49
|
+
// Turn off controls
|
|
50
|
+
this.context.disableInput();
|
|
51
|
+
const controls = this.context.getCameraControls();
|
|
52
|
+
const currentPosition = controls.getPosition();
|
|
53
|
+
const from = {
|
|
54
|
+
position: new PVector3(currentPosition),
|
|
55
|
+
};
|
|
56
|
+
const position = this.context
|
|
57
|
+
.getNodeRenderer()
|
|
58
|
+
.getPositionVector(this.node);
|
|
59
|
+
const to = {
|
|
60
|
+
position: new PVector3(position),
|
|
61
|
+
};
|
|
62
|
+
this._tween = new Tween(from)
|
|
63
|
+
.to(to, this.duration)
|
|
64
|
+
.onUpdate((value) => {
|
|
65
|
+
controls?.setPosition(value.position);
|
|
66
|
+
controls?.lookAtTarget();
|
|
67
|
+
})
|
|
68
|
+
.onComplete(this.onComplete)
|
|
69
|
+
.start();
|
|
70
|
+
this.context.addTween(this._tween);
|
|
71
|
+
};
|
|
72
|
+
onComplete = () => {
|
|
73
|
+
this._tween = null;
|
|
74
|
+
this.context.enableInput();
|
|
75
|
+
this.outevent_onAnimated?.emit(null, this);
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
//# sourceMappingURL=PCameraPosition.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PCameraPosition.js","sourceRoot":"","sources":["../../src/pcomponents/PCameraPosition.ts"],"names":[],"mappings":"AAEA,OAAO,EAAyB,SAAS,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAC1E,OAAO,UAA2B,MAAM,eAAe,CAAC;AACxD,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,QAAQ,MAAM,aAAa,CAAC;AAYnC,MAAM,CAAC,OAAO,OAAO,eAAgB,SAAQ,UAAU;IACrD,YAAY,CAAmB;IAC/B,eAAe,CAAmB;IAElC,mBAAmB,CAAoB;IACvC,iBAAiB,CAAoB;IAErC,QAAQ,CAAS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E;YAClB,QAAQ,EAAE,WAAW,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;YACtC,QAAQ,EAAE,YAAY,EAAE,CAAC;QAC3B,CAAC,CAAC;aACD,UAAU,CAAC,IAAI,CAAC,UAAU,CAAC;aAC3B,KAAK,EAAE,CAAC;QAEX,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACrC,CAAC,CAAC;IAEF,UAAU,GAAG,GAAG,EAAE;QAChB,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC;QACnB,IAAI,CAAC,OAAO,CAAC,WAAW,EAAE,CAAC;QAC3B,IAAI,CAAC,mBAAmB,EAAE,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC7C,CAAC,CAAC;CACH"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import GameContext from "../GameContext";
|
|
2
|
+
import PNode from "../PNode";
|
|
3
|
+
import { type IInAction, type IOutAction, PInAction, POutAction } from "../PAction";
|
|
4
|
+
import PComponent, { DBComponent } from "../PComponent";
|
|
5
|
+
import { Tween } from "@tweenjs/tween.js";
|
|
6
|
+
interface DBCameraTarget extends DBComponent {
|
|
7
|
+
inevent_jump: IInAction | null;
|
|
8
|
+
inevent_animate: IInAction | null;
|
|
9
|
+
outevent_onAnimated: IOutAction | null;
|
|
10
|
+
outevent_onJumped: IOutAction | null;
|
|
11
|
+
duration: number;
|
|
12
|
+
}
|
|
13
|
+
export type { DBCameraTarget };
|
|
14
|
+
export default class PCameraTarget extends PComponent {
|
|
15
|
+
inevent_jump: PInAction | null;
|
|
16
|
+
inevent_animate: PInAction | null;
|
|
17
|
+
outevent_onAnimated: POutAction | null;
|
|
18
|
+
outevent_onJumped: POutAction | null;
|
|
19
|
+
duration: number;
|
|
20
|
+
protected _tween: Tween<any> | null;
|
|
21
|
+
constructor(dbComponent: DBCameraTarget, node: PNode, context: GameContext);
|
|
22
|
+
toDB(): DBCameraTarget;
|
|
23
|
+
render(): void;
|
|
24
|
+
unrender(): void;
|
|
25
|
+
callback_onJump: () => void;
|
|
26
|
+
callback_onAnimate: () => void;
|
|
27
|
+
onComplete: () => void;
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=PCameraTarget.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PCameraTarget.d.ts","sourceRoot":"","sources":["../../src/pcomponents/PCameraTarget.ts"],"names":[],"mappings":"AAAA,OAAO,WAAW,MAAM,gBAAgB,CAAC;AACzC,OAAO,KAAK,MAAM,UAAU,CAAC;AAC7B,OAAO,EACL,KAAK,SAAS,EACd,KAAK,UAAU,EACf,SAAS,EACT,UAAU,EACX,MAAM,YAAY,CAAC;AACpB,OAAO,UAAU,EAAE,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACxD,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAG1C,UAAU,cAAe,SAAQ,WAAW;IAC1C,YAAY,EAAE,SAAS,GAAG,IAAI,CAAC;IAC/B,eAAe,EAAE,SAAS,GAAG,IAAI,CAAC;IAElC,mBAAmB,EAAE,UAAU,GAAG,IAAI,CAAC;IACvC,iBAAiB,EAAE,UAAU,GAAG,IAAI,CAAC;IAErC,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,YAAY,EAAE,cAAc,EAAE,CAAC;AAE/B,MAAM,CAAC,OAAO,OAAO,aAAc,SAAQ,UAAU;IACnD,YAAY,EAAE,SAAS,GAAG,IAAI,CAAC;IAC/B,eAAe,EAAE,SAAS,GAAG,IAAI,CAAC;IAElC,mBAAmB,EAAE,UAAU,GAAG,IAAI,CAAC;IACvC,iBAAiB,EAAE,UAAU,GAAG,IAAI,CAAC;IAErC,QAAQ,EAAE,MAAM,CAAC;IAEjB,SAAS,CAAC,MAAM,EAAE,KAAK,CAAC,GAAG,CAAC,GAAG,IAAI,CAAQ;gBAE/B,WAAW,EAAE,cAAc,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,WAAW;IA0B1E,IAAI,IAAI,cAAc;IAWtB,MAAM,IAAI,IAAI;IAEd,QAAQ;IAOR,eAAe,aAUb;IAEF,kBAAkB,aAgChB;IAEF,UAAU,aAIR;CACH"}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { PInAction, POutAction, } from "../PAction";
|
|
2
|
+
import PComponent from "../PComponent";
|
|
3
|
+
import { Tween } from "@tweenjs/tween.js";
|
|
4
|
+
import PVector3 from "../PVector3";
|
|
5
|
+
export default class PCameraTarget extends PComponent {
|
|
6
|
+
inevent_jump;
|
|
7
|
+
inevent_animate;
|
|
8
|
+
outevent_onAnimated;
|
|
9
|
+
outevent_onJumped;
|
|
10
|
+
duration;
|
|
11
|
+
_tween = null;
|
|
12
|
+
constructor(dbComponent, node, context) {
|
|
13
|
+
super(dbComponent, "PCameraTarget", "Camera Target", node, context);
|
|
14
|
+
this.requireTransform = true;
|
|
15
|
+
this.inevent_jump = node.registerInAction("Jump", dbComponent.inevent_jump, this.callback_onJump);
|
|
16
|
+
this.inevent_animate = node.registerInAction("Animate", dbComponent.inevent_animate, this.callback_onAnimate);
|
|
17
|
+
this.outevent_onAnimated = node.registerOutAction(dbComponent.outevent_onAnimated);
|
|
18
|
+
this.outevent_onJumped = node.registerOutAction(dbComponent.outevent_onJumped);
|
|
19
|
+
this.duration = dbComponent.duration;
|
|
20
|
+
}
|
|
21
|
+
toDB() {
|
|
22
|
+
return {
|
|
23
|
+
...super.toDB(),
|
|
24
|
+
inevent_jump: PInAction.toDB(this.inevent_jump),
|
|
25
|
+
inevent_animate: PInAction.toDB(this.inevent_animate),
|
|
26
|
+
outevent_onAnimated: POutAction.toDB(this.outevent_onAnimated),
|
|
27
|
+
outevent_onJumped: POutAction.toDB(this.outevent_onJumped),
|
|
28
|
+
duration: this.duration,
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
render() { }
|
|
32
|
+
unrender() {
|
|
33
|
+
if (this._tween !== null) {
|
|
34
|
+
this._tween.stop();
|
|
35
|
+
this._tween = null;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
callback_onJump = () => {
|
|
39
|
+
const controls = this.context.getCameraControls();
|
|
40
|
+
const worldPosition = this.context
|
|
41
|
+
.getNodeRenderer()
|
|
42
|
+
.getWorldPosition(this.node);
|
|
43
|
+
controls?.setTarget(worldPosition);
|
|
44
|
+
controls?.lookAtTarget();
|
|
45
|
+
this.outevent_onJumped?.emit(null, this);
|
|
46
|
+
};
|
|
47
|
+
callback_onAnimate = () => {
|
|
48
|
+
if (this._tween !== null) {
|
|
49
|
+
this._tween.stop();
|
|
50
|
+
}
|
|
51
|
+
// Turn off controls
|
|
52
|
+
this.context.disableInput();
|
|
53
|
+
const controls = this.context.getCameraControls();
|
|
54
|
+
const from = {
|
|
55
|
+
position: new PVector3(controls.getTarget()),
|
|
56
|
+
};
|
|
57
|
+
const worldPosition = this.context
|
|
58
|
+
.getNodeRenderer()
|
|
59
|
+
.getWorldPosition(this.node);
|
|
60
|
+
const to = {
|
|
61
|
+
position: new PVector3(worldPosition),
|
|
62
|
+
};
|
|
63
|
+
this._tween = new Tween(from)
|
|
64
|
+
.to(to, this.duration)
|
|
65
|
+
.onUpdate((value) => {
|
|
66
|
+
controls.setTarget(value.position);
|
|
67
|
+
controls.lookAtTarget();
|
|
68
|
+
})
|
|
69
|
+
.onComplete(this.onComplete)
|
|
70
|
+
.start();
|
|
71
|
+
this.context.addTween(this._tween);
|
|
72
|
+
};
|
|
73
|
+
onComplete = () => {
|
|
74
|
+
this._tween = null;
|
|
75
|
+
this.context.enableInput();
|
|
76
|
+
this.outevent_onAnimated?.emit(null, this);
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
//# sourceMappingURL=PCameraTarget.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PCameraTarget.js","sourceRoot":"","sources":["../../src/pcomponents/PCameraTarget.ts"],"names":[],"mappings":"AAEA,OAAO,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e,EAAE;aACjB,gBAAgB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAE/B,MAAM,EAAE,GAAG;YACT,QAAQ,EAAE,IAAI,QAAQ,CAAC,aAAa,CAAC;SACtC,CAAC;QAEF,IAAI,CAAC,MAAM,GAAG,IAAI,KAAK,CAAC,IAAI,CAAC;aAC1B,EAAE,CAAC,EAAE,EAAE,IAAI,CAAC,QAAQ,CAAC;aACrB,QAAQ,CAAC,CAAC,KAAK,EAAE,EAAE;YAClB,QAAQ,CAAC,SAAS,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;YACnC,QAAQ,CAAC,YAAY,EAAE,CAAC;QAC1B,CAAC,CAAC;aACD,UAAU,CAAC,IAAI,CAAC,UAAU,CAAC;aAC3B,KAAK,EAAE,CAAC;QAEX,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACrC,CAAC,CAAC;IAEF,UAAU,GAAG,GAAG,EAAE;QAChB,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC;QACnB,IAAI,CAAC,OAAO,CAAC,WAAW,EAAE,CAAC;QAC3B,IAAI,CAAC,mBAAmB,EAAE,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC7C,CAAC,CAAC;CACH"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import PComponent, { DBComponent } from "../PComponent";
|
|
2
|
+
import PNode from "../PNode";
|
|
3
|
+
import PVector3, { IVector3 } from "../PVector3";
|
|
4
|
+
import { IOutAction, POutAction } from "../PAction";
|
|
5
|
+
import { IColliderComponent } from "../PTypes";
|
|
6
|
+
import GameContext from "../GameContext";
|
|
7
|
+
interface DBCollider extends DBComponent {
|
|
8
|
+
sphere: boolean;
|
|
9
|
+
box: boolean;
|
|
10
|
+
center: IVector3;
|
|
11
|
+
sphere_radius: number;
|
|
12
|
+
box_size: IVector3;
|
|
13
|
+
editor_showColliders: boolean;
|
|
14
|
+
outevent_onHoverEnter: IOutAction | null;
|
|
15
|
+
outevent_onHoverExit: IOutAction | null;
|
|
16
|
+
outevent_onClick: IOutAction | null;
|
|
17
|
+
}
|
|
18
|
+
export { type DBCollider };
|
|
19
|
+
export default abstract class PCollider extends PComponent implements IColliderComponent {
|
|
20
|
+
sphere: boolean;
|
|
21
|
+
box: boolean;
|
|
22
|
+
center: PVector3;
|
|
23
|
+
sphere_radius: number;
|
|
24
|
+
box_size: PVector3;
|
|
25
|
+
editor_showColliders: boolean;
|
|
26
|
+
outevent_onHoverEnter: POutAction | null;
|
|
27
|
+
outevent_onHoverExit: POutAction | null;
|
|
28
|
+
outevent_onClick: POutAction | null;
|
|
29
|
+
hidden: boolean;
|
|
30
|
+
constructor(dbComponent: DBCollider, node: PNode, context: GameContext);
|
|
31
|
+
toDB(): DBCollider;
|
|
32
|
+
abstract addColliderObject(): void;
|
|
33
|
+
abstract removeColliderObject(): void;
|
|
34
|
+
abstract show(): void;
|
|
35
|
+
abstract hide(): void;
|
|
36
|
+
native_onHoverEnter: () => void;
|
|
37
|
+
native_onHoverExit: () => void;
|
|
38
|
+
native_onClick: () => void;
|
|
39
|
+
}
|
|
40
|
+
//# sourceMappingURL=PCollider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PCollider.d.ts","sourceRoot":"","sources":["../../src/pcomponents/PCollider.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,EAAE,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACxD,OAAO,KAAK,MAAM,UAAU,CAAC;AAC7B,OAAO,QAAQ,EAAE,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAEpD,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,WAAW,MAAM,gBAAgB,CAAC;AAEzC,UAAU,UAAW,SAAQ,WAAW;IACtC,MAAM,EAAE,OAAO,CA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
+
export default class PCollider extends PComponent {
|
|
6
|
+
sphere;
|
|
7
|
+
box;
|
|
8
|
+
center;
|
|
9
|
+
sphere_radius;
|
|
10
|
+
box_size;
|
|
11
|
+
editor_showColliders = false;
|
|
12
|
+
outevent_onHoverEnter;
|
|
13
|
+
outevent_onHoverExit;
|
|
14
|
+
outevent_onClick;
|
|
15
|
+
// el: any;
|
|
16
|
+
hidden = true;
|
|
17
|
+
constructor(dbComponent, node, context) {
|
|
18
|
+
super(dbComponent, "PCollider", "Collider", node, context);
|
|
19
|
+
this.requireTransform = true;
|
|
20
|
+
this.sphere = dbComponent.sphere;
|
|
21
|
+
this.box = dbComponent.box;
|
|
22
|
+
this.center = new PVector3(dbComponent.center);
|
|
23
|
+
this.sphere_radius = dbComponent.sphere_radius;
|
|
24
|
+
this.box_size = new PVector3(dbComponent.box_size);
|
|
25
|
+
this.editor_showColliders = dbComponent.editor_showColliders;
|
|
26
|
+
this.outevent_onHoverEnter = node.registerOutAction(dbComponent.outevent_onHoverEnter, DataType.Node);
|
|
27
|
+
this.outevent_onHoverExit = node.registerOutAction(dbComponent.outevent_onHoverExit, DataType.Node);
|
|
28
|
+
this.outevent_onClick = node.registerOutAction(dbComponent.outevent_onClick, DataType.Node);
|
|
29
|
+
this.node.collider = this;
|
|
30
|
+
}
|
|
31
|
+
toDB() {
|
|
32
|
+
return {
|
|
33
|
+
...super.toDB(),
|
|
34
|
+
sphere: this.sphere,
|
|
35
|
+
box: this.box,
|
|
36
|
+
center: this.center,
|
|
37
|
+
sphere_radius: this.sphere_radius,
|
|
38
|
+
box_size: this.box_size,
|
|
39
|
+
editor_showColliders: this.editor_showColliders,
|
|
40
|
+
outevent_onHoverEnter: POutAction.toDB(this.outevent_onHoverEnter),
|
|
41
|
+
outevent_onHoverExit: POutAction.toDB(this.outevent_onHoverExit),
|
|
42
|
+
outevent_onClick: POutAction.toDB(this.outevent_onClick),
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
//
|
|
46
|
+
// EVENTS
|
|
47
|
+
//
|
|
48
|
+
native_onHoverEnter = () => {
|
|
49
|
+
this.outevent_onHoverEnter?.emit(this.node.id, this);
|
|
50
|
+
};
|
|
51
|
+
native_onHoverExit = () => {
|
|
52
|
+
this.outevent_onHoverExit?.emit(this.node.id, this);
|
|
53
|
+
};
|
|
54
|
+
native_onClick = () => {
|
|
55
|
+
this.outevent_onClick?.emit(this.node.id, this);
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
//# sourceMappingURL=PCollider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PCollider.js","sourceRoot":"","sources":["../../src/pcomponents/PCollider.ts"],"names":[],"mappings":"AAAA,OAAO,UAA2B,MAAM,eAAe,CAAC;AAExD,OAAO,QAAsB,MAAM,aAAa,CAAC;AACjD,OAAO,EAAc,UAAU,EAAE,MAAM,YAAY,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAqBrC,MAAM,CAAC,OAAO,OAAgB,SAC5B,SAAQ,UAAU;IAGlB,MAAM,CAAU;IAChB,GAAG,CAAU;IAEb,MAAM,CAAW;IACjB,aAAa,CAAS;IACtB,QAAQ,CAAW;IAEnB,oBAAoB,GAAG,KAAK,CAAC;IAE7B,qBAAqB,CAAoB;IACzC,oBAAoB,CAAoB;IACxC,gBAAgB,CAAoB;IAEpC,YAAY;IAEZ,MAAM,GAAG,IAAI,CAAC;IAEd,YAAY,WAAuB,EAAE,IAAW,EAAE,OAAoB;QACpE,KAAK,CAAC,WAAW,EAAE,WAAW,EAAE,UAAU,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;QAE3D,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC;QAE7B,IAAI,CAAC,MAAM,GAAG,WAAW,CAAC,MAAM,CAAC;QACjC,IAAI,CAAC,GAAG,GAAG,WAAW,CAAC,GAAG,CAAC;QAE3B,IAAI,CAAC,MAAM,GAAG,IAAI,QAAQ,CAAC,W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IAAI,CAAC,qBAAqB,EAAE,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC;IACvD,CAAC,CAAC;IAEF,kBAAkB,GAAG,GAAG,EAAE;QACxB,IAAI,CAAC,oBAAoB,EAAE,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC;IACtD,CAAC,CAAC;IAEF,cAAc,GAAG,GAAG,EAAE;QACpB,IAAI,CAAC,gBAAgB,EAAE,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC;IAClD,CAAC,CAAC;CACH"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { IInAction, IOutAction, PInAction, POutAction } from "../PAction";
|
|
2
|
+
import PComponent, { DBComponent } from "../PComponent";
|
|
3
|
+
import GameContext from "../GameContext";
|
|
4
|
+
import PNode from "../PNode";
|
|
5
|
+
interface DBCompareBoolean extends DBComponent {
|
|
6
|
+
inevent_compare: IInAction | null;
|
|
7
|
+
outevent_onCompare: IOutAction | null;
|
|
8
|
+
outevent_onTrue: IOutAction | null;
|
|
9
|
+
outevent_onFalse: IOutAction | null;
|
|
10
|
+
}
|
|
11
|
+
export { type DBCompareBoolean };
|
|
12
|
+
export default class PCompareBoolean extends PComponent {
|
|
13
|
+
inevent_compare: PInAction | null;
|
|
14
|
+
outevent_onCompare: POutAction | null;
|
|
15
|
+
outevent_onTrue: POutAction | null;
|
|
16
|
+
outevent_onFalse: POutAction | null;
|
|
17
|
+
constructor(dbComponent: DBCompareBoolean, node: PNode, context: GameContext);
|
|
18
|
+
toDB(): DBCompareBoolean;
|
|
19
|
+
callback_compare: (_payloadValue: string | null) => void;
|
|
20
|
+
render(): void;
|
|
21
|
+
unrender(): void;
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=PCompareBoolean.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PCompareBoolean.d.ts","sourceRoot":"","sources":["../../src/pcomponents/PCompareBoolean.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAE1E,OAAO,UAAU,EAAE,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACxD,OAAO,WAAW,MAAM,gBAAgB,CAAC;AACzC,OAAO,KAAK,MAAM,UAAU,CAAC;AAE7B,UAAU,gBAAiB,SAAQ,WAAW;IAC5C,eAAe,EAAE,SAAS,GAAG,IAAI,CAAC;IAClC,kBAAkB,EAAE,UAAU,GAAG,IAAI,CAAC;IACtC,eAAe,EAAE,UAAU,GAAG,IAAI,CAAC;IACnC,gBAAgB,EAAE,UAAU,GAAG,IAAI,CAAC;CACrC;AAED,OAAO,EAAE,KAAK,gBAAgB,EAAE,CAAC;AAEjC,MAAM,CAAC,OAAO,OAAO,eAAgB,SAAQ,UAAU;IACrD,eAAe,EAAE,SAAS,GAAG,IAAI,CAAC;IAClC,kBAAkB,EAAE,UAAU,GAAG,IAAI,CAAC;IACtC,eAAe,EAAE,UAAU,GAAG,IAAI,CAAC;IACnC,gBAAgB,EAAE,UAAU,GAAG,IAAI,CAAC;gBAGlC,WAAW,EAAE,gBAAgB,EAC7B,IAAI,EAAE,KAAK,EACX,OAAO,EAAE,WAAW;IAuBtB,IAAI,IAAI,gBAAgB;IAUxB,gBAAgB,GAAI,eAAe,MAAM,GAAG,IAAI,UAQ9C;IAEF,MAAM,IAAI,IAAI;IAEd,QAAQ,IAAI,IAAI;CACjB"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { PInAction, POutAction } from "../PAction";
|
|
2
|
+
import { DataType } from "../PEnums";
|
|
3
|
+
import PComponent from "../PComponent";
|
|
4
|
+
export default class PCompareBoolean extends PComponent {
|
|
5
|
+
inevent_compare;
|
|
6
|
+
outevent_onCompare;
|
|
7
|
+
outevent_onTrue;
|
|
8
|
+
outevent_onFalse;
|
|
9
|
+
constructor(dbComponent, node, context) {
|
|
10
|
+
super(dbComponent, "PCompareBoolean", "Compare Boolean", node, context);
|
|
11
|
+
this.inevent_compare = node.registerInAction("Compare", dbComponent.inevent_compare, this.callback_compare, DataType.Boolean);
|
|
12
|
+
this.outevent_onCompare = node.registerOutAction(dbComponent.outevent_onCompare, DataType.Boolean);
|
|
13
|
+
this.outevent_onTrue = node.registerOutAction(dbComponent.outevent_onTrue);
|
|
14
|
+
this.outevent_onFalse = node.registerOutAction(dbComponent.outevent_onFalse);
|
|
15
|
+
}
|
|
16
|
+
toDB() {
|
|
17
|
+
return {
|
|
18
|
+
...super.toDB(),
|
|
19
|
+
inevent_compare: PInAction.toDB(this.inevent_compare),
|
|
20
|
+
outevent_onCompare: POutAction.toDB(this.outevent_onCompare),
|
|
21
|
+
outevent_onTrue: POutAction.toDB(this.outevent_onTrue),
|
|
22
|
+
outevent_onFalse: POutAction.toDB(this.outevent_onFalse),
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
callback_compare = (_payloadValue) => {
|
|
26
|
+
const value = _payloadValue === "1";
|
|
27
|
+
this.outevent_onCompare?.emit(value ? "1" : "0", this);
|
|
28
|
+
if (value) {
|
|
29
|
+
this.outevent_onTrue?.emit(null, this);
|
|
30
|
+
}
|
|
31
|
+
else {
|
|
32
|
+
this.outevent_onFalse?.emit(null, this);
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
render() { }
|
|
36
|
+
unrender() { }
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=PCompareBoolean.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PCompareBoolean.js","sourceRoot":"","sources":["../../src/pcomponents/PCompareBoolean.ts"],"names":[],"mappings":"AAAA,OAAO,EAAyB,SAAS,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAC1E,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACrC,OAAO,UAA2B,M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AI,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;QACvD,IAAI,KAAK,EAAE,CAAC;YACV,IAAI,CAAC,eAAe,EAAE,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;QACzC,CAAC;aAAM,CAAC;YACN,IAAI,CAAC,gBAAgB,EAAE,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;QAC1C,CAAC;IACH,CAAC,CAAC;IAEF,MAAM,KAAU,CAAC;IAEjB,QAAQ,KAAU,CAAC;CACpB"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { IInAction, IOutAction, PInAction, POutAction } from "../PAction";
|
|
2
|
+
import PComponent, { DBComponent } from "../PComponent";
|
|
3
|
+
import GameContext from "../GameContext";
|
|
4
|
+
import PNode from "../PNode";
|
|
5
|
+
interface DBCompareInteger extends DBComponent {
|
|
6
|
+
inevent_compare: IInAction | null;
|
|
7
|
+
outevent_onCompare: IOutAction | null;
|
|
8
|
+
outevent_onTrue: IOutAction | null;
|
|
9
|
+
outevent_onFalse: IOutAction | null;
|
|
10
|
+
compareTo: number;
|
|
11
|
+
}
|
|
12
|
+
export { type DBCompareInteger };
|
|
13
|
+
export default class PCompareInteger extends PComponent {
|
|
14
|
+
inevent_compare: PInAction | null;
|
|
15
|
+
outevent_onCompare: POutAction | null;
|
|
16
|
+
outevent_onTrue: POutAction | null;
|
|
17
|
+
outevent_onFalse: POutAction | null;
|
|
18
|
+
compareTo: number;
|
|
19
|
+
constructor(dbComponent: DBCompareInteger, node: PNode, context: GameContext);
|
|
20
|
+
toDB(): DBCompareInteger;
|
|
21
|
+
callback_compare: (payload: string | null) => void;
|
|
22
|
+
render(): void;
|
|
23
|
+
unrender(): void;
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=PCompareInteger.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PCompareInteger.d.ts","sourceRoot":"","sources":["../../src/pcomponents/PCompareInteger.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAG1E,OAAO,UAAU,EAAE,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACxD,OAAO,WAAW,MAAM,gBAAgB,CAAC;AACzC,OAAO,KAAK,MAAM,UAAU,CAAC;AAE7B,UAAU,gBAAiB,SAAQ,WAAW;IAC5C,eAAe,EAAE,SAAS,GAAG,IAAI,CAAC;IAClC,kBAAkB,EAAE,UAAU,GAAG,IAAI,CAAC;IACtC,eAAe,EAAE,UAAU,GAAG,IAAI,CAAC;IACnC,gBAAgB,EAAE,UAAU,GAAG,IAAI,CAAC;IACpC,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,OAAO,EAAE,KAAK,gBAAgB,EAAE,CAAC;AAEjC,MAAM,CAAC,OAAO,OAAO,eAAgB,SAAQ,UAAU;IACrD,eAAe,EAAE,SAAS,GAAG,IAAI,CAAC;IAClC,kBAAkB,EAAE,UAAU,GAAG,IAAI,CAAC;IACtC,eAAe,EAAE,UAAU,GAAG,IAAI,CAAC;IACnC,gBAAgB,EAAE,UAAU,GAAG,IAAI,CAAC;IAEpC,SAAS,EAAE,MAAM,CAAC;gBAEN,WAAW,EAAE,gBAAgB,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,WAAW;IAwB5E,IAAI,IAAI,gBAAgB;IAWxB,gBAAgB,GAAI,SAAS,MAAM,GAAG,IAAI,UAWxC;IAEF,MAAM,IAAI,IAAI;IAEd,QAAQ,IAAI,IAAI;CACjB"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { PInAction, POutAction } from "../PAction";
|
|
2
|
+
import { DataType } from "../PEnums";
|
|
3
|
+
import PPayload from "../PPayload";
|
|
4
|
+
import PComponent from "../PComponent";
|
|
5
|
+
export default class PCompareInteger extends PComponent {
|
|
6
|
+
inevent_compare;
|
|
7
|
+
outevent_onCompare;
|
|
8
|
+
outevent_onTrue;
|
|
9
|
+
outevent_onFalse;
|
|
10
|
+
compareTo;
|
|
11
|
+
constructor(dbComponent, node, context) {
|
|
12
|
+
super(dbComponent, "PCompareInteger", "Compare Integer", node, context);
|
|
13
|
+
this.compareTo = dbComponent.compareTo || 0;
|
|
14
|
+
this.inevent_compare = node.registerInAction("Compare", dbComponent.inevent_compare, this.callback_compare, DataType.Integer);
|
|
15
|
+
this.outevent_onCompare = node.registerOutAction(dbComponent.outevent_onCompare, DataType.Boolean);
|
|
16
|
+
this.outevent_onTrue = node.registerOutAction(dbComponent.outevent_onTrue);
|
|
17
|
+
this.outevent_onFalse = node.registerOutAction(dbComponent.outevent_onFalse);
|
|
18
|
+
}
|
|
19
|
+
toDB() {
|
|
20
|
+
return {
|
|
21
|
+
...super.toDB(),
|
|
22
|
+
inevent_compare: PInAction.toDB(this.inevent_compare),
|
|
23
|
+
outevent_onCompare: POutAction.toDB(this.outevent_onCompare),
|
|
24
|
+
outevent_onTrue: POutAction.toDB(this.outevent_onTrue),
|
|
25
|
+
outevent_onFalse: POutAction.toDB(this.outevent_onFalse),
|
|
26
|
+
compareTo: this.compareTo,
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
callback_compare = (payload) => {
|
|
30
|
+
if (!payload)
|
|
31
|
+
return;
|
|
32
|
+
const result = payload === "" + this.compareTo;
|
|
33
|
+
this.outevent_onCompare?.emit(PPayload.fromBoolean(result), this);
|
|
34
|
+
if (result) {
|
|
35
|
+
this.outevent_onTrue?.emit(null, this);
|
|
36
|
+
}
|
|
37
|
+
else {
|
|
38
|
+
this.outevent_onFalse?.emit(null, this);
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
render() { }
|
|
42
|
+
unrender() { }
|
|
43
|
+
}
|
|
44
|
+
//# sourceMappingURL=PCompareInteger.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PCompare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C,IAAI,CAAC,kBAAkB,CAAC;YAC5D,eAAe,EAAE,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,eAAe,CAAC;YACtD,gBAAgB,EAAE,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC;YACxD,SAAS,EAAE,IAAI,CAAC,SAAS;SAC1B,CAAC;IACJ,CAAC;IAED,gBAAgB,GAAG,CAAC,OAAsB,EAAE,EAAE;QAC5C,IAAI,CAAC,OAAO;YAAE,OAAO;QAErB,MAAM,MAAM,GAAG,OAAO,KAAK,EAAE,GAAG,IAAI,CAAC,SAAS,CAAC;QAC/C,IAAI,CAAC,kBAAkB,EAAE,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,MAAM,CAAC,EAAE,IAAI,CAAC,CAAC;QAElE,IAAI,MAAM,EAAE,CAAC;YACX,IAAI,CAAC,eAAe,EAAE,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;QACzC,CAAC;aAAM,CAAC;YACN,IAAI,CAAC,gBAAgB,EAAE,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;QAC1C,CAAC;IACH,CAAC,CAAC;IAEF,MAAM,KAAU,CAAC;IAEjB,QAAQ,KAAU,CAAC;CACpB"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { IInAction, IOutAction, PInAction, POutAction } from "../PAction";
|
|
2
|
+
import PComponent, { DBComponent } from "../PComponent";
|
|
3
|
+
import GameContext from "../GameContext";
|
|
4
|
+
import PNode from "../PNode";
|
|
5
|
+
interface DBCompareNumber extends DBComponent {
|
|
6
|
+
inevent_compare: IInAction | null;
|
|
7
|
+
outevent_onCompare: IOutAction | null;
|
|
8
|
+
outevent_onTrue: IOutAction | null;
|
|
9
|
+
outevent_onFalse: IOutAction | null;
|
|
10
|
+
compareTo: number;
|
|
11
|
+
}
|
|
12
|
+
export { type DBCompareNumber };
|
|
13
|
+
export default class PCompareNumber extends PComponent {
|
|
14
|
+
inevent_compare: PInAction | null;
|
|
15
|
+
outevent_onCompare: POutAction | null;
|
|
16
|
+
outevent_onTrue: POutAction | null;
|
|
17
|
+
outevent_onFalse: POutAction | null;
|
|
18
|
+
compareTo: number;
|
|
19
|
+
constructor(dbComponent: DBCompareNumber, node: PNode, context: GameContext);
|
|
20
|
+
toDB(): DBCompareNumber;
|
|
21
|
+
callback_compare: (payload: string | null) => void;
|
|
22
|
+
render(): void;
|
|
23
|
+
unrender(): void;
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=PCompareNumber.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PCompareNumber.d.ts","sourceRoot":"","sources":["../../src/pcomponents/PCompareNumber.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAG1E,OAAO,UAAU,EAAE,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACxD,OAAO,WAAW,MAAM,gBAAgB,CAAC;AACzC,OAAO,KAAK,MAAM,UAAU,CAAC;AAE7B,UAAU,eAAgB,SAAQ,WAAW;IAC3C,eAAe,EAAE,SAAS,GAAG,IAAI,CAAC;IAClC,kBAAkB,EAAE,UAAU,GAAG,IAAI,CAAC;IACtC,eAAe,EAAE,UAAU,GAAG,IAAI,CAAC;IACnC,gBAAgB,EAAE,UAAU,GAAG,IAAI,CAAC;IACpC,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,OAAO,EAAE,KAAK,eAAe,EAAE,CAAC;AAEhC,MAAM,CAAC,OAAO,OAAO,cAAe,SAAQ,UAAU;IACpD,eAAe,EAAE,SAAS,GAAG,IAAI,CAAC;IAClC,kBAAkB,EAAE,UAAU,GAAG,IAAI,CAAC;IACtC,eAAe,EAAE,UAAU,GAAG,IAAI,CAAC;IACnC,gBAAgB,EAAE,UAAU,GAAG,IAAI,CAAC;IAEpC,SAAS,EAAE,MAAM,CAAC;gBAEN,WAAW,EAAE,eAAe,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,WAAW;IAwB3E,IAAI,IAAI,eAAe;IAWvB,gBAAgB,GAAI,SAAS,MAAM,GAAG,IAAI,UAWxC;IAEF,MAAM,IAAI,IAAI;IAEd,QAAQ,IAAI,IAAI;CACjB"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { PInAction, POutAction } from "../PAction";
|
|
2
|
+
import { DataType } from "../PEnums";
|
|
3
|
+
import PPayload from "../PPayload";
|
|
4
|
+
import PComponent from "../PComponent";
|
|
5
|
+
export default class PCompareNumber extends PComponent {
|
|
6
|
+
inevent_compare;
|
|
7
|
+
outevent_onCompare;
|
|
8
|
+
outevent_onTrue;
|
|
9
|
+
outevent_onFalse;
|
|
10
|
+
compareTo;
|
|
11
|
+
constructor(dbComponent, node, context) {
|
|
12
|
+
super(dbComponent, "PCompareNumber", "Compare Number", node, context);
|
|
13
|
+
this.compareTo = dbComponent.compareTo || 0;
|
|
14
|
+
this.inevent_compare = node.registerInAction("Compare", dbComponent.inevent_compare, this.callback_compare, DataType.Number);
|
|
15
|
+
this.outevent_onCompare = node.registerOutAction(dbComponent.outevent_onCompare, DataType.Boolean);
|
|
16
|
+
this.outevent_onTrue = node.registerOutAction(dbComponent.outevent_onTrue);
|
|
17
|
+
this.outevent_onFalse = node.registerOutAction(dbComponent.outevent_onFalse);
|
|
18
|
+
}
|
|
19
|
+
toDB() {
|
|
20
|
+
return {
|
|
21
|
+
...super.toDB(),
|
|
22
|
+
inevent_compare: PInAction.toDB(this.inevent_compare),
|
|
23
|
+
outevent_onCompare: POutAction.toDB(this.outevent_onCompare),
|
|
24
|
+
outevent_onTrue: POutAction.toDB(this.outevent_onTrue),
|
|
25
|
+
outevent_onFalse: POutAction.toDB(this.outevent_onFalse),
|
|
26
|
+
compareTo: this.compareTo,
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
callback_compare = (payload) => {
|
|
30
|
+
if (!payload)
|
|
31
|
+
return;
|
|
32
|
+
const result = payload === "" + this.compareTo;
|
|
33
|
+
this.outevent_onCompare?.emit(PPayload.fromBoolean(result), this);
|
|
34
|
+
if (result) {
|
|
35
|
+
this.outevent_onTrue?.emit(null, this);
|
|
36
|
+
}
|
|
37
|
+
else {
|
|
38
|
+
this.outevent_onFalse?.emit(null, this);
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
render() { }
|
|
42
|
+
unrender() { }
|
|
43
|
+
}
|
|
44
|
+
//# sourceMappingURL=PCompareNumber.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PCompareNumber.js","sourceRoot":"","sources":["../../src/pcomponents/PCompareNumber.ts"],"names":[],"mappings":"AAAA,OAAO,EAAyB,SAAS,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAC1E,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACrC,OAAO,QAAQ,MAAM,aAAa,CAAC;AACnC,OAAO,UAA2B,MAAM,eAAe,CAAC;AAcxD,MAAM,CAAC,OAAO,OAAO,cAAe,SAAQ,UAAU;IACpD,eAAe,CAAmB;IAClC,kBAAkB,CAAoB;IACtC,eAAe,CAAoB;IACnC,gBAAgB,CAAoB;IAEpC,SAAS,CAAS;IAElB,YAAY,WAA4B,EAAE,IAAW,EAAE,OAAoB;QACzE,KAAK,CAAC,WAAW,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;QAEtE,IAAI,CAAC,SAAS,GAAG,WAAW,CAAC,SAAS,IAAI,CAAC,CAAC;QAE5C,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC,gBAAgB,CAC1C,SAAS,EACT,WAAW,CAAC,eAAe,EAC3B,IAAI,CAAC,gBAAgB,EACrB,QAAQ,CAAC,MAAM,CAChB,CAAC;QAEF,IAAI,CAAC,kBAAkB,GAAG,IAAI,CAAC,iBAAiB,CAC9C,WAAW,CAAC,kBAAkB,EAC9B,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ction } from "../PAction";
|
|
2
|
+
import PComponent, { DBComponent } from "../PComponent";
|
|
3
|
+
import GameContext from "../GameContext";
|
|
4
|
+
import PNode from "../PNode";
|
|
5
|
+
interface DBCompareString extends DBComponent {
|
|
6
|
+
inevent_compare: IInAction | null;
|
|
7
|
+
outevent_onCompare: IOutAction | null;
|
|
8
|
+
outevent_onTrue: IOutAction | null;
|
|
9
|
+
outevent_onFalse: IOutAction | null;
|
|
10
|
+
compareTo: string | null;
|
|
11
|
+
}
|
|
12
|
+
export { type DBCompareString };
|
|
13
|
+
export default class PCompareString extends PComponent {
|
|
14
|
+
inevent_compare: PInAction | null;
|
|
15
|
+
outevent_onCompare: POutAction | null;
|
|
16
|
+
outevent_onTrue: POutAction | null;
|
|
17
|
+
outevent_onFalse: POutAction | null;
|
|
18
|
+
compareTo: string;
|
|
19
|
+
constructor(dbComponent: DBCompareString, node: PNode, context: GameContext);
|
|
20
|
+
toDB(): DBCompareString;
|
|
21
|
+
callback_compare: (payloadValue: string | null) => void;
|
|
22
|
+
render(): void;
|
|
23
|
+
unrender(): void;
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=PCompareString.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PCompareString.d.ts","sourceRoot":"","sources":["../../src/pcomponents/PCompareString.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,SAAS,EACd,KAAK,UAAU,EACf,SAAS,EACT,UAAU,EACX,MAAM,YAAY,CAAC;AAEpB,OAAO,UAAU,EAAE,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACxD,OAAO,WAAW,MAAM,gBAAgB,CAAC;AACzC,OAAO,KAAK,MAAM,UAAU,CAAC;AAE7B,UAAU,eAAgB,SAAQ,WAAW;IAC3C,eAAe,EAAE,SAAS,GAAG,IAAI,CAAC;IAClC,kBAAkB,EAAE,UAAU,GAAG,IAAI,CAAC;IACtC,eAAe,EAAE,UAAU,GAAG,IAAI,CAAC;IACnC,gBAAgB,EAAE,UAAU,GAAG,IAAI,CAAC;IACpC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1B;AAED,OAAO,EAAE,KAAK,eAAe,EAAE,CAAC;AAEhC,MAAM,CAAC,OAAO,OAAO,cAAe,SAAQ,UAAU;IACpD,eAAe,EAAE,SAAS,GAAG,IAAI,CAAC;IAClC,kBAAkB,EAAE,UAAU,GAAG,IAAI,CAAC;IACtC,eAAe,EAAE,UAAU,GAAG,IAAI,CAAC;IACnC,gBAAgB,EAAE,UAAU,GAAG,IAAI,CAAC;IAEpC,SAAS,EAAE,MAAM,CAAC;gBAEN,WAAW,EAAE,eAAe,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,WAAW;IAwB3E,IAAI,IAAI,eAAe;IAWvB,gBAAgB,GAAI,cAAc,MAAM,GAAG,IAAI,UAW7C;IAEF,MAAM,IAAI,IAAI;IAEd,QAAQ,IAAI,IAAI;CACjB"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { PInAction, POutAction, } from "../PAction";
|
|
2
|
+
import { DataType } from "../PEnums";
|
|
3
|
+
import PComponent from "../PComponent";
|
|
4
|
+
export default class PCompareString extends PComponent {
|
|
5
|
+
inevent_compare;
|
|
6
|
+
outevent_onCompare;
|
|
7
|
+
outevent_onTrue;
|
|
8
|
+
outevent_onFalse;
|
|
9
|
+
compareTo;
|
|
10
|
+
constructor(dbComponent, node, context) {
|
|
11
|
+
super(dbComponent, "PCompareString", "Compare String", node, context);
|
|
12
|
+
this.compareTo = dbComponent.compareTo || "";
|
|
13
|
+
this.inevent_compare = node.registerInAction("Compare", dbComponent.inevent_compare, this.callback_compare, DataType.String);
|
|
14
|
+
this.outevent_onCompare = node.registerOutAction(dbComponent.outevent_onCompare, DataType.Boolean);
|
|
15
|
+
this.outevent_onTrue = node.registerOutAction(dbComponent.outevent_onTrue);
|
|
16
|
+
this.outevent_onFalse = node.registerOutAction(dbComponent.outevent_onFalse);
|
|
17
|
+
}
|
|
18
|
+
toDB() {
|
|
19
|
+
return {
|
|
20
|
+
...super.toDB(),
|
|
21
|
+
inevent_compare: PInAction.toDB(this.inevent_compare),
|
|
22
|
+
outevent_onCompare: POutAction.toDB(this.outevent_onCompare),
|
|
23
|
+
outevent_onTrue: POutAction.toDB(this.outevent_onTrue),
|
|
24
|
+
outevent_onFalse: POutAction.toDB(this.outevent_onFalse),
|
|
25
|
+
compareTo: this.compareTo === "" ? null : this.compareTo,
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
callback_compare = (payloadValue) => {
|
|
29
|
+
payloadValue = payloadValue || "";
|
|
30
|
+
const result = payloadValue === this.compareTo;
|
|
31
|
+
this.outevent_onCompare?.emit(result ? "1" : "0", this);
|
|
32
|
+
if (result) {
|
|
33
|
+
this.outevent_onTrue?.emit(null, this);
|
|
34
|
+
}
|
|
35
|
+
else {
|
|
36
|
+
this.outevent_onFalse?.emit(null, this);
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
render() { }
|
|
40
|
+
unrender() { }
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=PCompareString.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PCompareString.js","sourceRoot":"","sources":["../../src/pcomponents/PCompareString.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,SAAS,EACT,UAAU,GACX,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACrC,OAAO,UAA2B,MAAM,eAAe,CAAC;AAcxD,MAAM,CAAC,OAAO,OAAO,cAAe,SAAQ,UAAU;IACpD,eAAe,CAAmB;IAClC,kBAAkB,CAAoB;IACtC,eAAe,CAAoB;IACnC,gBAAgB,CAAoB;IAEpC,SAAS,CAAS;IAElB,YAAY,WAA4B,EAAE,IAAW,EAAE,OAAoB;QACzE,KAAK,CAAC,WAAW,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,IAAI,EAAE,OAAO,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