javascript - Why does every object in BabylonJS require a name? - Stack Overflow
I wonder why does every object you create (Box, Sphere, Camera, Light, etc) require a name
to be specified?
I'm new to BabylonJS, but have used ThreeJS before, where there is no such a requirement. So, I wonder why such a design decision in BabylonJS?
I understand that these names allow me to look up objects by name
. But what if I never intend to look up a specific object - why do I still need to specify a name
?
In addition to the name
all objects also seem to have an id
. But setting of the id
is not required. Though apparently these id
's are the same as name
. Looks like you can look up objects also by id
. I'm even more puzzled now.
More specifically I would like to know:
- Do these names have to be unique? What will happen if they are not?
- What to do if I don't care about a name? Use empty string?
- Perhaps I should care about always using some sensible name? Why?
- What's the difference between
name
andid
?
最新文章
- 有点厉害 win10兼容安卓应用方式曝光
- 苹果WWDC2014:iOS 8新功能都有哪些?
- 80后回忆录 那些年我们折腾过的IT玩意
- reactjs - When i run the build command on my project, the dist files aren't being created in the correct format - Stack
- ios - CocoaPods could not find compatible versions for pod "FirebaseCore": - Stack Overflow
- javascript - How to delete content from content-editable field on facebookmessenger.com? - Stack Overflow
- How do you use partitions in Music Player Daemon (MPD) - Stack Overflow
- reactjs - How to import svg icons in Nextjs 15 - Stack Overflow
- dolphindb - Whitepaper error: “cannot recognize the token b” - Stack Overflow
- javascript - Why Does Putting a Custom HTML Element Inside Another Leaves the Second Hidden? - Stack Overflow
- matplotlib - Annotate each subplot from a list - Stack Overflow
- expo - Thread problem with expo_av in React Native app development - Stack Overflow
- javascript - How to properly handle AES encryption in React Native and generate Random Key for AES encryption? - Stack Overflow
- amazon web services - Python boto3: download files from s3 to local only if there are differences between s3 files and local one
- google cloud platform - Java application unable to find ADC when Workload Identity is enabled on GKE cluster - Stack Overflow
- python - Unable to get form data in database and getting type object 'UserRegister' has no attribute 'US
- python - Convert numpy float to string - Stack Overflow