0

I'm trying to make a 3D2D Sign that has text on it and displays a website, so that i can walk around it and the website will stay in the same position. So far I have got this code but don't know how to import the website.

include("shared.lua")

function ENT:Initialize()
    self:SetMaterial("models/shiny")
    self:SetRenderMode(RENDERMODE_NORMAL)
    self:SetColor(Color( 0, 0, 0, 255 ))
end

function ENT:Draw()
    self:DrawModel()

    local ENTPos = self:GetPos()+Vector(0,0,26)
    local ENTAng = self:GetAngles()
    ENTAng:RotateAroundAxis(ENTAng:Forward(), 0)
    ENTAng:RotateAroundAxis(ENTAng:Right(), 270)
    ENTAng:RotateAroundAxis(ENTAng:Up(), 90)

    local url = "https://www.google.com/"
    local webPage = vgui.Create("F1HTML")
    webPage:OpenURL(url)

    cam.Start3D2D(ENTPos + ENTAng:Up() * 2, ENTAng, 0.5)
    draw.RoundedBox( 2, -220, -62.5, 440, 227, Color(0, 0, 0, 255) );--Black Body
    draw.RoundedBox( 2, -220, -62.5, 440, 30, Color(255, 0, 0, 255) );--Red Title

    local FontNameTitle = "HUDNumber5"
    draw.SimpleText( "Server", FontNameTitle, 0, -33, Color( 255, 255, 255, 255 ), TEXT_ALIGN_CENTER, TEXT_ALIGN_TOP)

    cam.End3D2D()

end
4

1 回答 1

1

要像您尝试那样在 3D 空间中显示网站,我建议使用HandsomeMatt 的 3D2D derma 项目

您可能已经知道,Derma 可用于在面板中打开网站。查看Derma 基本指南,了解如何使用 derma。

它允许您在 3D2D 空间中绘制真皮面板,如您所愿!

于 2015-02-10T21:41:32.053 回答