-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPaperPlaneVM.swift
More file actions
27 lines (21 loc) · 902 Bytes
/
Copy pathPaperPlaneVM.swift
File metadata and controls
27 lines (21 loc) · 902 Bytes
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
//
// PaperPlaneVM.swift
// AnimationExamples
//
// Created by Esat Gözcü on 2023/03/13.
//
import SwiftUI
class PaperPlaneVM : ObservableObject {
var randomYList = [CGFloat]()
var randomSize = [CGFloat]()
var randomDurationMillis = [CGFloat]()
var randomDelayMillis = [CGFloat]()
var screenHeight = Int(UIScreen.main.bounds.height)
var itemSize = 20
init() {
randomYList = RandomGenerator.uniqueRandoms(numberOfRandoms: itemSize, minNum: 100 , maxNum: screenHeight)
randomSize = RandomGenerator.uniqueRandoms(numberOfRandoms: itemSize, minNum: 20 , maxNum: 100)
randomDurationMillis = RandomGenerator.uniqueRandoms(numberOfRandoms: itemSize, minNum: 750 , maxNum: 1250)
randomDelayMillis = RandomGenerator.uniqueRandoms(numberOfRandoms: itemSize, minNum: 0 , maxNum: 1000)
}
}