move animate button generation to the right spot
This commit is contained in:
parent
fb603a53e5
commit
214fcec348
1 changed files with 5 additions and 4 deletions
|
|
@ -140,15 +140,13 @@
|
|||
|
||||
api.event.on("preview.end", () => {
|
||||
isParsed = false;
|
||||
if (isCamMode && camStock) {
|
||||
STACKS.getStack("bounds").button("animate", animate);
|
||||
}
|
||||
});
|
||||
|
||||
api.event.on("code.loaded", (info) => {
|
||||
if (isCamMode && camStock) {
|
||||
isParsed = true;
|
||||
STACKS.getStack("parse", SPACE.world).button("animate", animate);
|
||||
let parse = STACKS.getStack("parse", SPACE.world);
|
||||
if (parse) parse.button("animate", animate);
|
||||
}
|
||||
});
|
||||
|
||||
|
|
@ -1255,6 +1253,9 @@
|
|||
if (x && y && z && !STACKS.getStack('bounds')) {
|
||||
const render = new KIRI.Layers().setLayer('bounds', { face: 0xaaaaaa, line: 0xaaaaaa });
|
||||
const stack = STACKS.setFreeMem(false).create('bounds', SPACE.world);
|
||||
if (isCamMode && camStock) {
|
||||
stack.button("animate", animate);
|
||||
}
|
||||
stack.add(render.addPolys([
|
||||
newPolygon().centerRectangle({x:csox, y:csoy, z:0}, x, y),
|
||||
newPolygon().centerRectangle({x:csox, y:csoy, z}, x, y)
|
||||
|
|
|
|||
Loading…
Reference in a new issue