Alpha for textures
This commit is contained in:
parent
472a870b71
commit
b23a340eb1
|
@ -20,6 +20,7 @@ Rotate = @euler <rotate @v Vector3 @shape Shape> / @quaternion <rotate @q Quater
|
||||||
Texture =
|
Texture =
|
||||||
/ @simple <texture @path string @shape Shape>
|
/ @simple <texture @path string @shape Shape>
|
||||||
/ @uv <texture @path string @scale Vector2 @offset Vector2 @shape Shape>
|
/ @uv <texture @path string @scale Vector2 @offset Vector2 @shape Shape>
|
||||||
|
/ @uvAlpha <texture @path string @scale Vector2 @offset Vector2 @alpha double @shape Shape>
|
||||||
.
|
.
|
||||||
|
|
||||||
Color =
|
Color =
|
||||||
|
|
|
@ -8,8 +8,13 @@
|
||||||
<floor <ground <v 30.0 30.0>>>>>
|
<floor <ground <v 30.0 30.0>>>>>
|
||||||
|
|
||||||
<sprite "box"
|
<sprite "box"
|
||||||
<move <v 1.0 1.5 3.0>
|
<move <v 6.0 2.5 8.0>
|
||||||
<texture "textures/grass-256x256.jpg" <floor <box>>>>>
|
<scale <v 10.0 0.1 10.0>
|
||||||
|
<texture "textures/oak-herringbone-5e80fb40b00c9-1200.jpg"
|
||||||
|
<v 0.1 0.1>
|
||||||
|
<v 0.0 0.0>
|
||||||
|
0.75
|
||||||
|
<floor <box>>>>>>
|
||||||
|
|
||||||
<sprite "box2"
|
<sprite "box2"
|
||||||
<move <v -1.0 0.5 3.0>
|
<move <v -1.0 0.5 3.0>
|
||||||
|
|
|
@ -194,6 +194,9 @@ export function build(name: string, scene: Scene, shape: Shapes.Shape, customize
|
||||||
switch (shape.value._variant) {
|
switch (shape.value._variant) {
|
||||||
case "simple":
|
case "simple":
|
||||||
break;
|
break;
|
||||||
|
case "uvAlpha":
|
||||||
|
mat.alpha = shape.value.alpha;
|
||||||
|
/* FALL THROUGH */
|
||||||
case "uv": {
|
case "uv": {
|
||||||
const scale = v2(shape.value.scale);
|
const scale = v2(shape.value.scale);
|
||||||
const offset = v2(shape.value.offset);
|
const offset = v2(shape.value.offset);
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 1.4 MiB |
Loading…
Reference in New Issue