The publish module publishes animations using javascript to define the animation engine, without running the code inside the TimeEventHandler

When inserting 3d annot, I use the following code:
A3DPDF3DArtworkData2 s3DArtworkData;
A3D_INITIALIZE_DATA(A3DPDF3DArtworkData2, s3DArtworkData);
s3DArtworkData.m_pStream = m_pStream;
s3DArtworkData.m_eAnimationStyle = kA3DPDFAnimStyleNoAnimation;
s3DArtworkData.m_pcJavaScriptFileName = (A3DUTF8Char*)jsFile.c_str();

and jsFile content is
AnimationController.js (8.9 KB)

button runs the function inside the AnimationController.js normally, but the timer callback does not execute!

I use the official samplesamples\publish\publishsource\AnimWorkinstruction still have this problem, how to solve this problem!

Hi,
Hoops Publish has a dedicated API to design your animation. The API will generate the javascript file according to the data of the animations that you provide using it. It is not possible to provide your own animation javascript.
Please refer to the source files AnimDef*.cpp in the sample AnimWorkinstruction to learn how to design your own animation based on our API.
Thanks a lot for your interest in Hoops Publish,
Kind regards,
Isabelle

1 Like