23 lines
511 B
JavaScript
23 lines
511 B
JavaScript
import { Controller } from "@hotwired/stimulus"
|
|
import * as THREE from "three"
|
|
import BIM from '../bim.js';
|
|
|
|
export default class extends Controller {
|
|
static targets = ['hex'];
|
|
|
|
color(event) {
|
|
let color = event.target.value;
|
|
this.hexTarget.querySelector('span').textContent = color;
|
|
BIM.clipper.config.color = new THREE.Color(color);
|
|
}
|
|
|
|
size(event) {
|
|
BIM.clipper.config.size = event.target.value
|
|
}
|
|
|
|
deleteAll() {
|
|
BIM.clipper.deleteAll();
|
|
}
|
|
}
|
|
|