René's URL Explorer Experiment


Title: Convenience setters for Scene.scale and Scene.offset · Issue #86 · PAIR-code/megaplot · GitHub

Open Graph Title: Convenience setters for Scene.scale and Scene.offset · Issue #86 · PAIR-code/megaplot

X Title: Convenience setters for Scene.scale and Scene.offset · Issue #86 · PAIR-code/megaplot

Description: The SpriteView implementation provides convenient setters for the PositionWorld etc. properties as: set PositionWorld(value: (number[] | {x?: number; y?: number;})) { /* ...some logic... */ } I would like the same convenience setters for...

Open Graph Description: The SpriteView implementation provides convenient setters for the PositionWorld etc. properties as: set PositionWorld(value: (number[] | {x?: number; y?: number;})) { /* ...some logic... */ } I wou...

X Description: The SpriteView implementation provides convenient setters for the PositionWorld etc. properties as: set PositionWorld(value: (number[] | {x?: number; y?: number;})) { /* ...some logic... */ } I wou...

Opengraph URL: https://github.com/PAIR-code/megaplot/issues/86

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Convenience setters for Scene.scale and Scene.offset","articleBody":"The `SpriteView` implementation provides convenient [setters for the `PositionWorld`](https://github.com/PAIR-code/megaplot/blob/main/src/lib/generated/sprite-view-impl.ts#L450) etc. properties as:\r\n\r\n```javascript \r\nset PositionWorld(value: (number[] | {x?: number; y?: number;})) { /* ...some logic... */ }\r\n```\r\n\r\nI would like the same convenience setters for `Scene.scale` and `Scene.offset` as follows.\r\n\r\n```javascript\r\nset scale(value: (number | number[] | {x?: number; y?: number;})) {\r\n  if (typeof value === 'number') {\r\n    this.scale.x = this.scale.y = value;\r\n  } else if (Array.isArray(value)) {\r\n    // setter logic similar to SpriteView\r\n  } else if (typeof value === 'object') {\r\n    // setter logic similar to SpriteView\r\n  } else {\r\n    throw new TypeError('Argument must be a number, number array, or object.');\r\n  }\r\n}\r\n```\r\n\r\nIt seems like this isn't happening now because [`Scene.scale`](https://github.com/PAIR-code/megaplot/blob/main/src/lib/scene-internal.ts#L83) and [`Scene.offset`](https://github.com/PAIR-code/megaplot/blob/main/src/lib/scene-internal.ts#L89) are instances of [`DrawTriggerPoint`](https://github.com/PAIR-code/megaplot/blob/3f4e5acb81cf42b3f64bf8c9f40858b3c3a53dfe/src/lib/draw-trigger-point.ts#L23), but it shouldn't be hard to move these to an internal `private` variable and convert the public interfaces to getters and setters. What might be more difficult to overcome is the philosophical desire to always be setting the `x` and `y` components of a `DrawTriggerPoint` directly.\r\n\r\n","author":{"url":"https://github.com/RyanMullins","@type":"Person","name":"RyanMullins"},"datePublished":"2022-11-07T12:43:49.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/86/megaplot/issues/86"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:1332c32e-97bd-ef2d-3492-696832d2d431
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idDB1C:3A2E82:595C37:7A9DA0:6A4DCCD4
html-safe-nonce0f331a0d18c9bd5afdb6af5c69e0eb85b91fe4a8a1a06406768239724b68df71
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEQjFDOjNBMkU4Mjo1OTVDMzc6N0E5REEwOjZBNERDQ0Q0IiwidmlzaXRvcl9pZCI6Ijk5MTI0NDEzNjkxMTU4ODU2NCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac8d7560ff17de665dae85769c7f927c8364a786df06526963dafabf0256fc462d
hovercard-subject-tagissue:1438305287
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/PAIR-code/megaplot/86/issue_layout
twitter:imagehttps://opengraph.githubassets.com/2fd57bb3aae03e99b412db745d87bc338a78fd906b1a5ddc3a3a96be4832d292/PAIR-code/megaplot/issues/86
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/2fd57bb3aae03e99b412db745d87bc338a78fd906b1a5ddc3a3a96be4832d292/PAIR-code/megaplot/issues/86
og:image:altThe SpriteView implementation provides convenient setters for the PositionWorld etc. properties as: set PositionWorld(value: (number[] | {x?: number; y?: number;})) { /* ...some logic... */ } I wou...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameRyanMullins
hostnamegithub.com
expected-hostnamegithub.com
None06b8a6144231bf3a234f1c2e9993861e07ce98a905912b114aa386c2d7e84b33
turbo-cache-controlno-preview
go-importgithub.com/PAIR-code/megaplot git https://github.com/PAIR-code/megaplot.git
octolytics-dimension-user_id29804435
octolytics-dimension-user_loginPAIR-code
octolytics-dimension-repository_id451893434
octolytics-dimension-repository_nwoPAIR-code/megaplot
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id451893434
octolytics-dimension-repository_network_root_nwoPAIR-code/megaplot
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release1d344bdb7547fe6bca17a59bb2b8aac3dc9532a0
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/PAIR-code/megaplot/issues/86#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FPAIR-code%2Fmegaplot%2Fissues%2F86
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FPAIR-code%2Fmegaplot%2Fissues%2F86
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=PAIR-code%2Fmegaplot
Reloadhttps://github.com/PAIR-code/megaplot/issues/86
Reloadhttps://github.com/PAIR-code/megaplot/issues/86
Reloadhttps://github.com/PAIR-code/megaplot/issues/86
Please reload this pagehttps://github.com/PAIR-code/megaplot/issues/86
PAIR-code https://github.com/PAIR-code
megaplothttps://github.com/PAIR-code/megaplot
Notifications https://github.com/login?return_to=%2FPAIR-code%2Fmegaplot
Fork 3 https://github.com/login?return_to=%2FPAIR-code%2Fmegaplot
Star 21 https://github.com/login?return_to=%2FPAIR-code%2Fmegaplot
Code https://github.com/PAIR-code/megaplot
Issues 34 https://github.com/PAIR-code/megaplot/issues
Pull requests 24 https://github.com/PAIR-code/megaplot/pulls
Actions https://github.com/PAIR-code/megaplot/actions
Projects https://github.com/PAIR-code/megaplot/projects
Security and quality 0 https://github.com/PAIR-code/megaplot/security
Insights https://github.com/PAIR-code/megaplot/pulse
Code https://github.com/PAIR-code/megaplot
Issues https://github.com/PAIR-code/megaplot/issues
Pull requests https://github.com/PAIR-code/megaplot/pulls
Actions https://github.com/PAIR-code/megaplot/actions
Projects https://github.com/PAIR-code/megaplot/projects
Security and quality https://github.com/PAIR-code/megaplot/security
Insights https://github.com/PAIR-code/megaplot/pulse
Convenience setters for Scene.scale and Scene.offsethttps://github.com/PAIR-code/megaplot/issues/86#top
enhancementNew feature or requesthttps://github.com/PAIR-code/megaplot/issues?q=state%3Aopen%20label%3A%22enhancement%22
https://github.com/RyanMullins
RyanMullinshttps://github.com/RyanMullins
on Nov 7, 2022https://github.com/PAIR-code/megaplot/issues/86#issue-1438305287
setters for the PositionWorldhttps://github.com/PAIR-code/megaplot/blob/main/src/lib/generated/sprite-view-impl.ts#L450
Scene.scalehttps://github.com/PAIR-code/megaplot/blob/main/src/lib/scene-internal.ts#L83
Scene.offsethttps://github.com/PAIR-code/megaplot/blob/main/src/lib/scene-internal.ts#L89
DrawTriggerPointhttps://github.com/PAIR-code/megaplot/blob/3f4e5acb81cf42b3f64bf8c9f40858b3c3a53dfe/src/lib/draw-trigger-point.ts#L23
enhancementNew feature or requesthttps://github.com/PAIR-code/megaplot/issues?q=state%3Aopen%20label%3A%22enhancement%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.