0
ノードの色をスムーズにフェードアウトしようとしていますが、SCNTransactionが正しく動作するように見えません。ある色から別の色にゆっくりと移行したい。SCNTransaction color fade?
let defaultMaterial = SCNMaterial()
defaultMaterial.diffuse.contents = randomColor()
defaultMaterial.specular.contents = randomColor()
defaultMaterial.emission.contents = randomColor()
SCNTransaction.begin()
SCNTransaction.animationDuration = 2.0
emptyLeftSquare.firstMaterial? = defaultMaterial
emptyRightSquare.firstMaterial? = defaultMaterial
emptyUpSquare.firstMaterial? = defaultMaterial
emptyDownSquare.firstMaterial? = defaultMaterial
emptyBottomRightLink.firstMaterial? = defaultMaterial
emptyBottomLeftLink.firstMaterial? = defaultMaterial
emptyTopLeftLink.firstMaterial? = defaultMaterial
emptyTopRightLink.firstMaterial? = defaultMaterial
SCNTransaction.commit()