Форум

Сообщения, созданные пользователем ДЕНИС
11 августа 2016 14:54
Ответ на сообщение пользователя Семенцов Роман
Можно сказать и так, только на этапе загрузки подготавливаются данные для рендеринга. Т.е. фактически сам рендеринг начинается по завершению загрузки

ранее была тема что у меня в этом проекте рендеринг принудительно ограничен 1 к\с соотв. у меня была проблема с
прелоадером который грузился бесконечно долго из за этого.. и сделан небольшой обход , на этапе прелоадера 60к\с потом перекл на 1к\с .. кроме того я вроде как использую паузу далее .. а как все-же седалть так что б пауза во время начала работать и к.с не сбились?
Денис
11 августа 2016 12:20
Ответ на сообщение пользователя Семенцов Роман
Добрый день.

Извиняюсь за запоздалый ответ, проглядел

Передайте параметр pause_invisible : false в функцию app.init

После этого, когда вы переключаете вкладку сцена будет активничать. Если вы хотите, чтобы сцена не активничала после того как вы загрузили её и переключили вкладку, то сделайте дополнительно следующее действие:

в load_cb к примеру вызовите вот эту функцию:

function handle_page_visibility() {

    var was_paused = m_main.is_paused();

    var visibility_change = function() {
        if (document.hidden) {
            was_paused = m_main.is_paused();
            m_main.pause();
        } else if (!was_paused)
            m_main.resume();
    }
    document.addEventListener("visibilitychange", visibility_change, false);
}


не совсем понятно.. про то что можно вначале до первого рендера сцены
сделать без паузы ясно, а вот как определить прохождение первого рендера?
как я понял прелоадер исполняется в том же цикле как и рендер т.е. каждый кадр прелоадера по факту рендер уже,
верно?
Денис
11 августа 2016 12:14
Ответ на сообщение пользователя Иван Любовников
а если resume закомментировать, что будет происходить? frame уже должен отрисовать новый кадр, даже, если движок на паузе

нет ни чего не меняется.
я пошел дальше, отключил автопаузу с инициализации, и создал поуслових ХАЙД установку на паузу. соответсвенно по сокрытию и открытию должно точно сраюатывать , проверил в циклы попадает команды исполняются.
но результат тот же.
все-же похоже что системная функция паузы приложения срабатывает раньше чем успевает сработать наша и так же системная функция отпускает приложение раньше или позже чем наша..


вот лог системный
до 08-11 10:59:41.080 "watch_core_time_tick" это значит отсчет секунд идет
08-11 10:59:41.745 потом закрываю экран, часы уходят в паузу
потом внтурненние сообщения в режиме раузы системные
08-11 10:59:51.570 - часы пошли после снтия с паузы



08-11 10:59:39.065 : INFO / CAPI_WATCH_APPLICATION ( 24769 : 24769 ) : watch_app_main.c: _watch_core_time_tick(306) > _watch_core_time_tick
08-11 10:59:40.080 : INFO / CAPI_WATCH_APPLICATION ( 24769 : 24769 ) : watch_app_main.c: _watch_core_time_tick(306) > _watch_core_time_tick
08-11 10:59:41.080 : INFO / CAPI_WATCH_APPLICATION ( 24769 : 24769 ) : watch_app_main.c: _watch_core_time_tick(306) > _watch_core_time_tick
08-11 10:59:41.745 : WARN / STARTER ( 870 : 870 ) : clock-mgr.c: _on_lcd_signal_receive_cb(1626) > [_on_lcd_signal_receive_cb:1626] _on_lcd_signal_receive_cb, 1626, Pre LCD off by [palm]
08-11 10:59:41.745 : WARN / STARTER ( 870 : 870 ) : clock-mgr.c: _pre_lcd_off(1404) > [_pre_lcd_off:1404] Will LCD OFF as wake_up_setting[1]
08-11 10:59:41.750 : ERROR / STARTER ( 870 : 870 ) : scontext_util.c: scontext_util_handle_lock_state(64) > [scontext_util_handle_lock_state:64] wear state[0],bPossible [0]
08-11 10:59:41.755 : WARN / STARTER ( 870 : 870 ) : clock-mgr.c: _check_reserved_popup_status(324) > [_check_reserved_popup_status:324] Current reserved apps status : 0
08-11 10:59:41.755 : WARN / STARTER ( 870 : 870 ) : clock-mgr.c: _check_reserved_apps_status(360) > [_check_reserved_apps_status:360] Current reserved apps status : 0
08-11 10:59:41.755 : WARN / W_HOME ( 921 : 921 ) : dbus.c: _dbus_message_recv_cb(204) > LCD off
08-11 10:59:41.755 : WARN / W_HOME ( 921 : 921 ) : gesture.c: _manual_render_disable_timer_del(151) > timer del
08-11 10:59:41.755 : WARN / W_HOME ( 921 : 921 ) : gesture.c: _manual_render_enable(133) > 1
08-11 10:59:41.755 : WARN / W_HOME ( 921 : 921 ) : event_manager.c: _lcd_off_cb(699) > lcd state: 0
08-11 10:59:41.755 : WARN / W_HOME ( 921 : 921 ) : event_manager.c: _state_control(194) > control:4, app_state:1 win_state:0(1) pm_state:0 home_visible:1 clock_visible:1 tutorial_state:0 editing : 0, home_clocklist:0, addviewer:0 scrolling : 0, powersaving : 0, apptray state : 1, apptray visibility : 0, apptray edit visibility : 0
08-11 10:59:41.755 : WARN / WAKEUP-SERVICE ( 1059 : 1059 ) : WakeupService.cpp: OnReceiveDisplayChanged(977) > INFO: LCDOff receive data : 1074989836
08-11 10:59:41.760 : WARN / WAKEUP-SERVICE ( 1059 : 1059 ) : WakeupService.cpp: OnReceiveDisplayChanged(978) > INFO: WakeupServiceStop
08-11 10:59:41.760 : WARN / WAKEUP-SERVICE ( 1059 : 1059 ) : WakeupService.cpp: WakeupServiceStop(406) > INFO: SEAMLESS WAKEUP STOP REQUEST
08-11 10:59:41.760 : INFO / TIZEN_N_SOUND_MANAGER ( 1059 : 1059 ) : sound_manager_product.c: sound_manager_svoice_wakeup_enable(1230) > [SVOICE] Wake up Disable start
08-11 10:59:41.775 : INFO / TIZEN_N_SOUND_MANAGER ( 1059 : 1059 ) : sound_manager_product.c: sound_manager_svoice_wakeup_enable(1233) > [SVOICE] Wake up Disable end. (ret: 0x0)
08-11 10:59:41.775 : WARN / TIZEN_N_SOUND_MANAGER ( 1059 : 1059 ) : sound_manager_private.c: __convert_sound_manager_error_code(156) > [sound_manager_svoice_wakeup_enable] ERROR_NONE (0x00000000)
08-11 10:59:41.775 : WARN / WAKEUP-SERVICE ( 1059 : 1059 ) : WakeupService.cpp: WakeupSetSeamlessValue(369) > INFO: WAKEUP SET : 0
08-11 10:59:41.775 : INFO / HIGEAR ( 1059 : 1059 ) : WakeupService.cpp: WakeupServiceStop(410) > [svoice:Application:WakeupServiceStop:IN]
08-11 10:59:41.815 : WARN / WATCH_CORE ( 24769 : 24769 ) : appcore-watch.c: __signal_lcd_status_handler(1162) > signal_lcd_status_signal: LCDOff
08-11 10:59:41.815 : INFO / WATCH_CORE ( 24769 : 24769 ) : appcore-watch.c: __signal_lcd_status_handler(1166) > Skip the background tick update
08-11 10:59:41.845 : INFO / SENSOR ( 24802 : 24802 ) : sensor_event_listener.cpp: operate_sensor(88) > 24802 process(24802)'s LIGHT_SENSOR[0] is paused
08-11 10:59:41.845 : INFO / SENSOR ( 24802 : 24802 ) : command_channel.cpp: cmd_unset_batch(542) > 24802 process(24802) send cmd_unset_batch(client_id=1, LIGHT_SENSOR)
08-11 10:59:41.850 : INFO / SHealthCommon ( 1084 : 1084 ) : SystemUtil.cpp: OnDeviceStatusChanged(832) > lcdState:3
08-11 10:59:41.850 : INFO / SHealthService ( 1084 : 1084 ) : SHealthServiceController.cpp: OnSystemUtilLcdStateChanged(591) > ###
08-11 10:59:41.850 : INFO / SENSOR ( 24802 : 24802 ) : command_channel.cpp: cmd_stop(320) > 24802 process(24802) send cmd_stop(client_id=1, LIGHT_SENSOR)
08-11 10:59:41.850 : INFO / SHealthCommon ( 1102 : 1102 ) : SystemUtil.cpp: OnDeviceStatusChanged(832) > lcdState:3
08-11 10:59:41.870 : WARN / STARTER ( 870 : 870 ) : clock-mgr.c: _on_lcd_signal_receive_cb(1637) > [_on_lcd_signal_receive_cb:1637] _on_lcd_signal_receive_cb, 1637, Post LCD off by [palm]
08-11 10:59:41.870 : WARN / STARTER ( 870 : 870 ) : clock-mgr.c: _post_lcd_off(1536) > [_post_lcd_off:1536] LCD OFF as reserved app[(null)] alpm mode[0]
08-11 10:59:41.875 : WARN / STARTER ( 870 : 870 ) : clock-mgr.c: _post_lcd_off(1543) > [_post_lcd_off:1543] Current reserved apps status : 0
08-11 10:59:41.875 : WARN / STARTER ( 870 : 870 ) : clock-mgr.c: _post_lcd_off(1561) > [_post_lcd_off:1561] raise homescreen after 20 sec. home_visible[1]
08-11 10:59:41.885 : INFO / APP_CORE ( 921 : 921 ) : appcore-efl.c: __do_app(431) > [APP 921] Event: PAUSE State: RUNNING
08-11 10:59:41.885 : INFO / CAPI_APPFW_APPLICATION ( 921 : 921 ) : app_main.c: app_appcore_pause(202) > app_appcore_pause
08-11 10:59:41.885 : WARN / W_HOME ( 921 : 921 ) : main.c: _appcore_pause_cb(693) > appcore pause
08-11 10:59:41.885 : WARN / W_HOME ( 921 : 921 ) : event_manager.c: _app_pause_cb(372) > state: 1 -> 2
08-11 10:59:41.885 : WARN / W_HOME ( 921 : 921 ) : event_manager.c: _state_control(194) > control:2, app_state:2 win_state:0(1) pm_state:0 home_visible:1 clock_visible:1 tutorial_state:0 editing : 0, home_clocklist:0, addviewer:0 scrolling : 0, powersaving : 0, apptray state : 1, apptray visibility : 0, apptray edit visibility : 0
08-11 10:59:41.885 : WARN / W_HOME ( 921 : 921 ) : event_manager.c: _state_control(194) > control:0, app_state:2 win_state:0(1) pm_state:0 home_visible:1 clock_visible:1 tutorial_state:0 editing : 0, home_clocklist:0, addviewer:0 scrolling : 0, powersaving : 0, apptray state : 1, apptray visibility : 0, apptray edit visibility : 0
08-11 10:59:41.885 : WARN / W_HOME ( 921 : 921 ) : main.c: home_pause(763) > clock/widget paused
08-11 10:59:41.885 : WARN / W_HOME ( 921 : 921 ) : event_manager.c: _state_control(194) > control:1, app_state:2 win_state:0(1) pm_state:0 home_visible:1 clock_visible:1 tutorial_state:0 editing : 0, home_clocklist:0, addviewer:0 scrolling : 0, powersaving : 0, apptray state : 1, apptray visibility : 0, apptray edit visibility : 0
08-11 10:59:41.890 : INFO / MESSAGE_PORT ( 522 : 567 ) : MessagePortIpcServer.cpp: OnReadMessage(739) > _MessagePortIpcServer::OnReadMessage
08-11 10:59:41.890 : INFO / MESSAGE_PORT ( 522 : 567 ) : MessagePortIpcServer.cpp: HandleReceivedMessage(578) > _MessagePortIpcServer::HandleReceivedMessage
08-11 10:59:41.890 : INFO / MESSAGE_PORT ( 522 : 567 ) : MessagePortStub.cpp: OnIpcRequestReceived(147) > MessagePort message received
08-11 10:59:41.890 : INFO / MESSAGE_PORT ( 522 : 567 ) : MessagePortStub.cpp: OnCheckRemotePort(115) > _MessagePortStub::OnCheckRemotePort.
08-11 10:59:41.890 : INFO / MESSAGE_PORT ( 522 : 567 ) : MessagePortService.cpp: CheckRemotePort(207) > _MessagePortService::CheckRemotePort
08-11 10:59:41.890 : INFO / MESSAGE_PORT ( 522 : 567 ) : MessagePortService.cpp: GetKey(365) > _MessagePortService::GetKey
08-11 10:59:41.890 : INFO / MESSAGE_PORT ( 522 : 567 ) : MessagePortService.cpp: CheckRemotePort(220) > Check a remote message port: [com.samsung.w-music-player.music-control-service:music-control-service-request-message-port]
08-11 10:59:41.890 : INFO / MESSAGE_PORT ( 522 : 567 ) : MessagePortIpcServer.cpp: Send(847) > _MessagePortIpcServer::Stop
08-11 10:59:41.890 : INFO / MESSAGE_PORT ( 522 : 567 ) : MessagePortIpcServer.cpp: OnReadMessage(739) > _MessagePortIpcServer::OnReadMessage
08-11 10:59:41.890 : INFO / MESSAGE_PORT ( 522 : 567 ) : MessagePortIpcServer.cpp: HandleReceivedMessage(578) > _MessagePortIpcServer::HandleReceivedMessage
08-11 10:59:41.890 : INFO / MESSAGE_PORT ( 522 : 567 ) : MessagePortStub.cpp: OnIpcRequestReceived(147) > MessagePort message received
08-11 10:59:41.890 : INFO / MESSAGE_PORT ( 522 : 567 ) : MessagePortStub.cpp: OnSendMessage(126) > MessagePort OnSendMessage
08-11 10:59:41.890 : INFO / MESSAGE_PORT ( 522 : 567 ) : MessagePortService.cpp: SendMessage(291) > _MessagePortService::SendMessage
08-11 10:59:41.890 : INFO / MESSAGE_PORT ( 522 : 567 ) : MessagePortService.cpp: GetKey(365) > _MessagePortService::GetKey
08-11 10:59:41.890 : INFO / MESSAGE_PORT ( 522 : 567 ) : MessagePortService.cpp: SendMessage(299) > Sends a message to a remote message port [com.samsung.w-music-player.music-control-service:music-control-service-request-message-port]
08-11 10:59:41.890 : INFO / MESSAGE_PORT ( 522 : 567 ) : MessagePortStub.cpp: SendMessage(138) > MessagePort SendMessage
08-11 10:59:41.890 : INFO / MESSAGE_PORT ( 522 : 567 ) : MessagePortIpcServer.cpp: SendResponse(884) > _MessagePortIpcServer::SendResponse
08-11 10:59:41.890 : INFO / MESSAGE_PORT ( 522 : 567 ) : MessagePortIpcServer.cpp: Send(847) > _MessagePortIpcServer::Stop
08-11 10:59:41.910 : ERROR / CAPI_APPFW_APP_CONTROL ( 1154 : 1154 ) : app_control.c: app_control_error(131) > [app_control_get_caller] INVALID_PARAMETER(0xffffffea) : invalid app_control handle type
08-11 10:59:41.910 : WARN / MUSIC_CONTROL_SERVICE ( 1154 : 1154 ) : music-control-service.c: _music_control_service_pasre_request(454) > [TID:1154] [com.samsung.w-home]register msg port [false]
08-11 10:59:41.965 : WARN / WATCH_CORE ( 24769 : 24769 ) : appcore-watch.c: __widget_pause(1033) > widget_pause
08-11 10:59:42.400 : INFO / APP_CORE ( 921 : 921 ) : appcore-efl.c: __do_app(431) > [APP 921] Event: MEM_FLUSH State: PAUSED
08-11 10:59:46.900 : INFO / APP_CORE ( 921 : 921 ) : appcore-efl.c: __do_app(431) > [APP 921] Event: MEM_FLUSH State: PAUSED
08-11 10:59:49.200 : INFO / SENSOR ( 24802 : 24802 ) : sensor_event_listener.cpp: operate_sensor(94) > 24802 process(24802)'s LIGHT_SENSOR[0] is resumed
08-11 10:59:49.200 : INFO / SENSOR ( 24802 : 24802 ) : command_channel.cpp: cmd_set_batch(507) > 24802 process(24802) send cmd_set_batch(client_id=1, LIGHT_SENSOR, interval=255000, latency = 0)
08-11 10:59:49.205 : INFO / SENSOR ( 24802 : 24802 ) : command_channel.cpp: cmd_start(285) > 24802 process(24802) send cmd_start(client_id=1, LIGHT_SENSOR)
08-11 10:59:49.310 : WARN / WATCH_CORE ( 24769 : 24769 ) : appcore-watch.c: __signal_lcd_status_handler(1162) > signal_lcd_status_signal: LCDOn
08-11 10:59:49.310 : INFO / WATCH_CORE ( 24769 : 24769 ) : appcore-watch.c: __signal_lcd_status_handler(1166) > Skip the background tick update
08-11 10:59:49.325 : WARN / wnotibp ( 1397 : 1397 ) : wnotiboard-popup-view.c: _wnotibp_event_lcd_on_cb(1420) > ::APP:: view state=0, 2, 0
08-11 10:59:49.335 : WARN / W_INDICATOR ( 938 : 938 ) : windicator_dbus.c: _windicator_dbus_lcd_changed_cb(251) > [_windicator_dbus_lcd_changed_cb:251] LCD ON signal is received
08-11 10:59:49.335 : WARN / W_INDICATOR ( 938 : 938 ) : windicator_dbus.c: _windicator_dbus_lcd_changed_cb(266) > [_windicator_dbus_lcd_changed_cb:266] 266, str=[powerkey],charge 0
08-11 10:59:49.340 : WARN / WAKEUP-SERVICE ( 1059 : 1059 ) : WakeupService.cpp: OnReceiveDisplayChanged(968) > INFO: LCDOn receive data : 1074989836
08-11 10:59:49.340 : WARN / WAKEUP-SERVICE ( 1059 : 1059 ) : WakeupService.cpp: OnReceiveDisplayChanged(969) > INFO: WakeupServiceStart
08-11 10:59:49.340 : WARN / WAKEUP-SERVICE ( 1059 : 1059 ) : WakeupService.cpp: WakeupServiceStart(376) > INFO: SEAMLESS WAKEUP START REQUEST
08-11 10:59:49.340 : INFO / TIZEN_N_SOUND_MANAGER ( 1059 : 1059 ) : sound_manager_product.c: sound_manager_svoice_set_param(1262) > [SVOICE] set param [keyword length] : 0
08-11 10:59:49.340 : WARN / W_HOME ( 921 : 921 ) : dbus.c: _dbus_message_recv_cb(186) > LCD on
08-11 10:59:49.340 : WARN / W_HOME ( 921 : 921 ) : gesture.c: _manual_render_disable_timer_set(161) > timer set
08-11 10:59:49.340 : WARN / W_HOME ( 921 : 921 ) : gesture.c: _manual_render_disable_timer_del(151) > timer del
08-11 10:59:49.345 : WARN / W_HOME ( 921 : 921 ) : gesture.c: _apps_status_get(123) > apps status:0
08-11 10:59:49.345 : WARN / W_HOME ( 921 : 921 ) : gesture.c: _lcd_on_cb(295) > move_to_clock:0 clock_visible:1 info->offtime:7401
08-11 10:59:49.345 : WARN / W_HOME ( 921 : 921 ) : gesture.c: _manual_render_schedule(211) > schedule, manual render
08-11 10:59:49.345 : WARN / W_HOME ( 921 : 921 ) : event_manager.c: _lcd_on_cb(691) > lcd state: 1
08-11 10:59:49.345 : WARN / W_HOME ( 921 : 921 ) : event_manager.c: _state_control(194) > control:4, app_state:2 win_state:0(1) pm_state:1 home_visible:1 clock_visible:1 tutorial_state:0 editing : 0, home_clocklist:0, addviewer:0 scrolling : 0, powersaving : 0, apptray state : 1, apptray visibility : 0, apptray edit visibility : 0
08-11 10:59:49.345 : WARN / STARTER ( 870 : 870 ) : clock-mgr.c: _on_lcd_signal_receive_cb(1604) > [_on_lcd_signal_receive_cb:1604] _on_lcd_signal_receive_cb, 1604, Pre LCD on by [powerkey] after screen off time [7401]ms
08-11 10:59:49.345 : WARN / STARTER ( 870 : 870 ) : clock-mgr.c: _pre_lcd_on(1324) > [_pre_lcd_on:1324] Will LCD ON as reserved app[(null)] alpm mode[0]
08-11 10:59:49.355 : WARN / TIZEN_N_SOUND_MANAGER ( 1059 : 1059 ) : sound_manager_private.c: __convert_sound_manager_error_code(156) > [sound_manager_svoice_set_param] ERROR_NONE (0x00000000)
08-11 10:59:49.360 : INFO / TIZEN_N_SOUND_MANAGER ( 1059 : 1059 ) : sound_manager_product.c: sound_manager_svoice_wakeup_enable(1230) > [SVOICE] Wake up Enable start
08-11 10:59:49.360 : INFO / APP_CORE ( 921 : 921 ) : appcore-efl.c: __do_app(431) > [APP 921] Event: RESUME State: PAUSED
08-11 10:59:49.360 : INFO / CAPI_APPFW_APPLICATION ( 921 : 921 ) : app_main.c: app_appcore_resume(223) > app_appcore_resume
08-11 10:59:49.360 : WARN / W_HOME ( 921 : 921 ) : main.c: _appcore_resume_cb(684) > appcore resume
08-11 10:59:49.360 : WARN / W_HOME ( 921 : 921 ) : event_manager.c: _app_resume_cb(355) > state: 2 -> 1
08-11 10:59:49.360 : WARN / W_HOME ( 921 : 921 ) : event_manager.c: _state_control(194) > control:2, app_state:1 win_state:0(1) pm_state:1 home_visible:1 clock_visible:1 tutorial_state:0 editing : 0, home_clocklist:0, addviewer:0 scrolling : 0, powersaving : 0, apptray state : 1, apptray visibility : 0, apptray edit visibility : 0
08-11 10:59:49.360 : WARN / W_HOME ( 921 : 921 ) : event_manager.c: _state_control(194) > control:0, app_state:1 win_state:0(1) pm_state:1 home_visible:1 clock_visible:1 tutorial_state:0 editing : 0, home_clocklist:0, addviewer:0 scrolling : 0, powersaving : 0, apptray state : 1, apptray visibility : 0, apptray edit visibility : 0
08-11 10:59:49.360 : WARN / W_HOME ( 921 : 921 ) : main.c: home_resume(732) > journal_multimedia_screen_loaded_home called
08-11 10:59:49.360 : WARN / W_HOME ( 921 : 921 ) : main.c: home_resume(736) > clock/widget resumed
08-11 10:59:49.365 : WARN / W_HOME ( 921 : 921 ) : event_manager.c: _state_control(194) > control:1, app_state:1 win_state:0(1) pm_state:1 home_visible:1 clock_visible:1 tutorial_state:0 editing : 0, home_clocklist:0, addviewer:0 scrolling : 0, powersaving : 0, apptray state : 1, apptray visibility : 0, apptray edit visibility : 0
08-11 10:59:49.375 : WARN / WATCH_CORE ( 24769 : 24769 ) : appcore-watch.c: __widget_resume(1044) > widget_resume
08-11 10:59:49.380 : INFO / CAPI_WATCH_APPLICATION ( 24769 : 24769 ) : watch_app_main.c: _watch_core_time_tick(306) > _watch_core_time_tick
08-11 10:59:49.385 : INFO / TIZEN_N_SOUND_MANAGER ( 1059 : 1059 ) : sound_manager_product.c: sound_manager_svoice_wakeup_enable(1233) > [SVOICE] Wake up Enable end. (ret: 0x0)
08-11 10:59:49.385 : WARN / TIZEN_N_SOUND_MANAGER ( 1059 : 1059 ) : sound_manager_private.c: __convert_sound_manager_error_code(156) > [sound_manager_svoice_wakeup_enable] ERROR_NONE (0x00000000)
08-11 10:59:49.385 : WARN / WAKEUP-SERVICE ( 1059 : 1059 ) : WakeupService.cpp: WakeupSetSeamlessValue(369) > INFO: WAKEUP SET : 1
08-11 10:59:49.385 : INFO / HIGEAR ( 1059 : 1059 ) : WakeupService.cpp: WakeupServiceStart(400) > [svoice:Application:WakeupServiceStart:IN]
08-11 10:59:49.460 : WARN / STARTER ( 870 : 870 ) : clock-mgr.c: _on_lcd_signal_receive_cb(1615) > [_on_lcd_signal_receive_cb:1615] _on_lcd_signal_receive_cb, 1615, Post LCD on by [powerkey]
08-11 10:59:49.460 : WARN / STARTER ( 870 : 870 ) : clock-mgr.c: _post_lcd_on(1370) > [_post_lcd_on:1370] LCD ON as reserved app[(null)] alpm mode[0]
08-11 10:59:49.520 : INFO / SHealthCommon ( 1102 : 1102 ) : SystemUtil.cpp: OnDeviceStatusChanged(832) > lcdState:1
08-11 10:59:49.545 : WARN / W_HOME ( 921 : 921 ) : gesture.c: _manual_render_disable_timer_cb(140) > timeout callback expired
08-11 10:59:49.545 : WARN / W_HOME ( 921 : 921 ) : gesture.c: _manual_render_enable(133) > 0
08-11 10:59:49.655 : INFO / SHealthCommon ( 1084 : 1084 ) : SystemUtil.cpp: OnDeviceStatusChanged(832) > lcdState:1
08-11 10:59:49.660 : INFO / SHealthService ( 1084 : 1084 ) : SHealthServiceController.cpp: OnSystemUtilLcdStateChanged(591) > ###
08-11 10:59:49.695 : ERROR / CAPI_APPFW_APPLICATION_PREFERENCE ( 1084 : 1084 ) : preference.c: _preference_check_retry_err(507) > key(test_healthy_pace), check retry err: -21/(2/No such file or directory).
08-11 10:59:49.705 : ERROR / CAPI_APPFW_APPLICATION_PREFERENCE ( 1084 : 1084 ) : preference.c: _preference_get_key(1101) > _preference_get_key(test_healthy_pace) step(-17825744) failed(2 / No such file or directory)
08-11 10:59:49.705 : ERROR / CAPI_APPFW_APPLICATION_PREFERENCE ( 1084 : 1084 ) : preference.c: preference_get_boolean(1173) > preference_get_boolean(1084) : test_healthy_pace error
08-11 10:59:49.710 : ERROR / CAPI_APPFW_APPLICATION_PREFERENCE ( 1084 : 1084 ) : preference.c: _preference_check_retry_err(507) > key(pedometer_inactive_period), check retry err: -21/(2/No such file or directory).
08-11 10:59:49.710 : ERROR / CAPI_APPFW_APPLICATION_PREFERENCE ( 1084 : 1084 ) : preference.c: _preference_get_key(1101) > _preference_get_key(pedometer_inactive_period) step(-17825744) failed(2 / No such file or directory)
08-11 10:59:49.710 : ERROR / CAPI_APPFW_APPLICATION_PREFERENCE ( 1084 : 1084 ) : preference.c: preference_get_double(1214) > preference_get_double(1084) : pedometer_inactive_period error
08-11 10:59:49.710 : ERROR / CAPI_APPFW_APPLICATION_PREFERENCE ( 1084 : 1084 ) : preference.c: _preference_check_retry_err(507) > key(inactive_10min_precaution_millisec), check retry err: -21/(2/No such file or directory).
08-11 10:59:49.710 : ERROR / CAPI_APPFW_APPLICATION_PREFERENCE ( 1084 : 1084 ) : preference.c: _preference_get_key(1101) > _preference_get_key(inactive_10min_precaution_millisec) step(-17825744) failed(2 / No such file or directory)
08-11 10:59:49.710 : ERROR / CAPI_APPFW_APPLICATION_PREFERENCE ( 1084 : 1084 ) : preference.c: preference_get_double(1214) > preference_get_double(1084) : inactive_10min_precaution_millisec error
08-11 10:59:49.715 : ERROR / CAPI_APPFW_APPLICATION_PREFERENCE ( 1084 : 1084 ) : preference.c: _preference_check_retry_err(507) > key(inactive_before_10min_precaution_millisec), check retry err: -21/(2/No such file or directory).
08-11 10:59:49.715 : ERROR / CAPI_APPFW_APPLICATION_PREFERENCE ( 1084 : 1084 ) : preference.c: _preference_get_key(1101) > _preference_get_key(inactive_before_10min_precaution_millisec) step(-17825744) failed(2 / No such file or directory)
08-11 10:59:49.715 : ERROR / CAPI_APPFW_APPLICATION_PREFERENCE ( 1084 : 1084 ) : preference.c: preference_get_double(1214) > preference_get_double(1084) : inactive_before_10min_precaution_millisec error
08-11 10:59:50.370 : INFO / MESSAGE_PORT ( 522 : 567 ) : MessagePortIpcServer.cpp: OnReadMessage(739) > _MessagePortIpcServer::OnReadMessage
08-11 10:59:50.370 : INFO / MESSAGE_PORT ( 522 : 567 ) : MessagePortIpcServer.cpp: HandleReceivedMessage(578) > _MessagePortIpcServer::HandleReceivedMessage
08-11 10:59:50.370 : INFO / MESSAGE_PORT ( 522 : 567 ) : MessagePortStub.cpp: OnIpcRequestReceived(147) > MessagePort message received
08-11 10:59:50.370 : INFO / MESSAGE_PORT ( 522 : 567 ) : MessagePortStub.cpp: OnCheckRemotePort(115) > _MessagePortStub::OnCheckRemotePort.
08-11 10:59:50.370 : INFO / MESSAGE_PORT ( 522 : 567 ) : MessagePortService.cpp: CheckRemotePort(207) > _MessagePortService::CheckRemotePort
08-11 10:59:50.370 : INFO / MESSAGE_PORT ( 522 : 567 ) : MessagePortService.cpp: GetKey(365) > _MessagePortService::GetKey
08-11 10:59:50.370 : INFO / MESSAGE_PORT ( 522 : 567 ) : MessagePortService.cpp: CheckRemotePort(220) > Check a remote message port: [com.samsung.w-music-player.music-control-service:music-control-service-request-message-port]
08-11 10:59:50.370 : INFO / MESSAGE_PORT ( 522 : 567 ) : MessagePortIpcServer.cpp: Send(847) > _MessagePortIpcServer::Stop
08-11 10:59:50.385 : INFO / MESSAGE_PORT ( 522 : 567 ) : MessagePortIpcServer.cpp: OnReadMessage(739) > _MessagePortIpcServer::OnReadMessage
08-11 10:59:50.385 : INFO / MESSAGE_PORT ( 522 : 567 ) : MessagePortIpcServer.cpp: HandleReceivedMessage(578) > _MessagePortIpcServer::HandleReceivedMessage
08-11 10:59:50.385 : INFO / MESSAGE_PORT ( 522 : 567 ) : MessagePortStub.cpp: OnIpcRequestReceived(147) > MessagePort message received
08-11 10:59:50.385 : INFO / MESSAGE_PORT ( 522 : 567 ) : MessagePortStub.cpp: OnSendMessage(126) > MessagePort OnSendMessage
08-11 10:59:50.385 : INFO / MESSAGE_PORT ( 522 : 567 ) : MessagePortService.cpp: SendMessage(291) > _MessagePortService::SendMessage
08-11 10:59:50.385 : INFO / MESSAGE_PORT ( 522 : 567 ) : MessagePortService.cpp: GetKey(365) > _MessagePortService::GetKey
08-11 10:59:50.385 : INFO / MESSAGE_PORT ( 522 : 567 ) : MessagePortService.cpp: SendMessage(299) > Sends a message to a remote message port [com.samsung.w-music-player.music-control-service:music-control-service-request-message-port]
08-11 10:59:50.385 : INFO / MESSAGE_PORT ( 522 : 567 ) : MessagePortStub.cpp: SendMessage(138) > MessagePort SendMessage
08-11 10:59:50.385 : INFO / MESSAGE_PORT ( 522 : 567 ) : MessagePortIpcServer.cpp: SendResponse(884) > _MessagePortIpcServer::SendResponse
08-11 10:59:50.385 : INFO / MESSAGE_PORT ( 522 : 567 ) : MessagePortIpcServer.cpp: Send(847) > _MessagePortIpcServer::Stop
08-11 10:59:50.450 : ERROR / CAPI_APPFW_APP_CONTROL ( 1154 : 1154 ) : app_control.c: app_control_error(131) > [app_control_get_caller] INVALID_PARAMETER(0xffffffea) : invalid app_control handle type
08-11 10:59:50.450 : WARN / MUSIC_CONTROL_SERVICE ( 1154 : 1154 ) : music-control-service.c: _music_control_service_pasre_request(454) > [TID:1154] [com.samsung.w-home]register msg port [true]
08-11 10:59:50.460 : WARN / AUL_AMD ( 533 : 533 ) : amd_request.c: __request_handler(645) > __request_handler: 14
08-11 10:59:50.490 : WARN / AUL_AMD ( 533 : 533 ) : amd_request.c: __send_result_to_client(83) > __send_result_to_client, pid: 921
08-11 10:59:50.550 : WARN / W_HOME ( 921 : 921 ) : gesture.c: _widget_updated_cb(190) > widget updated
08-11 10:59:50.555 : WARN / MUSIC_CONTROL_SERVICE ( 1154 : 1154 ) : music-control-message.c: music_control_message_send_media_changed_ind(229) > [TID:1154] [MUSIC_PLAYER_EVENT]
08-11 10:59:50.555 : WARN / W_HOME ( 921 : 921 ) : gesture.c: _manual_render_disable_timer_del(151) > timer del
08-11 10:59:50.555 : WARN / W_HOME ( 921 : 921 ) : gesture.c: _manual_render(176) >
08-11 10:59:50.605 : INFO / CAPI_WATCH_APPLICATION ( 24769 : 24769 ) : watch_app_main.c: _watch_core_time_tick(306) > _watch_core_time_tick
08-11 10:59:50.605 : WARN / W_HOME ( 921 : 921 ) : gesture.c: _manual_render(176) >
08-11 10:59:50.650 : INFO / MESSAGE_PORT ( 522 : 567 ) : MessagePortIpcServer.cpp: OnReadMessage(739) > _MessagePortIpcServer::OnReadMessage
08-11 10:59:50.650 : INFO / MESSAGE_PORT ( 522 : 567 ) : MessagePortIpcServer.cpp: HandleReceivedMessage(578) > _MessagePortIpcServer::HandleReceivedMessage
08-11 10:59:50.650 : INFO / MESSAGE_PORT ( 522 : 567 ) : MessagePortStub.cpp: OnIpcRequestReceived(147) > MessagePort message received
08-11 10:59:50.650 : INFO / MESSAGE_PORT ( 522 : 567 ) : MessagePortStub.cpp: OnCheckRemotePort(115) > _MessagePortStub::OnCheckRemotePort.
08-11 10:59:50.650 : INFO / MESSAGE_PORT ( 522 : 567 ) : MessagePortService.cpp: CheckRemotePort(207) > _MessagePortService::CheckRemotePort
08-11 10:59:50.650 : INFO / MESSAGE_PORT ( 522 : 567 ) : MessagePortService.cpp: GetKey(365) > _MessagePortService::GetKey
08-11 10:59:50.650 : INFO / MESSAGE_PORT ( 522 : 567 ) : MessagePortService.cpp: CheckRemotePort(220) > Check a remote message port: [com.samsung.w-home:music-control-service-message-port]
08-11 10:59:50.650 : INFO / MESSAGE_PORT ( 522 : 567 ) : MessagePortIpcServer.cpp: Send(847) > _MessagePortIpcServer::Stop
08-11 10:59:50.690 : WARN / W_HOME ( 921 : 921 ) : gesture.c: _manual_render_enable(133) > 0
08-11 10:59:50.710 : INFO / MESSAGE_PORT ( 522 : 567 ) : MessagePortIpcServer.cpp: OnReadMessage(739) > _MessagePortIpcServer::OnReadMessage
08-11 10:59:50.710 : INFO / MESSAGE_PORT ( 522 : 567 ) : MessagePortIpcServer.cpp: HandleReceivedMessage(578) > _MessagePortIpcServer::HandleReceivedMessage
08-11 10:59:50.710 : INFO / MESSAGE_PORT ( 522 : 567 ) : MessagePortStub.cpp: OnIpcRequestReceived(147) > MessagePort message received
08-11 10:59:50.710 : INFO / MESSAGE_PORT ( 522 : 567 ) : MessagePortStub.cpp: OnSendMessage(126) > MessagePort OnSendMessage
08-11 10:59:50.710 : INFO / MESSAGE_PORT ( 522 : 567 ) : MessagePortService.cpp: SendMessage(291) > _MessagePortService::SendMessage
08-11 10:59:50.710 : INFO / MESSAGE_PORT ( 522 : 567 ) : MessagePortService.cpp: GetKey(365) > _MessagePortService::GetKey
08-11 10:59:50.710 : INFO / MESSAGE_PORT ( 522 : 567 ) : MessagePortService.cpp: SendMessage(299) > Sends a message to a remote message port [com.samsung.w-home:music-control-service-message-port]
08-11 10:59:50.710 : INFO / MESSAGE_PORT ( 522 : 567 ) : MessagePortStub.cpp: SendMessage(138) > MessagePort SendMessage
08-11 10:59:50.710 : INFO / MESSAGE_PORT ( 522 : 567 ) : MessagePortIpcServer.cpp: SendResponse(884) > _MessagePortIpcServer::SendResponse
08-11 10:59:50.710 : INFO / MESSAGE_PORT ( 522 : 567 ) : MessagePortIpcServer.cpp: Send(847) > _MessagePortIpcServer::Stop
08-11 10:59:50.710 : WARN / W_HOME ( 921 : 921 ) : clock_shortcut.c: _music_service_messageport_cb(361) > mode:local state:paused
08-11 10:59:50.710 : ERROR / W_HOME ( 921 : 921 ) : clock_shortcut.c: _mp_state_get(104) > (s_info.music_service.state != 1) -> _mp_state_get() return
08-11 10:59:50.720 : WARN / MUSIC_CONTROL_SERVICE ( 1154 : 1154 ) : music-control-message.c: music_control_message_send_player_state_changed_ind(254) > [TID:1154] [MUSIC_PLAYER_EVENT]
08-11 10:59:50.720 : INFO / MESSAGE_PORT ( 522 : 567 ) : MessagePortIpcServer.cpp: OnReadMessage(739) > _MessagePortIpcServer::OnReadMessage
08-11 10:59:50.720 : INFO / MESSAGE_PORT ( 522 : 567 ) : MessagePortIpcServer.cpp: HandleReceivedMessage(578) > _MessagePortIpcServer::HandleReceivedMessage
08-11 10:59:50.720 : INFO / MESSAGE_PORT ( 522 : 567 ) : MessagePortStub.cpp: OnIpcRequestReceived(147) > MessagePort message received
08-11 10:59:50.720 : INFO / MESSAGE_PORT ( 522 : 567 ) : MessagePortStub.cpp: OnCheckRemotePort(115) > _MessagePortStub::OnCheckRemotePort.
08-11 10:59:50.720 : INFO / MESSAGE_PORT ( 522 : 567 ) : MessagePortService.cpp: CheckRemotePort(207) > _MessagePortService::CheckRemotePort
08-11 10:59:50.720 : INFO / MESSAGE_PORT ( 522 : 567 ) : MessagePortService.cpp: GetKey(365) > _MessagePortService::GetKey
08-11 10:59:50.720 : INFO / MESSAGE_PORT ( 522 : 567 ) : MessagePortService.cpp: CheckRemotePort(220) > Check a remote message port: [com.samsung.w-home:music-control-service-message-port]
08-11 10:59:50.720 : INFO / MESSAGE_PORT ( 522 : 567 ) : MessagePortIpcServer.cpp: Send(847) > _MessagePortIpcServer::Stop
08-11 10:59:50.725 : INFO / MESSAGE_PORT ( 522 : 567 ) : MessagePortIpcServer.cpp: OnReadMessage(739) > _MessagePortIpcServer::OnReadMessage
08-11 10:59:50.725 : INFO / MESSAGE_PORT ( 522 : 567 ) : MessagePortIpcServer.cpp: HandleReceivedMessage(578) > _MessagePortIpcServer::HandleReceivedMessage
08-11 10:59:50.725 : INFO / MESSAGE_PORT ( 522 : 567 ) : MessagePortStub.cpp: OnIpcRequestReceived(147) > MessagePort message received
08-11 10:59:50.725 : INFO / MESSAGE_PORT ( 522 : 567 ) : MessagePortStub.cpp: OnSendMessage(126) > MessagePort OnSendMessage
08-11 10:59:50.725 : INFO / MESSAGE_PORT ( 522 : 567 ) : MessagePortService.cpp: SendMessage(291) > _MessagePortService::SendMessage
08-11 10:59:50.725 : INFO / MESSAGE_PORT ( 522 : 567 ) : MessagePortService.cpp: GetKey(365) > _MessagePortService::GetKey
08-11 10:59:50.725 : INFO / MESSAGE_PORT ( 522 : 567 ) : MessagePortService.cpp: SendMessage(299) > Sends a message to a remote message port [com.samsung.w-home:music-control-service-message-port]
08-11 10:59:50.725 : INFO / MESSAGE_PORT ( 522 : 567 ) : MessagePortStub.cpp: SendMessage(138) > MessagePort SendMessage
08-11 10:59:50.725 : INFO / MESSAGE_PORT ( 522 : 567 ) : MessagePortIpcServer.cpp: SendResponse(884) > _MessagePortIpcServer::SendResponse
08-11 10:59:50.725 : INFO / MESSAGE_PORT ( 522 : 567 ) : MessagePortIpcServer.cpp: Send(847) > _MessagePortIpcServer::Stop
08-11 10:59:50.725 : WARN / W_HOME ( 921 : 921 ) : clock_shortcut.c: _music_service_messageport_cb(361) > mode:local state:paused
08-11 10:59:50.725 : ERROR / W_HOME ( 921 : 921 ) : clock_shortcut.c: _mp_state_get(104) > (s_info.music_service.state != 1) -> _mp_state_get() return
08-11 10:59:50.730 : INFO / TIZEN_N_SOUND_MANAGER ( 1154 : 1154 ) : sound_manager.c: sound_manager_get_volume(84) > returns : type=4, volume=0, ret=0x80000241
08-11 10:59:50.730 : ERROR / TIZEN_N_SOUND_MANAGER ( 1154 : 1154 ) : sound_manager_private.c: __convert_sound_manager_error_code(158) > [sound_manager_get_volume] INTERNAL (0xfe6a0001): mm_error(0x80000241)
08-11 10:59:50.730 : WARN / MUSIC_CONTROL_SERVICE ( 1154 : 1154 ) : music-control-sound-manager.c: music_control_sound_mgr_get_volume(108) > [TID:1154] sound_manager_get_volume() .. [0xfe6a0001]
08-11 10:59:50.730 : INFO / MESSAGE_PORT ( 522 : 567 ) : MessagePortIpcServer.cpp: OnReadMessage(739) > _MessagePortIpcServer::OnReadMessage
08-11 10:59:50.730 : INFO / MESSAGE_PORT ( 522 : 567 ) : MessagePortIpcServer.cpp: HandleReceivedMessage(578) > _MessagePortIpcServer::HandleReceivedMessage
08-11 10:59:50.730 : INFO / MESSAGE_PORT ( 522 : 567 ) : MessagePortStub.cpp: OnIpcRequestReceived(147) > MessagePort message received
08-11 10:59:50.730 : INFO / MESSAGE_PORT ( 522 : 567 ) : MessagePortStub.cpp: OnCheckRemotePort(115) > _MessagePortStub::OnCheckRemotePort.
08-11 10:59:50.730 : INFO / MESSAGE_PORT ( 522 : 567 ) : MessagePortService.cpp: CheckRemotePort(207) > _MessagePortService::CheckRemotePort
08-11 10:59:50.730 : INFO / MESSAGE_PORT ( 522 : 567 ) : MessagePortService.cpp: GetKey(365) > _MessagePortService::GetKey
08-11 10:59:50.730 : INFO / MESSAGE_PORT ( 522 : 567 ) : MessagePortService.cpp: CheckRemotePort(220) > Check a remote message port: [com.samsung.w-home:music-control-service-message-port]
08-11 10:59:50.730 : INFO / MESSAGE_PORT ( 522 : 567 ) : MessagePortIpcServer.cpp: Send(847) > _MessagePortIpcServer::Stop
08-11 10:59:50.730 : INFO / MESSAGE_PORT ( 522 : 567 ) : MessagePortIpcServer.cpp: OnReadMessage(739) > _MessagePortIpcServer::OnReadMessage
08-11 10:59:50.730 : INFO / MESSAGE_PORT ( 522 : 567 ) : MessagePortIpcServer.cpp: HandleReceivedMessage(578) > _MessagePortIpcServer::HandleReceivedMessage
08-11 10:59:50.730 : INFO / MESSAGE_PORT ( 522 : 567 ) : MessagePortStub.cpp: OnIpcRequestReceived(147) > MessagePort message received
08-11 10:59:50.730 : INFO / MESSAGE_PORT ( 522 : 567 ) : MessagePortStub.cpp: OnSendMessage(126) > MessagePort OnSendMessage
08-11 10:59:50.730 : INFO / MESSAGE_PORT ( 522 : 567 ) : MessagePortService.cpp: SendMessage(291) > _MessagePortService::SendMessage
08-11 10:59:50.730 : INFO / MESSAGE_PORT ( 522 : 567 ) : MessagePortService.cpp: GetKey(365) > _MessagePortService::GetKey
08-11 10:59:50.730 : INFO / MESSAGE_PORT ( 522 : 567 ) : MessagePortService.cpp: SendMessage(299) > Sends a message to a remote message port [com.samsung.w-home:music-control-service-message-port]
08-11 10:59:50.730 : INFO / MESSAGE_PORT ( 522 : 567 ) : MessagePortStub.cpp: SendMessage(138) > MessagePort SendMessage
08-11 10:59:50.735 : INFO / MESSAGE_PORT ( 522 : 567 ) : MessagePortIpcServer.cpp: SendResponse(884) > _MessagePortIpcServer::SendResponse
08-11 10:59:50.735 : INFO / MESSAGE_PORT ( 522 : 567 ) : MessagePortIpcServer.cpp: Send(847) > _MessagePortIpcServer::Stop
08-11 10:59:51.570 : INFO / CAPI_WATCH_APPLICATION ( 24769 : 24769 ) : watch_app_main.c: _watch_core_time_tick(306) > _watch_core_time_tick
08-11 10:59:52.550 : INFO / CAPI_WATCH_APPLICATION ( 24769 : 24769 ) : watch_app_main.c: _watch_core_time_tick(306) > _watch_core_time_tick
08-11 10:59:53.580 : INFO / CAPI_WATCH_APPLICATION ( 24769 : 24769 ) : watch_app_main.c: _watch_core_time_tick(306) > _watch_core_time_tick
Денис
10 августа 2016 20:01
Ответ на сообщение пользователя Кирилл
Прелоадер это отдельный компонент. Он выводит загрузку не в canvas а отдельный dom элемент, но опирается на цикл loop().

