diff --git a/protocols/schemas/shapes.prs b/protocols/schemas/shapes.prs index 67b575e..b66db2d 100644 --- a/protocols/schemas/shapes.prs +++ b/protocols/schemas/shapes.prs @@ -4,13 +4,15 @@ Sprite = . Shape = Mesh / Light / Scale / Move / Rotate / @many [Shape ...] / Texture / Color / Name / Floor / Nonphysical / CSG . -Mesh = Sphere / Box / Ground . +Mesh = Sphere / Box / Ground / Plane . Sphere = . Box = . -Light = . +Plane = . Ground = . +Light = . + Vector2 = . Vector3 = . Quaternion = . diff --git a/scene/example.pr b/scene/example.pr index 81a3f19..4bd3bf6 100644 --- a/scene/example.pr +++ b/scene/example.pr @@ -39,6 +39,14 @@ >>>>> + + + 1.0] + + >>> + diff --git a/src/shapes.ts b/src/shapes.ts index 48c6399..6dd5567 100644 --- a/src/shapes.ts +++ b/src/shapes.ts @@ -130,6 +130,7 @@ function buildTexture(name: string, scene: Scene, spec: Shapes.TextureSpec): Mat break; case "uvAlpha": mat.alpha = spec.alpha; + tex.hasAlpha = true; /* FALL THROUGH */ case "uv": { const scale = v2(spec.scale); @@ -165,6 +166,10 @@ export function build(name: string, scene: Scene, shape: Shapes.Shape, customize MeshBuilder.CreateGround(name, { width: v.x, height: v.y }, scene)); break; } + + case "Plane": + t = new ShapeTree(scene, shape, MeshBuilder.CreatePlane(name, {}, scene)); + break; } applyCustomizer(t, customize); return t;