Passing objects to a web worker

后端 未结 8 1086
心在旅途
心在旅途 2020-11-28 06:19

I\'m trying to pass an object to a web worker through the postMessage function.
This object is a square that has a couple of functions to draw himself on a canvas and so

8条回答
  •  感动是毒
    2020-11-28 06:29

    take a look at the vkThread plugin

    http://www.eslinstructor.net/vkthread/

    it can pass function to a worker, including function with context ( object's method ). It can also pass functions with dependencies, anonymous functions and lambdas.

    --Vadim

提交回复
热议问题