Skip to content

Commit 2d07548

Browse files
committed
Add fog
1 parent 14139bc commit 2d07548

File tree

2 files changed

+159
-18
lines changed

2 files changed

+159
-18
lines changed

examples/3d-car-coin-hunt/3d-car-coin-hunt.json

Lines changed: 159 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -634,6 +634,14 @@
634634
"identifier": "https://asset-resources.gdevelop.io/public-resources/Mobile Layouts/assets/6a8102ce3340bf9f62300ee1a81ef0b2327b2c6e8d62d7dda68d547f5e2b5969_rotate-screen-icon.png",
635635
"name": "rotate-screen-icon.png"
636636
}
637+
},
638+
{
639+
"file": "assets/FoggySky.png",
640+
"kind": "image",
641+
"metadata": "",
642+
"name": "assets\\FoggySky.png",
643+
"smoothed": true,
644+
"userAdded": false
637645
}
638646
],
639647
"resourceFolders": []
@@ -1104,15 +1112,15 @@
11041112
]
11051113
},
11061114
{
1107-
"b": 216,
1115+
"b": 215,
11081116
"disableInputWhenNotFocused": true,
11091117
"mangledName": "Game",
11101118
"name": "Game",
1111-
"r": 135,
1119+
"r": 221,
11121120
"standardSortMethod": true,
11131121
"stopSoundsOnStartup": true,
11141122
"title": "",
1115-
"v": 179,
1123+
"v": 221,
11161124
"uiSettings": {
11171125
"grid": false,
11181126
"gridType": "rectangular",
@@ -1301,6 +1309,23 @@
13011309
"numberProperties": [],
13021310
"stringProperties": [],
13031311
"initialVariables": []
1312+
},
1313+
{
1314+
"angle": 0,
1315+
"customSize": true,
1316+
"depth": 1,
1317+
"height": 203,
1318+
"keepRatio": true,
1319+
"layer": "Background",
1320+
"name": "NewSprite",
1321+
"persistentUuid": "69a0e10c-4cb2-4f66-832f-e8590d4aac59",
1322+
"width": 1281,
1323+
"x": 0,
1324+
"y": 0,
1325+
"zOrder": 44,
1326+
"numberProperties": [],
1327+
"stringProperties": [],
1328+
"initialVariables": []
13041329
}
13051330
],
13061331
"objects": [
@@ -2573,6 +2598,77 @@
25732598
"width": 31,
25742599
"animations": []
25752600
}
2601+
},
2602+
{
2603+
"adaptCollisionMaskAutomatically": true,
2604+
"assetStoreId": "",
2605+
"name": "NewSprite",
2606+
"type": "Sprite",
2607+
"updateIfNotVisible": false,
2608+
"variables": [],
2609+
"effects": [],
2610+
"behaviors": [
2611+
{
2612+
"bottomEdgeAnchor": 0,
2613+
"leftEdgeAnchor": 1,
2614+
"name": "Anchor",
2615+
"relativeToOriginalWindowSize": true,
2616+
"rightEdgeAnchor": 2,
2617+
"topEdgeAnchor": 0,
2618+
"type": "AnchorBehavior::AnchorBehavior",
2619+
"useLegacyBottomAndRightAnchors": false
2620+
}
2621+
],
2622+
"animations": [
2623+
{
2624+
"name": "",
2625+
"useMultipleDirections": false,
2626+
"directions": [
2627+
{
2628+
"looping": false,
2629+
"timeBetweenFrames": 0.08,
2630+
"sprites": [
2631+
{
2632+
"hasCustomCollisionMask": true,
2633+
"image": "assets\\FoggySky.png",
2634+
"points": [],
2635+
"originPoint": {
2636+
"name": "origine",
2637+
"x": 0,
2638+
"y": 0
2639+
},
2640+
"centerPoint": {
2641+
"automatic": true,
2642+
"name": "centre",
2643+
"x": 0,
2644+
"y": 0
2645+
},
2646+
"customCollisionMask": [
2647+
[
2648+
{
2649+
"x": 0,
2650+
"y": 0
2651+
},
2652+
{
2653+
"x": 256,
2654+
"y": 0
2655+
},
2656+
{
2657+
"x": 256,
2658+
"y": 256
2659+
},
2660+
{
2661+
"x": 0,
2662+
"y": 256
2663+
}
2664+
]
2665+
]
2666+
}
2667+
]
2668+
}
2669+
]
2670+
}
2671+
]
25762672
}
25772673
],
25782674
"objectsFolderStructure": {
@@ -2665,6 +2761,9 @@
26652761
{
26662762
"objectName": "Player"
26672763
},
2764+
{
2765+
"objectName": "NewSprite"
2766+
},
26682767
{
26692768
"objectName": "Coin"
26702769
}
@@ -4123,7 +4222,40 @@
41234222
"ambientLightColorB": 200,
41244223
"ambientLightColorG": 200,
41254224
"ambientLightColorR": 200,
4126-
"camera3DFarPlaneDistance": 5000,
4225+
"camera3DFarPlaneDistance": 10000,
4226+
"camera3DFieldOfView": 45,
4227+
"camera3DNearPlaneDistance": 3,
4228+
"cameraType": "",
4229+
"followBaseLayerCamera": false,
4230+
"isLightingLayer": false,
4231+
"isLocked": false,
4232+
"name": "Background",
4233+
"renderingType": "",
4234+
"visibility": true,
4235+
"cameras": [],
4236+
"effects": [
4237+
{
4238+
"effectType": "Scene3D::HemisphereLight",
4239+
"name": "3D Light",
4240+
"doubleParameters": {
4241+
"elevation": 45,
4242+
"intensity": 1,
4243+
"rotation": 0
4244+
},
4245+
"stringParameters": {
4246+
"groundColor": "64;64;64",
4247+
"skyColor": "255;255;255",
4248+
"top": "Y-"
4249+
},
4250+
"booleanParameters": {}
4251+
}
4252+
]
4253+
},
4254+
{
4255+
"ambientLightColorB": 200,
4256+
"ambientLightColorG": 200,
4257+
"ambientLightColorR": 200,
4258+
"camera3DFarPlaneDistance": 3000,
41274259
"camera3DFieldOfView": 45,
41284260
"camera3DNearPlaneDistance": 0.1,
41294261
"cameraType": "perspective",
@@ -4174,6 +4306,17 @@
41744306
"top": "Z+"
41754307
},
41764308
"booleanParameters": {}
4309+
},
4310+
{
4311+
"effectType": "Scene3D::ExponentialFog",
4312+
"name": "Fog",
4313+
"doubleParameters": {
4314+
"density": 0.0006
4315+
},
4316+
"stringParameters": {
4317+
"color": "221;221;215"
4318+
},
4319+
"booleanParameters": {}
41774320
}
41784321
]
41794322
},
@@ -15314,24 +15457,22 @@
1531415457
},
1531515458
{
1531615459
"type": {
15317-
"value": "SetCameraAngle"
15460+
"value": "SetNumberVariable"
1531815461
},
1531915462
"parameters": [
15320-
"",
15463+
"CameraZ",
1532115464
"=",
15322-
"Object.Angle() + 90",
15323-
"Object.Layer()",
15324-
"0"
15465+
"Object.Object3D::CenterZ()"
1532515466
]
1532615467
},
1532715468
{
1532815469
"type": {
15329-
"value": "SetNumberVariable"
15470+
"value": "ThirdPersonCamera::ThirdPersonCamera::JumpToTargetedRotation"
1533015471
},
1533115472
"parameters": [
15332-
"CameraZ",
15333-
"=",
15334-
"Object.Object3D::CenterZ()"
15473+
"Object",
15474+
"Behavior",
15475+
""
1533515476
]
1533615477
}
1533715478
]
@@ -45958,15 +46099,15 @@
4595846099
"angle": 0,
4595946100
"customSize": true,
4596046101
"depth": 100,
45961-
"height": 10496,
46102+
"height": 12160,
4596246103
"layer": "",
4596346104
"locked": true,
4596446105
"name": "Grass",
4596546106
"persistentUuid": "05276cd6-3502-4c9d-a19e-58308fbbb417",
4596646107
"sealed": true,
45967-
"width": 10624,
45968-
"x": -4480,
45969-
"y": -4480,
46108+
"width": 14080,
46109+
"x": -6784,
46110+
"y": -5376,
4597046111
"z": -100,
4597146112
"zOrder": 47,
4597246113
"numberProperties": [],
@@ -48630,7 +48771,7 @@
4863048771
"gridColor": 10401023,
4863148772
"gridAlpha": 0.8,
4863248773
"snap": true,
48633-
"zoomFactor": 0.13138826996360262,
48774+
"zoomFactor": 0.06334164344484745,
4863448775
"windowMask": false
4863548776
}
4863648777
},
12.9 KB
Loading

0 commit comments

Comments
 (0)