Lines Matching refs:obj
30 JSWrapperState(NapiApi::Object obj, BASE_NS::string_view name);
71 JSWrapperState::JSWrapperState(NapiApi::Object obj, BASE_NS::string_view name)
75 env_ = obj.GetEnv();
77 napi_create_reference(env_, obj, 0, &ref_);
116 ExecSyncTask([obj = BASE_NS::move(obj_)]() { return META_NS::IAny::Ptr {}; });
130 NapiApi::Object obj(GetJSConstructor(env, jsName), argc, argv);
131 if (!obj) {
134 auto oo = GetRootObject(env, obj);
136 return obj;
138 bool IsInstanceOf(const NapiApi::Object& obj, const BASE_NS::string_view jsName)
140 auto env = obj.GetEnv();
143 auto status = napi_instanceof(env, obj, cl, &result);
147 NapiApi::Object FetchJsObj(const META_NS::IObject::Ptr& obj)
152 if (auto AppMeta = interface_pointer_cast<IMetadata>(obj)) {
160 NapiApi::Object StoreJsObj(const META_NS::IObject::Ptr& obj, NapiApi::Object jsobj)
163 if (auto AppMeta = interface_pointer_cast<IMetadata>(obj)) {
165 auto res = BASE_NS::shared_ptr<JSWrapperState>(new JSWrapperState(jsobj, obj->GetClassName()));
208 napi_env env, const META_NS::IObject::Ptr& obj, bool strong, uint32_t argc, napi_value* argv)
212 if (obj == nullptr) {
216 NapiApi::Object nodeJS = FetchJsObj(obj);
222 BASE_NS::string name { obj->GetClassName() };
232 SCENE_NS::IMaterial* mat = interface_cast<SCENE_NS::IMaterial>(obj);
245 if (interface_cast<SCENE_NS::INode>(obj)->GetMesh()) {
252 MakeNativeObjectParam(env, obj, argc, argv);
254 nodeJS = CreateJsObj(env, name, obj, strong, argc, argv);
260 return StoreJsObj(obj, nodeJS);