Skip to content

Commit 6245342

Browse files
committed
feat: add animation query support to model loading and scene files
1 parent 5fd4508 commit 6245342

12 files changed

Lines changed: 827 additions & 521 deletions

File tree

assets/core/scenes/scene-helmet.json

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,22 @@
8383
}
8484
}
8585
},
86+
"assets": {
87+
"models": {
88+
"helmet":{
89+
"path": "/assets/core/models/gltf/DamagedHelmet.glb"
90+
},
91+
"floor":{
92+
"path": "/assets/core/models/gltf/floor.gltf"
93+
}
94+
},
95+
"environments": {
96+
"sky": "/assets/core/environments/sky.hdr"
97+
}
98+
},
8699
"scene": {
87100
"skybox": {
88-
"path": "/assets/core/environments/sky.hdr",
101+
"environment": "sky",
89102
"resolution": 1024
90103
},
91104
"probes": [
@@ -102,7 +115,7 @@
102115
"entities": [
103116
{
104117
"active": true,
105-
"model": "/assets/core/models/gltf/DamagedHelmet.glb",
118+
"model": "helmet",
106119
"transform": {
107120
"scale": [1.0, 1.0, 1.0],
108121
"translation": [0.0, 3.0, 0.0],
@@ -111,7 +124,7 @@
111124
},
112125
{
113126
"active": true,
114-
"model": "/assets/core/models/gltf/floor.gltf",
127+
"model": "floor",
115128
"transform": {
116129
"scale": [1.0, 1.0, 1.0],
117130
"translation": [0.0, 0.0, 0.0],

assets/core/scenes/scene-humanoid.json

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,22 @@
8383
}
8484
}
8585
},
86+
"assets": {
87+
"models": {
88+
"humanoid":{
89+
"path": "/assets/core/models/gltf/humanoid.gltf"
90+
},
91+
"floor":{
92+
"path": "/assets/core/models/gltf/floor.gltf"
93+
}
94+
},
95+
"environments": {
96+
"sky": "/assets/core/environments/sky.hdr"
97+
}
98+
},
8699
"scene": {
87100
"skybox": {
88-
"path": "/assets/core/environments/sky.hdr",
101+
"environment": "sky",
89102
"resolution": 1024
90103
},
91104
"probes": [
@@ -102,16 +115,20 @@
102115
"entities": [
103116
{
104117
"active": true,
105-
"model": "/assets/core/models/gltf/humanoid.gltf",
118+
"model": "humanoid",
106119
"transform": {
107120
"scale": [1.0, 1.0, 1.0],
108121
"translation": [0.0, 0.0, 0.0],
109122
"rotation": [0.0, 0.0, 0.0, 1.0]
123+
},
124+
"animation": {
125+
"clip": "dance",
126+
"tFlags": ["PL_ANIMATION_FLAG_PLAYING", "PL_ANIMATION_FLAG_LOOPED"]
110127
}
111128
},
112129
{
113130
"active": true,
114-
"model": "/assets/core/models/gltf/floor.gltf",
131+
"model": "floor",
115132
"transform": {
116133
"scale": [1.0, 1.0, 1.0],
117134
"translation": [0.0, 0.0, 0.0],

docs/version.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ the API is complete. It just means we won't break what currently exists.
9898
* ECS Tools v0.1.0 (pl_ecs_tools_ext.h)
9999
* Camera v0.3.0 (pl_camera_ext.h)
100100
* Gizmo v0.1.0 (pl_gizmo_ext.h)
101-
* Model Loader v0.2.1 (pl_model_loader_ext.h)
101+
* Model Loader v0.3.0 (pl_model_loader_ext.h)
102102
* Dear ImGui v0.1.0 (pl_dear_imgui_ext.h)
103103
* Animation v0.1.0 (pl_animation_ext.h)
104104
* Material v0.1.0 (pl_material_ext.h)

0 commit comments

Comments
 (0)