• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Is it possible to execute 3D javascript on the button?

New Here ,
Jul 15, 2019 Jul 15, 2019

Copy link to clipboard

Copied

I am looking for forums and documentation to write a mouse move to get 3D coordinates (also instantly display the coordinates in my Field)

Is it possible to execute 3D javascript using rich media buttons or other possible buttons?

Because I can only execute javascript right on the 3D model to be effective.

The fragment code is as follows:

-------------------------------------------------------------------------------------------------------------------------------

myAnnotObj = getAnnots3D(0)[0].context3D;

myAnnotObj.scene.selectedNode = myAnnotObj.scene.meshes.getByName("ModelNode1");

myAnnotObj.runtime.overrideSelection=true;

var myMouseHandlingFunction = app.trustedFunction(

function(event)

{

     if (event.isMouseMove)

     {

             var clickedMesh = null;

             if(event.hits.length > 0)

                      clickedMesh = event.hits[0].position;

-------------------------------------------------------------------------------------------------------------------------------

I got the error:

TypeError: event.hits[0] is undefined

15: Batch: Exec

How can I make the event in the function have a mouse event?

I am not sure if this method is feasible.

I would like to ask the experts, thank you for taking the time to answer!

TOPICS
Rich media and 3D

Views

256

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
no replies

Have something to add?

Join the conversation