測試各種新玩具,主要是網頁的 Shader 嵌入,還有互動內容測試

hi

自定義功能測試

lua.monster
function awake() print("hello from script a"); end
monster.lua
function awake() print("hello from script a"); end
monster.cs
class Monster { int hp; float speed; }
cs
class Monster { int hp; float speed; }

測試著色器嵌入

測試一般 Shader 嵌入

測試 Float Silder

u_input0
value
u_input1
value
u_input2
value

測試 Vector Picker

u_position
value

glsl
//language - glsl uniform float u_input0; uniform float u_input1; uniform float u_input2; uniform vec2 u_position; void main() { vec2 uv = gl_FragCoord.xy / u_resolution.xx; uv = mix(vec2(-1), vec2(1), uv); float dist = sdf_cross(uv, u_position); vec4 color = vec4(u_input0, u_input1, u_input2, 1); gl_FragColor = mix(vec4(0), color, 1.0 - dist); }

測試其他東西嵌入

嵌入圖片資源

image display error, please report: [/common/gears.gif]

comment

嵌入音效資源

測試文字上色

上色提示區塊

上色註解區塊

上色,註解整段

原生模板功能測試

code block

cs
void Start() { Debug.Log("Hello World"); }
hlsl
void Start() { Debug.Log("Hello World"); }