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

Problem with capital letters in scriptName #62

Open
albertvanveen opened this issue Sep 22, 2020 · 3 comments
Open

Problem with capital letters in scriptName #62

albertvanveen opened this issue Sep 22, 2020 · 3 comments
Labels
bug Something isn't working

Comments

@albertvanveen
Copy link

Description

When I create a new script with for example the name 'lookAtScreen' then inside the script the result is 'lookAtscreen'. The S is no capital letter anymore. With for example 'thisIsABug' the result inside the script is 'thisIsAbug'. The B is no capital letter anymore. If I try 'testTestTest' then the result is as expected.

unknown

image

Steps to Reproduce

  1. Create a new script with some capital letters
  2. Check the result inside the script
@Maksims
Copy link
Collaborator

Maksims commented Sep 22, 2020

Based on naming conventions been used: lookAtScreen should be lookAtScreen indeed. But thisIsABug should be thisIsAbug, as consecutive capital letters should be lower case. Like HTMLClass, should be HtmlClass, or RGB should be Rgb.

@albertvanveen
Copy link
Author

Ah ok I didn't know that. Then the problem is only when capital letters are used with only one normal letter in between.

@willeastcott willeastcott added the bug Something isn't working label Oct 28, 2020
@willeastcott willeastcott transferred this issue from playcanvas/editor Feb 25, 2023
@willeastcott
Copy link
Contributor

The code responsible for this is here:

https://github.com/playcanvas/editor-api/blob/main/src/assets/createScript.js#L17

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants