Skip to content
This repository has been archived by the owner on Apr 4, 2022. It is now read-only.

Allow setting of "deg(n)" in numerical attributes #31

Closed
hmans opened this issue Jan 25, 2021 · 0 comments
Closed

Allow setting of "deg(n)" in numerical attributes #31

hmans opened this issue Jan 25, 2021 · 0 comments
Labels
enhancement New feature or request
Milestone

Comments

@hmans
Copy link
Owner

hmans commented Jan 25, 2021

What? eg. rotation.x="deg(180)"

Why? Because manually typing out half a PI in 100% static three-elements HTML is a bit meh. (It's not a problem when using frameworks, because those will let you use JavaScript's Math.PI.)

How? We already try to parseFloat the value and then use either that or the string itself. Before using the string, we'll insert another step where we check for a deg(...) value using a regexp.

@hmans hmans added the enhancement New feature or request label Jan 25, 2021
@hmans hmans added this to the 0.3 milestone Jan 25, 2021
@hmans hmans mentioned this issue Jan 26, 2021
@hmans hmans closed this as completed in 6194c85 Jan 28, 2021
hmans added a commit that referenced this issue Jan 28, 2021
* main:
  "...deg" transforms (#33) (fixes #31)
hmans added a commit that referenced this issue Jan 29, 2021
* main:
  Refactor args parsing (fixes #40)
  Fix example
  v0.3.0-3
  Resolve that circular dependency that rollup was complaining about
  Reference other objects via CSS selectors in attributes (closes #16)
  New camera handling
  BaseElement.applyAllAttributes
  <three-rect-area-light-helper>
  Make ThreeElement.object writable
  Have ThreeGame emit a "ready" event
  Ignore the src symlink
  "...deg" transforms (#33) (fixes #31)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant