@p100-web/core 100.1.27 → 100.2.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/GameContext.d.ts +60 -42
- package/dist/GameContext.d.ts.map +1 -1
- package/dist/GameContext.js +219 -127
- package/dist/GameContext.js.map +1 -1
- package/dist/IDBApp.d.ts +21 -0
- package/dist/IDBApp.d.ts.map +1 -0
- package/dist/IDBApp.js +2 -0
- package/dist/IDBApp.js.map +1 -0
- package/dist/IDBEvent.d.ts +10 -0
- package/dist/IDBEvent.d.ts.map +1 -0
- package/dist/IDBEvent.js +2 -0
- package/dist/IDBEvent.js.map +1 -0
- package/dist/IDBFileUsage.d.ts +9 -0
- package/dist/IDBFileUsage.d.ts.map +1 -0
- package/dist/IDBFileUsage.js +2 -0
- package/dist/IDBFileUsage.js.map +1 -0
- package/dist/IDBItem.d.ts +9 -0
- package/dist/IDBItem.d.ts.map +1 -0
- package/dist/IDBItem.js +2 -0
- package/dist/IDBItem.js.map +1 -0
- package/dist/IDBNode.d.ts +21 -0
- package/dist/IDBNode.d.ts.map +1 -0
- package/dist/IDBNode.js +42 -0
- package/dist/IDBNode.js.map +1 -0
- package/dist/IDBScene.d.ts +7 -0
- package/dist/IDBScene.d.ts.map +1 -0
- package/dist/IDBScene.js +2 -0
- package/dist/IDBScene.js.map +1 -0
- package/dist/IDBVariable.d.ts +10 -0
- package/dist/IDBVariable.d.ts.map +1 -0
- package/dist/IDBVariable.js +2 -0
- package/dist/IDBVariable.js.map +1 -0
- package/dist/PCanvas.d.ts +1 -1
- package/dist/PCanvas.d.ts.map +1 -1
- package/dist/PCanvas.js +7 -7
- package/dist/PCanvas.js.map +1 -1
- package/dist/PComponent.d.ts +31 -8
- package/dist/PComponent.d.ts.map +1 -1
- package/dist/PComponent.js +86 -7
- package/dist/PComponent.js.map +1 -1
- package/dist/PEnums.d.ts +7 -15
- package/dist/PEnums.d.ts.map +1 -1
- package/dist/PEnums.js +24 -17
- package/dist/PEnums.js.map +1 -1
- package/dist/PEvent.d.ts +9 -15
- package/dist/PEvent.d.ts.map +1 -1
- package/dist/PEvent.js +18 -23
- package/dist/PEvent.js.map +1 -1
- package/dist/PFileSlot.d.ts +14 -0
- package/dist/PFileSlot.d.ts.map +1 -0
- package/dist/PFileSlot.js +14 -0
- package/dist/PFileSlot.js.map +1 -0
- package/dist/PFileUsage.d.ts +11 -0
- package/dist/PFileUsage.d.ts.map +1 -0
- package/dist/PFileUsage.js +24 -0
- package/dist/PFileUsage.js.map +1 -0
- package/dist/PItem.d.ts +14 -0
- package/dist/PItem.d.ts.map +1 -0
- package/dist/PItem.js +36 -0
- package/dist/PItem.js.map +1 -0
- package/dist/PNode.d.ts +9 -28
- package/dist/PNode.d.ts.map +1 -1
- package/dist/PNode.js +61 -185
- package/dist/PNode.js.map +1 -1
- package/dist/PScene.d.ts +8 -0
- package/dist/PScene.d.ts.map +1 -0
- package/dist/PScene.js +12 -0
- package/dist/PScene.js.map +1 -0
- package/dist/PTypes.d.ts +15 -1
- package/dist/PTypes.d.ts.map +1 -1
- package/dist/PVariable.d.ts +14 -15
- package/dist/PVariable.d.ts.map +1 -1
- package/dist/PVariable.js +26 -28
- package/dist/PVariable.js.map +1 -1
- package/dist/index.d.ts +27 -25
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +15 -19
- package/dist/index.js.map +1 -1
- package/dist/media/IDBFile.d.ts +18 -0
- package/dist/media/IDBFile.d.ts.map +1 -0
- package/dist/media/IDBFile.js +2 -0
- package/dist/media/IDBFile.js.map +1 -0
- package/dist/media/PFile.d.ts +5 -5
- package/dist/media/PFile.d.ts.map +1 -1
- package/dist/media/PFile.js +16 -10
- package/dist/media/PFile.js.map +1 -1
- package/dist/pcomponents/BaseMaterial.d.ts +5 -6
- package/dist/pcomponents/BaseMaterial.d.ts.map +1 -1
- package/dist/pcomponents/BaseMaterial.js +3 -6
- package/dist/pcomponents/BaseMaterial.js.map +1 -1
- package/dist/pcomponents/PAnimator.d.ts +16 -14
- package/dist/pcomponents/PAnimator.d.ts.map +1 -1
- package/dist/pcomponents/PAnimator.js +21 -20
- package/dist/pcomponents/PAnimator.js.map +1 -1
- package/dist/pcomponents/PBackground.d.ts +4 -4
- package/dist/pcomponents/PBackground.d.ts.map +1 -1
- package/dist/pcomponents/PBackground.js +2 -5
- package/dist/pcomponents/PBackground.js.map +1 -1
- package/dist/pcomponents/PBasicMaterial.d.ts +3 -3
- package/dist/pcomponents/PBasicMaterial.d.ts.map +1 -1
- package/dist/pcomponents/PBasicMaterial.js +4 -5
- package/dist/pcomponents/PBasicMaterial.js.map +1 -1
- package/dist/pcomponents/PCallAction.d.ts +10 -5
- package/dist/pcomponents/PCallAction.d.ts.map +1 -1
- package/dist/pcomponents/PCallAction.js +20 -9
- package/dist/pcomponents/PCallAction.js.map +1 -1
- package/dist/pcomponents/PCameraPosition.d.ts +10 -9
- package/dist/pcomponents/PCameraPosition.d.ts.map +1 -1
- package/dist/pcomponents/PCameraPosition.js +15 -16
- package/dist/pcomponents/PCameraPosition.js.map +1 -1
- package/dist/pcomponents/PCameraTarget.d.ts +10 -9
- package/dist/pcomponents/PCameraTarget.d.ts.map +1 -1
- package/dist/pcomponents/PCameraTarget.js +15 -16
- package/dist/pcomponents/PCameraTarget.js.map +1 -1
- package/dist/pcomponents/PCollider.d.ts +7 -7
- package/dist/pcomponents/PCollider.d.ts.map +1 -1
- package/dist/pcomponents/PCollider.js +13 -14
- package/dist/pcomponents/PCollider.js.map +1 -1
- package/dist/pcomponents/PCompare.d.ts +32 -0
- package/dist/pcomponents/PCompare.d.ts.map +1 -0
- package/dist/pcomponents/PCompare.js +73 -0
- package/dist/pcomponents/PCompare.js.map +1 -0
- package/dist/pcomponents/PControllerInput.d.ts +9 -9
- package/dist/pcomponents/PControllerInput.d.ts.map +1 -1
- package/dist/pcomponents/PControllerInput.js +13 -14
- package/dist/pcomponents/PControllerInput.js.map +1 -1
- package/dist/pcomponents/PCubeGeometry.js +1 -1
- package/dist/pcomponents/PCubeGeometry.js.map +1 -1
- package/dist/pcomponents/PDebug.d.ts +7 -11
- package/dist/pcomponents/PDebug.d.ts.map +1 -1
- package/dist/pcomponents/PDebug.js +13 -17
- package/dist/pcomponents/PDebug.js.map +1 -1
- package/dist/pcomponents/PEnvironment.js +1 -1
- package/dist/pcomponents/PEnvironment.js.map +1 -1
- package/dist/pcomponents/PFadeAnimation.d.ts +10 -9
- package/dist/pcomponents/PFadeAnimation.d.ts.map +1 -1
- package/dist/pcomponents/PFadeAnimation.js +15 -16
- package/dist/pcomponents/PFadeAnimation.js.map +1 -1
- package/dist/pcomponents/PHud.js +1 -1
- package/dist/pcomponents/PHud.js.map +1 -1
- package/dist/pcomponents/PImageCache.d.ts +2 -4
- package/dist/pcomponents/PImageCache.d.ts.map +1 -1
- package/dist/pcomponents/PImageCache.js +9 -23
- package/dist/pcomponents/PImageCache.js.map +1 -1
- package/dist/pcomponents/PImageDetector.d.ts +5 -7
- package/dist/pcomponents/PImageDetector.d.ts.map +1 -1
- package/dist/pcomponents/PImageDetector.js +5 -12
- package/dist/pcomponents/PImageDetector.js.map +1 -1
- package/dist/pcomponents/PInteger.d.ts +18 -16
- package/dist/pcomponents/PInteger.d.ts.map +1 -1
- package/dist/pcomponents/PInteger.js +29 -31
- package/dist/pcomponents/PInteger.js.map +1 -1
- package/dist/pcomponents/PIntegerAnimator.d.ts +10 -9
- package/dist/pcomponents/PIntegerAnimator.d.ts.map +1 -1
- package/dist/pcomponents/PIntegerAnimator.js +17 -18
- package/dist/pcomponents/PIntegerAnimator.js.map +1 -1
- package/dist/pcomponents/PLight.js +1 -1
- package/dist/pcomponents/PLight.js.map +1 -1
- package/dist/pcomponents/PLightDirectional.js +1 -1
- package/dist/pcomponents/PLightDirectional.js.map +1 -1
- package/dist/pcomponents/PMaskedMaterial.js +1 -1
- package/dist/pcomponents/PMaskedMaterial.js.map +1 -1
- package/dist/pcomponents/PMaterialModifier.d.ts +9 -9
- package/dist/pcomponents/PMaterialModifier.d.ts.map +1 -1
- package/dist/pcomponents/PMaterialModifier.js +13 -14
- package/dist/pcomponents/PMaterialModifier.js.map +1 -1
- package/dist/pcomponents/PModelAnnotation.d.ts +12 -11
- package/dist/pcomponents/PModelAnnotation.d.ts.map +1 -1
- package/dist/pcomponents/PModelAnnotation.js +19 -20
- package/dist/pcomponents/PModelAnnotation.js.map +1 -1
- package/dist/pcomponents/PModelAnnotations.d.ts +12 -11
- package/dist/pcomponents/PModelAnnotations.d.ts.map +1 -1
- package/dist/pcomponents/PModelAnnotations.js +19 -20
- package/dist/pcomponents/PModelAnnotations.js.map +1 -1
- package/dist/pcomponents/PModelGLTF.d.ts +7 -9
- package/dist/pcomponents/PModelGLTF.d.ts.map +1 -1
- package/dist/pcomponents/PModelGLTF.js +9 -15
- package/dist/pcomponents/PModelGLTF.js.map +1 -1
- package/dist/pcomponents/PModelNode.js +1 -1
- package/dist/pcomponents/PModelNode.js.map +1 -1
- package/dist/pcomponents/PMoveAnimation.d.ts +3 -3
- package/dist/pcomponents/PMoveAnimation.d.ts.map +1 -1
- package/dist/pcomponents/PMoveAnimation.js +4 -5
- package/dist/pcomponents/PMoveAnimation.js.map +1 -1
- package/dist/pcomponents/PMoveToAnimation.d.ts +5 -5
- package/dist/pcomponents/PMoveToAnimation.d.ts.map +1 -1
- package/dist/pcomponents/PMoveToAnimation.js +7 -8
- package/dist/pcomponents/PMoveToAnimation.js.map +1 -1
- package/dist/pcomponents/PNumberAnimator.d.ts +14 -13
- package/dist/pcomponents/PNumberAnimator.d.ts.map +1 -1
- package/dist/pcomponents/PNumberAnimator.js +25 -26
- package/dist/pcomponents/PNumberAnimator.js.map +1 -1
- package/dist/pcomponents/PPhysicalMaterial.d.ts +3 -3
- package/dist/pcomponents/PPhysicalMaterial.d.ts.map +1 -1
- package/dist/pcomponents/PPhysicalMaterial.js +4 -5
- package/dist/pcomponents/PPhysicalMaterial.js.map +1 -1
- package/dist/pcomponents/PPlaneDetector.d.ts +3 -3
- package/dist/pcomponents/PPlaneDetector.d.ts.map +1 -1
- package/dist/pcomponents/PPlaneDetector.js +4 -5
- package/dist/pcomponents/PPlaneDetector.js.map +1 -1
- package/dist/pcomponents/PPlaneGeometry.js +1 -1
- package/dist/pcomponents/PPlaneGeometry.js.map +1 -1
- package/dist/pcomponents/PProjectRoot.d.ts +20 -19
- package/dist/pcomponents/PProjectRoot.d.ts.map +1 -1
- package/dist/pcomponents/PProjectRoot.js +30 -31
- package/dist/pcomponents/PProjectRoot.js.map +1 -1
- package/dist/pcomponents/PRotateAnimation.d.ts +8 -7
- package/dist/pcomponents/PRotateAnimation.d.ts.map +1 -1
- package/dist/pcomponents/PRotateAnimation.js +11 -12
- package/dist/pcomponents/PRotateAnimation.js.map +1 -1
- package/dist/pcomponents/PScaleAnimation.d.ts +5 -5
- package/dist/pcomponents/PScaleAnimation.d.ts.map +1 -1
- package/dist/pcomponents/PScaleAnimation.js +7 -8
- package/dist/pcomponents/PScaleAnimation.js.map +1 -1
- package/dist/pcomponents/PSceneContainer.d.ts +8 -7
- package/dist/pcomponents/PSceneContainer.d.ts.map +1 -1
- package/dist/pcomponents/PSceneContainer.js +15 -19
- package/dist/pcomponents/PSceneContainer.js.map +1 -1
- package/dist/pcomponents/PSceneRoot.d.ts +3 -3
- package/dist/pcomponents/PSceneRoot.d.ts.map +1 -1
- package/dist/pcomponents/PSceneRoot.js +4 -5
- package/dist/pcomponents/PSceneRoot.js.map +1 -1
- package/dist/pcomponents/PSlider.d.ts +9 -9
- package/dist/pcomponents/PSlider.d.ts.map +1 -1
- package/dist/pcomponents/PSlider.js +15 -16
- package/dist/pcomponents/PSlider.js.map +1 -1
- package/dist/pcomponents/PSound.d.ts +12 -13
- package/dist/pcomponents/PSound.d.ts.map +1 -1
- package/dist/pcomponents/PSound.js +14 -20
- package/dist/pcomponents/PSound.js.map +1 -1
- package/dist/pcomponents/PSphereGeometry.js +1 -1
- package/dist/pcomponents/PSphereGeometry.js.map +1 -1
- package/dist/pcomponents/PSprite.d.ts +2 -4
- package/dist/pcomponents/PSprite.d.ts.map +1 -1
- package/dist/pcomponents/PSprite.js +2 -8
- package/dist/pcomponents/PSprite.js.map +1 -1
- package/dist/pcomponents/PSpriteSheet.d.ts +6 -5
- package/dist/pcomponents/PSpriteSheet.d.ts.map +1 -1
- package/dist/pcomponents/PSpriteSheet.js +7 -8
- package/dist/pcomponents/PSpriteSheet.js.map +1 -1
- package/dist/pcomponents/PText.d.ts +8 -9
- package/dist/pcomponents/PText.d.ts.map +1 -1
- package/dist/pcomponents/PText.js +8 -14
- package/dist/pcomponents/PText.js.map +1 -1
- package/dist/pcomponents/PTransform.js +1 -1
- package/dist/pcomponents/PTransform.js.map +1 -1
- package/dist/pcomponents/PVarList.d.ts +21 -14
- package/dist/pcomponents/PVarList.d.ts.map +1 -1
- package/dist/pcomponents/PVarList.js +45 -29
- package/dist/pcomponents/PVarList.js.map +1 -1
- package/dist/pcomponents/PVideoPlayer.d.ts +10 -9
- package/dist/pcomponents/PVideoPlayer.d.ts.map +1 -1
- package/dist/pcomponents/PVideoPlayer.js +15 -16
- package/dist/pcomponents/PVideoPlayer.js.map +1 -1
- package/dist/pcomponents/PVisibility.d.ts +20 -18
- package/dist/pcomponents/PVisibility.d.ts.map +1 -1
- package/dist/pcomponents/PVisibility.js +32 -32
- package/dist/pcomponents/PVisibility.js.map +1 -1
- package/dist/pcomponents/PXRTools.d.ts +13 -13
- package/dist/pcomponents/PXRTools.d.ts.map +1 -1
- package/dist/pcomponents/PXRTools.js +19 -20
- package/dist/pcomponents/PXRTools.js.map +1 -1
- package/dist/ports/IDBInValue.d.ts +6 -0
- package/dist/ports/IDBInValue.d.ts.map +1 -0
- package/dist/ports/IDBInValue.js +2 -0
- package/dist/ports/IDBInValue.js.map +1 -0
- package/dist/ports/IDBLink.d.ts +17 -0
- package/dist/ports/IDBLink.d.ts.map +1 -0
- package/dist/ports/IDBLink.js +2 -0
- package/dist/ports/IDBLink.js.map +1 -0
- package/dist/ports/IDBPayloadValue.d.ts +5 -0
- package/dist/ports/IDBPayloadValue.d.ts.map +1 -0
- package/dist/ports/IDBPayloadValue.js +2 -0
- package/dist/ports/IDBPayloadValue.js.map +1 -0
- package/dist/ports/IValue.d.ts +10 -0
- package/dist/ports/IValue.d.ts.map +1 -0
- package/dist/ports/IValue.js +2 -0
- package/dist/ports/IValue.js.map +1 -0
- package/dist/ports/PInEventPort.d.ts +16 -0
- package/dist/ports/PInEventPort.d.ts.map +1 -0
- package/dist/ports/PInEventPort.js +22 -0
- package/dist/ports/PInEventPort.js.map +1 -0
- package/dist/ports/PInValue.d.ts +17 -0
- package/dist/ports/PInValue.d.ts.map +1 -0
- package/dist/ports/PInValue.js +31 -0
- package/dist/ports/PInValue.js.map +1 -0
- package/dist/ports/PInValuePort.d.ts +18 -0
- package/dist/ports/PInValuePort.d.ts.map +1 -0
- package/dist/ports/PInValuePort.js +49 -0
- package/dist/ports/PInValuePort.js.map +1 -0
- package/dist/ports/PLink.d.ts +23 -0
- package/dist/ports/PLink.d.ts.map +1 -0
- package/dist/ports/PLink.js +50 -0
- package/dist/ports/PLink.js.map +1 -0
- package/dist/ports/POutEventPort.d.ts +20 -0
- package/dist/ports/POutEventPort.d.ts.map +1 -0
- package/dist/ports/POutEventPort.js +65 -0
- package/dist/ports/POutEventPort.js.map +1 -0
- package/dist/ports/POutValuePort.d.ts +13 -0
- package/dist/ports/POutValuePort.d.ts.map +1 -0
- package/dist/ports/POutValuePort.js +21 -0
- package/dist/ports/POutValuePort.js.map +1 -0
- package/dist/ports/PPayloadValue.d.ts +16 -0
- package/dist/ports/PPayloadValue.d.ts.map +1 -0
- package/dist/ports/PPayloadValue.js +28 -0
- package/dist/ports/PPayloadValue.js.map +1 -0
- package/dist/ports/PPort.d.ts +21 -0
- package/dist/ports/PPort.d.ts.map +1 -0
- package/dist/ports/PPort.js +25 -0
- package/dist/ports/PPort.js.map +1 -0
- package/package.json +1 -1
- package/dist/DBEvent.d.ts +0 -22
- package/dist/DBEvent.d.ts.map +0 -1
- package/dist/DBEvent.js +0 -19
- package/dist/DBEvent.js.map +0 -1
- package/dist/DBNode.d.ts +0 -35
- package/dist/DBNode.d.ts.map +0 -1
- package/dist/DBNode.js +0 -33
- package/dist/DBNode.js.map +0 -1
- package/dist/DBScene.d.ts +0 -11
- package/dist/DBScene.d.ts.map +0 -1
- package/dist/DBScene.js +0 -9
- package/dist/DBScene.js.map +0 -1
- package/dist/DBVariable.d.ts +0 -22
- package/dist/DBVariable.d.ts.map +0 -1
- package/dist/DBVariable.js +0 -19
- package/dist/DBVariable.js.map +0 -1
- package/dist/PAction.d.ts +0 -77
- package/dist/PAction.d.ts.map +0 -1
- package/dist/PAction.js +0 -242
- package/dist/PAction.js.map +0 -1
- package/dist/POutValue.d.ts +0 -18
- package/dist/POutValue.d.ts.map +0 -1
- package/dist/POutValue.js +0 -28
- package/dist/POutValue.js.map +0 -1
- package/dist/media/MediaManager.d.ts +0 -17
- package/dist/media/MediaManager.d.ts.map +0 -1
- package/dist/media/MediaManager.js +0 -19
- package/dist/media/MediaManager.js.map +0 -1
- package/dist/pcomponents/PCallActions.d.ts +0 -24
- package/dist/pcomponents/PCallActions.d.ts.map +0 -1
- package/dist/pcomponents/PCallActions.js +0 -37
- package/dist/pcomponents/PCallActions.js.map +0 -1
- package/dist/pcomponents/PCompareBoolean.d.ts +0 -23
- package/dist/pcomponents/PCompareBoolean.d.ts.map +0 -1
- package/dist/pcomponents/PCompareBoolean.js +0 -38
- package/dist/pcomponents/PCompareBoolean.js.map +0 -1
- package/dist/pcomponents/PCompareInteger.d.ts +0 -32
- package/dist/pcomponents/PCompareInteger.d.ts.map +0 -1
- package/dist/pcomponents/PCompareInteger.js +0 -82
- package/dist/pcomponents/PCompareInteger.js.map +0 -1
- package/dist/pcomponents/PCompareNumber.d.ts +0 -25
- package/dist/pcomponents/PCompareNumber.d.ts.map +0 -1
- package/dist/pcomponents/PCompareNumber.js +0 -44
- package/dist/pcomponents/PCompareNumber.js.map +0 -1
- package/dist/pcomponents/PCompareString.d.ts +0 -25
- package/dist/pcomponents/PCompareString.d.ts.map +0 -1
- package/dist/pcomponents/PCompareString.js +0 -42
- package/dist/pcomponents/PCompareString.js.map +0 -1
- package/dist/pcomponents/PCompareVariable.d.ts +0 -28
- package/dist/pcomponents/PCompareVariable.d.ts.map +0 -1
- package/dist/pcomponents/PCompareVariable.js +0 -50
- package/dist/pcomponents/PCompareVariable.js.map +0 -1
- package/dist/pcomponents/PVarReader.d.ts +0 -19
- package/dist/pcomponents/PVarReader.d.ts.map +0 -1
- package/dist/pcomponents/PVarReader.js +0 -25
- package/dist/pcomponents/PVarReader.js.map +0 -1
- package/dist/pcomponents/PVarWriter.d.ts +0 -25
- package/dist/pcomponents/PVarWriter.d.ts.map +0 -1
- package/dist/pcomponents/PVarWriter.js +0 -45
- package/dist/pcomponents/PVarWriter.js.map +0 -1
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import PComponent from "../PComponent";
|
|
2
2
|
import PVector3 from "../PVector3";
|
|
3
|
-
import { POutAction } from "../PAction";
|
|
4
3
|
import { DataType } from "../PEnums";
|
|
5
4
|
export default class PCollider extends PComponent {
|
|
6
5
|
sphere;
|
|
@@ -9,13 +8,13 @@ export default class PCollider extends PComponent {
|
|
|
9
8
|
sphere_radius;
|
|
10
9
|
box_size;
|
|
11
10
|
editor_showColliders = false;
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
11
|
+
outport_onHoverEnter;
|
|
12
|
+
outport_onHoverExit;
|
|
13
|
+
outport_onClick;
|
|
15
14
|
// el: any;
|
|
16
15
|
hidden = true;
|
|
17
16
|
constructor(dbComponent, node, context) {
|
|
18
|
-
super(dbComponent, "
|
|
17
|
+
super(dbComponent, "Collider", node, context);
|
|
19
18
|
this.requireTransform = true;
|
|
20
19
|
this.sphere = dbComponent.sphere;
|
|
21
20
|
this.box = dbComponent.box;
|
|
@@ -23,9 +22,9 @@ export default class PCollider extends PComponent {
|
|
|
23
22
|
this.sphere_radius = dbComponent.sphere_radius;
|
|
24
23
|
this.box_size = new PVector3(dbComponent.box_size);
|
|
25
24
|
this.editor_showColliders = dbComponent.editor_showColliders;
|
|
26
|
-
this.
|
|
27
|
-
this.
|
|
28
|
-
this.
|
|
25
|
+
this.outport_onHoverEnter = this.registerOutPort(1, "On Hover Enter", dbComponent.outport_onHoverEnter, DataType.Node);
|
|
26
|
+
this.outport_onHoverExit = this.registerOutPort(2, "On Hover Exit", dbComponent.outport_onHoverExit, DataType.Node);
|
|
27
|
+
this.outport_onClick = this.registerOutPort(3, "On Click", dbComponent.outport_onClick, DataType.Node);
|
|
29
28
|
this.node.collider = this;
|
|
30
29
|
}
|
|
31
30
|
toDB() {
|
|
@@ -37,22 +36,22 @@ export default class PCollider extends PComponent {
|
|
|
37
36
|
sphere_radius: this.sphere_radius,
|
|
38
37
|
box_size: this.box_size,
|
|
39
38
|
editor_showColliders: this.editor_showColliders,
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
39
|
+
outport_onHoverEnter: this.outport_onHoverEnter.toDB(),
|
|
40
|
+
outport_onHoverExit: this.outport_onHoverExit.toDB(),
|
|
41
|
+
outport_onClick: this.outport_onClick.toDB(),
|
|
43
42
|
};
|
|
44
43
|
}
|
|
45
44
|
//
|
|
46
45
|
// EVENTS
|
|
47
46
|
//
|
|
48
47
|
native_onHoverEnter = () => {
|
|
49
|
-
this.
|
|
48
|
+
this.outport_onHoverEnter?.emit(this.node.pid.toString());
|
|
50
49
|
};
|
|
51
50
|
native_onHoverExit = () => {
|
|
52
|
-
this.
|
|
51
|
+
this.outport_onHoverExit?.emit(this.node.pid.toString());
|
|
53
52
|
};
|
|
54
53
|
native_onClick = () => {
|
|
55
|
-
this.
|
|
54
|
+
this.outport_onClick?.emit(this.node.pid.toString());
|
|
56
55
|
};
|
|
57
56
|
}
|
|
58
57
|
//# sourceMappingURL=PCollider.js.map
|
|
@@ -1 +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,
|
|
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,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAuBrC,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,oBAAoB,CAAgB;IACpC,mBAAmB,CAAgB;IACnC,eAAe,CAAgB;IAE/B,YAAY;IAEZ,MAAM,GAAG,IAAI,CAAC;IAEd,YAAY,WAAuB,EAAE,IAAW,EAAE,OAAoB;QACpE,KAAK,CAAC,WAAW,EAAE,UAAU,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;QAE9C,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,WAAW,CAAC,MAAM,CAAC,CAAC;QAC/C,IAAI,CAAC,aAAa,GAAG,WAAW,CAAC,aAAa,CAAC;QAC/C,IAAI,CAAC,QAAQ,GAAG,IAAI,QAAQ,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;QAEnD,IAAI,CAAC,oBAAoB,GAAG,WAAW,CAAC,oBAAoB,CAAC;QAE7D,IAAI,CAAC,oBAAoB,GAAG,IAAI,CAAC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AAC;IAC3D,CAAC,CAAC;IAEF,cAAc,GAAG,GAAG,EAAE;QACpB,IAAI,CAAC,eAAe,EAAE,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC,CAAC;IACvD,CAAC,CAAC;CACH"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { DataType } from "../PEnums";
|
|
2
|
+
import PComponent, { DBComponent } from "../PComponent";
|
|
3
|
+
import GameContext from "../GameContext";
|
|
4
|
+
import PNode from "../PNode";
|
|
5
|
+
import PInEventPort, { DBInPort } from "../ports/PInEventPort";
|
|
6
|
+
import POutEventPort, { DBOutPort } from "../ports/POutEventPort";
|
|
7
|
+
import PInValuePort from "../ports/PInValuePort";
|
|
8
|
+
interface DBCompare extends DBComponent {
|
|
9
|
+
inport_compare?: DBInPort;
|
|
10
|
+
outport_onCompare?: DBOutPort;
|
|
11
|
+
outport_onTrue?: DBOutPort;
|
|
12
|
+
outport_onFalse?: DBOutPort;
|
|
13
|
+
bitCompare: boolean;
|
|
14
|
+
dataType: DataType;
|
|
15
|
+
}
|
|
16
|
+
export { type DBCompare };
|
|
17
|
+
export default class PCompare extends PComponent {
|
|
18
|
+
inport_compare: PInEventPort;
|
|
19
|
+
outport_onCompare: POutEventPort;
|
|
20
|
+
outport_onTrue: POutEventPort;
|
|
21
|
+
outport_onFalse: POutEventPort;
|
|
22
|
+
invalue_compareTo: PInValuePort;
|
|
23
|
+
bitCompare: boolean;
|
|
24
|
+
dataType: DataType;
|
|
25
|
+
constructor(dbComponent: DBCompare, node: PNode, context: GameContext);
|
|
26
|
+
toDB(): DBCompare;
|
|
27
|
+
callback_compare(payload: string | null): void;
|
|
28
|
+
render(): void;
|
|
29
|
+
unrender(): void;
|
|
30
|
+
editor_onDataTypeChange(field: string, value: DataType): void;
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=PCompare.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file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AE,KAAK,EAAE,QAAQ;CAOvD"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { DataType } from "../PEnums";
|
|
2
|
+
import PPayload from "../PPayload";
|
|
3
|
+
import PComponent from "../PComponent";
|
|
4
|
+
export default class PCompare extends PComponent {
|
|
5
|
+
inport_compare;
|
|
6
|
+
outport_onCompare;
|
|
7
|
+
outport_onTrue;
|
|
8
|
+
outport_onFalse;
|
|
9
|
+
invalue_compareTo;
|
|
10
|
+
bitCompare;
|
|
11
|
+
dataType;
|
|
12
|
+
constructor(dbComponent, node, context) {
|
|
13
|
+
super(dbComponent, "Compare", node, context);
|
|
14
|
+
this.bitCompare = dbComponent.bitCompare || false;
|
|
15
|
+
this.dataType = dbComponent.dataType || DataType.String;
|
|
16
|
+
this.inport_compare = this.registerInPort(1, "Compare", dbComponent.inport_compare, this.callback_compare, this.dataType);
|
|
17
|
+
this.invalue_compareTo = this.registerInValuePort(2, "Compare To", DataType.Integer);
|
|
18
|
+
this.outport_onCompare = this.registerOutPort(3, "On Compare", dbComponent.outport_onCompare, DataType.Boolean);
|
|
19
|
+
this.outport_onTrue = this.registerOutPort(4, "On True", dbComponent.outport_onTrue);
|
|
20
|
+
this.outport_onFalse = this.registerOutPort(5, "On False", dbComponent.outport_onFalse);
|
|
21
|
+
}
|
|
22
|
+
toDB() {
|
|
23
|
+
return {
|
|
24
|
+
...super.toDB(),
|
|
25
|
+
inport_compare: this.inport_compare.toDB(),
|
|
26
|
+
outport_onCompare: this.outport_onCompare.toDB(),
|
|
27
|
+
outport_onTrue: this.outport_onTrue.toDB(),
|
|
28
|
+
outport_onFalse: this.outport_onFalse.toDB(),
|
|
29
|
+
bitCompare: this.bitCompare,
|
|
30
|
+
dataType: this.dataType,
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
callback_compare(payload) {
|
|
34
|
+
if (!payload || !this.invalue_compareTo?.value)
|
|
35
|
+
return;
|
|
36
|
+
const compareToString = this.invalue_compareTo.runtime_value();
|
|
37
|
+
let result = false;
|
|
38
|
+
if (this.dataType === DataType.Boolean) {
|
|
39
|
+
result = payload === "1";
|
|
40
|
+
}
|
|
41
|
+
else if (this.dataType === DataType.Integer) {
|
|
42
|
+
const compareToInt = parseInt(compareToString || "-1");
|
|
43
|
+
if (!this.bitCompare) {
|
|
44
|
+
result = parseInt(payload) === compareToInt;
|
|
45
|
+
}
|
|
46
|
+
else {
|
|
47
|
+
// Bit compare
|
|
48
|
+
const payloadBit = parseInt(payload);
|
|
49
|
+
result = (payloadBit & compareToInt) > 0;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
else {
|
|
53
|
+
result = payload === compareToString;
|
|
54
|
+
}
|
|
55
|
+
this.outport_onCompare?.emit(PPayload.fromBoolean(result));
|
|
56
|
+
if (result) {
|
|
57
|
+
this.outport_onTrue?.emit(null);
|
|
58
|
+
}
|
|
59
|
+
else {
|
|
60
|
+
this.outport_onFalse?.emit(null);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
render() { }
|
|
64
|
+
unrender() { }
|
|
65
|
+
editor_onDataTypeChange(field, value) {
|
|
66
|
+
if (field === "dataType") {
|
|
67
|
+
this.dataType = value;
|
|
68
|
+
this.inport_compare.dataType = value;
|
|
69
|
+
this.invalue_compareTo.dataType = value;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
//# sourceMappingURL=PCompare.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PCompare.js","sourceRoot":"","sources":["../../src/pcomponents/PCompare.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACrC,OAAO,QAAQ,MAAM,aAAa,CAAC;AACnC,OAAO,UAA2B,MAAM,eAAe,CAAC;AAoBxD,MAAM,CAAC,OAAO,OAAO,QAAS,SAAQ,UAAU;IAC9C,cAAc,CAAe;IAC7B,iBAAiB,CAAgB;IACjC,cAAc,CAAgB;IAC9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C;QACnC,CAAC;IACH,CAAC;IAED,MAAM,KAAU,CAAC;IAEjB,QAAQ,KAAU,CAAC;IAEnB,uBAAuB,CAAC,KAAa,EAAE,KAAe;QACpD,IAAI,KAAK,KAAK,UAAU,EAAE,CAAC;YACzB,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;YACtB,IAAI,CAAC,cAAc,CAAC,QAAQ,GAAG,KAAK,CAAC;YACrC,IAAI,CAAC,iBAAiB,CAAC,QAAQ,GAAG,KAAK,CAAC;QAC1C,CAAC;IACH,CAAC;CACF"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import GameContext from "../GameContext";
|
|
2
2
|
import PNode from "../PNode";
|
|
3
|
-
import { IOutAction, POutAction } from "../PAction";
|
|
4
3
|
import PComponent, { DBComponent } from "../PComponent";
|
|
4
|
+
import POutEventPort, { DBOutPort } from "../ports/POutEventPort";
|
|
5
5
|
interface DBControllerInput extends DBComponent {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
outport_buttonA?: DBOutPort;
|
|
7
|
+
outport_buttonB?: DBOutPort;
|
|
8
|
+
outport_buttonX?: DBOutPort;
|
|
9
|
+
outport_buttonY?: DBOutPort;
|
|
10
10
|
holdDurationA: number;
|
|
11
11
|
holdDurationB: number;
|
|
12
12
|
holdDurationX: number;
|
|
@@ -14,10 +14,10 @@ interface DBControllerInput extends DBComponent {
|
|
|
14
14
|
}
|
|
15
15
|
export type { DBControllerInput };
|
|
16
16
|
export default class PControllerInput extends PComponent {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
17
|
+
outport_buttonA: POutEventPort;
|
|
18
|
+
outport_buttonB: POutEventPort;
|
|
19
|
+
outport_buttonX: POutEventPort;
|
|
20
|
+
outport_buttonY: POutEventPort;
|
|
21
21
|
holdDurationA: number;
|
|
22
22
|
holdDurationB: number;
|
|
23
23
|
holdDurationX: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PControllerInput.d.ts","sourceRoot":"","sources":["../../src/pcomponents/PControllerInput.ts"],"names":[],"mappings":"AAAA,OAAO,WAAW,MAAM,gBAAgB,CAAC;AACzC,OAAO,KAAK,MAAM,UAAU,CAAC;AAC7B,OAAO,
|
|
1
|
+
{"version":3,"file":"PControllerInput.d.ts","sourceRoot":"","sources":["../../src/pcomponents/PControllerInput.ts"],"names":[],"mappings":"AAAA,OAAO,WAAW,MAAM,gBAAgB,CAAC;AACzC,OAAO,KAAK,MAAM,UAAU,CAAC;AAC7B,OAAO,UAAU,EAAE,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAExD,OAAO,aAAa,EAAE,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAElE,UAAU,iBAAkB,SAAQ,WAAW;IAC7C,eAAe,CAAC,EAAE,SAAS,CAAC;IAC5B,eAAe,CAAC,EAAE,SAAS,CAAC;IAC5B,eAAe,CAAC,EAAE,SAAS,CAAC;IAC5B,eAAe,CAAC,EAAE,SAAS,CAAC;IAE5B,aAAa,EAAE,MAAM,CAAC;IACtB,aAAa,EAAE,MAAM,CAAC;IACtB,aAAa,EAAE,MAAM,CAAC;IACtB,aAAa,EAAE,MAAM,CAAC;CACvB;AAED,YAAY,EAAE,iBAAiB,EAAE,CAAC;AAElC,MAAM,CAAC,OAAO,OAAO,gBAAiB,SAAQ,UAAU;IACtD,eAAe,EAAE,aAAa,CAAC;IAC/B,eAAe,EAAE,aAAa,CAAC;IAC/B,eAAe,EAAE,aAAa,CAAC;IAC/B,eAAe,EAAE,aAAa,CAAC;IAE/B,aAAa,EAAE,MAAM,CAAC;IACtB,aAAa,EAAE,MAAM,CAAC;IACtB,aAAa,EAAE,MAAM,CAAC;IACtB,aAAa,EAAE,MAAM,CAAC;gBAGpB,WAAW,EAAE,iBAAiB,EAC9B,IAAI,EAAE,KAAK,EACX,OAAO,EAAE,WAAW;IA+BtB,IAAI,IAAI,iBAAiB;IAezB,MAAM,IAAI,IAAI;IAEd,QAAQ,IAAI,IAAI;CACjB"}
|
|
@@ -1,32 +1,31 @@
|
|
|
1
|
-
import { POutAction } from "../PAction";
|
|
2
1
|
import PComponent from "../PComponent";
|
|
3
2
|
export default class PControllerInput extends PComponent {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
outport_buttonA;
|
|
4
|
+
outport_buttonB;
|
|
5
|
+
outport_buttonX;
|
|
6
|
+
outport_buttonY;
|
|
8
7
|
holdDurationA;
|
|
9
8
|
holdDurationB;
|
|
10
9
|
holdDurationX;
|
|
11
10
|
holdDurationY;
|
|
12
11
|
constructor(dbComponent, node, context) {
|
|
13
|
-
super(dbComponent, "
|
|
12
|
+
super(dbComponent, "Controller Input", node, context);
|
|
14
13
|
this.holdDurationA = dbComponent.holdDurationA;
|
|
15
14
|
this.holdDurationB = dbComponent.holdDurationB;
|
|
16
15
|
this.holdDurationX = dbComponent.holdDurationX;
|
|
17
16
|
this.holdDurationY = dbComponent.holdDurationY;
|
|
18
|
-
this.
|
|
19
|
-
this.
|
|
20
|
-
this.
|
|
21
|
-
this.
|
|
17
|
+
this.outport_buttonA = this.registerOutPort(1, "On Button A", dbComponent.outport_buttonA);
|
|
18
|
+
this.outport_buttonB = this.registerOutPort(2, "On Button B", dbComponent.outport_buttonB);
|
|
19
|
+
this.outport_buttonX = this.registerOutPort(3, "On Button X", dbComponent.outport_buttonX);
|
|
20
|
+
this.outport_buttonY = this.registerOutPort(4, "On Button Y", dbComponent.outport_buttonY);
|
|
22
21
|
}
|
|
23
22
|
toDB() {
|
|
24
23
|
return {
|
|
25
24
|
...super.toDB(),
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
25
|
+
outport_buttonA: this.outport_buttonA.toDB(),
|
|
26
|
+
outport_buttonB: this.outport_buttonB.toDB(),
|
|
27
|
+
outport_buttonX: this.outport_buttonX.toDB(),
|
|
28
|
+
outport_buttonY: this.outport_buttonY.toDB(),
|
|
30
29
|
holdDurationA: this.holdDurationA,
|
|
31
30
|
holdDurationB: this.holdDurationB,
|
|
32
31
|
holdDurationX: this.holdDurationX,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PControllerInput.js","sourceRoot":"","sources":["../../src/pcomponents/PControllerInput.ts"],"names":[],"mappings":"AAEA,OAAO,
|
|
1
|
+
{"version":3,"file":"PControllerInput.js","sourceRoot":"","sources":["../../src/pcomponents/PControllerInput.ts"],"names":[],"mappings":"AAEA,OAAO,UAA2B,MAAM,eAAe,CAAC;AAkBxD,MAAM,CAAC,OAAO,OAAO,gBAAiB,SAAQ,UAAU;IACtD,eAAe,CAAgB;IAC/B,eAAe,CAAgB;IAC/B,eAAe,CAAgB;IAC/B,eAAe,CAAgB;IAE/B,aAAa,CAAS;IACtB,aAAa,CAAS;IACtB,aAAa,CAAS;IACtB,aAAa,CAAS;IAEtB,YACE,WAA8B,EAC9B,IAAW,EACX,OAAoB;QAEpB,KAAK,CAAC,WAAW,EAAE,kBAAkB,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;QAEtD,IAAI,CAAC,aAAa,GAAG,WAAW,CAAC,aAAa,CAAC;QAC/C,IAAI,CAAC,aAAa,GAAG,WAAW,CAAC,aAAa,CAAC;QAC/C,IAAI,CAAC,aAAa,GAAG,WAAW,CAAC,aAAa,CAAC;QAC/C,IAAI,CAAC,aAAa,GAAG,WAAW,CAAC,aAAa,CAAC;QAE/C,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC,eAAe,CACzC,CAAC,EACD,aAAa,EACb,WAAW,CAAC,eAAe,CAC5B,CAAC;QACF,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC,eAAe,CACzC,CAAC,EACD,aAAa,EACb,WAAW,CAAC,eAAe,CAC5B,CAAC;QACF,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC,eAAe,CACzC,CAAC,EACD,aAAa,EACb,WAAW,CAAC,eAAe,CAC5B,CAAC;QACF,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC,eAAe,CACzC,CAAC,EACD,aAAa,EACb,WAAW,CAAC,eAAe,CAC5B,CAAC;IACJ,CAAC;IAED,IAAI;QACF,OAAO;YACL,GAAG,KAAK,CAAC,IAAI,EAAE;YACf,eAAe,EAAE,IAAI,CAAC,eAAe,CAAC,IAAI,EAAE;YAC5C,eAAe,EAAE,IAAI,CAAC,eAAe,CAAC,IAAI,EAAE;YAC5C,eAAe,EAAE,IAAI,CAAC,eAAe,CAAC,IAAI,EAAE;YAC5C,eAAe,EAAE,IAAI,CAAC,eAAe,CAAC,IAAI,EAAE;YAE5C,aAAa,EAAE,IAAI,CAAC,aAAa;YACjC,aAAa,EAAE,IAAI,CAAC,aAAa;YACjC,aAAa,EAAE,IAAI,CAAC,aAAa;YACjC,aAAa,EAAE,IAAI,CAAC,aAAa;SAClC,CAAC;IACJ,CAAC;IAED,MAAM,KAAU,CAAC;IAEjB,QAAQ,KAAU,CAAC;CACpB"}
|
|
@@ -5,7 +5,7 @@ export default class PCubeGeometry extends PComponent {
|
|
|
5
5
|
castShadow;
|
|
6
6
|
receiveShadow;
|
|
7
7
|
constructor(dbComponent, node, context) {
|
|
8
|
-
super(dbComponent, "
|
|
8
|
+
super(dbComponent, "Cube Geometry", node, context);
|
|
9
9
|
this.requireTransform = true;
|
|
10
10
|
this.size = new PVector3(dbComponent.size);
|
|
11
11
|
this.castShadow = dbComponent.castShadow;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PCubeGeometry.js","sourceRoot":"","sources":["../../src/pcomponents/PCubeGeometry.ts"],"names":[],"mappings":"AAEA,OAAO,UAA2B,MAAM,eAAe,CAAC;AACxD,OAAO,QAAsB,MAAM,aAAa,CAAC;AAUjD,MAAM,CAAC,OAAO,OAAgB,aAAc,SAAQ,UAAU;IAC5D,IAAI,CAAW;IACf,UAAU,CAAU;IACpB,aAAa,CAAU;IAEvB,YAAY,WAA2B,EAAE,IAAW,EAAE,OAAoB;QACxE,KAAK,CAAC,WAAW,EAAE,eAAe,EAAE,
|
|
1
|
+
{"version":3,"file":"PCubeGeometry.js","sourceRoot":"","sources":["../../src/pcomponents/PCubeGeometry.ts"],"names":[],"mappings":"AAEA,OAAO,UAA2B,MAAM,eAAe,CAAC;AACxD,OAAO,QAAsB,MAAM,aAAa,CAAC;AAUjD,MAAM,CAAC,OAAO,OAAgB,aAAc,SAAQ,UAAU;IAC5D,IAAI,CAAW;IACf,UAAU,CAAU;IACpB,aAAa,CAAU;IAEvB,YAAY,WAA2B,EAAE,IAAW,EAAE,OAAoB;QACxE,KAAK,CAAC,WAAW,EAAE,eAAe,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;QAEnD,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC;QAE7B,IAAI,CAAC,IAAI,GAAG,IAAI,QAAQ,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;QAE3C,IAAI,CAAC,UAAU,GAAG,WAAW,CAAC,UAAU,CAAC;QACzC,IAAI,CAAC,aAAa,GAAG,WAAW,CAAC,aAAa,CAAC;IACjD,CAAC;IAED,IAAI;QACF,OAAO;YACL,GAAG,KAAK,CAAC,IAAI,EAAE;YACf,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,UAAU,EAAE,IAAI,CAAC,UAAU;YAC3B,aAAa,EAAE,IAAI,CAAC,aAAa;SAClC,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -1,25 +1,21 @@
|
|
|
1
1
|
import PComponent, { DBComponent } from "../PComponent";
|
|
2
|
-
import {
|
|
2
|
+
import { DataType } from "../PEnums";
|
|
3
3
|
import GameContext from "../GameContext";
|
|
4
4
|
import PNode from "../PNode";
|
|
5
|
+
import PInEventPort, { DBInPort } from "../ports/PInEventPort";
|
|
5
6
|
interface DBDebug extends DBComponent {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
inevent_onInteger: IInAction | null;
|
|
9
|
-
inevent_onBoolean: IInAction | null;
|
|
10
|
-
inevent_onColor: IInAction | null;
|
|
7
|
+
dataType: DataType;
|
|
8
|
+
inport_on?: DBInPort;
|
|
11
9
|
}
|
|
12
10
|
export type { DBDebug };
|
|
13
11
|
export default class PDebug extends PComponent {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
inevent_onInteger: PInAction | null;
|
|
17
|
-
inevent_onBoolean: PInAction | null;
|
|
18
|
-
inevent_onColor: PInAction | null;
|
|
12
|
+
dataType: DataType;
|
|
13
|
+
inport_on: PInEventPort;
|
|
19
14
|
constructor(dbComponent: DBDebug, node: PNode, context: GameContext);
|
|
20
15
|
toDB(): DBDebug;
|
|
21
16
|
render(): void;
|
|
22
17
|
unrender(): void;
|
|
23
18
|
callback_onDebug(payloadValue: string | null): void;
|
|
19
|
+
editor_onEnumChange(field: string, value: DataType): void;
|
|
24
20
|
}
|
|
25
21
|
//# sourceMappingURL=PDebug.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PDebug.d.ts","sourceRoot":"","sources":["../../src/pcomponents/PDebug.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,EAAE,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACxD,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"PDebug.d.ts","sourceRoot":"","sources":["../../src/pcomponents/PDebug.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,EAAE,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACxD,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACrC,OAAO,WAAW,MAAM,gBAAgB,CAAC;AACzC,OAAO,KAAK,MAAM,UAAU,CAAC;AAC7B,OAAO,YAAY,EAAE,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAE/D,UAAU,OAAQ,SAAQ,WAAW;IACnC,QAAQ,EAAE,QAAQ,CAAC;IACnB,SAAS,CAAC,EAAE,QAAQ,CAAC;CACtB;AACD,YAAY,EAAE,OAAO,EAAE,CAAC;AAExB,MAAM,CAAC,OAAO,OAAO,MAAO,SAAQ,UAAU;IAC5C,QAAQ,EAAE,QAAQ,CAAC;IAEnB,SAAS,EAAE,YAAY,CAAC;gBAEZ,WAAW,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,WAAW;IAcnE,IAAI,IAAI,OAAO;IAQf,MAAM,IAAI,IAAI;IAEd,QAAQ,IAAI,IAAI;IAEhB,gBAAgB,CAAC,YAAY,EAAE,MAAM,GAAG,IAAI;IAI5C,mBAAmB,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ;CAMnD"}
|
|
@@ -1,28 +1,18 @@
|
|
|
1
1
|
import PComponent from "../PComponent";
|
|
2
|
-
import { PInAction } from "../PAction";
|
|
3
2
|
import { DataType } from "../PEnums";
|
|
4
3
|
export default class PDebug extends PComponent {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
inevent_onInteger;
|
|
8
|
-
inevent_onBoolean;
|
|
9
|
-
inevent_onColor;
|
|
4
|
+
dataType;
|
|
5
|
+
inport_on;
|
|
10
6
|
constructor(dbComponent, node, context) {
|
|
11
|
-
super(dbComponent, "
|
|
12
|
-
this.
|
|
13
|
-
this.
|
|
14
|
-
this.inevent_onBoolean = node.registerInAction(this, "Debug Boolean", dbComponent.inevent_onBoolean, this.callback_onDebug, DataType.Boolean);
|
|
15
|
-
this.inevent_onInteger = node.registerInAction(this, "Debug Integer", dbComponent.inevent_onInteger, this.callback_onDebug, DataType.Integer);
|
|
16
|
-
this.inevent_onColor = node.registerInAction(this, "Debug Color", dbComponent.inevent_onColor, this.callback_onDebug, DataType.Color);
|
|
7
|
+
super(dbComponent, "Debug", node, context);
|
|
8
|
+
this.dataType = dbComponent.dataType || DataType.String;
|
|
9
|
+
this.inport_on = this.registerInPort(1, "Debug", dbComponent.inport_on, this.callback_onDebug, this.dataType);
|
|
17
10
|
}
|
|
18
11
|
toDB() {
|
|
19
12
|
return {
|
|
20
13
|
...super.toDB(),
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
inevent_onBoolean: PInAction.toDB(this.inevent_onBoolean),
|
|
24
|
-
inevent_onInteger: PInAction.toDB(this.inevent_onInteger),
|
|
25
|
-
inevent_onColor: PInAction.toDB(this.inevent_onColor),
|
|
14
|
+
dataType: this.dataType,
|
|
15
|
+
inport_on: this.inport_on.toDB(),
|
|
26
16
|
};
|
|
27
17
|
}
|
|
28
18
|
render() { }
|
|
@@ -30,5 +20,11 @@ export default class PDebug extends PComponent {
|
|
|
30
20
|
callback_onDebug(payloadValue) {
|
|
31
21
|
console.log("[PDebug][" + this.node.name + "]", payloadValue);
|
|
32
22
|
}
|
|
23
|
+
editor_onEnumChange(field, value) {
|
|
24
|
+
if (field === "dataType") {
|
|
25
|
+
this.dataType = value;
|
|
26
|
+
this.inport_on.dataType = value;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
33
29
|
}
|
|
34
30
|
//# sourceMappingURL=PDebug.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PDebug.js","sourceRoot":"","sources":["../../src/pcomponents/PDebug.ts"],"names":[],"mappings":"AAAA,OAAO,UAA2B,MAAM,eAAe,CAAC;AACxD,OAAO,
|
|
1
|
+
{"version":3,"file":"PDebug.js","sourceRoot":"","sources":["../../src/pcomponents/PDebug.ts"],"names":[],"mappings":"AAAA,OAAO,UAA2B,MAAM,eAAe,CAAC;AACxD,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAWrC,MAAM,CAAC,OAAO,OAAO,MAAO,SAAQ,UAAU;IAC5C,QAAQ,CAAW;IAEnB,SAAS,CAAe;IAExB,YAAY,WAAoB,EAAE,IAAW,EAAE,OAAoB;QACjE,KAAK,CAAC,WAAW,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;QAE3C,IAAI,CAAC,QAAQ,GAAG,WAAW,CAAC,QAAQ,IAAI,QAAQ,CAAC,MAAM,CAAC;QAExD,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,cAAc,CAClC,CAAC,EACD,OAAO,EACP,WAAW,CAAC,SAAS,EACrB,IAAI,CAAC,gBAAgB,EACrB,IAAI,CAAC,QAAQ,CACd,CAAC;IACJ,CAAC;IAED,IAAI;QACF,OAAO;YACL,GAAG,KAAK,CAAC,IAAI,EAAE;YACf,QAAQ,EAAE,IAAI,CAAC,QAAQ;YACvB,SAAS,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE;SACjC,CAAC;IACJ,CAAC;IAED,MAAM,KAAU,CAAC;IAEjB,QAAQ,KAAU,CAAC;IAEnB,gBAAgB,CAAC,YAA2B;QAC1C,OAAO,CAAC,GAAG,CAAC,WAAW,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,GAAG,GAAG,EAAE,YAAY,CAAC,CAAC;IAChE,CAAC;IAED,mBAAmB,CAAC,KAAa,EAAE,KAAe;QAChD,IAAI,KAAK,KAAK,UAAU,EAAE,CAAC;YACzB,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;YACtB,IAAI,CAAC,SAAS,CAAC,QAAQ,GAAG,KAAK,CAAC;QAClC,CAAC;IACH,CAAC;CACF"}
|
|
@@ -17,7 +17,7 @@ export default class PEnvironment extends PComponent {
|
|
|
17
17
|
];
|
|
18
18
|
_three = [];
|
|
19
19
|
constructor(dbComponent, node, context) {
|
|
20
|
-
super(dbComponent, "
|
|
20
|
+
super(dbComponent, "Environment", node, context);
|
|
21
21
|
//this.file_texture = this.context.requestFile(dbComponent.file_texture);
|
|
22
22
|
this.value = dbComponent.value || 0;
|
|
23
23
|
this.rotation = dbComponent.rotation;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PEnvironment.js","sourceRoot":"","sources":["../../src/pcomponents/PEnvironment.ts"],"names":[],"mappings":"AAEA,OAAO,UAA2B,MAAM,eAAe,CAAC;AAaxD,MAAM,CAAC,OAAO,OAAgB,YAAa,SAAQ,UAAU;IAC3D,6BAA6B;IAC7B,SAAS,GAA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AA0E;YAC1E,QAAQ,EAAE,IAAI,CAAC,QAAQ;YACvB,SAAS,EAAE,IAAI,CAAC,SAAS;YACzB,UAAU,EAAE,IAAI,CAAC,UAAU;YAC3B,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,KAAK,EAAE,IAAI,CAAC,KAAK;SAClB,CAAC;IACJ,CAAC;IAeD,QAAQ;QACN,IAAI,CAAC,QAAQ,EAAE,CAAC;IAClB,CAAC;CACF"}
|
|
@@ -1,21 +1,22 @@
|
|
|
1
1
|
import PComponent, { DBComponent } from "../PComponent";
|
|
2
|
-
import { IInAction, IOutAction, PInAction, POutAction } from "../PAction";
|
|
3
2
|
import GameContext from "../GameContext";
|
|
4
3
|
import PNode from "../PNode";
|
|
5
4
|
import { Tween } from "@tweenjs/tween.js";
|
|
5
|
+
import PInEventPort, { DBInPort } from "../ports/PInEventPort";
|
|
6
|
+
import POutEventPort, { DBOutPort } from "../ports/POutEventPort";
|
|
6
7
|
interface DBFadeAnimation extends DBComponent {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
inport_fadeInOn?: DBInPort;
|
|
9
|
+
inport_fadeOutOn?: DBInPort;
|
|
10
|
+
outport_onFadeOut?: DBOutPort;
|
|
11
|
+
outport_onFadeIn?: DBOutPort;
|
|
11
12
|
duration: number;
|
|
12
13
|
}
|
|
13
14
|
export type { DBFadeAnimation };
|
|
14
15
|
export default class PFadeAnimation extends PComponent {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
inport_fadeInOn: PInEventPort;
|
|
17
|
+
inport_fadeOutOn: PInEventPort;
|
|
18
|
+
outport_onFadeOut: POutEventPort;
|
|
19
|
+
outport_onFadeIn: POutEventPort;
|
|
19
20
|
duration: number;
|
|
20
21
|
protected _tween: Tween<any> | null;
|
|
21
22
|
protected _maxValue: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PFadeAnimation.d.ts","sourceRoot":"","sources":["../../src/pcomponents/PFadeAnimation.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,EAAE,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACxD,OAAO,
|
|
1
|
+
{"version":3,"file":"PFadeAnimation.d.ts","sourceRoot":"","sources":["../../src/pcomponents/PFadeAnimation.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,EAAE,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACxD,OAAO,WAAW,MAAM,gBAAgB,CAAC;AACzC,OAAO,KAAK,MAAM,UAAU,CAAC;AAC7B,OAAO,EAAU,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAElD,OAAO,YAAY,EAAE,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC/D,OAAO,aAAa,EAAE,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAElE,UAAU,eAAgB,SAAQ,WAAW;IAC3C,eAAe,CAAC,EAAE,QAAQ,CAAC;IAC3B,gBAAgB,CAAC,EAAE,QAAQ,CAAC;IAE5B,iBAAiB,CAAC,EAAE,SAAS,CAAC;IAC9B,gBAAgB,CAAC,EAAE,SAAS,CAAC;IAE7B,QAAQ,EAAE,MAAM,CAAC;CAClB;AACD,YAAY,EAAE,eAAe,EAAE,CAAC;AAEhC,MAAM,CAAC,OAAO,OAAO,cAAe,SAAQ,UAAU;IACpD,eAAe,EAAE,YAAY,CAAC;IAC9B,gBAAgB,EAAE,YAAY,CAAC;IAE/B,iBAAiB,EAAE,aAAa,CAAC;IACjC,gBAAgB,EAAE,aAAa,CAAC;IAEhC,QAAQ,SAAQ;IAEhB,SAAS,CAAC,MAAM,EAAE,KAAK,CAAC,GAAG,CAAC,GAAG,IAAI,CAAQ;IAC3C,SAAS,CAAC,SAAS,EAAE,MAAM,CAAO;gBAEtB,WAAW,EAAE,eAAe,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,WAAW;IAgC3E,IAAI,IAAI,eAAe;IAWvB,MAAM,IAAI,IAAI;IAEd,QAAQ;IAOR,IAAI;IAeJ,iBAAiB;IAqCjB,kBAAkB;CAmCnB"}
|
|
@@ -1,31 +1,30 @@
|
|
|
1
1
|
import PComponent from "../PComponent";
|
|
2
|
-
import { PInAction, POutAction } from "../PAction";
|
|
3
2
|
import { Easing, Tween } from "@tweenjs/tween.js";
|
|
4
3
|
export default class PFadeAnimation extends PComponent {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
inport_fadeInOn;
|
|
5
|
+
inport_fadeOutOn;
|
|
6
|
+
outport_onFadeOut;
|
|
7
|
+
outport_onFadeIn;
|
|
9
8
|
duration = 1000;
|
|
10
9
|
_tween = null;
|
|
11
10
|
_maxValue = 1.0;
|
|
12
11
|
constructor(dbComponent, node, context) {
|
|
13
|
-
super(dbComponent, "
|
|
12
|
+
super(dbComponent, "Fade Animation", node, context);
|
|
14
13
|
this.requireTransform = true;
|
|
15
|
-
this.
|
|
16
|
-
this.
|
|
17
|
-
this.
|
|
18
|
-
this.
|
|
14
|
+
this.inport_fadeInOn = this.registerInPort(1, "Fade In", dbComponent.inport_fadeInOn, this.callback_onFadeIn);
|
|
15
|
+
this.inport_fadeOutOn = this.registerInPort(2, "Fade Out", dbComponent.inport_fadeOutOn, this.callback_onFadeOut);
|
|
16
|
+
this.outport_onFadeOut = this.registerOutPort(3, "On Fade Out", dbComponent.outport_onFadeOut);
|
|
17
|
+
this.outport_onFadeIn = this.registerOutPort(4, "On Fade In", dbComponent.outport_onFadeIn);
|
|
19
18
|
this.duration = dbComponent.duration;
|
|
20
19
|
}
|
|
21
20
|
toDB() {
|
|
22
21
|
return {
|
|
23
22
|
...super.toDB(),
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
inport_fadeInOn: this.inport_fadeInOn.toDB(),
|
|
24
|
+
inport_fadeOutOn: this.inport_fadeOutOn.toDB(),
|
|
26
25
|
duration: this.duration,
|
|
27
|
-
|
|
28
|
-
|
|
26
|
+
outport_onFadeOut: this.outport_onFadeOut.toDB(),
|
|
27
|
+
outport_onFadeIn: this.outport_onFadeIn.toDB(),
|
|
29
28
|
};
|
|
30
29
|
}
|
|
31
30
|
render() { }
|
|
@@ -74,7 +73,7 @@ export default class PFadeAnimation extends PComponent {
|
|
|
74
73
|
})
|
|
75
74
|
.onComplete(() => {
|
|
76
75
|
this._tween = null;
|
|
77
|
-
this.
|
|
76
|
+
this.outport_onFadeIn?.emit(null);
|
|
78
77
|
})
|
|
79
78
|
.start();
|
|
80
79
|
this.context.addTween(this._tween);
|
|
@@ -104,7 +103,7 @@ export default class PFadeAnimation extends PComponent {
|
|
|
104
103
|
.onComplete(() => {
|
|
105
104
|
this._tween = null;
|
|
106
105
|
this.node.setVisible(false);
|
|
107
|
-
this.
|
|
106
|
+
this.outport_onFadeOut?.emit(null);
|
|
108
107
|
})
|
|
109
108
|
.start();
|
|
110
109
|
this.context.addTween(this._tween);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PFadeAnimation.js","sourceRoot":"","sources":["../../src/pcomponents/PFadeAnimation.ts"],"names":[],"mappings":"AAAA,OAAO,UAA2B,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"PFadeAnimation.js","sourceRoot":"","sources":["../../src/pcomponents/PFadeAnimation.ts"],"names":[],"mappings":"AAAA,OAAO,UAA2B,MAAM,eAAe,CAAC;AAGxD,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAgBlD,MAAM,CAAC,OAAO,OAAO,cAAe,SAAQ,UAAU;IACpD,eAAe,CAAe;IAC9B,gBAAgB,CAAe;IAE/B,iBAAiB,CAAgB;IACjC,gBAAgB,CAAgB;IAEhC,QAAQ,GAAG,IAAI,CAAC;IAEN,MAAM,GAAsB,IAAI,CAAC;IACjC,SAAS,GAAW,GAAG,CAAC;IAElC,YAAY,WAA4B,EAAE,IAAW,EAAE,OAAoB;QACzE,KAAK,CAAC,WAAW,EAA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Q,CAAC;aAChC,QAAQ,CAAC,CAAC,KAAK,EAAE,EAAE;YAClB,QAAQ,CAAC,UAAU,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QACrC,CAAC,CAAC;aACD,UAAU,CAAC,GAAG,EAAE;YACf,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC;YACnB,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;YAC5B,IAAI,CAAC,iBAAiB,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;QACrC,CAAC,CAAC;aACD,KAAK,EAAE,CAAC;QACX,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACrC,CAAC;CACF"}
|
package/dist/pcomponents/PHud.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import PComponent from "../PComponent";
|
|
2
2
|
export default class PHud extends PComponent {
|
|
3
3
|
constructor(dbComponent, node, context) {
|
|
4
|
-
super(dbComponent, "
|
|
4
|
+
super(dbComponent, "Hud", node, context);
|
|
5
5
|
this.requireTransform = true;
|
|
6
6
|
}
|
|
7
7
|
render() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PHud.js","sourceRoot":"","sources":["../../src/pcomponents/PHud.ts"],"names":[],"mappings":"AAEA,OAAO,UAA2B,MAAM,eAAe,CAAC;AAMxD,MAAM,CAAC,OAAO,OAAO,IAAK,SAAQ,UAAU;IAC1C,YAAY,WAAkB,EAAE,IAAW,EAAE,OAAoB;QAC/D,KAAK,CAAC,WAAW,EAAE,
|
|
1
|
+
{"version":3,"file":"PHud.js","sourceRoot":"","sources":["../../src/pcomponents/PHud.ts"],"names":[],"mappings":"AAEA,OAAO,UAA2B,MAAM,eAAe,CAAC;AAMxD,MAAM,CAAC,OAAO,OAAO,IAAK,SAAQ,UAAU;IAC1C,YAAY,WAAkB,EAAE,IAAW,EAAE,OAAoB;QAC/D,KAAK,CAAC,WAAW,EAAE,KAAK,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;QAEzC,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC;IAC/B,CAAC;IAED,MAAM;QACJ,IAAI,CAAC,OAAO,CAAC,eAAe,EAAE,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACxD,CAAC;IAED,QAAQ,KAAU,CAAC;CACpB"}
|
|
@@ -1,18 +1,16 @@
|
|
|
1
1
|
import GameContext from "../GameContext";
|
|
2
2
|
import PNode from "../PNode";
|
|
3
3
|
import PComponent, { DBComponent } from "../PComponent";
|
|
4
|
-
import
|
|
4
|
+
import PFileSlot from "../PFileSlot";
|
|
5
5
|
interface DBImageCache extends DBComponent {
|
|
6
|
-
files_textures: (string | null)[] | null;
|
|
7
6
|
size: number;
|
|
8
7
|
}
|
|
9
8
|
export type { DBImageCache };
|
|
10
9
|
export default abstract class PImageCache extends PComponent {
|
|
11
10
|
size: number;
|
|
12
|
-
files_textures:
|
|
11
|
+
files_textures: PFileSlot[];
|
|
13
12
|
constructor(dbComponent: DBImageCache, node: PNode, context: GameContext);
|
|
14
13
|
toDB(): DBImageCache;
|
|
15
|
-
dispose(): void;
|
|
16
14
|
editor_setFile(_index: number, _file: string | null): void;
|
|
17
15
|
}
|
|
18
16
|
//# sourceMappingURL=PImageCache.d.ts.map
|