This file contains 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
#import <UIKit/UIKit.h> | |
#import <ImageIO/ImageIO.h> | |
#import <MobileCoreServices/MobileCoreServices.h> | |
- (void)exportAnimatedGif | |
{ | |
UIImage *shacho = [UIImage imageNamed:@"shacho.png"]; | |
UIImage *bucho = [UIImage imageNamed:@"bucho.jpeg"]; | |
NSString *path = [[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) lastObject] stringByAppendingPathComponent:@"animated.gif"]; |
This file contains 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
import Foundation | |
import SceneKit | |
public enum BinarySTLParser { | |
public enum STLError: Error { | |
case fileTooSmall(size: Int) | |
case unexpectedFileSize(expected: Int, actual: Int) | |
case triangleCountMismatch(diff: Int) | |
} | |
This file contains 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
class GameWorld { | |
var systems: [System] = [] | |
var entities: [Entity] = [] | |
var terrain: Terrain? | |
var level: Level? | |
var player: Player? | |
// Add a system to the game world | |
func addSystem(_ system: System) { | |
systems.append(system) |