Браузер специально приостанавливает эти временные колбеки по таймеру для оптимизации, походу тут ничего не сделаешь. Только переписывать модуль загрузки ресурсов в движке b4w…

А вот раньше такого "костыля" в браузере небыло…

все развивается )
пробелма осталась.. и ее очень видно на моих проектах
Денис
10 августа 2016 19:38
Ответ на сообщение пользователя Кирилл
Чуть чуть разобрался и мне кажется тут дело вот в чём:
Для загрузки ресурсов нужно что бы крутился цикл loop(), он, грубо говоря, вешается на метод браузера setTimeout(), который перестаёт срабатывать на неактивной вкладке. След-но и загрузка сцены не идёт… Надо подумать как дёргать метод в неактивной вкладке по таймеру…

возможно и так .. только думаю тут дело в прелоадере который работает как обычный рендер сцены и если есть использовать паузу то вот и результат
Денис
10 августа 2016 19:37
Ответ на сообщение пользователя Иван Любовников
checkTime нужно вызвать 1 раз перед frame, чтобы сцена обновилась, а то, конечно, будет старый кадр
ну и махинации с max_fps уже будут не нужны

не очень понимаю.. про сек тайм перед снятием с паузы , да понял , а пот про макс фпс не очень..


точнее по подробнее нужно про m_main.frame(m_time.get_timeline(), 0);

