mirror of
https://github.com/enduro2d/enduro2d.git
synced 2025-12-14 16:09:06 +07:00
Merge branch 'feature/remove_3d' into feature/input_event_system
This commit is contained in:
@@ -11,7 +11,7 @@
|
||||
"prototype" : "../prefabs/gnome_prefab.json",
|
||||
"components" : {
|
||||
"actor" : {
|
||||
"translation" : [0,0,0],
|
||||
"translation" : [0,0],
|
||||
"scale" : 20
|
||||
},
|
||||
"behaviour" : {
|
||||
@@ -28,7 +28,7 @@
|
||||
"outline_color" : [0,0,0,255]
|
||||
},
|
||||
"actor" : {
|
||||
"translation" : [-315,-235,0],
|
||||
"translation" : [-315,-235],
|
||||
"scale" : 1
|
||||
},
|
||||
"behaviour" : {
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
"prototype" : "../prefabs/gnome_prefab.json",
|
||||
"components" : {
|
||||
"actor" : {
|
||||
"translation" : [0,0,0],
|
||||
"translation" : [0,0],
|
||||
"scale" : 20
|
||||
}
|
||||
}
|
||||
@@ -19,7 +19,7 @@
|
||||
"blending" : "additive"
|
||||
},
|
||||
"actor" : {
|
||||
"translation" : [-50,-50,0]
|
||||
"translation" : [-50,-50]
|
||||
}
|
||||
}
|
||||
}, {
|
||||
@@ -29,7 +29,7 @@
|
||||
"tint" : [255,0,0,255]
|
||||
},
|
||||
"actor" : {
|
||||
"translation" : [50,-50,0]
|
||||
"translation" : [50,-50]
|
||||
}
|
||||
}
|
||||
}, {
|
||||
@@ -42,7 +42,7 @@
|
||||
"outline_color" : [0,0,0,255]
|
||||
},
|
||||
"actor" : {
|
||||
"translation" : [0,180,0],
|
||||
"translation" : [0,180],
|
||||
"scale" : 3
|
||||
}
|
||||
}
|
||||
@@ -56,7 +56,7 @@
|
||||
"outline_color" : [0,0,0,255]
|
||||
},
|
||||
"actor" : {
|
||||
"translation" : [0.5,-180.5,0],
|
||||
"translation" : [0.5,-180.5],
|
||||
"scale" : 3
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
"prototype" : "../prefabs/coin_prefab.json",
|
||||
"components" : {
|
||||
"actor" : {
|
||||
"translation" : [350,250,0],
|
||||
"translation" : [350,250],
|
||||
"scale" : 0.25
|
||||
}
|
||||
}
|
||||
@@ -16,7 +16,7 @@
|
||||
"prototype" : "../prefabs/raptor_prefab.json",
|
||||
"components" : {
|
||||
"actor" : {
|
||||
"translation" : [300,-350,0],
|
||||
"translation" : [300,-350],
|
||||
"scale" : 0.25
|
||||
}
|
||||
}
|
||||
@@ -24,7 +24,7 @@
|
||||
"prototype" : "../prefabs/dragon_prefab.json",
|
||||
"components" : {
|
||||
"actor" : {
|
||||
"translation" : [-100,0,0],
|
||||
"translation" : [-100,0],
|
||||
"scale" : 0.9
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,7 +4,19 @@ local renderer = {
|
||||
enabled = true,
|
||||
|
||||
---@type boolean
|
||||
disabled = false
|
||||
disabled = false,
|
||||
|
||||
---@type t3f
|
||||
transform = t3f.identity(),
|
||||
|
||||
---@type v3f
|
||||
translation = v3f.zero(),
|
||||
|
||||
---@type q4f
|
||||
rotation = q4f.identity(),
|
||||
|
||||
---@type v3f
|
||||
scale = v3f.unit()
|
||||
}
|
||||
|
||||
---@overload fun(self: renderer)
|
||||
|
||||
@@ -1,16 +1,19 @@
|
||||
---@class node
|
||||
local node = {
|
||||
---@type t3f
|
||||
transform = t3f.identity(),
|
||||
---@type gobject
|
||||
owner = nil,
|
||||
|
||||
---@type v3f
|
||||
translation = v3f.zero(),
|
||||
---@type t2f
|
||||
transform = t2f.identity(),
|
||||
|
||||
---@type q4f
|
||||
rotation = q4f.identity(),
|
||||
---@type v2f
|
||||
translation = v2f.zero(),
|
||||
|
||||
---@type v3f
|
||||
scale = v3f.unit(),
|
||||
---@type number
|
||||
rotation = 0,
|
||||
|
||||
---@type v2f
|
||||
scale = v2f.unit(),
|
||||
|
||||
---@type m4f
|
||||
local_matrix = m4f.identity(),
|
||||
|
||||
@@ -4,7 +4,7 @@ local world = {
|
||||
|
||||
---@overload fun(prefab: prefab): gobject
|
||||
---@overload fun(prefab: prefab, parent: node): gobject
|
||||
---@overload fun(prefab: prefab, parent: node, transform: t3f): gobject
|
||||
---@overload fun(prefab: prefab, parent: node, transform: t2f): gobject
|
||||
---@return gobject
|
||||
function world:instantiate(...) end
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ end
|
||||
---@param go gobject
|
||||
local function update_gnome_rotation(meta, go)
|
||||
local time = the_engine.time
|
||||
go.actor.node.rotation = q4f.make_from_euler_angles(0, time, 0)
|
||||
go.renderer.rotation = q4f.make_from_euler_angles(0, time, 0)
|
||||
end
|
||||
|
||||
-- -----------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user