Plasma Engine  2.0
Loading...
Searching...
No Matches
plTypeScriptBinding Class Reference

Classes

struct  ConsoleFuncBinding
 
struct  ConsoleFuncBinding2
 
struct  FunctionBinding
 
struct  PropertyBinding
 
struct  TsComponentInfo
 
struct  TsMessageHandler
 

Public Types

using TsComponentTypeInfo = plMap<plUuid, TsComponentInfo>::ConstIterator
 

Static Public Member Functions

Math
static void PushVec2 (duk_context *pDuk, const plVec2 &value)
 
static void SetVec2 (duk_context *pDuk, plInt32 iObjIdx, const plVec2 &value)
 
static void SetVec2Property (duk_context *pDuk, const char *szPropertyName, plInt32 iObjIdx, const plVec2 &value)
 
static plVec2 GetVec2 (duk_context *pDuk, plInt32 iObjIdx, const plVec2 &vFallback=plVec2::MakeZero())
 
static plVec2 GetVec2Property (duk_context *pDuk, const char *szPropertyName, plInt32 iObjIdx, const plVec2 &vFallback=plVec2::MakeZero())
 
static void PushVec3 (duk_context *pDuk, const plVec3 &value)
 
static void SetVec3 (duk_context *pDuk, plInt32 iObjIdx, const plVec3 &value)
 
static void SetVec3Property (duk_context *pDuk, const char *szPropertyName, plInt32 iObjIdx, const plVec3 &value)
 
static plVec3 GetVec3 (duk_context *pDuk, plInt32 iObjIdx, const plVec3 &vFallback=plVec3::MakeZero())
 
static plVec3 GetVec3Property (duk_context *pDuk, const char *szPropertyName, plInt32 iObjIdx, const plVec3 &vFallback=plVec3::MakeZero())
 
static void PushMat3 (duk_context *pDuk, const plMat3 &value)
 
static void SetMat3 (duk_context *pDuk, plInt32 iObjIdx, const plMat3 &value)
 
static void SetMat3Property (duk_context *pDuk, const char *szPropertyName, plInt32 iObjIdx, const plMat3 &value)
 
static plMat3 GetMat3 (duk_context *pDuk, plInt32 iObjIdx, const plMat3 &mFallback=plMat3::MakeIdentity())
 
static plMat3 GetMat3Property (duk_context *pDuk, const char *szPropertyName, plInt32 iObjIdx, const plMat3 &mFallback=plMat3::MakeIdentity())
 
static void PushMat4 (duk_context *pDuk, const plMat4 &value)
 
static void SetMat4 (duk_context *pDuk, plInt32 iObjIdx, const plMat4 &value)
 
static void SetMat4Property (duk_context *pDuk, const char *szPropertyName, plInt32 iObjIdx, const plMat4 &value)
 
static plMat4 GetMat4 (duk_context *pDuk, plInt32 iObjIdx, const plMat4 &mFallback=plMat4::MakeIdentity())
 
static plMat4 GetMat4Property (duk_context *pDuk, const char *szPropertyName, plInt32 iObjIdx, const plMat4 &mFallback=plMat4::MakeIdentity())
 
static void PushQuat (duk_context *pDuk, const plQuat &value)
 
static void SetQuat (duk_context *pDuk, plInt32 iObjIdx, const plQuat &value)
 
static void SetQuatProperty (duk_context *pDuk, const char *szPropertyName, plInt32 iObjIdx, const plQuat &value)
 
static plQuat GetQuat (duk_context *pDuk, plInt32 iObjIdx, plQuat qFallback=plQuat::MakeIdentity())
 
static plQuat GetQuatProperty (duk_context *pDuk, const char *szPropertyName, plInt32 iObjIdx, plQuat qFallback=plQuat::MakeIdentity())
 
static void PushColor (duk_context *pDuk, const plColor &value)
 
static void SetColor (duk_context *pDuk, plInt32 iObjIdx, const plColor &value)
 
static void SetColorProperty (duk_context *pDuk, const char *szPropertyName, plInt32 iObjIdx, const plColor &value)
 
static plColor GetColor (duk_context *pDuk, plInt32 iObjIdx, const plColor &fallback=plColor::White)
 
static plColor GetColorProperty (duk_context *pDuk, const char *szPropertyName, plInt32 iObjIdx, const plColor &fallback=plColor::White)
 
static void PushTransform (duk_context *pDuk, const plTransform &value)
 
static void SetTransform (duk_context *pDuk, plInt32 iObjIdx, const plTransform &value)
 
