Home › Forums › Programming › v3d.js:132 v3d.PropertyBinding: Can not bind to objectName of node undefined.
- This topic has 1 reply, 1 voice, and was last updated 3 years, 10 months ago by
rowger.
Viewing 2 posts - 1 through 2 (of 2 total)
-
AuthorPosts
-
2022-01-07 at 4:00 pm #48526
rowger
Participant<template color="green"> <dummy> <label>绘制一条线段:</label> <label>名称为:</label> <text name="name">myLine</text> <label>起点位置</label> <label>X:</label> <number name="startX"></number> <label>y:</label> <number name="startY"></number> <label>z:</label> <number name="startZ"></number> <label>终点为:</label> <label>X:</label> <number name="endX"></number> <label>y:</label> <number name="endY"></number> <label>z:</label> <number name="endZ"></number> <label>颜色为:</label> <color name="myColor"></color> </dummy> </template> <script> function code(block) { const startX = <code>'${block.getFieldValue('startX')}'</code>; const startY = <code>'${block.getFieldValue('startY')}'</code>; const startZ = <code>'${block.getFieldValue('startZ')}'</code>; const endX = <code>'${block.getFieldValue('endX')}'</code>; const endY = <code>'${block.getFieldValue('endY')}'</code>; const endZ = <code>'${block.getFieldValue('endZ')}'</code>; const myColor = <code>'${block.getFieldValue('myColor')||'#660000'}'</code>; const fun = Plug.provide('myFunction1', function(startX, myColor,) { var times = [0, 10]; var position_x = [0, 0, 0, 100, 0, 0]; var pos1_Keyframe = new v3d.KeyframeTrack('.mesh[car].position', times, position_x); var duration = 10; var clip = new v3d.AnimationClip('boxAnimation', duration, [ pos1_Keyframe ]); var mixer = new THREE.AnimationMixer(app.scene); var action = mixer.clipAction(clip); app.actions.push(action); console.log("====================app.actions") console.log(app.actions); }); return <code>${fun}(${startX}, ${myColor});</code>; } </script>I want create my Animation,How can I binding the mesh “car” with Animation?I sure ,the “car” is mesh in app.scene
2022-01-07 at 4:02 pm #48527rowger
Participantconsole.log(app)
Attachments:
-
AuthorPosts
Viewing 2 posts - 1 through 2 (of 2 total)
- You must be logged in to reply to this topic.

