It's been a while since I started coding for RPG Maker MV in javascript, but I have to confess that I'm still a bit better in RGSS (3 mostly). Although I've been able to code almost everything I wanted, there's a little something that bugs me: what's the equivalent of the rgss' viewport in javascript?
More specifically, I just need to make a sprite draw inside a certain viewport (rectangular). I scale and move the sprite constantly, but it must stay inside a rectangle. In RGSS you would just set a viewport with limits, and make that the sprite's viewport and voila. In MV I tried many stuff witout success:
1) Creating a sprite and setting the frame as the limit, and addChild my other sprite in it.
2) Same but with a window as the container.
Any solutions?
More specifically, I just need to make a sprite draw inside a certain viewport (rectangular). I scale and move the sprite constantly, but it must stay inside a rectangle. In RGSS you would just set a viewport with limits, and make that the sprite's viewport and voila. In MV I tried many stuff witout success:
1) Creating a sprite and setting the frame as the limit, and addChild my other sprite in it.
2) Same but with a window as the container.
Any solutions?