static void SetTransformProperty (duk_context *pDuk, const char *szPropertyName, plInt32 iObjIdx, const plTransform &value)
 
static plTransform GetTransform (duk_context *pDuk, plInt32 iObjIdx, const plTransform &fallback=plTransform::MakeIdentity())
 
static plTransform GetTransformProperty (duk_context *pDuk, const char *szPropertyName, plInt32 iObjIdx, const plTransform &fallback=plTransform::MakeIdentity())
 
static void PushVariant (duk_context *pDuk, const plVariant &value)
 
static void SetVariantProperty (duk_context *pDuk, const char *szPropertyName, plInt32 iObjIdx, const plVariant &value)
 
static plVariant GetVariant (duk_context *pDuk, plInt32 iObjIdx, const plRTTI *pType)
 
static plVariant GetVariantProperty (duk_context *pDuk, const char *szPropertyName, plInt32 iObjIdx, const plRTTI *pType)
 

Basics

plResult Initialize (plWorld &ref_world)
 
plResult LoadComponent (const plUuid &typeGuid, TsComponentTypeInfo &out_typeInfo)
 
plResult FindScriptComponentInfo (const char *szComponentType, TsComponentTypeInfo &out_typeInfo)
 
void RegisterMessageHandlersForComponentType (const char *szComponent, const plUuid &componentType)
 
PL_ALWAYS_INLINE plDuktapeContext & GetDukTapeContext ()
 
PL_ALWAYS_INLINE duk_context * GetDukContext ()
 
void Update ()
 

Message Binding

plUniquePtr< plMessageMessageFromParameter (duk_context *pDuk, plInt32 iObjIdx, plTime delay)
 
bool HasMessageHandler (const TsComponentTypeInfo &typeInfo, const plRTTI *pMsgRtti) const
 
bool DeliverMessage (const TsComponentTypeInfo &typeInfo, plTypeScriptComponent *pComponent, plMessage &ref_msg, bool bSynchronizeAfterwards)
 
bool DeliverTsMessage (const TsComponentTypeInfo &typeInfo, plTypeScriptComponent *pComponent, const plMsgTypeScriptMsgProxy &msg)
 
static void DukPutMessage (duk_context *pDuk, const plMessage &msg)
 

plWorld

plWorldGetWorld ()
 
static plWorldRetrieveWorld (duk_context *pDuk)
 
static plTypeScriptBindingRetrieveBinding (duk_context *pDuk)
 

Debug

plMap< plString, plUniquePtr< plCVar > > m_CVars
 
plMap< plString, ConsoleFuncBindingm_ConsoleFuncs
 
void StoreConsoleFuncCall (plConsoleFunctionBase *pFunc, const plArrayPtr< plVariant > &params)
 

C++ Object Registration

bool RegisterGameObject (plGameObjectHandle hHandle, plUInt32 &out_uiStashIdx)
 
plResult RegisterComponent (plStringView sTypeName, plComponentHandle hHandle, plUInt32 &out_uiStashIdx, bool bIsNativeComponent)
 
void CleanupStash (plUInt32 uiNumIterations)
 Removes dead GameObject and Component references from the DukTape stash.
 
plUInt32 AcquireStashObjIndex ()
 
void ReleaseStashObjIndex (plUInt32 uiIdx)
 

Typescript Code Generation

static plResult SetupProjectCode ()
 

Function Binding

static const FunctionBindingFindFunctionBinding (plUInt32 uiFunctionHash)
 

Property Binding

static const PropertyBindingFindPropertyBinding (plUInt32 uiHash)
 
static void SyncPlObjectToTsObject (duk_context *pDuk, const plRTTI *pRtti, const void *pObject, plInt32 iObjIdx)
 
static void SyncTsObjectPlTsObject (duk_context *pDuk, const plRTTI *pRtti, void *pObject, plInt32 iObjIdx)
 

plGameObject

bool DukPutGameObject (const plGameObjectHandle &hObject)
 
void DukPutGameObject (const plGameObject *pObject)
 
static plGameObjectHandle RetrieveGameObjectHandle (duk_context *pDuk, plInt32 iObjIdx=0)
 
static plGameObjectExpectGameObject (duk_context *pDuk, plInt32 iObjIdx=0)
 

Components

void DukPutComponentObject (plComponent *pComponent)
 
static plComponentHandle RetrieveComponentHandle (duk_context *pDuk, plInt32 iObjIdx=0)
 
template<typename ComponentType >
static ComponentType * ExpectComponent (duk_context *pDuk, plInt32 iObjIdx=0)
 

The documentation for this class was generated from the following files: