Skip to content

Instantly share code, notes, and snippets.

@makihiro
Created March 9, 2020 06:13
Show Gist options
  • Save makihiro/c4d4adc9840288be3037a3f67dd01f45 to your computer and use it in GitHub Desktop.
Save makihiro/c4d4adc9840288be3037a3f67dd01f45 to your computer and use it in GitHub Desktop.
function addARObjectAt(matrix) {
let newFlower = arObject.clone();
newFlower.visible = true;
newFlower.matrix = matrix;
scene.addNode(newFlower); //sceneに仮想オブジェクトnewFlowerを追加
flowers.push(newFlower);
if (flowers.length > MAX_FLOWERS) {
let oldFlower = flowers.shift();
scene.removeNode(oldFlower);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment