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.

Request : Please make the Behaviour class public

See original GitHub issue

Current behavior

The Behaviour class is not accessible from the public. And the Behaviour class cannot be extended.

Expected behavior

The Behaviour class is accessible from the public.

Motivation / Use Case

Third party developers will be able to create custom behaviors.


Currently, the Color behavior in three-nebula has two variables, ColorA and ColorB.

I want to set the transparency to a more granular level. For this reason, I have prototyped a custom behavior with the color of the Canvas element as a variable.

This is a color behavior with canvas elements and png images as variables.

This prototype works in 5.1.0 and does not work in 5.1.1.

Why it doesn’t work

This prototype is a custom class that extends the Behavior class in the src directory.

From this commit, the src folder has been removed from the npm package. That’s why I can’t extend the Behavior class from src/behaviour/Behaviour.js.

Additional information

If getEasingByName() and SUPPORTED_JSON_BEHAVIOUR_TYPES are public, third party developers can customize the fromJson() function.

However, the public SUPPORTED_JSON_BEHAVIOUR_TYPES has a Side effects. If the behavior has a duplicate TYPE, fromJson will not work. You can’t limit what TYPE to third party developers.

I’ve thought of several ideas. They are not the best, but I hope they will help you.

  2. make the function for registering TYPE.


macOS 10.15.2 three-nebula 5.1.0 - 5.1.1 webpack 4.43.0

Thank you.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6

github_iconTop GitHub Comments

rohan-deshpandecommented, Aug 3, 2020

@cjsjy123 yes, the editor is what is holding up the release a bit, I want the editor to be available at this time. I’ve made the change and committed it to the develop branch in #100 please wait a tiny bit longer, it’ll be out in master soon!

rohan-deshpandecommented, Jul 12, 2020

Really soon please wait a little longer!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Super keyword in Java, interesting behavior, please explain
In Java, the super keyword always refers to the superclass of the type in which the keyword is used, not the superclass of...
Read more >
Supporting Child and Student Social, Emotional, Behavioral ...
Establishing a plan to gather, honor, and reflect voice and choice within school, district and community decision making may require expanding team membership ......
Read more >
2.2. @Bean - Spring
When @Bean s have dependencies on one another, expressing that dependency is as simple as having one bean method call another: @Configuration public...
Read more >
Classes and objects - C# Fundamentals tutorial | Microsoft Learn
Create your first C# program and explore object oriented concepts.
Read more >
Inheritance — What your mother never told you, C++ FAQ
Virtual functions, in their view, should never be public, because they define the class' interface, which must remain consistent in all derived classes....
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 Post

No results found

github_iconTop Related Hashnode Post

No results found