Skip to content

Remove type function#2273

Merged
willeastcott merged 1 commit intomasterfrom
remove-type
Jul 14, 2020
Merged

Remove type function#2273
willeastcott merged 1 commit intomasterfrom
remove-type

Conversation

@willeastcott
Copy link
Copy Markdown
Contributor

@willeastcott willeastcott commented Jul 12, 2020

Various places in the codebase use the type function defined in core.js. However, it's faster, more succinct and more readable to just use alternatives like Array.isArray and typeof directly.

I confirm I have signed the Contributor License Agreement.

@willeastcott willeastcott added the performance Relating to load times or frame rate label Jul 12, 2020
@willeastcott willeastcott requested a review from a team July 12, 2020 12:16
@willeastcott willeastcott self-assigned this Jul 12, 2020
Copy link
Copy Markdown
Member

@slimbuck slimbuck left a comment

Choose a reason for hiding this comment

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

Might also be worth deprecating the type function?

@willeastcott
Copy link
Copy Markdown
Contributor Author

Yeah, I have a follow up commit that should do that. 😄

@willeastcott
Copy link
Copy Markdown
Contributor Author

Actually, in the interest of getting this out with 1.32.0, I'll merge this now. I can officially retire type in a future PR.

@willeastcott willeastcott merged commit 6e5c90b into master Jul 14, 2020
@willeastcott willeastcott deleted the remove-type branch July 14, 2020 09:36
TheJonRobinson added a commit to Mojiworks/playcanvas-engine that referenced this pull request Jul 15, 2020
* mojiworks/pr/sound-stop-typing: (112 commits)
  fix: SoundComponent.stop's string parameter is optional
  [RELEASE] v1.32.0
  [Fix] Changes to Attribute to location mapping (playcanvas#2292)
  Deprecate pc.makeArray (playcanvas#2289)
  [FIX] API ref docs for pc.Mesh#getIndices (playcanvas#2291)
  fix cubemap filtering on safari (playcanvas#2288)
  disable ImageBitmap (playcanvas#2286)
  [Fix] Fix to texture based skinning on Safari (playcanvas#2287)
  fix cubemap dependent loads (playcanvas#2285)
  [Fix] Update to Transform Feedback to work with VAOs (playcanvas#2284)
  Update the anim state graph to support the new data schema (playcanvas#2278)
  Remove viewer (playcanvas#2282)
  [FIX] pc.SoundComponent#resume/stop param type (playcanvas#2281)
  Remove type function (playcanvas#2273)
  Remove some shader-related circular dependencies (playcanvas#2274)
  Glb-parser improvements (playcanvas#2275)
  Fix glb-parser normals generation (playcanvas#2276)
  Glb texture coordinate fix (playcanvas#2252)
  use faces if the asset was previously unloaded (playcanvas#2272)
  fix material resource loader (playcanvas#2268)
  ...

# Conflicts:
#	src/scene/graph-node.js
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

performance Relating to load times or frame rate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants