Please understand that i cannot accurately deliver all the source code.
it printed, inverted up and down
why is it…
camera type
THREE.OrthographicCamera
part of renderer setting
constructor() {
this.renderer = new THREE.WebGLRenderer({
antialias: true,
alpha: true,
depth: false
});
this.renderer.setPixelRatio(window.devicePixelRatio);
this.renderer.autoClear = false;
this.renderer.autoClearColor = true;
this.renderer.autoClearStencil = true;
this.renderer.autoClearDepth = true;
}
part of camera viewport setting
__cameraViewportNear
is 0.1
__cameraViewportFar
is 100
public setCameraViewport(near: number = this.__cameraViewportNear, far: number = this.__cameraViewportFar) {
this.getCamera().left = 0;
this.getCamera().right = this.rendererWidth;
this.getCamera().top = 0;
this.getCamera().bottom = this.rendererHeight;
this.getCamera().near = near;
this.getCamera().far = far;
this.getCamera().updateProjectionMatrix();
}
part of creating mesh
var extrudeSettings = {
steps: 2,
depth: 2,
bevelEnabled: false,
};
//xxx2
let xxx_shape = self.draws().createShape();
xxx_shape.moveTo( 34, 16.8421);
xxx_shape.bezierCurveTo( 34, 29.4737, 17, 40, 17, 40 );
xxx_shape.bezierCurveTo( 17, 40, 0, 29.4737, 0, 16.8421 );
xxx_shape.bezierCurveTo( 0, 7.54047, 7.61116, 0, 17, 0 );
xxx_shape.bezierCurveTo( 26.3888, 0, 34, 7.54047, 34, 16.8421);
xxx_shape.closePath();
//xxx3
let xxx_geo = self.draws().createExtrudeGeometry(xxx_shape, extrudeSettings); // equal new three.extrudegeometry
let xxx_material = self.draws().createMeshBaiscMeterial({color:0x4fff82}); // equal new three.meshBasicMeterial
let xxx_mesh = self.draws().createMesh(xxx_geo, xxx_material); // equal new THREE.Mesh
//xxx4
const xxx_text = self.draws().createTextMesh(); // https://github.com/protectwise/troika/tree/main/packages/troika-three-text
xxx_text.text = "HeLp1_23";
xxx_text.fontSize = 24;
xxx_text.position.z = 1;
xxx_text.color = 0xff0000;
xxx_mesh.add(xxx_text);
//xxx5
setTimeout(()=>{
xxx_text.sync(()=>{
self.events().emit("@render");
});
}, 0);