Skip to content

Commit

Permalink
fix examples
Browse files Browse the repository at this point in the history
  • Loading branch information
yukiny0811 committed Feb 2, 2024
1 parent bce067e commit 8a1d4af
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions Examples/ExampleMacOSApp/ExampleMacOSApp/Sample12.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ class ColoredHitTestableBox: HitTestableBox {

final class Sample12: Sketch {

let numberFactory = NumberTextFactory(font: NSFont.systemFont(ofSize: 60), color: .white)
let textFactory = GeneralTextFactory(font: NSFont.systemFont(ofSize: 60), register: "someTextFrameRate:" + TextFactory.Template.numerics, color: .white)
let numberFactory = NumberImageTextFactory(font: NSFont.systemFont(ofSize: 60), color: .white)
let textFactory = GeneralImageTextFactory(font: NSFont.systemFont(ofSize: 60), register: "someTextFrameRate:" + ImageTextFactory.Template.numerics, color: .white)

static let count = 6
static let multiplier: Float = 5
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ struct TestingApp: App {

ImmersiveSpace(id: "ImmersiveSpace") {
CompositorLayer(configuration: ContentStageConfiguration()) { layerRenderer in
let renderer = RendererBase.BlendMode.add.getRenderer(sketch: SampleSketch(), layerRenderer: layerRenderer)
let renderer = RendererBase.BlendMode.normalBlend.getRenderer(sketch: SampleSketch(), layerRenderer: layerRenderer)
renderer.startRenderLoop()
}
}.immersionStyle(selection: .constant(.full), in: .full)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 16.0;
IPHONEOS_DEPLOYMENT_TARGET = 17.0;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
ONLY_ACTIVE_ARCH = YES;
Expand Down Expand Up @@ -283,7 +283,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 16.0;
IPHONEOS_DEPLOYMENT_TARGET = 17.0;
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
SDKROOT = iphoneos;
Expand All @@ -303,7 +303,7 @@
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_ASSET_PATHS = "\"ExampleiOSApp/Preview Content\"";
DEVELOPMENT_TEAM = "";
DEVELOPMENT_TEAM = XH2JMYC7KB;
ENABLE_PREVIEWS = YES;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES;
Expand Down Expand Up @@ -338,7 +338,7 @@
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_ASSET_PATHS = "\"ExampleiOSApp/Preview Content\"";
DEVELOPMENT_TEAM = "";
DEVELOPMENT_TEAM = XH2JMYC7KB;
ENABLE_PREVIEWS = YES;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES;
Expand Down
4 changes: 2 additions & 2 deletions Examples/ExampleiOSApp/ExampleiOSApp/SketchSample1.swift
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ final class SketchSample1: Sketch {
}
}

override func update(camera: some MainCameraBase) {
override func update(camera: MainCamera) {
camera.rotateAroundY(deltaTime)
elapsed += deltaTime
}
Expand All @@ -41,7 +41,7 @@ final class SketchSample1: Sketch {
}
}

override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?, camera: some MainCameraBase, view: UIView) {
override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?, camera: MainCamera, view: UIView) {
let touch = touches.first!
let location = touch.location(in: view)
let processed = camera.screenToWorldDirection(x: Float(location.x), y: Float(location.y), width: Float(view.frame.width), height: Float(view.frame.height))
Expand Down
4 changes: 2 additions & 2 deletions Examples/ExampleiOSApp/ExampleiOSApp/SketchSample2.swift
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ final class SketchSample2: Sketch {
viewObj.multiplyScale(6)
}

override func update(camera: some MainCameraBase) {
override func update(camera: MainCamera) {
viewObj.$rotation.update(multiplier: deltaTime * 5)
}

Expand All @@ -40,7 +40,7 @@ final class SketchSample2: Sketch {
postProcessor.postProcess(commandBuffer: commandBuffer, texture: viewObj.texture!)
}

override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?, camera: some MainCameraBase, view: UIView) {
override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?, camera: MainCamera, view: UIView) {
let touch = touches.first!
let location = touch.location(in: view)
let processed = camera.screenToWorldDirection(x: Float(location.x), y: Float(location.y), width: Float(view.frame.width), height: Float(view.frame.height))
Expand Down

0 comments on commit 8a1d4af

Please sign in to comment.