спасибо , сейчас попробую

Попробовал так всеравно прыгает(показывает старый потом скачок) !
.....
if (!document.hidden) {
            //watch();
        	if (!ambMode) {
        		//m_cfg.set("max_fps", 60);
        		//alert("in ok");
        		checkTime();
        		m_main.frame(m_time.get_timeline(), 0);
        		m_main.resume();

......
Денис
10 августа 2016 18:58
Ответ на сообщение пользователя Иван Любовников
а можете ещё раз привести код, который сейчас используется, после всех изменений?
АГА, только убрал "мысли в слух" с матюками

"use strict";
// register the application module
b4w.register("simple_app", function(exports, require) {
    // import modules used by the app
    var m_main = require("main");
    //var m_anim      = require("animation");
    var m_app = require("app");
    var m_data = require("data");
    //var m_mouse     = require("mouse");
    //var m_obj      = require("objects");
    //var m_scenes    = require("scenes");
    var m_scs = require("scenes");
    var m_trans = require("transform");
    var m_cfg = require("config");
    var m_cons = require("constraints");
    var m_lights = require("lights");
    var m_time = require("time");
    var m_preloader = require("preloader");
    //v ar _previous_selected_obj = null;
    var m_input = require("input");
    var lamp = null;
    //var //loader, 
    //scene, 
    //camera, 
    //renderer, 
    var now = new getDate();
    var l = null;
    var h = null;
    var m = null;
    var s = null;
    var d = null;
    var b = null;
    var battCharging = false;
    var battLevel = 50;
    var ambMode = false;
    var signAngleLast = 0;
    var signAngleNew = 0;
    var signX = 0;
    var signY = 0;
    var llevel = 7;
    try {
        var lightSensor = tizen.sensorservice.getDefaultSensor("LIGHT");
    } catch (ignore) {
        alert("Light sens not init!");
    }

    exports.init = function() {
        m_app.init({
            canvas_container_id: "main_canvas_container",
            quality: m_cfg.P_HIGH,
            callback: init_cb,
            //show_fps: true,
            //show_fps: false,
            fps_elem_id: "idFPS",
            //console_verbose: true,
            console_verbose: false,
            autoresize: false,
            pause_invisible: true,
            //antialiasing: true,
            alpha: false,
            physics_enabled: false
        });
    };


    function onGetSuccessCB(sensorData) {

        if (sensorData.lightLevel / 10 < llevel) {
            llevel = llevel - 0.3;
        }
        if (sensorData.lightLevel / 10 > llevel) {
            llevel = llevel + 0.3;
        }

    }

    function onerrorCB(error) {
        console.log("error occurs");
    }

    function onsuccessCB() {
        console.log("sensor start");
        lightSensor.getLightSensorData(onGetSuccessCB, onerrorCB);
    }

    function onBatteryUpdate(a) {
        battCharging = a.isCharging;
        battLevel = 100 * a.level;
    }


    /**
     * callback executed when the app is initizalized
     */
    function init_cb(canvas_elem, success) {

        if (!success) {
            //console.log("b4w init failure");
            return;
        }

        m_preloader.create_preloader();
        document.addEventListener('tizenhwkey', function(e) {
            if (e.keyName === "back") {
                try {
                    tizen.application.getCurrentApplication().exit();
                } catch (ignore) {
                    alert("exit tizenhwkey not work!");
                }
            }
        });

        try {
            lightSensor.start(onsuccessCB);
        } catch (ignore) {
            alert("Light sens is not start!");
        }


        document.addEventListener("visibilitychange", function() {
            if (!document.hidden) {

                if (!ambMode) {
                    //m_cfg.set("max_fps", 60);
                    //alert("in ok");
                    m_main.frame(m_time.get_timeline(), 0);
                    m_main.resume();
                    //m_cfg.set("max_fps", 1);
                }
            }
        });

        try {
            tizen.systeminfo.getPropertyValue("BATTERY", onBatteryUpdate, null);
        } catch (ignore) {
            alert("BATT Prz not init!");
        }

        try {
            tizen.systeminfo.addPropertyValueChangeListener("BATTERY", onBatteryUpdate);
        } catch (ignore) {
            alert("BATT Ste not init!");
        }


        m_cfg.set("shadows", true);
        //m_cfg.set("shadows", false);

        m_cfg.set("antialiasing", true);
        //m_cfg.set("antialiasing", false);

        //m_cfg.set("reflections", true);
        m_cfg.set("refractions", false);

        //m_cfg.set("refractions", true);
        m_cfg.set("reflections", false);

        //m_cfg.set("canvas_resolution_factor", 1); // max 4096

        load();
    }

    function preloader_cb(percentage) {
        m_preloader.update_preloader(percentage);
    }

    /**
     * load the scene data
     */
    function load() {
        m_data.load("testshdw-t3d.json", load_cb, preloader_cb);
    }


    function frame_cb() {
        //Append a callback to be executed every frame (even if the rendering is paused). Its purpose is to perform actions non-related to the actual rendering, e.g html/css manipulation. This method allows registration of multiple callbacks. 
        if (m_main.is_paused()) {
            m_cfg.set("max_fps", 60);
        }

        // m_cfg.set("max_fps", 1);

    }

    function render_cb() {
        // Set the rendering callback which is executed for every frame just before the rendering. Only one callback is allowed. 
        // TODO this is a timer ! 
        checkTime();
        m_cfg.set("max_fps", 1);
    }

    /**
     * callback executed when the scene is loaded
     */
    function load_cb() {
        m_cfg.set("max_fps", 1);
        //setInterval(checkTime, 500);
        m_main.set_render_callback(render_cb); // Set the rendering callback which is executed for every frame just before the rendering. Only one callback is allowed. 
        m_main.append_loop_cb(frame_cb); //Append a callback to be executed every frame (even if the rendering is paused). Its purpose is to perform actions non-related to the actual rendering, e.g html/css manipulation. This method allows registration of multiple callbacks. 

    }

    function getDate() {
        var dateget;
        try {
            dateget = tizen.time.getCurrentDateTime();
        } catch (err) {

            dateget = new Date();
        }

        return dateget;
    }



    function checkTime() {
        now = getDate();
        d = now.getDate();
        h = now.getHours();
        m = now.getMinutes();
        s = now.getSeconds();
        //ms = now.getMilliseconds();
        h = h % 12;
        b = (battLevel) * Math.PI / 180; // 100 grad = 100%  0=0%	
        d = (d * 11.612903225806451612903225806452) * (Math.PI / 180);
        h = (h * Math.PI / 6) + (m * Math.PI / (6 * 60)) + (s * Math.PI / (360 * 60));
        l = ((m + s / 60) / 0.3333333333333333333333333333333333333 * Math.PI / 6);
        m = (m * Math.PI / 30) + (s * Math.PI / (30 * 60));
        s = (s * Math.PI / 30);
        m_trans.set_rotation_euler(m_scs.get_object_by_name("hh"), 0, -h, 0);
        m_trans.set_rotation_euler(m_scs.get_object_by_name("mm"), 0, -m, 0);
        m_trans.set_rotation_euler(m_scs.get_object_by_name("ss"), 0, -s, 0);
        m_trans.set_rotation_euler(m_scs.get_object_by_name("dd"), 0, -d, 0);
        m_trans.set_rotation_euler(m_scs.get_object_by_name("bb"), 0, -b, 0);
        try {
            onsuccessCB(lightSensor);
        } catch (ignore) {}

        m_lights.set_light_params(m_scs.get_object_by_name("lamp"), {
            "light_energy": llevel
        }); //mid 7 sensorData.lightLevel
        m_trans.set_rotation_euler(m_scs.get_object_by_name("emptyLight"), 0, l, 0);

    }

});
// import the app module and start the app by calling the init method
b4w.require("simple_app").init();
Денис
10 августа 2016 17:36
Ответ на сообщение пользователя Иван Любовников
а сцена актуальная к моменту вызова frame? checkTime должен хотя бы 1 раз сработать

не я ж пишу ничего не меняется.. а вроде даже задержка удлинняется и даже иногда успевает еще один старый калр обсчитать до того как прыгнет на новое положение, вот как раз тот самый второй кадр который иногда проскакивает на нем уже похоже срабатывает изменение частоты кадров на 60 и после того ка кпросчитает первый кадр частота становится как записано 1 , но 1й кадр стабильно показывает старый .
может как то получается что это уже готовый старый кадр остается где то ?
Денис
10 августа 2016 17:04
может все-же есть решение с лоадером?
Денис
10 августа 2016 17:02
Ответ на сообщение пользователя Иван Любовников
прикрепил для 16.07
надо вызывать так:
m_main.frame(m_time.get_timeline(), 0);

должна работать, даже если движок на паузе


даже в таком случае, сделанном для проверки листенера( работает нормально):
после ОК , идет старый кадр и только после этого рендер нового соотв +1 кадр (1 сек)
( собственно без АЛЕРТА ситуация та же)
        		alert("in ok");
        		m_main.frame(m_time.get_timeline(), 0);
        		m_main.resume();
Денис