This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // | |
| // CALayer+Pause.swift | |
| // | |
| // Created by Grzegorz Krukowski on 11/05/2017. | |
| // Copyright © 2017. All rights reserved. | |
| // | |
| import Foundation | |
| extension CALayer { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Will fire 60x per second (90 in VR) | |
| update = -> | |
| print Date.now() | |
| # Will fire 10x per second | |
| fixedUpdateFps = 10 | |
| fixedUpdate = -> | |
| print Date.now() | |
| fixedUpdate = AFRAME.utils.throttle(fixedUpdate, 1000/fixedUpdateFps); |