question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Are "type" properties still needed?

See original GitHub issue

As per #7291, the type property was added to objects because the closure compiler was anonymizing constructors. Since switching to a modular build this should no longer be a problem, and indeed running the following:

for(let p in THREE){
    if(typeof THREE[p] === 'function'){
	try{
	    console.log((new THREE[p]()).constructor.name);
        }
	catch(e){
	    // console.log(e);
	}
    }
}

outputs the correct names: FogExp2 Fog Scene LensFlare Sprite LOD Skeleton Bone Mesh LineSegments …

and so on.

Is this property still needed? Or can it be refactored out?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:9 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
mrdoobcommented, Nov 21, 2016

Seems like we still need these… It’s true that the new modular structure retains the function names, but that only works with three.js and three.modules.js. three.min.js still obfuscates the function names…

screen shot 2016-11-21 at 10 10 08

0reactions
looeeecommented, Nov 22, 2016

Ah, good catch! Thanks for investigating 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Is Vendor Prefixing Dead? - CSS-Tricks
Let's take a quick stroll down memory-lane to revisit how vendor prefixing CSS properties came to be. I hope I don't trigger PTSD...
Read more >
Like-Kind Exchanges - Real Estate Tax Tips - IRS
An exchange of real property held primarily for sale still does not qualify as a like-kind exchange. A transition rule in the new...
Read more >
Introduction to data types and field properties - Microsoft Support
This article describes the data types and other field properties available in Access, and includes additional information in a detailed data type reference ......
Read more >
Universal Analytics will be going away - Google Support
On July 1, 2023, standard Universal Analytics properties will stop processing new hits. If you still rely on Universal Analytics, ...
Read more >
Dealing with Properties - Martin Fowler
lmost every object you create needs properties : some statement about the object. ... would still be present on those objects that had...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found