Delete skybox.txt
This commit is contained in:
parent
40100ca627
commit
41d7cc1ae9
1 changed files with 0 additions and 32 deletions
32
skybox.txt
32
skybox.txt
|
|
@ -1,32 +0,0 @@
|
|||
--@name skybox
|
||||
--@author
|
||||
--@client
|
||||
--@owneronly
|
||||
--[[
|
||||
replace materail of skybox
|
||||
--]]
|
||||
--settings
|
||||
local url = "https://i.imgur.com/DrTGfP1.jpeg"
|
||||
local model = "sphere" -- models : cube , sphere
|
||||
|
||||
--code
|
||||
local models = {
|
||||
cube = "models/holograms/cube.mdl",
|
||||
sphere = "models/holograms/hq_sphere.mdl"
|
||||
}
|
||||
local sizeX = {
|
||||
cube = Vector(-4000,-4000,-3900),
|
||||
sphere = Vector(-4400,-4400,-3900)
|
||||
}
|
||||
local sky = hologram.create(owner():getShootPos(),Angle(0,0,180),models[model],sizeX[model])
|
||||
sky:suppressEngineLighting(true)
|
||||
local mat = material.create("UnlitGeneric")
|
||||
mat:setInt("$flags", 256)
|
||||
mat:setTextureURL("$basetexture", url, function(m, u, w, h, l)
|
||||
if m == nil then return end
|
||||
l(0, 0, m:getWidth(), m:getHeight())
|
||||
sky:setMaterial("!" .. mat:getName())
|
||||
end)
|
||||
hook.add("think","",function()
|
||||
sky:setPos(owner():getShootPos())
|
||||
end)
|
||||
Loading…
Add table
Reference in a new issue