Plane
This commit is contained in:
parent
6e137692e4
commit
c20d7da1f5
|
@ -4,13 +4,15 @@ Sprite = <sprite @name string @shape Shape> .
|
||||||
|
|
||||||
Shape = Mesh / Light / Scale / Move / Rotate / @many [Shape ...] / Texture / Color / Name / Floor / Nonphysical / CSG .
|
Shape = Mesh / Light / Scale / Move / Rotate / @many [Shape ...] / Texture / Color / Name / Floor / Nonphysical / CSG .
|
||||||
|
|
||||||
Mesh = Sphere / Box / Ground .
|
Mesh = Sphere / Box / Ground / Plane .
|
||||||
|
|
||||||
Sphere = <sphere> .
|
Sphere = <sphere> .
|
||||||
Box = <box> .
|
Box = <box> .
|
||||||
Light = <hemispheric-light @v Vector3> .
|
Plane = <plane> .
|
||||||
Ground = <ground @size Vector2> .
|
Ground = <ground @size Vector2> .
|
||||||
|
|
||||||
|
Light = <hemispheric-light @v Vector3> .
|
||||||
|
|
||||||
Vector2 = <v @x double @y double> .
|
Vector2 = <v @x double @y double> .
|
||||||
Vector3 = <v @x double @y double @z double> .
|
Vector3 = <v @x double @y double @z double> .
|
||||||
Quaternion = <q @a double @b double @c double @d double> .
|
Quaternion = <q @a double @b double @c double @d double> .
|
||||||
|
|
|
@ -39,6 +39,14 @@
|
||||||
<floor
|
<floor
|
||||||
<sphere>>>>>>
|
<sphere>>>>>>
|
||||||
|
|
||||||
|
<sprite "note"
|
||||||
|
<texture ["https://www.gravatar.com/avatar/42b16d07d26467b3b1c06affe16413a2?s=256"
|
||||||
|
<v 1.0 1.0>
|
||||||
|
<v 0.0 0.0>
|
||||||
|
1.0]
|
||||||
|
<move <v 0.0 1.0 0.0>
|
||||||
|
<plane>>>>
|
||||||
|
|
||||||
<sprite "plans"
|
<sprite "plans"
|
||||||
<texture ["plans/signal-2022-12-27-125451_002.jpeg"]
|
<texture ["plans/signal-2022-12-27-125451_002.jpeg"]
|
||||||
<move <v 0.0 1.0 -10.0>
|
<move <v 0.0 1.0 -10.0>
|
||||||
|
|
|
@ -130,6 +130,7 @@ function buildTexture(name: string, scene: Scene, spec: Shapes.TextureSpec): Mat
|
||||||
break;
|
break;
|
||||||
case "uvAlpha":
|
case "uvAlpha":
|
||||||
mat.alpha = spec.alpha;
|
mat.alpha = spec.alpha;
|
||||||
|
tex.hasAlpha = true;
|
||||||
/* FALL THROUGH */
|
/* FALL THROUGH */
|
||||||
case "uv": {
|
case "uv": {
|
||||||
const scale = v2(spec.scale);
|
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));
|
MeshBuilder.CreateGround(name, { width: v.x, height: v.y }, scene));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
case "Plane":
|
||||||
|
t = new ShapeTree<Mesh>(scene, shape, MeshBuilder.CreatePlane(name, {}, scene));
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
applyCustomizer(t, customize);
|
applyCustomizer(t, customize);
|
||||||
return t;
|
return t;
|
||||||
|
|
Loading…
Reference in New Issue