auto reapply textures when selecting texture
This commit is contained in:
@@ -34,7 +34,12 @@ function harness() {
|
||||
class Cube {
|
||||
static all = [];
|
||||
static preview_controller = {
|
||||
on(names, listener) { for (const name of names.split(' ')) previewEvents.set(name, listener); },
|
||||
on(names, listener) {
|
||||
for (const name of names.split(' ')) {
|
||||
const previous = previewEvents.get(name);
|
||||
previewEvents.set(name, (event) => { previous?.(event); listener(event); });
|
||||
}
|
||||
},
|
||||
};
|
||||
constructor(data) {
|
||||
Object.assign(this, data, { uuid: `cube-${++sequence}`, mesh: {},
|
||||
|
||||
Reference in New Issue
Block a user