How to create a plain javascript object #4198
Unanswered
ZhaoXiangXML
asked this question in
Q&A
Replies: 2 comments
-
The snippet above is for js-import ( |
Beta Was this translation helpful? Give feedback.
0 replies
-
The way that its done internally in |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Summary
I'd like to create rust binding for something like this:
So I've add binding like this:
The problem is I don't know how to create a new
JsVector3
object like{x: 1.0, y: 2.0, z: 3.0}
in javascript.I've tried
let vec = JsVector3::new()
in rust but it won't run asVector3
is not an actual class in javascript.Additional Details
I've found this post but I don't know how to cast
JsObject
toJsVector
either.Beta Was this translation helpful? Give feedback.
All reactions