-
Notifications
You must be signed in to change notification settings - Fork 4
3. Environment
Environment enhancements are fully a chroma feature and are implemented to HeckLib, however it is an experimental feature.
Objects can be manipulated using environment enhancements using the Environment class.
new Environment()
This will create a new environment enhancement object. This can be used to manipulate objects or create geometry.
These properties work on all Environment objects.
.active(boolean)
Enables or disables the object..scale(vec3)
Sets the object scale..pos(vec3)
Sets the object position..localPos(vec3)
Sets the object localPosition..rot(vec3)
Sets the object rotation..localRot(vec3)
Sets the object localRotation..lightID(number)
Sets the object lightID..track(string|string[])
Sets the object track.
To make an environment object into a geometry object, just simply add the property
geometry()
. That turns the environment object into a geometry shape.
Example:new Environment .geometry() .push();This just makes a simple geometry object.
To edit the values we can add a few properties to it
.shape(string|geoShape)
Sets the shape of the object. All properties here..material(string|material)
Sets the shape of the object..collision(boolean)
Turns on collider hitbox for the object.Materials should be created so that you can reuse them for other objects. This will also significantly increase the performance of the map. Less materials means less lag, reuse materials if possible.
The syntax for materials isnew Material("name") .color([1, 1, 1]) .shader(Shader.TransparentLight) .track("materialTrack") .push();This would create a new reusable material that can be called with
"name"
in all geometry objects. An example of this would benew Material("name") .color([1, 1, 1]) .shader(Shader.TransparentLight) .push(); new Environment .geometry() .shape(Shape.Cube) .material("name") .push();
.color(vec3)
Sets the material's initial color..shader(shaderType)
Sets the shader for the material. All shaders here..track(string|string[])
Sets the material's track(s). This can be used to control the material color later..keywords(array)
Sets the shader's properties.
This is a bit more complicated subject. This page contains a simple explanation of it.
new Environment .contains("PS") .active(false)This would essentially just disable all environment objects that have
PS
in their name.
.regex(string|RegExp)
Regex search using the ID..contains(string)
Contains search using the ID..exact(string)
Exact search using the ID.
Functions
- Note Effects
- Wall Effects
- Other Effects