Lines Matching refs:ctx
209 napi_value CameraJS::GetFov(NapiApi::FunctionContext<>& ctx)
223 napi_status status = napi_create_double(ctx, fov, &value);
227 void CameraJS::SetFov(NapiApi::FunctionContext<float>& ctx)
229 float fov = ctx.Arg<0>();
238 napi_value CameraJS::GetEnabled(NapiApi::FunctionContext<>& ctx)
252 napi_status status = napi_get_boolean(ctx, activ, &value);
256 void CameraJS::SetEnabled(NapiApi::FunctionContext<bool>& ctx)
258 bool activ = ctx.Arg<0>();
273 napi_value CameraJS::GetFar(NapiApi::FunctionContext<>& ctx)
287 napi_status status = napi_create_double(ctx, fov, &value);
291 void CameraJS::SetFar(NapiApi::FunctionContext<float>& ctx)
293 float fov = ctx.Arg<0>();
302 napi_value CameraJS::GetNear(NapiApi::FunctionContext<>& ctx)
316 napi_status status = napi_create_double(ctx, fov, &value);
320 void CameraJS::SetNear(NapiApi::FunctionContext<float>& ctx)
322 float fov = ctx.Arg<0>();
331 napi_value CameraJS::GetPostProcess(NapiApi::FunctionContext<>& ctx)
345 napi_value args[] = { ctx.This(), // Camera..
347 napi_value postProcJS = CreateFromNativeInstance(ctx, obj, false, BASE_NS::countof(args), args);
348 postProc_ = { ctx, postProcJS }; // take ownership of the object.
351 return ctx.GetNull();
354 void CameraJS::SetPostProcess(NapiApi::FunctionContext<NapiApi::Object>& ctx)
356 NapiApi::Object psp = ctx.Arg<0>();
375 ctx.This(), // Camera..
376 ctx.Arg<0>() // "javascript object for values"
378 psp = { GetJSConstructor(ctx, "PostProcessSettings"), BASE_NS::countof(args), args };
381 postProc_ = { ctx, psp };
435 napi_value CameraJS::GetColor(NapiApi::FunctionContext<>& ctx)
437 auto camera = interface_pointer_cast<SCENE_NS::ICamera>(GetThisNativeObject(ctx));
449 return ctx.GetNull();
453 clearColor_ = BASE_NS::make_unique<ColorProxy>(ctx, camera->ClearColor());
457 void CameraJS::SetColor(NapiApi::FunctionContext<NapiApi::Object>& ctx)
459 auto camera = interface_pointer_cast<SCENE_NS::ICamera>(GetThisNativeObject(ctx));
464 clearColor_ = BASE_NS::make_unique<ColorProxy>(ctx, camera->ClearColor());
466 NapiApi::Object obj = ctx.Arg<0>();
506 napi_value CameraJS::GetMSAA(NapiApi::FunctionContext<>& ctx)
518 napi_status status = napi_get_boolean(ctx, enabled, &value);
522 void CameraJS::SetMSAA(NapiApi::FunctionContext<bool>& ctx)
524 msaaEnabled_ = ctx.Arg<0>();