Skip to content

Vectors#2074

Open
unknown07724 wants to merge 54 commits intoTurboWarp:masterfrom
unknown07724:vectors
Open

Vectors#2074
unknown07724 wants to merge 54 commits intoTurboWarp:masterfrom
unknown07724:vectors

Conversation

@unknown07724
Copy link
Copy Markdown

Vectors is a extension for Vectors
Blocks: Create vector with ID,direction and magnitude: creates a vector, vector direction, returns direction of the vector based on ID, vector magnitude, returns magnitude of the vector based on ID, Change Magnitude and direction, changes magnitude and direction of the vector based on ID, and List of IDs, lists all elements in IDs

@github-actions github-actions Bot added the pr: new extension Pull requests that add a new extension label Apr 8, 2025
@The11thPencil
Copy link
Copy Markdown

there is no block for deleting vectors?

@The11thPencil
Copy link
Copy Markdown

also please run !format

@unknown07724
Copy link
Copy Markdown
Author

!format

@unknown07724
Copy link
Copy Markdown
Author

there is no block for deleting vectors?

Yes, just stop using a vector

@unknown07724
Copy link
Copy Markdown
Author

!format

@unknown07724
Copy link
Copy Markdown
Author

@fath11 there is now

Copy link
Copy Markdown

@yuri-kiss yuri-kiss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this seems to literally just be a weird way of storing 2 dictionary's, what is the point of this extension, you can't even do any operations?

Comment thread extensions/unknown/vectors.js
Comment thread extensions/unknown/vectors.js Outdated
opcode: "vectorCreate",
blockType: Scratch.BlockType.COMMAND,
text: Scratch.translate(
"create vector with ID [ID], direction [DIRECTION] and magnitude [MAGNITUDE]"

This comment was marked as abuse.

Comment thread extensions/unknown/vectors.js Outdated
}

vectorCreate(args) {
const id = args.ID;

This comment was marked as abuse.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

aren't they numbers, you can not put strings in there, and if you could, who would?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see now, attempted to fix, fucked up the code

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed the fuck up, now works better

}

// Vectors storage
const ids = [];

This comment was marked as abuse.


// Vectors storage
const ids = [];
const directions = {};

This comment was marked as abuse.

Comment thread extensions/unknown/vectors.js Outdated

vectorMag(args) {
const id = args.ID;
return magnitudes[id] ?? Scratch.translate("vector not found");

This comment was marked as abuse.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do I want people to wonder why their shit isn't working? if you said yes then you are wrong, the answer is no.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do I want people to wonder why their shit isn't working? if you said yes then you are wrong, the answer is no.

@GarboMuffin said to chill the language

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

decided upon making it "null"

Comment thread extensions/unknown/vectors.js Outdated

vectorDir(args) {
const id = args.ID;
return directions[id] ?? Scratch.translate("vector not found");

This comment was marked as abuse.

@unknown07724
Copy link
Copy Markdown
Author

unknown07724 commented Apr 20, 2025

Maps are < >, it does what it needs to do very well

@unknown07724
Copy link
Copy Markdown
Author

!format

@GarboMuffin
Copy link
Copy Markdown
Member

it would be wonderful if you would be more reasonable with your language on this issue tracker

@unknown07724
Copy link
Copy Markdown
Author

it already does what it needs to do, I don't want to spend multiple hours rewriting the entire extension

@unknown07724
Copy link
Copy Markdown
Author

!format

Comment thread extensions/unknown/vectors.js Outdated
Change the return value for undefined magnitudes from a translation to an empty string.
@unknown07724
Copy link
Copy Markdown
Author

!format

@unknown07724
Copy link
Copy Markdown
Author

!format

@unknown07724
Copy link
Copy Markdown
Author

this seems to literally just be a weird way of storing 2 dictionary's, what is the point of this extension, you can't even do any operations?

you can now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr: new extension Pull requests that add a new extension

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants