Steps toward improved textures in turtle
This commit is contained in:
parent
4c618250fe
commit
1d30f3fc13
|
@ -38,6 +38,7 @@
|
|||
<sprite "house" []
|
||||
<move <v 0.0 0.0 10.0>
|
||||
<rotate <v 0.0 0.0 0.0>
|
||||
<texture ["textures/oak-herringbone-5e80fb40b00c9-1200.jpg"]
|
||||
<turtle [
|
||||
[
|
||||
to [f]
|
||||
|
@ -123,6 +124,6 @@
|
|||
1.6 B [90 L [0.2 F [1 F] iDoor 1 F] draw] saved
|
||||
1.4 B [90 R [2.3 F [0.7 F] iDoor 6.2 F [0.9 F] iDoor 1 F] draw] saved
|
||||
]>
|
||||
>>>
|
||||
>>>>
|
||||
|
||||
[]
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
import {
|
||||
Mesh,
|
||||
MeshBuilder,
|
||||
Plane,
|
||||
Quaternion,
|
||||
Ray,
|
||||
|
@ -166,9 +165,11 @@ export class TurtleVM extends Cat.VM<TurtleVM> {
|
|||
|
||||
function pushPoint(pathIndex: number, stepIndex: number): number {
|
||||
const pointIndex = positions.length / 3;
|
||||
positions.push(... paths[pathIndex][stepIndex].asArray());
|
||||
uvs.push(us[pathIndex][stepIndex] / uTotal[pathIndex],
|
||||
vs[stepIndex][pathIndex] / vTotal[stepIndex]);
|
||||
const p = paths[pathIndex][stepIndex];
|
||||
positions.push(... p.asArray());
|
||||
uvs.push((p.x - p.z) / 1.2, (p.y) / 0.9);
|
||||
// uvs.push(us[pathIndex][stepIndex] / uTotal[pathIndex],
|
||||
// vs[stepIndex][pathIndex] / vTotal[stepIndex]);
|
||||
return pointIndex;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue