-
Notifications
You must be signed in to change notification settings - Fork 9
/
configurations.dart
45 lines (32 loc) · 1.19 KB
/
configurations.dart
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
import 'dart:math';
import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';
import 'package:flutter_3d_raycast_engine/asset.dart';
import 'package:flutter_3d_raycast_engine/map_information.dart';
import 'package:flutter_3d_raycast_engine/vector.dart';
const double width = 700;
const double height = 500;
const double margin = 8;
const Size screenSize = Size(width, height);
const Size halfScreenSize = Size(width / 2, height / 2);
const double fps = 60;
const int cycleDelay = 1000 ~/ fps;
const double fov = pi / 3;
const double halfFov = fov / 2;
const double rayStep = fov / width;
const double wallHeightMultiplier = 800;
final viewDistance = (width * 1.5) / tan(halfFov);
const int mapSize = 32;
const double mapScale = 4;
const double mapRange = mapScale * mapSize;
const double editorScale = 8;
const double playerSpeed = 0.4;
const double playerRotationSpeed = 0.03;
const double playerRadius = mapScale / 4;
const double textureScale = 64;
const double epsilon = 0.0001;
const double infinity = 10000;
final List<MapInformation> map = [];
final Vector playerPosition = Vector(x: mapSize / 2, y: mapSize / 2);
final List<Asset> materials = [];
final List<Asset> sprites = [];