์ผ | ์ | ํ | ์ | ๋ชฉ | ๊ธ | ํ |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |
- BOJ
- ํจ์คํธ์บ ํผ์ค
- XCTest
- rxcocoa
- BFS
- TCA
- RxSwift
- CollectionView
- tableView
- reactorkit
- ํ๋ก๊ทธ๋๋จธ์ค
- Kuring
- designpattern
- UIKit
- combine
- SwiftUI
- swift
- ๋ฐฑ์ค
- node.js
- Swfit
- arkit
- ios
- MVVM
- realm
- SnapKit
- Xcode
- visionOS
- Lv2
- Flutter
- raywenderlich
- Today
- Total
๋ชฉ๋กscenekit (4)
lgvv98
SCNSceneRendererDelegate SceneKit์ ์ ๋๋ฉ์ด์ ๋ฃจํ์ ๋ค์ด๊ฐ๊ฑฐ๋ ์ถ๊ฐ์ ์ธ ๋ ๋๋ง์ ์ํํ๊ธฐ ์ํด ์ฑ์์ ๊ตฌํํ ์ ์๋ ๋ฉ์๋. protocol SCNSceneRendererDelegate SceneKit์ผ๋ก ๊ฒ์ ๋๋ ์ฑ์ ๋น๋ํ๋ ค๋ฉด SCNView ๊ฐ์ฒด ๋๋ SCNSceneRender ํ๋กํ ์ฝ์ ์ฌ์ฉํ์ฌ scene์ ๋ณด์ฌ์ค ์ ์๋ค. ๊ทธ๋ฐ ๋ค์ ํ๋ ์๋น ๊ฒ์ ๋ก์ง์ ์ถ๊ฐํ๊ฑฐ๋ SceneKit์ด scene์ ๋ ๋๋งํ๊ธฐ ์ ์ด๋ ํ์ ์ฌ์ฉ์๊ฐ ์ง์ ํ Metal ๋๋ OpenGL ๋ ๋๋ง์ ์ํํ๋ ค๋ฉด SCNSceneRendererDelegate ํ๋กํ ์ฝ์ ๊ตฌํํ๋ค. SCNView ๊ฐ์ฒด ํน์ SceneKit ๋ ๋๋ฌ์์ scene์ด ๋ ๋๋ง๋ ๋ ๋ ๋๋ง ๋ฃจํ๋ scene์ ์๋์ ๊ณผ์ ์ ํตํด..
SCNAction ์์ํ๊ธฐ ์ ๊ฐ๋จ์ ๋ฆฌ SceneKit์์ ๋ช ์์ ์ ๋๋ฉ์ด์ : Core Animation SceneKit์์ ์์์ ์ ๋๋ฉ์ด์ : SCNTransaction SCNAction์?: ๊ทธ๋ฃนํ, ์ํ์ค, ์ฑ๊ธ ๋ฑ ์กฐํฉ ๊ฐ๋ฅ. ์ฐ๊ฒฐํ ๋ชจ๋ ๋ ธ๋์ ์์ฑ์ ๋ณ๊ฒฝํ๋ ๊ฐ๋จํ๊ณ ์ฌ์ฌ์ฉ ๊ฐ๋ฅํ ์ ๋๋ฉ์ด์ . class SCNAction : NSObject SCNNode์ก์ ์ด ์ฐ๊ฒฐ๋ ๊ฐ์ฒด์ ๊ตฌ์กฐ์ ๋ด์ฉ์ ๋ณ๊ฒฝํ๊ธฐ ์ํด ์ก์ ์ ์ฌ์ฉํ์ง๋ง ์ก์ ์ ์ฌ์ฉํ์ฌ scene์ ๋ค๋ฅธ ๋ณ๊ฒฝ์ ์ค ์ ์์. SceneKit์์ ์ก์ ์ ์ฌ์ฉ์ ์ ๋ ฅ์ ๋ฐ๋ผ ์์ฃผ ๋ณ๊ฒฝ๋๋ ์ ๋๋ฉ์ด์ ๋์์ ๊ตฌํํ๋ ์ฌ์ด ๋ฐฉ๋ฒ์ ์ ๊ณตํจ. # Working with Actions action์ ์์ฑํ๊ธฐ ์ํด์๋ action๊ณผ ๊ด๋ จ์ด ์๋ ๋ฉ์๋์ ํด..
#3 Animating SceneKit Content ๋ด๊ฐ ๋ง๋ ์ง์ค๋ฉํธ๋ฆฌ๋ค์ ์ด๋ฒคํธ๋ ์ ๋๋ฉ์ด์ ๋ฑ๋ ์ฌ์ฉํ ์ ์๋ค. # Base Code ์ผ๋จ ๊ธฐ๋ณธ์ฝ๋๋ ์ด๋ ๊ฒ ์ฌ๊ธฐ์ ํ๋ํ๋ ์ถ๊ฐํด๋ณด์. func make_image_control() { let scene = SCNScene() arSceneView.scene = scene // ์นด๋ฉ๋ผ ์์ฑ let cameraNode = SCNNode() cameraNode.camera = SCNCamera() cameraNode.position = SCNVector3(x: 0, y: 0, z: 5) scene.rootNode.addChildNode(cameraNode) // Capsule ์์ฑ ๋ฐ ์ถ๊ฐ let capsuleGeometry = SCNCapsule(..
#2 Geometry ๋ค๋ค๋ณด๊ธฐ Geometry ๋ค๋ค๋ณด๊ธฐ - ๋ค์ด๊ฐ๊ธฐ ์ ๊ฐ๋จ์ ๋ฆฌ - Geometry: ์ฐ๋ฆฌ๊ฐ ์ํ๋ ์ด๋ค ๋ฌผ์ฒด (ex. ์ ์ก๋ฉด์ฒด, ๊ตฌ ๋ฑ) - Material: ์ง์ค๋ฉํธ๋ฆฌ ํ๋ฉด์ ์ด๋ค ํจ๊ณผ๋ฅผ ์ฃผ๋๊ฒ (ex. ์ด๋ฏธ์ง ๋ฃ๊ธฐ, ์ ๋ฃ๊ธฐ ๋ฑ) - Node: ARSceneViewํ๋ฉด์ Geometry๋ฅผ ์ถ๊ฐํ ๊ฑด๋ฐ, Node๋ฅผ ํตํด ์ขํ๋ฅผ ์ฃผ์ด ๋ฃ์๋ ์ฌ์ฉ. # SCNGeometry ํด๋์ค material์ด ์ ์๋ ํ๋ฉด์ Scene์ ํ์ํ ์ ์๋ 3์ฐจ์ ๋ชจ์(model ๋๋ mesh๋ผ๊ณ ๋ ๋ถ๋ฆ) SceneKit์์ SCNode ๊ฐ์ฒด์ ์ฐ๊ฒฐ๋ ์ง์ค๋ฉํธ๋ฆฌ๋ Scene์ Visible ์์๋ฅผ ๊ตฌ์ฑํ๋ฉฐ, ์ง์ค๋ฉํธ๋ฆฌ์ ์ฐ๊ฒฐ๋ SCNMaterial ๊ฐ์ฒด๋ ๊ทธ ๋ชจ์์ ๊ฒฐ์ ํฉ๋๋ค. # Working with ..