cloneColors
cloneColors: (ModelData) -> ModelDataThis model data, its colours its own (they already are: see the class doc).
client:loadModelData(…)| Method | Returns | Description |
|---|---|---|
cloneColors() | ModelData | This model data, its colours its own (they already are: see the class doc). |
recolor(number, number) | ModelData | Replace face colour colorToReplace with colorToReplaceWith (HSL, a signed 16-bit value or its unsigned form), after the recolours befor… |
light(number, number, number, number, number) | Model? | (ModelData, number, number, number, number, number) -> Model?: The model, lit with ambient, contrast and light direction x, y, `z… |
light() | Model? |
| Field | Type | Description |
|---|---|---|
DEFAULT_AMBIENT | number | The ambient light light() uses. |
DEFAULT_CONTRAST | number | The contrast light() uses. |
DEFAULT_X | number | The light direction's x light() uses. |
DEFAULT_Y | number | The light direction's y light() uses. |
DEFAULT_Z | number | The light direction's z light() uses. |
| Method | Returns | Description |
|---|---|---|
Client.loadModelData | ModelData? | Cache model id's data, to recolour and light; nil when the cache has no such model. Each call makes a new one, so a recolour never reac… |
cloneColorscloneColors: (ModelData) -> ModelDataThis model data, its colours its own (they already are: see the class doc).
recolorrecolor: (ModelData, number, number) -> ModelDataReplace face colour colorToReplace with colorToReplaceWith (HSL, a signed 16-bit value or its unsigned form), after the recolours before it; this model data.
lightlight: ((ModelData, number, number, number, number, number) -> Model?) & ((ModelData) -> Model?)(ModelData, number, number, number, number, number) -> Model?: The model, lit with ambient, contrast and light direction x, y, z, as the client lights it (the SD model in either mode).
(ModelData) -> Model?: The model lit with the defaults (DEFAULT_AMBIENT, ...).