Home › Forums › Programming › Animating cloned objects
Tagged: clone animations
- This topic has 23 replies, 8 voices, and was last updated 7 months, 3 weeks ago by c4cc.
-
AuthorPosts
-
2023-06-06 at 12:04 pm #64405huibCustomer
Hello
I want to clone an animated cube with its animation working but the cloning function still seems to get rid of the animation clip. (bugged or intentional not a feature?)
kdv Solution seems to work nicely but I don’t understand how and where to implement this. Is it possible to share how you did this?2023-06-06 at 9:43 pm #64414kdvParticipantbut I don’t understand how and where to implement this
That code above should be used inside the
cloneObject()
function that can be found inpuzzles.min.js
Or you can use this plugin which includes the modified puzzle.
Puzzles and JS coding. Fast and expensive.
If you don’t see the meaning in something it primarily means that you just don’t see it but not the absence of the meaning at all.
2023-06-07 at 7:33 am #64416huibCustomerbut I don’t understand how and where to implement this
That code above should be used inside the
cloneObject()
function that can be found inpuzzles.min.js
Or you can use this plugin which includes the modified puzzle.
Hey thanks for the quick reply!
How to change the code in the minified javascript is a bit beyond my skills.
The code looks a lot different than the snippet you posted here earlier.
I cant really find in the documentation anything about how this is done, it’s might be very obvious to a programmer used to this kind of work haha.Will also look into the plugin with the additional puzzles thanks :)
2023-06-07 at 7:51 am #64419kdvParticipantIf you open
visual_logic.js
you can find this function (initially it’s inpuzzles.min.js
)
In that function you can add this JS code to clone an object’s animation.
const objAnim = v3d.SceneUtils.getAnimationActionByName(app, objName); if (objAnim) { const newAnim = app.mixer.clipAction(objAnim._clip.clone(), newObj, objAnim.blendMode); newAnim._clip.name = newObj.name; newAnim._localRoot = objAnim._localRoot; app.actions.push(newAnim); }
Once it works you can transfer this code into
puzzles.min.js
if needed.Puzzles and JS coding. Fast and expensive.
If you don’t see the meaning in something it primarily means that you just don’t see it but not the absence of the meaning at all.
2023-06-14 at 10:12 am #64612huibCustomerGreat thanks for explaining managed to get it to work.
We also picked up the plugin, works great. The javascript puzzle is also a great addition.2023-06-14 at 10:14 am #64613kdvParticipantThe javascript puzzle is also a great addition.
That’s the best puzzle with no limitations )))
Puzzles and JS coding. Fast and expensive.
If you don’t see the meaning in something it primarily means that you just don’t see it but not the absence of the meaning at all.
2023-07-22 at 1:45 pm #65369sauravParticipantHi,
I have opened the puzzle.min.js file to search for the cloneObject function, but it is appearing in a different format, which you can see in the image attached here.Do I need to download some specific software or application to view it in the format that are visible in your solutions above?
Attachments:
You must be logged in to view attached files.2023-07-22 at 2:05 pm #65371kdvParticipantYou see the same function but as a single line. EOL is replaced by
\n
Puzzles and JS coding. Fast and expensive.
If you don’t see the meaning in something it primarily means that you just don’t see it but not the absence of the meaning at all.
2024-03-30 at 5:22 pm #72031c4ccParticipantApparently this is due to a bug in Verge3D. We’ll try to fix this ASAP. Thanks for reporting!
Is this clone animation bug fixed?
-
AuthorPosts
- You must be logged in to reply to this topic.