Lines Matching refs:ctx

164 napi_value BaseLight::GetlightType(NapiApi::FunctionContext<>& ctx)
167 if (auto node = interface_cast<SCENE_NS::ILight>(GetThisNativeObject(ctx))) {
171 napi_status status = napi_create_uint32(ctx, type, &value);
175 napi_value BaseLight::GetEnabled(NapiApi::FunctionContext<>& ctx)
178 auto node = interface_pointer_cast<SCENE_NS::INode>(GetThisNativeObject(ctx));
186 napi_status status = napi_get_boolean(ctx, enable, &value);
190 void BaseLight::SetEnabled(NapiApi::FunctionContext<bool>& ctx)
192 bool enabled = ctx.Arg<0>();
193 auto node = interface_pointer_cast<SCENE_NS::INode>(GetThisNativeObject(ctx));
202 napi_value BaseLight::GetColor(NapiApi::FunctionContext<>& ctx)
204 auto node = interface_pointer_cast<SCENE_NS::ILight>(GetThisNativeObject(ctx));
209 colorProxy_ = BASE_NS::make_unique<ColorProxy>(ctx, node->Color());
213 void BaseLight::SetColor(NapiApi::FunctionContext<Object>& ctx)
215 auto node = interface_pointer_cast<SCENE_NS::ILight>(GetThisNativeObject(ctx));
219 NapiApi::Object obj = ctx.Arg<0>();
221 colorProxy_ = BASE_NS::make_unique<ColorProxy>(ctx, node->Color());
226 napi_value BaseLight::GetShadowEnabled(NapiApi::FunctionContext<>& ctx)
229 auto node = interface_pointer_cast<SCENE_NS::ILight>(GetThisNativeObject(ctx));
237 napi_status status = napi_get_boolean(ctx, enable, &value);
240 void BaseLight::SetShadowEnabled(NapiApi::FunctionContext<bool>& ctx)
242 bool enabled = ctx.Arg<0>();
243 auto node = interface_pointer_cast<SCENE_NS::ILight>(GetThisNativeObject(ctx));
252 napi_value BaseLight::GetIntensity(NapiApi::FunctionContext<>& ctx)
255 auto node = interface_pointer_cast<SCENE_NS::ILight>(GetThisNativeObject(ctx));
263 napi_status status = napi_create_double(ctx, intensity, &value);
266 void BaseLight::SetIntensity(NapiApi::FunctionContext<float>& ctx)
268 float intensity = ctx.Arg<0>();
269 auto node = interface_pointer_cast<SCENE_NS::ILight>(GetThisNativeObject(ctx));
370 napi_value DirectionalLightJS::GetNear(NapiApi::FunctionContext<>& ctx)
384 napi_status status = napi_create_double(ctx, fov, &value);
388 void DirectionalLightJS::SetNear(NapiApi::FunctionContext<float>& ctx)
390 float fov = ctx.Arg<0>();