对b4w.webplayer的分析理解

1065

b4w.webplayer对模型数据的加载过程如下:
* Stage properties.
* priority:
* ASYNC_PRIORITY – stage can be executed asynchronously alongside with other stages
* (relevant for stages which perform http requests)
* SYNC_PRIORITY – such stages are executed in a strict order one-by-one
* background_loading:
* – stage can be executed after the rendering starts
* inputs:
* – previous stages which are needed to be finished before this stage can start
* is_resource:
* – stage will be omitted if “do_not_load_resources” flag is set
* relative_size:
* – a value which represents amount of time required to finish this stage
* primary_only:
* – stage is executed only in the primary thread, it’s omitted during the dynamic loading
* cb_before:
* – a stage callback which is processed first during the stage execution
* call cb_finish as follows: cb_finish(thread, stage) to finish the stage
* (suitable for preparatory actions)
* cb_loop:
* – a stage callback which is called multiple times within a loop;
* call cb_set_rate callback as follows: cb_set_rate(thread, stage, 1) to break the loop,
* call cb_finish as follows: cb_finish(thread, stage) to finish the stage
* (suitable for cyclical actions which can be breaked into a separate steps;
* not needed for asynchronous resources(speakers, textures, …))
* cb_after:
* – a stage callback which is processed last during the stage execution
* call cb_finish as follows: cb_finish(thread, stage) to finish the stage
* (suitable for finishing actions)
* cb_param:
* – an utility parameter which is available inside all of the stage callbacks
* (can be used to translate some data through the stage callbacks)

留下一个答复

Please enter your comment!
Please enter your name here