mirror of
https://github.com/teverse/teverse
synced 2025-08-24 23:24:45 +02:00
Compare commits
2 Commits
64c7894bef
...
46fda8fe65
Author | SHA1 | Date | |
---|---|---|---|
![]() |
46fda8fe65 | ||
![]() |
c4803464b7 |
@ -186,20 +186,27 @@ return {
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
print(translateBy, offsetBy)
|
||||||
|
|
||||||
if didMove then
|
if didMove then
|
||||||
--print(dist, translateBy)
|
--print(dist, translateBy)
|
||||||
for _,v in pairs(selection.selection) do
|
for _,v in pairs(selection.selection) do
|
||||||
if type(v.position) == "vector3" and type(v.size) == "vector3" then
|
if type(v.position) == "vector3" and type(v.size) == "vector3" then
|
||||||
local scaleBy = (v.rotation * translateBy)
|
local scaleBy = (v.rotation * translateBy)
|
||||||
scaleBy = vector3(math.abs(scaleBy.x), math.abs(scaleBy.y), math.abs(scaleBy.z)):normal()
|
scaleBy = vector3(math.abs(scaleBy.x), math.abs(scaleBy.y), math.abs(scaleBy.z))
|
||||||
if scaleBy.x < 0.01 then
|
if scaleBy.x < 0.01 then
|
||||||
scaleBy.x = 0
|
scaleBy.x = 0
|
||||||
end
|
end
|
||||||
|
if scaleBy.y < 0.01 then
|
||||||
|
scaleBy.y = 0
|
||||||
|
end
|
||||||
|
if scaleBy.z < 0.01 then
|
||||||
|
scaleBy.z = 0
|
||||||
|
end
|
||||||
|
|
||||||
if translateBy[axis] < 0 then
|
if translateBy[axis] < 0 then
|
||||||
scaleBy = -scaleBy
|
scaleBy = -scaleBy
|
||||||
end
|
end
|
||||||
|
|
||||||
v.position = v.position - (offsetBy / 2)
|
v.position = v.position - (offsetBy / 2)
|
||||||
v.size = v.size + scaleBy
|
v.size = v.size + scaleBy
|
||||||
end
|
end
|
||||||
|
@ -152,7 +152,7 @@ local function createHierarchyButton(object, guiParent)
|
|||||||
controller.scrollView.canvasSize =
|
controller.scrollView.canvasSize =
|
||||||
guiCoord(1, 0, 0, updatePositions())
|
guiCoord(1, 0, 0, updatePositions())
|
||||||
end
|
end
|
||||||
else
|
elseif object.name ~= "_bounding" then
|
||||||
-- single click
|
-- single click
|
||||||
local currentTime = os.time()
|
local currentTime = os.time()
|
||||||
lastClick = currentTime
|
lastClick = currentTime
|
||||||
|
Loading…
x
Reference in New Issue
Block a user