Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(scripting/v8): implement vector classes #3262

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

thelindat
Copy link
Contributor

Goal of this PR

Improve compatibility of vector types across scripting runtimes.

Note this is a technically breaking change to some scripts, as a few developers have opted to depend on undefined behaviour (i.e. implementation details).

How is this PR achieving the goal

Implements simple vector classes which can be correctly encoded and decoded with msgpack.

This PR applies to the following area(s)

ScRT: JS

Successfully tested on

Game builds: 3407

Platforms: Windows

Checklist

  • Code compiles and has been tested successfully.
  • Code explains itself well and/or is documented.
  • My commit message explains what the changes do and what they are for.
  • No extra compilation warnings are added by these changes.

Fixes issues

Supersedes #2946.

@github-actions github-actions bot added the triage Needs a preliminary assessment to determine the urgency and required action label Mar 19, 2025
@Korioz
Copy link
Contributor

Korioz commented Mar 19, 2025

You should implement quaternion too as it was supported before, ext type is 23 and it's the same structure as a vec4

@thelindat
Copy link
Contributor Author

Can do, but would also like to know how cfx prefer these implementations (just basic, or with methods?)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage Needs a preliminary assessment to determine the urgency and required action
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants