groupBegin
Decorator that begins a collapsible group in the inspector UI.
| Type | Name | Interface Description |
|---|---|---|
| Functions | groupBegin(groupName: string): (target: any, key: string) => any | • Function: Decorator that begins a collapsible group in the inspector UI. All properties after this decorator will be grouped until a corresponding Parameters • Returns Property decorator function |
Example
@component()
export class MaterialSettings extends APJS.BasicScriptComponent {
@serializeProperty()
public materialName: string = "Default";
@groupBegin("Surface Properties")
@serializeProperty()
public roughness: number = 0.5;
@serializeProperty()
public metallic: number = 0;
@serializeProperty()
public ao: number = 1;
@groupEnd()
@groupBegin("Emission")
@serializeProperty()
public emissionColor: APJS.Vector3f = new APJS.Vector3f(0, 0, 0);
@serializeProperty()
public emissionStrength: number = 1;
@groupEnd()
onStart() {
console.log("onStart");
}
}