Comments (3)
I'm honestly not sure how to solve this one?
Viewports are currently projection matrices from model space (coordinates for vertices relative to each other) to clip space (position on the screen)
The way they're currently implemented, they actually don't do a lot for us, because egui calls RenderPass::set_viewport
to set the region where custom paint callbacks are drawn on the screen.
This is both a curse and a blessing because it means that if we decide to draw things like events inside luminol_graphics::MapView
we'll need to set the viewport ourselves, but it also means that we can effectively ditch Viewport
(for events)
from luminol.
We can still get rid of the projection matrix for Viewport
though because, as far as I know, every single Viewport
projection matrix we currently use is created using glam::Mat4::orthographic_rh
, and that function just generates a matrix that represents some combination of translation and scaling (no rotations, shearing or other weird stuff). That can be reduced to just passing to the shader the translation as vec2<f32>
and the scale as vec2<f32>
instead of using a matrix.
from luminol.
I think what I'll do is split viewport into the region on the screen being drawn to (shared between things drawn in the samw region), and any transformations being applied to what's being drawn
This is how 3d usually works (there's a transformation matrix that applies rotation, scaling, and translation to an object) and a projection matrix which applies perspective and normalizes coordinates to fit in clip space
from luminol.
Related Issues (20)
- Implement RMXP Extractor Into the Editor HOT 4
- Variable controls and Switch toggling
- Event evaluation
- Show/Move Picture Command Visualizer
- Event command editing
- Custom egui app runner to replace eframe HOT 2
- Improved error reports
- Unable to load KNight-Blade after saving
- Editor Plugins HOT 6
- Remove git dependencies HOT 2
- Downloading files in web builds HOT 1
- Tilemap grid
- Placeholder graphics HOT 2
- UI repaints every frame when the map editor is open
- Spellcheck for Text Commands HOT 2
- [BUG] Clicking on tiles in the map view or tilepicker doesn't select/edit tiles
- Random tile placement HOT 3
- Supporting MacOS HOT 3
- [BUG] Tilemaps that wrap (height >8192) are drawn incorrectly
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from luminol.