How do ScaleViews work?



  • The documentation is really vague on this. I'm trying to make a pixelated platformer, so I don't want the image to have any fading. I have tried:

    • Width = Scene.width, Height = Scene.height (black screen)
    • Width = 16, Height = 16 (part of my image shows, with resizing)
      0cb72390-38fd-4086-8c1a-d14f56306acb-image.png
    • Width = 100, Height = 100 (can get image to show up at a certain resolution)
      0d48330d-7b47-480e-bed3-14b9737614d9-image.png

    I'd appreciate some advice on how to use this....

    This is not exactly helpful:
    97d99b67-d02b-4bdf-b4d5-2894d7777030-image.png

    To create the scale view I did this:

    class MainMenu : Scene() {
        override suspend fun Container.sceneInit() {
            val block = Block("block");
            block.load(resourcesRoot)
            println(block.properties)
            val scaleView = scaleView(16, 16, 20.0)
            scaleView.image(block.texture)
        }
    }
    


  • I also noticed that the scale view was supposed to let me NOT have any of the image fading. It looks like it just changed it to even worse looking fading
    (There seems to be no way to edit my original post, otherwise I would have put it in there)



  • I will check tomorrow. Images have a boolean property called smoothing or filtering (don’t remember exactly how was called). Maybe ScaleView have a similar property already to use nearest as scaling. If not, should be easy to add it



  • It's smoothing