webgl-operate icon indicating copy to clipboard operation
webgl-operate copied to clipboard

reduce re-implementation of common templates

Open cgcostume opened this issue 5 years ago • 0 comments

this issue is intended for collecting small patterns that are heavily/frequently used within webgl-operates code basis. I would like to see these "snippets" replaced by, e.g., some form of meta programming, transpiling, or something similar ...

Setter only setting when different:

set object(object: Type) {
    if (object === this._object) {
        return;
    }
    this._object = object;

    /* bookmark alteration or trigger some update/recomputation ... */
    ...
}

cgcostume avatar Jul 07 '19 12:07 cgcostume