As a Japanese student, I ask for your understanding regarding my limited English proficiency. Currently, I am working on developing an a-frame library that utilizes anime.js in TypeScript to create animations. However, I encountered an issue when attempting to access Element.object3D in order to update the position value. TypeScript flagged an error stating "Property 'object3D' does not exist on type 'Element'". Below is the code snippet in question:
function updateValue(target: Element, attr: Attribute, value: number) {
switch (attr) {
case "PositionX":
target.object3D.position.setX(value)
case "PositionY":
target.object3D.position.setY(value)
case "PositionZ":
target.object3D.position.setZ(value)
}
I understand that 'object3D' is not directly available on Element, even though it exists when importing a-frame. I attempted to use require("aframe") but this did not resolve the issue. I apologize for the basic nature of this inquiry and any language barriers, but I would greatly appreciate any assistance you can provide.