@p100-web/core 100.2.1 → 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/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/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 +202 -0
- package/dist/GameContext.d.ts.map +1 -0
- package/dist/GameContext.js +694 -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/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/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/IPMaterial.d.ts +12 -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 +25 -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/PCanvas.d.ts +171 -0
- package/dist/PCanvas.d.ts.map +1 -0
- package/dist/PCanvas.js +648 -0
- package/dist/PCanvas.js.map +1 -0
- package/dist/PComponent.d.ts +73 -0
- package/dist/PComponent.d.ts.map +1 -0
- package/dist/PComponent.js +152 -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 +145 -0
- package/dist/PEnums.js.map +1 -0
- package/dist/PEvent.d.ts +21 -0
- package/dist/PEvent.d.ts.map +1 -0
- package/dist/PEvent.js +35 -0
- package/dist/PEvent.js.map +1 -0
- 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 +116 -0
- package/dist/PNode.d.ts.map +1 -0
- package/dist/PNode.js +458 -0
- package/dist/PNode.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/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 +50 -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 +28 -0
- package/dist/PVariable.d.ts.map +1 -0
- package/dist/PVariable.js +49 -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 +19 -0
- package/dist/PVector3.d.ts.map +1 -0
- package/dist/PVector3.js +44 -0
- package/dist/PVector3.js.map +1 -0
- package/dist/animations/AnimationTools.d.ts +3 -0
- package/dist/animations/AnimationTools.d.ts.map +1 -0
- package/dist/animations/AnimationTools.js +12 -0
- package/dist/animations/AnimationTools.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 +153 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +107 -0
- package/dist/index.js.map +1 -0
- 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 +13 -0
- package/dist/media/PFile.d.ts.map +1 -0
- package/dist/media/PFile.js +34 -0
- package/dist/media/PFile.js.map +1 -0
- package/dist/pcomponents/BaseMaterial.d.ts +49 -0
- package/dist/pcomponents/BaseMaterial.d.ts.map +1 -0
- package/dist/pcomponents/BaseMaterial.js +59 -0
- package/dist/pcomponents/BaseMaterial.js.map +1 -0
- package/dist/pcomponents/PAnimator.d.ts +42 -0
- package/dist/pcomponents/PAnimator.d.ts.map +1 -0
- package/dist/pcomponents/PAnimator.js +51 -0
- package/dist/pcomponents/PAnimator.js.map +1 -0
- package/dist/pcomponents/PBackground.d.ts +37 -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 +22 -0
- package/dist/pcomponents/PBasicMaterial.d.ts.map +1 -0
- package/dist/pcomponents/PBasicMaterial.js +30 -0
- package/dist/pcomponents/PBasicMaterial.js.map +1 -0
- package/dist/pcomponents/PCallAction.d.ts +24 -0
- package/dist/pcomponents/PCallAction.d.ts.map +1 -0
- package/dist/pcomponents/PCallAction.js +35 -0
- package/dist/pcomponents/PCallAction.js.map +1 -0
- package/dist/pcomponents/PCameraPosition.d.ts +33 -0
- package/dist/pcomponents/PCameraPosition.d.ts.map +1 -0
- package/dist/pcomponents/PCameraPosition.js +83 -0
- package/dist/pcomponents/PCameraPosition.js.map +1 -0
- package/dist/pcomponents/PCameraTarget.d.ts +33 -0
- package/dist/pcomponents/PCameraTarget.d.ts.map +1 -0
- package/dist/pcomponents/PCameraTarget.js +84 -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 +57 -0
- package/dist/pcomponents/PCollider.js.map +1 -0
- 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 +30 -0
- package/dist/pcomponents/PControllerInput.d.ts.map +1 -0
- package/dist/pcomponents/PControllerInput.js +38 -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 +21 -0
- package/dist/pcomponents/PDebug.d.ts.map +1 -0
- package/dist/pcomponents/PDebug.js +30 -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 +31 -0
- package/dist/pcomponents/PFadeAnimation.d.ts.map +1 -0
- package/dist/pcomponents/PFadeAnimation.js +112 -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 +16 -0
- package/dist/pcomponents/PImageCache.d.ts.map +1 -0
- package/dist/pcomponents/PImageCache.js +30 -0
- package/dist/pcomponents/PImageCache.js.map +1 -0
- package/dist/pcomponents/PImageDetector.d.ts +26 -0
- package/dist/pcomponents/PImageDetector.d.ts.map +1 -0
- package/dist/pcomponents/PImageDetector.js +32 -0
- package/dist/pcomponents/PImageDetector.js.map +1 -0
- package/dist/pcomponents/PInteger.d.ts +41 -0
- package/dist/pcomponents/PInteger.d.ts.map +1 -0
- package/dist/pcomponents/PInteger.js +73 -0
- package/dist/pcomponents/PInteger.js.map +1 -0
- package/dist/pcomponents/PIntegerAnimator.d.ts +37 -0
- package/dist/pcomponents/PIntegerAnimator.d.ts.map +1 -0
- package/dist/pcomponents/PIntegerAnimator.js +104 -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 +19 -0
- package/dist/pcomponents/PMaskedMaterial.d.ts.map +1 -0
- package/dist/pcomponents/PMaskedMaterial.js +28 -0
- package/dist/pcomponents/PMaskedMaterial.js.map +1 -0
- package/dist/pcomponents/PMaterialModifier.d.ts +38 -0
- package/dist/pcomponents/PMaterialModifier.d.ts.map +1 -0
- package/dist/pcomponents/PMaterialModifier.js +67 -0
- package/dist/pcomponents/PMaterialModifier.js.map +1 -0
- package/dist/pcomponents/PModelAnnotation.d.ts +47 -0
- package/dist/pcomponents/PModelAnnotation.d.ts.map +1 -0
- package/dist/pcomponents/PModelAnnotation.js +118 -0
- package/dist/pcomponents/PModelAnnotation.js.map +1 -0
- package/dist/pcomponents/PModelAnnotations.d.ts +46 -0
- package/dist/pcomponents/PModelAnnotations.d.ts.map +1 -0
- package/dist/pcomponents/PModelAnnotations.js +127 -0
- package/dist/pcomponents/PModelAnnotations.js.map +1 -0
- package/dist/pcomponents/PModelGLTF.d.ts +34 -0
- package/dist/pcomponents/PModelGLTF.d.ts.map +1 -0
- package/dist/pcomponents/PModelGLTF.js +55 -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 +64 -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 +80 -0
- package/dist/pcomponents/PMoveToAnimation.js.map +1 -0
- package/dist/pcomponents/PNumberAnimator.d.ts +41 -0
- package/dist/pcomponents/PNumberAnimator.d.ts.map +1 -0
- package/dist/pcomponents/PNumberAnimator.js +102 -0
- package/dist/pcomponents/PNumberAnimator.js.map +1 -0
- package/dist/pcomponents/PPhysicalMaterial.d.ts +28 -0
- package/dist/pcomponents/PPhysicalMaterial.d.ts.map +1 -0
- package/dist/pcomponents/PPhysicalMaterial.js +34 -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 +24 -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 +42 -0
- package/dist/pcomponents/PProjectRoot.d.ts.map +1 -0
- package/dist/pcomponents/PProjectRoot.js +93 -0
- package/dist/pcomponents/PProjectRoot.js.map +1 -0
- package/dist/pcomponents/PRotateAnimation.d.ts +33 -0
- package/dist/pcomponents/PRotateAnimation.d.ts.map +1 -0
- package/dist/pcomponents/PRotateAnimation.js +80 -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 +81 -0
- package/dist/pcomponents/PScaleAnimation.js.map +1 -0
- package/dist/pcomponents/PSceneContainer.d.ts +23 -0
- package/dist/pcomponents/PSceneContainer.d.ts.map +1 -0
- package/dist/pcomponents/PSceneContainer.js +46 -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 +20 -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 +38 -0
- package/dist/pcomponents/PSlider.js.map +1 -0
- package/dist/pcomponents/PSound.d.ts +33 -0
- package/dist/pcomponents/PSound.d.ts.map +1 -0
- package/dist/pcomponents/PSound.js +39 -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 +17 -0
- package/dist/pcomponents/PSprite.d.ts.map +1 -0
- package/dist/pcomponents/PSprite.js +21 -0
- package/dist/pcomponents/PSprite.js.map +1 -0
- package/dist/pcomponents/PSpriteSheet.d.ts +28 -0
- package/dist/pcomponents/PSpriteSheet.d.ts.map +1 -0
- package/dist/pcomponents/PSpriteSheet.js +41 -0
- package/dist/pcomponents/PSpriteSheet.js.map +1 -0
- package/dist/pcomponents/PText.d.ts +34 -0
- package/dist/pcomponents/PText.d.ts.map +1 -0
- package/dist/pcomponents/PText.js +43 -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 +43 -0
- package/dist/pcomponents/PVarList.d.ts.map +1 -0
- package/dist/pcomponents/PVarList.js +87 -0
- package/dist/pcomponents/PVarList.js.map +1 -0
- package/dist/pcomponents/PVideoPlayer.d.ts +36 -0
- package/dist/pcomponents/PVideoPlayer.d.ts.map +1 -0
- package/dist/pcomponents/PVideoPlayer.js +93 -0
- package/dist/pcomponents/PVideoPlayer.js.map +1 -0
- package/dist/pcomponents/PVisibility.d.ts +38 -0
- package/dist/pcomponents/PVisibility.d.ts.map +1 -0
- package/dist/pcomponents/PVisibility.js +68 -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 +43 -0
- package/dist/pcomponents/PXRTools.js.map +1 -0
- 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/dist/settings/ICameraSettings.d.ts +16 -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 +45 -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,35 @@
|
|
|
1
|
+
import PComponent from "../PComponent";
|
|
2
|
+
import { DataType } from "../PEnums";
|
|
3
|
+
export default class PCallAction extends PComponent {
|
|
4
|
+
dataType;
|
|
5
|
+
inport_on;
|
|
6
|
+
outport_do;
|
|
7
|
+
constructor(dbComponent, node, context) {
|
|
8
|
+
super(dbComponent, "Single Action", node, context);
|
|
9
|
+
this.dataType = dbComponent.dataType || DataType.None;
|
|
10
|
+
this.inport_on = this.registerInPort(1, "Trigger", dbComponent.inport_on, this.callback_onTrigger, this.dataType);
|
|
11
|
+
this.outport_do = this.registerOutPort(2, "On Triggered", dbComponent.outport_do, this.dataType);
|
|
12
|
+
}
|
|
13
|
+
toDB() {
|
|
14
|
+
return {
|
|
15
|
+
...super.toDB(),
|
|
16
|
+
dataType: this.dataType,
|
|
17
|
+
inport_on: this.inport_on.toDB(),
|
|
18
|
+
outport_do: this.outport_do.toDB(),
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
callback_onTrigger(_payloadValue) {
|
|
22
|
+
// this.outport_do?.emit(null);
|
|
23
|
+
this.outport_do.emit(null);
|
|
24
|
+
}
|
|
25
|
+
render() { }
|
|
26
|
+
unrender() { }
|
|
27
|
+
editor_onDataTypeChange(field, value) {
|
|
28
|
+
if (field === "dataType") {
|
|
29
|
+
this.dataType = value;
|
|
30
|
+
this.inport_on.dataType = value;
|
|
31
|
+
this.outport_do.dataType = value;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=PCallAction.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PCallAction.js","sourceRoot":"","sources":["../../src/pcomponents/PCallAction.ts"],"names":[],"mappings":"AAAA,OAAO,UAA2B,MAAM,eAAe,CAAC;AAOxD,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAWrC,MAAM,CAAC,OAAO,OAAO,WAAY,SAAQ,UAAU;IACjD,QAAQ,CAAW;IAEnB,SAAS,CAAe;IACxB,UAAU,CAAgB;IAE1B,YAAY,WAAyB,EAAE,IAAW,EAAE,OAAoB;QACtE,KAAK,CAAC,WAAW,EAAE,eAAe,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;QAEnD,IAAI,CAAC,QAAQ,GAAG,WAAW,CAAC,QAAQ,IAAI,QAAQ,CAAC,IAAI,CAAC;QAEtD,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,cAAc,CAClC,CAAC,EACD,SAAS,EACT,WAAW,CAAC,SAAS,EACrB,IAAI,CAAC,kBAAkB,EACvB,IAAI,CAAC,QAAQ,CACd,CAAC;QAEF,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,eAAe,CACpC,CAAC,EACD,cAAc,EACd,WAAW,CAAC,UAAU,EACtB,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;YAChC,UAAU,EAAE,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE;SACnC,CAAC;IACJ,CAAC;IAED,kBAAkB,CAAC,aAA4B;QAC7C,+BAA+B;QAC/B,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC7B,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,SAAS,CAAC,QAAQ,GAAG,KAAK,CAAC;YAChC,IAAI,CAAC,UAAU,CAAC,QAAQ,GAAG,KAAK,CAAC;QACnC,CAAC;IACH,CAAC;CACF"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import GameContext from "../GameContext";
|
|
2
|
+
import PNode from "../PNode";
|
|
3
|
+
import PComponent, { DBComponent } from "../PComponent";
|
|
4
|
+
import { Tween } from "@tweenjs/tween.js";
|
|
5
|
+
import { Curves } from "../PEnums";
|
|
6
|
+
import PInEventPort, { DBInPort } from "../ports/PInEventPort";
|
|
7
|
+
import POutEventPort, { DBOutPort } from "../ports/POutEventPort";
|
|
8
|
+
interface DBCameraPosition extends DBComponent {
|
|
9
|
+
inport_jump?: DBInPort;
|
|
10
|
+
inport_animate?: DBInPort;
|
|
11
|
+
outport_onAnimated?: DBOutPort;
|
|
12
|
+
outport_onJumped?: DBOutPort;
|
|
13
|
+
duration: number;
|
|
14
|
+
curve: Curves;
|
|
15
|
+
}
|
|
16
|
+
export type { DBCameraPosition };
|
|
17
|
+
export default class PCameraPosition extends PComponent {
|
|
18
|
+
inport_jump: PInEventPort;
|
|
19
|
+
inport_animate: PInEventPort;
|
|
20
|
+
outport_onAnimated: POutEventPort;
|
|
21
|
+
outport_onJumped: POutEventPort;
|
|
22
|
+
duration: number;
|
|
23
|
+
curve: Curves;
|
|
24
|
+
protected _tween: Tween<any> | null;
|
|
25
|
+
constructor(dbComponent: DBCameraPosition, node: PNode, context: GameContext);
|
|
26
|
+
toDB(): DBCameraPosition;
|
|
27
|
+
render(): void;
|
|
28
|
+
unrender(): void;
|
|
29
|
+
callback_onJump(): void;
|
|
30
|
+
callback_onAnimate(): void;
|
|
31
|
+
onComplete: () => void;
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=PCameraPosition.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PCameraPosition.d.ts","sourceRoot":"","sources":["../../src/pcomponents/PCameraPosition.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;AACxD,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAG1C,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAEnC,OAAO,YAAY,EAAE,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC/D,OAAO,aAAa,EAAE,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAElE,UAAU,gBAAiB,SAAQ,WAAW;IAC5C,WAAW,CAAC,EAAE,QAAQ,CAAC;IACvB,cAAc,CAAC,EAAE,QAAQ,CAAC;IAC1B,kBAAkB,CAAC,EAAE,SAAS,CAAC;IAC/B,gBAAgB,CAAC,EAAE,SAAS,CAAC;IAE7B,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,YAAY,EAAE,gBAAgB,EAAE,CAAC;AAEjC,MAAM,CAAC,OAAO,OAAO,eAAgB,SAAQ,UAAU;IACrD,WAAW,EAAE,YAAY,CAAC;IAC1B,cAAc,EAAE,YAAY,CAAC;IAE7B,kBAAkB,EAAE,aAAa,CAAC;IAClC,gBAAgB,EAAE,aAAa,CAAC;IAEhC,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IAEd,SAAS,CAAC,MAAM,EAAE,KAAK,CAAC,GAAG,CAAC,GAAG,IAAI,CAAQ;gBAGzC,WAAW,EAAE,gBAAgB,EAC7B,IAAI,EAAE,KAAK,EACX,OAAO,EAAE,WAAW;IAkCtB,IAAI,IAAI,gBAAgB;IAcxB,MAAM,IAAI,IAAI;IAEd,QAAQ;IAOR,eAAe;IAQf,kBAAkB;IAoClB,UAAU,aAIR;CACH"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import PComponent from "../PComponent";
|
|
2
|
+
import { Tween } from "@tweenjs/tween.js";
|
|
3
|
+
import PVector3 from "../PVector3";
|
|
4
|
+
import { getEasingFunction } from "../animations/AnimationTools";
|
|
5
|
+
import { Curves } from "../PEnums";
|
|
6
|
+
export default class PCameraPosition extends PComponent {
|
|
7
|
+
inport_jump;
|
|
8
|
+
inport_animate;
|
|
9
|
+
outport_onAnimated;
|
|
10
|
+
outport_onJumped;
|
|
11
|
+
duration;
|
|
12
|
+
curve;
|
|
13
|
+
_tween = null;
|
|
14
|
+
constructor(dbComponent, node, context) {
|
|
15
|
+
super(dbComponent, "Camera Position", node, context);
|
|
16
|
+
this.requireTransform = true;
|
|
17
|
+
this.inport_jump = this.registerInPort(1, "Jump", dbComponent.inport_jump, this.callback_onJump);
|
|
18
|
+
this.inport_animate = this.registerInPort(2, "Animate", dbComponent.inport_animate, this.callback_onAnimate);
|
|
19
|
+
this.outport_onAnimated = this.registerOutPort(3, "On Animated", dbComponent.outport_onAnimated);
|
|
20
|
+
this.outport_onJumped = this.registerOutPort(4, "On Jumped", dbComponent.outport_onJumped);
|
|
21
|
+
this.duration = dbComponent.duration;
|
|
22
|
+
this.curve = dbComponent.curve || Curves.Linear;
|
|
23
|
+
}
|
|
24
|
+
toDB() {
|
|
25
|
+
return {
|
|
26
|
+
...super.toDB(),
|
|
27
|
+
inport_jump: this.inport_jump.toDB(),
|
|
28
|
+
inport_animate: this.inport_animate.toDB(),
|
|
29
|
+
outport_onAnimated: this.outport_onAnimated.toDB(),
|
|
30
|
+
outport_onJumped: this.outport_onJumped.toDB(),
|
|
31
|
+
duration: this.duration,
|
|
32
|
+
curve: this.curve,
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
render() { }
|
|
36
|
+
unrender() {
|
|
37
|
+
if (this._tween !== null) {
|
|
38
|
+
this._tween.stop();
|
|
39
|
+
this._tween = null;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
callback_onJump() {
|
|
43
|
+
const transform = this.node.findComponent("PTransform");
|
|
44
|
+
const controls = this.context.getCameraControls();
|
|
45
|
+
controls?.setPosition(transform.position);
|
|
46
|
+
controls?.lookAtTarget();
|
|
47
|
+
this.outport_onJumped?.emit(null);
|
|
48
|
+
}
|
|
49
|
+
callback_onAnimate() {
|
|
50
|
+
if (this._tween !== null) {
|
|
51
|
+
this._tween.stop();
|
|
52
|
+
}
|
|
53
|
+
// Turn off controls
|
|
54
|
+
this.context.disableInput();
|
|
55
|
+
const controls = this.context.getCameraControls();
|
|
56
|
+
const currentPosition = controls.getPosition();
|
|
57
|
+
const from = {
|
|
58
|
+
position: new PVector3(currentPosition),
|
|
59
|
+
};
|
|
60
|
+
const position = this.context
|
|
61
|
+
.getNodeRenderer()
|
|
62
|
+
.getPositionVector(this.node);
|
|
63
|
+
const to = {
|
|
64
|
+
position: new PVector3(position),
|
|
65
|
+
};
|
|
66
|
+
this._tween = new Tween(from)
|
|
67
|
+
.to(to, this.duration)
|
|
68
|
+
.onUpdate((value) => {
|
|
69
|
+
controls.setPosition(value.position);
|
|
70
|
+
controls.lookAtTarget();
|
|
71
|
+
})
|
|
72
|
+
.easing(getEasingFunction(this.curve))
|
|
73
|
+
.onComplete(this.onComplete)
|
|
74
|
+
.start();
|
|
75
|
+
this.context.addTween(this._tween);
|
|
76
|
+
}
|
|
77
|
+
onComplete = () => {
|
|
78
|
+
this._tween = null;
|
|
79
|
+
this.context.enableInput();
|
|
80
|
+
this.outport_onAnimated?.emit(null);
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
//# sourceMappingURL=PCameraPosition.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PCameraPosition.js","sourceRoot":"","sources":["../../src/pcomponents/PCameraPosition.ts"],"names":[],"mappings":"AAEA,OAAO,UAA2B,MAAM,eAAe,CAAC;AACxD,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,QAAQ,MAAM,aAAa,CAAC;AACnC,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAiBnC,MAAM,CAAC,OAAO,OAAO,eAAgB,SAAQ,UAAU;IACrD,WAAW,CAAe;IAC1B,cAAc,CAAe;IAE7B,kBAAkB,CAAgB;IAClC,gBAAgB,CAAgB;IAEhC,QAAQ,CAAS;IACjB,KAAK,CAAS;IAEJ,MAAM,GAAsB,IAAI,CAAC;IAE3C,YACE,WAA6B,EAC7B,IAAW,EACX,OAAoB;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CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;YACrC,QAAQ,CAAC,YAAY,EAAE,CAAC;QAC1B,CAAC,CAAC;aACD,MAAM,CAAC,iBAAiB,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;aACrC,UAAU,CAAC,IAAI,CAAC,UAAU,CAAC;aAC3B,KAAK,EAAE,CAAC;QAEX,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACrC,CAAC;IAED,UAAU,GAAG,GAAG,EAAE;QAChB,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC;QACnB,IAAI,CAAC,OAAO,CAAC,WAAW,EAAE,CAAC;QAC3B,IAAI,CAAC,kBAAkB,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;IACtC,CAAC,CAAC;CACH"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import GameContext from "../GameContext";
|
|
2
|
+
import PNode from "../PNode";
|
|
3
|
+
import PComponent, { DBComponent } from "../PComponent";
|
|
4
|
+
import { Tween } from "@tweenjs/tween.js";
|
|
5
|
+
import { Curves } from "../PEnums";
|
|
6
|
+
import PInEventPort, { DBInPort } from "../ports/PInEventPort";
|
|
7
|
+
import POutEventPort, { DBOutPort } from "../ports/POutEventPort";
|
|
8
|
+
interface DBCameraTarget extends DBComponent {
|
|
9
|
+
inport_jump?: DBInPort;
|
|
10
|
+
inport_animate?: DBInPort;
|
|
11
|
+
outport_onAnimated?: DBOutPort;
|
|
12
|
+
outport_onJumped?: DBOutPort;
|
|
13
|
+
duration: number;
|
|
14
|
+
curve: Curves;
|
|
15
|
+
}
|
|
16
|
+
export type { DBCameraTarget };
|
|
17
|
+
export default class PCameraTarget extends PComponent {
|
|
18
|
+
inport_jump: PInEventPort;
|
|
19
|
+
inport_animate: PInEventPort;
|
|
20
|
+
outport_onAnimated: POutEventPort;
|
|
21
|
+
outport_onJumped: POutEventPort;
|
|
22
|
+
duration: number;
|
|
23
|
+
curve: Curves;
|
|
24
|
+
protected _tween: Tween<any> | null;
|
|
25
|
+
constructor(dbComponent: DBCameraTarget, node: PNode, context: GameContext);
|
|
26
|
+
toDB(): DBCameraTarget;
|
|
27
|
+
render(): void;
|
|
28
|
+
unrender(): void;
|
|
29
|
+
callback_onJump(): void;
|
|
30
|
+
callback_onAnimate(): void;
|
|
31
|
+
onComplete: () => void;
|
|
32
|
+
}
|
|
33
|
+
//# 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,UAAU,EAAE,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACxD,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAG1C,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAEnC,OAAO,YAAY,EAAE,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC/D,OAAO,aAAa,EAAE,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAElE,UAAU,cAAe,SAAQ,WAAW;IAC1C,WAAW,CAAC,EAAE,QAAQ,CAAC;IACvB,cAAc,CAAC,EAAE,QAAQ,CAAC;IAE1B,kBAAkB,CAAC,EAAE,SAAS,CAAC;IAC/B,gBAAgB,CAAC,EAAE,SAAS,CAAC;IAE7B,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,YAAY,EAAE,cAAc,EAAE,CAAC;AAE/B,MAAM,CAAC,OAAO,OAAO,aAAc,SAAQ,UAAU;IACnD,WAAW,EAAE,YAAY,CAAC;IAC1B,cAAc,EAAE,YAAY,CAAC;IAE7B,kBAAkB,EAAE,aAAa,CAAC;IAClC,gBAAgB,EAAE,aAAa,CAAC;IAEhC,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IAEd,SAAS,CAAC,MAAM,EAAE,KAAK,CAAC,GAAG,CAAC,GAAG,IAAI,CAAQ;gBAE/B,WAAW,EAAE,cAAc,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,WAAW;IAiC1E,IAAI,IAAI,cAAc;IActB,MAAM,IAAI,IAAI;IAEd,QAAQ;IAOR,eAAe;IAYf,kBAAkB;IAmClB,UAAU,aAIR;CACH"}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import PComponent from "../PComponent";
|
|
2
|
+
import { Tween } from "@tweenjs/tween.js";
|
|
3
|
+
import PVector3 from "../PVector3";
|
|
4
|
+
import { getEasingFunction } from "../animations/AnimationTools";
|
|
5
|
+
import { Curves } from "../PEnums";
|
|
6
|
+
export default class PCameraTarget extends PComponent {
|
|
7
|
+
inport_jump;
|
|
8
|
+
inport_animate;
|
|
9
|
+
outport_onAnimated;
|
|
10
|
+
outport_onJumped;
|
|
11
|
+
duration;
|
|
12
|
+
curve;
|
|
13
|
+
_tween = null;
|
|
14
|
+
constructor(dbComponent, node, context) {
|
|
15
|
+
super(dbComponent, "Camera Target", node, context);
|
|
16
|
+
this.requireTransform = true;
|
|
17
|
+
this.inport_jump = this.registerInPort(1, "Jump", dbComponent.inport_jump, this.callback_onJump);
|
|
18
|
+
this.inport_animate = this.registerInPort(2, "Animate", dbComponent.inport_animate, this.callback_onAnimate);
|
|
19
|
+
this.outport_onAnimated = this.registerOutPort(3, "On Animated", dbComponent.outport_onAnimated);
|
|
20
|
+
this.outport_onJumped = this.registerOutPort(4, "On Jumped", dbComponent.outport_onJumped);
|
|
21
|
+
this.duration = dbComponent.duration;
|
|
22
|
+
this.curve = dbComponent.curve || Curves.Linear;
|
|
23
|
+
}
|
|
24
|
+
toDB() {
|
|
25
|
+
return {
|
|
26
|
+
...super.toDB(),
|
|
27
|
+
inport_jump: this.inport_jump.toDB(),
|
|
28
|
+
inport_animate: this.inport_animate.toDB(),
|
|
29
|
+
outport_onAnimated: this.outport_onAnimated.toDB(),
|
|
30
|
+
outport_onJumped: this.outport_onJumped.toDB(),
|
|
31
|
+
duration: this.duration,
|
|
32
|
+
curve: this.curve,
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
render() { }
|
|
36
|
+
unrender() {
|
|
37
|
+
if (this._tween !== null) {
|
|
38
|
+
this._tween.stop();
|
|
39
|
+
this._tween = null;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
callback_onJump() {
|
|
43
|
+
const controls = this.context.getCameraControls();
|
|
44
|
+
const worldPosition = this.context
|
|
45
|
+
.getNodeRenderer()
|
|
46
|
+
.getWorldPosition(this.node);
|
|
47
|
+
controls?.setTarget(worldPosition);
|
|
48
|
+
controls?.lookAtTarget();
|
|
49
|
+
this.outport_onJumped?.emit(null);
|
|
50
|
+
}
|
|
51
|
+
callback_onAnimate() {
|
|
52
|
+
if (this._tween !== null) {
|
|
53
|
+
this._tween.stop();
|
|
54
|
+
}
|
|
55
|
+
// Turn off controls
|
|
56
|
+
this.context.disableInput();
|
|
57
|
+
const controls = this.context.getCameraControls();
|
|
58
|
+
const from = {
|
|
59
|
+
position: new PVector3(controls.getTarget()),
|
|
60
|
+
};
|
|
61
|
+
const worldPosition = this.context
|
|
62
|
+
.getNodeRenderer()
|
|
63
|
+
.getWorldPosition(this.node);
|
|
64
|
+
const to = {
|
|
65
|
+
position: new PVector3(worldPosition),
|
|
66
|
+
};
|
|
67
|
+
this._tween = new Tween(from)
|
|
68
|
+
.to(to, this.duration)
|
|
69
|
+
.onUpdate((value) => {
|
|
70
|
+
controls.setTarget(value.position);
|
|
71
|
+
controls.lookAtTarget();
|
|
72
|
+
})
|
|
73
|
+
.easing(getEasingFunction(this.curve))
|
|
74
|
+
.onComplete(this.onComplete)
|
|
75
|
+
.start();
|
|
76
|
+
this.context.addTween(this._tween);
|
|
77
|
+
}
|
|
78
|
+
onComplete = () => {
|
|
79
|
+
this._tween = null;
|
|
80
|
+
this.context.enableInput();
|
|
81
|
+
this.outport_onAnimated?.emit(null);
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
//# sourceMappingURL=PCameraTarget.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PCameraTarget.js","sourceRoot":"","sources":["../../src/pcomponents/PCameraTarget.ts"],"names":[],"mappings":"AAEA,OAAO,UAA2B,MAAM,eAAe,CAAC;AACxD,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,QAAQ,MAAM,aAAa,CAAC;AACnC,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAkBnC,MAAM,CAAC,OAAO,OAAO,aAAc,SAAQ,UAAU;IACnD,WAAW,CAAe;IAC1B,cAAc,CAAe;IAE7B,kBAAkB,CAAgB;IAClC,gBAAgB,CAAgB;IAEhC,QAAQ,CAAS;IACjB,KAAK,CAAS;IAEJ,MAAM,GAAsB,IAAI,CAAC;IAE3C,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,WAAW,GAAG,IAAI,CAAC,cAAc,CACpC,CAAC,EACD,MAAM,EACN,WAAW,CAAC,WAAW,EACvB,IAAI,CAAC,eAAe,CACrB,CAAC;QACF,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,cAAc,CACvC,CAAC,EACD,SAAS,EACT,WAAW,CAAC,cAAc,EAC1B,IAAI,CAAC,kBAAkB,CACxB,CAAC;QAEF,IAAI,CAAC,kBAAkB,GAAG,IAAI,CAAC,eAAe,CAC5C,CAAC,EACD,aAAa,EACb,WAAW,CAAC,k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tC,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 { IColliderComponent } from "../PTypes";
|
|
5
|
+
import GameContext from "../GameContext";
|
|
6
|
+
import POutEventPort, { DBOutPort } from "../ports/POutEventPort";
|
|
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
|
+
outport_onHoverEnter?: DBOutPort;
|
|
15
|
+
outport_onHoverExit?: DBOutPort;
|
|
16
|
+
outport_onClick?: DBOutPort;
|
|
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
|
+
outport_onHoverEnter: POutEventPort;
|
|
27
|
+
outport_onHoverExit: POutEventPort;
|
|
28
|
+
outport_onClick: POutEventPort;
|
|
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 @@
|
|
|
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,IAAI,IAAI,UAAU;IAgBlB,QAAQ,CAAC,iBAAiB,IAAI,IAAI;IAClC,QAAQ,CAAC,oBAAoB,IAAI,IAAI;IACrC,QAAQ,CAAC,IAAI,IAAI,IAAI;IACrB,QAAQ,CAAC,IAAI,IAAI,IAAI;IAMrB,mBAAmB,aAEjB;IAEF,kBAAkB,aAEhB;IAEF,cAAc,aAEZ;CACH"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import PComponent from "../PComponent";
|
|
2
|
+
import PVector3 from "../PVector3";
|
|
3
|
+
import { DataType } from "../PEnums";
|
|
4
|
+
export default class PCollider extends PComponent {
|
|
5
|
+
sphere;
|
|
6
|
+
box;
|
|
7
|
+
center;
|
|
8
|
+
sphere_radius;
|
|
9
|
+
box_size;
|
|
10
|
+
editor_showColliders = false;
|
|
11
|
+
outport_onHoverEnter;
|
|
12
|
+
outport_onHoverExit;
|
|
13
|
+
outport_onClick;
|
|
14
|
+
// el: any;
|
|
15
|
+
hidden = true;
|
|
16
|
+
constructor(dbComponent, node, context) {
|
|
17
|
+
super(dbComponent, "Collider", node, context);
|
|
18
|
+
this.requireTransform = true;
|
|
19
|
+
this.sphere = dbComponent.sphere;
|
|
20
|
+
this.box = dbComponent.box;
|
|
21
|
+
this.center = new PVector3(dbComponent.center);
|
|
22
|
+
this.sphere_radius = dbComponent.sphere_radius;
|
|
23
|
+
this.box_size = new PVector3(dbComponent.box_size);
|
|
24
|
+
this.editor_showColliders = dbComponent.editor_showColliders;
|
|
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);
|
|
28
|
+
this.node.collider = this;
|
|
29
|
+
}
|
|
30
|
+
toDB() {
|
|
31
|
+
return {
|
|
32
|
+
...super.toDB(),
|
|
33
|
+
sphere: this.sphere,
|
|
34
|
+
box: this.box,
|
|
35
|
+
center: this.center,
|
|
36
|
+
sphere_radius: this.sphere_radius,
|
|
37
|
+
box_size: this.box_size,
|
|
38
|
+
editor_showColliders: this.editor_showColliders,
|
|
39
|
+
outport_onHoverEnter: this.outport_onHoverEnter.toDB(),
|
|
40
|
+
outport_onHoverExit: this.outport_onHoverExit.toDB(),
|
|
41
|
+
outport_onClick: this.outport_onClick.toDB(),
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
//
|
|
45
|
+
// EVENTS
|
|
46
|
+
//
|
|
47
|
+
native_onHoverEnter = () => {
|
|
48
|
+
this.outport_onHoverEnter?.emit(this.node.pid.toString());
|
|
49
|
+
};
|
|
50
|
+
native_onHoverExit = () => {
|
|
51
|
+
this.outport_onHoverExit?.emit(this.node.pid.toString());
|
|
52
|
+
};
|
|
53
|
+
native_onClick = () => {
|
|
54
|
+
this.outport_onClick?.emit(this.node.pid.toString());
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
//# 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,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,WAAu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,CAAC,QAAQ;YACvB,oBAAoB,EAAE,IAAI,CAAC,oBAAoB;YAE/C,oBAAoB,EAAE,IAAI,CAAC,oBAAoB,CAAC,IAAI,EAAE;YACtD,mBAAmB,EAAE,IAAI,CAAC,mBAAmB,CAAC,IAAI,EAAE;YACpD,eAAe,EAAE,IAAI,CAAC,eAAe,CAAC,IAAI,EAAE;SAC7C,CAAC;IACJ,CAAC;IAOD,EAAE;IACF,SAAS;IACT,EAAE;IAEF,mBAAmB,GAAG,GAAG,EAAE;QACzB,IAAI,CAAC,oBAAoB,EAAE,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC,CAAC;IAC5D,CAAC,CAAC;IAEF,kBAAkB,GAAG,GAAG,EAAE;QACxB,IAAI,CAAC,mBAAmB,EAAE,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC,CAAC;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":"PCompare.d.ts","sourceRoot":"","sources":["../../src/pcomponents/PCompare.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAErC,OAAO,UAAU,EAAE,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACxD,OAAO,WAAW,MAAM,gBAAgB,CAAC;AACzC,OAAO,KAAK,MAAM,UAAU,CAAC;AAE7B,OAAO,YAAY,EAAE,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC/D,OAAO,aAAa,EAAE,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAElE,OAAO,YAAY,MAAM,uBAAuB,CAAC;AAEjD,UAAU,SAAU,SAAQ,WAAW;IACrC,cAAc,CAAC,EAAE,QAAQ,CAAC;IAC1B,iBAAiB,CAAC,EAAE,SAAS,CAAC;IAC9B,cAAc,CAAC,EAAE,SAAS,CAAC;IAC3B,eAAe,CAAC,EAAE,SAAS,CAAC;IAC5B,UAAU,EAAE,OAAO,CAAC;IACpB,QAAQ,EAAE,QAAQ,CAAC;CACpB;AAED,OAAO,EAAE,KAAK,SAAS,EAAE,CAAC;AAE1B,MAAM,CAAC,OAAO,OAAO,QAAS,SAAQ,UAAU;IAC9C,cAAc,EAAE,YAAY,CAAC;IAC7B,iBAAiB,EAAE,aAAa,CAAC;IACjC,cAAc,EAAE,aAAa,CAAC;IAC9B,eAAe,EAAE,aAAa,CAAC;IAE/B,iBAAiB,EAAE,YAAY,CAAC;IAEhC,UAAU,EAAE,OAAO,CAAC;IACpB,QAAQ,EAAE,QAAQ,CAAC;gBAEP,WAAW,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,WAAW;IAyCrE,IAAI,IAAI,SAAS;IAcjB,gBAAgB,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;IAgCvC,MAAM,IAAI,IAAI;IAEd,QAAQ,IAAI,IAAI;IAEhB,uBAAuB,CAAC,KAAK,EAAE,MAAM,EAAE,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;IAC9B,eAAe,CAAgB;IAE/B,iBAAiB,CAAe;IAEhC,UAAU,CAAU;IACpB,QAAQ,CAAW;IAEnB,YAAY,WAAsB,EAAE,IAAW,EAAE,OAAoB;QACnE,KAAK,CAAC,WAAW,EAAE,SAAS,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;QAE7C,IAAI,CAAC,UAAU,GAAG,WAAW,CAAC,UAAU,IAAI,KAAK,CAAC;QAElD,IAAI,CAAC,QAAQ,GAAG,WAAW,CAAC,QAAQ,IAAI,QAAQ,CAAC,MAAM,CAAC;QAExD,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,cAAc,CACvC,CAAC,EACD,SAAS,EACT,WAAW,CAAC,cAAc,EAC1B,IAAI,CAAC,gBAAgB,EACrB,IAAI,CAAC,QAAQ,CACd,CAAC;QAEF,IAAI,CAAC,iBAAiB,GAAG,IAAI,CAAC,mBAAmB,CAC/C,CAAC,EACD,YAAY,EACZ,QAAQ,CAAC,OAAO,CACjB,CAAC;QAEF,IAAI,CAAC,iBAAiB,GAAG,IAAI,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C;gBACrB,MAAM,GAAG,QAAQ,CAAC,OAAO,CAAC,KAAK,YAAY,CAAC;YAC9C,CAAC;iBAAM,CAAC;gBACN,cAAc;gBACd,MAAM,UAAU,GAAG,QAAQ,CAAC,OAAO,CAAC,CAAC;gBACrC,MAAM,GAAG,CAAC,UAAU,GAAG,YAAY,CAAC,GAAG,CAAC,CAAC;YAC3C,CAAC;QACH,CAAC;aAAM,CAAC;YACN,MAAM,GAAG,OAAO,KAAK,eAAe,CAAC;QACvC,CAAC;QAED,IAAI,CAAC,iBAAiB,EAAE,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC;QAE3D,IAAI,MAAM,EAAE,CAAC;YACX,IAAI,CAAC,cAAc,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;QAClC,CAAC;aAAM,CAAC;YACN,IAAI,CAAC,eAAe,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;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"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import GameContext from "../GameContext";
|
|
2
|
+
import PNode from "../PNode";
|
|
3
|
+
import PComponent, { DBComponent } from "../PComponent";
|
|
4
|
+
import POutEventPort, { DBOutPort } from "../ports/POutEventPort";
|
|
5
|
+
interface DBControllerInput extends DBComponent {
|
|
6
|
+
outport_buttonA?: DBOutPort;
|
|
7
|
+
outport_buttonB?: DBOutPort;
|
|
8
|
+
outport_buttonX?: DBOutPort;
|
|
9
|
+
outport_buttonY?: DBOutPort;
|
|
10
|
+
holdDurationA: number;
|
|
11
|
+
holdDurationB: number;
|
|
12
|
+
holdDurationX: number;
|
|
13
|
+
holdDurationY: number;
|
|
14
|
+
}
|
|
15
|
+
export type { DBControllerInput };
|
|
16
|
+
export default class PControllerInput extends PComponent {
|
|
17
|
+
outport_buttonA: POutEventPort;
|
|
18
|
+
outport_buttonB: POutEventPort;
|
|
19
|
+
outport_buttonX: POutEventPort;
|
|
20
|
+
outport_buttonY: POutEventPort;
|
|
21
|
+
holdDurationA: number;
|
|
22
|
+
holdDurationB: number;
|
|
23
|
+
holdDurationX: number;
|
|
24
|
+
holdDurationY: number;
|
|
25
|
+
constructor(dbComponent: DBControllerInput, node: PNode, context: GameContext);
|
|
26
|
+
toDB(): DBControllerInput;
|
|
27
|
+
render(): void;
|
|
28
|
+
unrender(): void;
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=PControllerInput.d.ts.map
|
|
@@ -0,0 +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,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"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import PComponent from "../PComponent";
|
|
2
|
+
export default class PControllerInput extends PComponent {
|
|
3
|
+
outport_buttonA;
|
|
4
|
+
outport_buttonB;
|
|
5
|
+
outport_buttonX;
|
|
6
|
+
outport_buttonY;
|
|
7
|
+
holdDurationA;
|
|
8
|
+
holdDurationB;
|
|
9
|
+
holdDurationX;
|
|
10
|
+
holdDurationY;
|
|
11
|
+
constructor(dbComponent, node, context) {
|
|
12
|
+
super(dbComponent, "Controller Input", node, context);
|
|
13
|
+
this.holdDurationA = dbComponent.holdDurationA;
|
|
14
|
+
this.holdDurationB = dbComponent.holdDurationB;
|
|
15
|
+
this.holdDurationX = dbComponent.holdDurationX;
|
|
16
|
+
this.holdDurationY = dbComponent.holdDurationY;
|
|
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);
|
|
21
|
+
}
|
|
22
|
+
toDB() {
|
|
23
|
+
return {
|
|
24
|
+
...super.toDB(),
|
|
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(),
|
|
29
|
+
holdDurationA: this.holdDurationA,
|
|
30
|
+
holdDurationB: this.holdDurationB,
|
|
31
|
+
holdDurationX: this.holdDurationX,
|
|
32
|
+
holdDurationY: this.holdDurationY,
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
render() { }
|
|
36
|
+
unrender() { }
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=PControllerInput.js.map
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import GameContext from "../GameContext";
|
|
2
|
+
import PNode from "../PNode";
|
|
3
|
+
import PComponent, { DBComponent } from "../PComponent";
|
|
4
|
+
import PVector3, { IVector3 } from "../PVector3";
|
|
5
|
+
interface DBCubeGeometry extends DBComponent {
|
|
6
|
+
size: IVector3;
|
|
7
|
+
castShadow: boolean;
|
|
8
|
+
receiveShadow: boolean;
|
|
9
|
+
}
|
|
10
|
+
export type { DBCubeGeometry };
|
|
11
|
+
export default abstract class PCubeGeometry extends PComponent {
|
|
12
|
+
size: PVector3;
|
|
13
|
+
castShadow: boolean;
|
|
14
|
+
receiveShadow: boolean;
|
|
15
|
+
constructor(dbComponent: DBCubeGeometry, node: PNode, context: GameContext);
|
|
16
|
+
toDB(): DBCubeGeometry;
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=PCubeGeometry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PCubeGeometry.d.ts","sourceRoot":"","sources":["../../src/pcomponents/PCubeGeometry.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;AACxD,OAAO,QAAQ,EAAE,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAEjD,UAAU,cAAe,SAAQ,WAAW;IAC1C,IAAI,EAAE,QAAQ,CAAC;IACf,UAAU,EAAE,OAAO,CAAC;IACpB,aAAa,EAAE,OAAO,CAAC;CACxB;AAED,YAAY,EAAE,cAAc,EAAE,CAAC;AAE/B,MAAM,CAAC,OAAO,CAAC,QAAQ,OAAO,aAAc,SAAQ,UAAU;IAC5D,IAAI,EAAE,QAAQ,CAAC;IACf,UAAU,EAAE,OAAO,CAAC;IACpB,aAAa,EAAE,OAAO,CAAC;gBAEX,WAAW,EAAE,cAAc,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,WAAW;IAW1E,IAAI,IAAI,cAAc;CAQvB"}
|