work on getting index translated widget geometry
This commit is contained in:
parent
ad1b25416e
commit
2af361fc5a
8 changed files with 57 additions and 37 deletions
|
|
@ -40,6 +40,12 @@ class Layers {
|
|||
return this.layers[layer];
|
||||
}
|
||||
|
||||
// in radians
|
||||
setRotation(x = 0, y = 0, z = 0) {
|
||||
this.rotation = { x, y, z };
|
||||
return this;
|
||||
}
|
||||
|
||||
setLayer(layer, colors, off) {
|
||||
let layers = this.layers;
|
||||
if (typeof(colors) === 'number') {
|
||||
|
|
@ -50,6 +56,7 @@ class Layers {
|
|||
};
|
||||
}
|
||||
this.current = layers[layer] = layers[layer] || {
|
||||
rotation: this.rotation,
|
||||
off: off === true,
|
||||
lines: [],
|
||||
polys: [], // colors are an attribute on polygons
|
||||
|
|
@ -59,8 +66,7 @@ class Layers {
|
|||
paths: undefined, // 3d extrusion / tube paths (used to be an array, now merged - FIX)
|
||||
cpath: undefined, // path colors indices
|
||||
color: colors || {
|
||||
index: 0,
|
||||
check: 0,
|
||||
check: 0, // unused?
|
||||
line: 0,
|
||||
face: 0,
|
||||
opacity: 1
|
||||
|
|
|
|||
Loading…
Reference in a new issue