General > Feedback

suggestion

<< < (2/3) > >>

EgonOlsen:

--- Quote from: "manumoi" ---I suppose there is a way to redefine this limit but I wasn t able to find it.
How to do that?
--- End quote ---
Set Config.maxLights to a higher value before instantiating a World.

Melssj5:
Why wont you change that feature on jpct?

EgonOlsen:

--- Quote from: "Melssj5" ---Why wont you change that feature on jpct?
--- End quote ---
Because it will break all existing code and doesn't really gain you anything except for giving you the gut feeling that it's somehow "better" that way. One thing i really hate about non-commercial software (may it be open source or not) is when the API constantly changes without adding new functionality, i.e. when the only reason for a change is to make the developers of the API feel better.
But i may add such Wrapper as an option and put it into the util-package. I haven't done this until now, because nobody ever complained about it and because such a wrapper is drop dead simple to write by yourself if needed.

Melssj5:
but the feature is not only for moving the lights, if having the object Light with its own methods it could help for managing them, for example:

a method to move the lights

a method to remove it from the world

a method to change its colors

a method to change its radio action

etc.

of course this things can be donde on other ways but its not likely to get a Light instance by using an id for managing them from another class. The problem is that I dont know how to get that ID.

rolz:
The id is assigned by World when you call world.addLight()


--- Code: ---

public static class Light {

 private int lightId;

 public Light(World world){
  this.lightId = world.addLight((new SimpleVector(), 255 255,255))
 }

//... put your methods here
//setColor()
//setPosition()
//setIntensity()

}


--- End code ---

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version