renderObject method
void
renderObject()
Implementation
void renderObject(Object3D object, scene, Camera camera,
BufferGeometry geometry, Material material, Map<String, dynamic>? group) {
// print(" render renderObject type: ${object.type} material: ${material} name: ${object.name} geometry: ${geometry}");
// print("1 render renderObject type: ${object.type} name: ${object.name} ${DateTime.now().millisecondsSinceEpoch}");
if (object.onBeforeRender != null) {
object.onBeforeRender!(
renderer: this,
mesh: object,
scene: scene,
camera: camera,
geometry: geometry,
material: material,
group: group);
}
object.modelViewMatrix
.multiplyMatrices(camera.matrixWorldInverse, object.matrixWorld);
object.normalMatrix.getNormalMatrix(object.modelViewMatrix);
if (material.onBeforeRender != null) {
material.onBeforeRender!(this, scene, camera, geometry, object, group);
}
if (material.transparent == true && material.side == DoubleSide) {
material.side = BackSide;
material.needsUpdate = true;
renderBufferDirect(camera, scene, geometry, material, object, group);
material.side = FrontSide;
material.needsUpdate = true;
renderBufferDirect(camera, scene, geometry, material, object, group);
material.side = DoubleSide;
} else {
renderBufferDirect(camera, scene, geometry, material, object, group);
}
object.onAfterRender(
renderer: this,
scene: scene,
camera: camera,
geometry: geometry,
material: material,
group: group);
// print("2 render renderObject type: ${object.type} name: ${object.name} ${DateTime.now().millisecondsSinceEpoch}");
}