I would like to learn how to do 2 things.
1. I would like to be able to make 3D transforms to a number of jit.gl.gridshape objects (generated in JS) using jit.anim.node as a parent to all of them. So that I can rotate all of the gridshapes together. How do I bind jit.anim.node to a number of generated gridshapes in JS?
Essentially, I want to know how to do what’s being done in the Max help examples but in JS.
hello. thanks for the questions.
you then can create a parent anim.node object, and set the "anim" attribute of the child anim.node objects to the "name" attribute of the parent.
you can then pass messages from the anim.drive (or any kind of message) to this parent anim.node.
please let me know if anything is unclear.
-- Pasted Max Patch, click to expand. --Copy all of the following text. Then, in Max, select New From Clipboard.----------begin_max5_patcher---------- 695.3ocyW1sjZBCFF9X3pHCSOzkg.Jp8n8pnmzoiSvD03fI1jfZ6N68dIIfx tKqFXbsbBw7KueO78S7EeufL9IhL.7cvOAddu364YFROfWUeufcnSKyQRyxB VkyYE6BFYmp7m7BUNQYlLtZz8H0xMT15EBxRk8vSlGEFMB.mXZrOiggQfeUs G6wn9ydhcC5WDRELBDjgXqCNuNJ1HCd11mfI0xXEmoXnclsF7Ch.iXnfyhQT NihHVPXnrbyZhZrOI8ulwfwgQWrJJq1nf5wd02W+XjiPZGQJQqI0RPQNYvPv dtjpnbFHB7MHHpcJBuMEmYahfll4WCisSNnKjyE5D2C5vHGKEwGfyVpJbcd3 FDCmS5rCFbZESZ1bcOLsyUq3Y18hNv6KcPL5tPrfdf.dFKPGUbvR0IvypBg1 kpgGUNkQVxKXl8lzUVFOsYvZEK0c5AKSFhrTBPLNl7Dx.yvsxNGIVgn3DKhz wf2zcqM7De2vS0fRzABdQ4QWJ0EHkRPyJT1T7dmozmjUzLmAwcEzJ950eVP6 UnnEhoI5mVRlbUuLp1gtEJN2kj8eUdSJPFfHPxtmypJLyZ4oiusKjoTXYjl8 00FIlN.C29c4WDAGLomtGU4eRScjOsgkzAZ8tiTFlezlEekDg.vd5DUmHZ7L 28hZkTiGn09JuYffvvDQeixl59ECtJff+OAjNgdAsmARwc4tQsY5Sbwz0Rr9 eJfTTMIu74bwQJVsQOc5rv9dKbizLWw4c+yEikqG+sDTxKDKqMrpxEfK1NlH KkIReu7FqI8MqYCEiIrlUSvTot.C9bgyO7kzU0LyA0.eXpY5fSMvAiZRcfMS eXpYhCpY7CSMINnl3GlZftHG3iyy4cup6Kdr4CQ62efHjUGoQIk0N1xMIiSG Y5RY1tlSLPPNPqW+De8o8p++.n7hyDK -----------end_max5_patcher-----------
This looks great, thanks!!!
Thanks for your help.
I’m working my way toward getting that all working.
I’ve run into a problem where my shader/texture is glitching out when I actually attach all of by generated jit.anim.nodes to a parent jit.anim.node. (like in your example).
Please try unzipping the attached file and run the patcher.
It is basically a text editor (in progress).
When you type, you should see text in the window. You will notice that the last letter of the text will pop up whenever you type (glitchy). This only happens the first time each gridshape is drawn. If you backspace and retype, it won’t happen again until you get to the new characters.
Open up render_screen.js and comment out lines 85 and 94 and save.
Now you will see that things are working fine, but of course the jit.anim.nodes have been disabled (by breaking the script). Basically, what I want is to be able to use the jit.anim.nodes in the way you described if you patch and the way it is kind of working here, except without the glitch. I’ve tried a number of things, but I don’t know why I’m getting this glitch.
Can someone shed some light on this?
the problem, i think, is that you are using non-automatic mode rendering.
this requires you to be very careful and explicit about the order you update nodes.
is there any way you can instead of using non-automatic, use the ob3d @enable attribute to turn rendering on and off?
i’m not entirely sure that would fix the problem, but that’s the first thing i would suggest you try.