Spaces:
Starting
Starting
Update app.py
Browse files
app.py
CHANGED
@@ -593,10 +593,14 @@ async(p, d, n)=>{
|
|
593 |
if (BABYLON && BABYLON.Engine.LastCreatedScene) {
|
594 |
BABYLON.Engine.LastCreatedScene.onAfterRenderObservable.add(function() { //onDataLoadedObservable
|
595 |
var bg = JSON.parse(document.getElementById("bgcolor").getElementsByTagName("textarea")[0].value);
|
|
|
596 |
for (var i=0; i<bg.length; i++) {
|
597 |
bg[i] /= 255;
|
598 |
}
|
599 |
BABYLON.Engine.LastCreatedScene.clearColor = new BABYLON.Color4(bg[0], bg[1], bg[2], bg[3]);
|
|
|
|
|
|
|
600 |
for (var i=0; i<BABYLON.Engine.LastCreatedScene.getNodes().length; i++) {
|
601 |
if (BABYLON.Engine.LastCreatedScene.getNodes()[i].material) {
|
602 |
BABYLON.Engine.LastCreatedScene.getNodes()[i].material.pointSize = Math.ceil(Math.log2(Math.PI/document.getElementById("zoom").value));
|
|
|
593 |
if (BABYLON && BABYLON.Engine.LastCreatedScene) {
|
594 |
BABYLON.Engine.LastCreatedScene.onAfterRenderObservable.add(function() { //onDataLoadedObservable
|
595 |
var bg = JSON.parse(document.getElementById("bgcolor").getElementsByTagName("textarea")[0].value);
|
596 |
+
BABYLON.Engine.LastCreatedScene.getEngine().setHardwareScalingLevel(1.0);
|
597 |
for (var i=0; i<bg.length; i++) {
|
598 |
bg[i] /= 255;
|
599 |
}
|
600 |
BABYLON.Engine.LastCreatedScene.clearColor = new BABYLON.Color4(bg[0], bg[1], bg[2], bg[3]);
|
601 |
+
BABYLON.Engine.LastCreatedScene.autoClear = false;
|
602 |
+
BABYLON.Engine.LastCreatedScene.autoClearDepthAndStencil = false;
|
603 |
+
BABYLON.Engine.LastCreatedScene.getAnimationRatio();
|
604 |
for (var i=0; i<BABYLON.Engine.LastCreatedScene.getNodes().length; i++) {
|
605 |
if (BABYLON.Engine.LastCreatedScene.getNodes()[i].material) {
|
606 |
BABYLON.Engine.LastCreatedScene.getNodes()[i].material.pointSize = Math.ceil(Math.log2(Math.PI/document.getElementById("zoom").value));
|