@@ -7,8 +7,6 @@ import type {
77 FaceDefinition
88} from "../BlockShape.ts" ;
99import {
10- type Vec2 ,
11- type Vec3 ,
1210 FACE
1311} from "../../utils/math.ts" ;
1412import {
@@ -174,79 +172,3 @@ export class RampCornerOuter implements BlockShape {
174172 }
175173}
176174
177- // -- Reverse variants (Y-flipped) -------------------------------------------
178-
179- function yFlipFace ( fd : FaceDefinition ) : FaceDefinition {
180- const flippedAndReversed = fd . vertices
181- . map ( ( [ x , y , z ] ) => [ x , 1 - y , z ] as Vec3 )
182- . reverse ( ) as Vec3 [ ] ;
183- const reversedUvs = [ ...fd . uvs ] . reverse ( ) as Vec2 [ ] ;
184-
185- let flippedFace : FACE ;
186- if ( fd . face === FACE . NegY ) {
187- flippedFace = FACE . PosY ;
188- }
189- else if ( fd . face === FACE . PosY ) {
190- flippedFace = FACE . NegY ;
191- }
192- else {
193- flippedFace = fd . face ;
194- }
195-
196- const flippedNormal : Vec3 = [ fd . normal [ 0 ] , - fd . normal [ 1 ] , fd . normal [ 2 ] ] ;
197-
198- return { face : flippedFace , normal : flippedNormal , vertices : flippedAndReversed , uvs : reversedUvs } ;
199- }
200-
201- const kRampCornerInnerFlipFaces = new RampCornerInner ( ) . faces . map ( yFlipFace ) ;
202- const kRampCornerOuterFlipFaces = new RampCornerOuter ( ) . faces . map ( yFlipFace ) ;
203-
204- /**
205- * RampCornerInnerFlip — Y-flipped RampCornerInner (hangs from ceiling).
206- * Flat ceiling at PosY, full walls PosZ + PosX, diagonal slope descends downward.
207- *
208- * Occludes: PosY, PosZ, PosX.
209- */
210- export class RampCornerInnerFlip implements BlockShape {
211- readonly id : BlockShapeID ;
212- readonly collisionHint : BlockCollisionHint = "trimesh" ;
213-
214- constructor (
215- id : BlockShapeID = "rampCornerInnerFlip"
216- ) {
217- this . id = id ;
218- }
219-
220- readonly faces : readonly FaceDefinition [ ] = kRampCornerInnerFlipFaces ;
221-
222- occludes (
223- face : FACE
224- ) : boolean {
225- return face === FACE . PosY || face === FACE . PosZ || face === FACE . PosX ;
226- }
227- }
228-
229- /**
230- * RampCornerOuterFlip — Y-flipped RampCornerOuter (quarter-pyramid hanging from ceiling).
231- * Flat ceiling at PosY, slope descends downward.
232- *
233- * Occludes: PosY only.
234- */
235- export class RampCornerOuterFlip implements BlockShape {
236- readonly id : BlockShapeID ;
237- readonly collisionHint : BlockCollisionHint = "trimesh" ;
238-
239- constructor (
240- id : BlockShapeID = "rampCornerOuterFlip"
241- ) {
242- this . id = id ;
243- }
244-
245- readonly faces : readonly FaceDefinition [ ] = kRampCornerOuterFlipFaces ;
246-
247- occludes (
248- face : FACE
249- ) : boolean {
250- return face === FACE . PosY ;
251- }
252- }
0 commit comments