feat: separate 2d scenes viewports and explicit cameras
This commit is contained in:
@@ -417,6 +417,8 @@ fn finish(vm: &mut Vm, mut work: Work, reads: Vec<endor_core::ReadDependency>) -
|
||||
}
|
||||
let mut commands = Vec::new();
|
||||
let mut clips = Vec::new();
|
||||
let mut views = Vec::new();
|
||||
let mut owners = Vec::new();
|
||||
for mount in &frame.mounts {
|
||||
let before = commands.len();
|
||||
if let Some(custom) = output.commands.get(&mount.id) {
|
||||
@@ -436,12 +438,16 @@ fn finish(vm: &mut Vm, mut work: Work, reads: Vec<endor_core::ReadDependency>) -
|
||||
));
|
||||
}
|
||||
clips.extend(std::iter::repeat_n(mount.clip, commands.len() - before));
|
||||
views.extend(std::iter::repeat_n(mount.view, commands.len() - before));
|
||||
owners.extend(std::iter::repeat_n(mount.id, commands.len() - before));
|
||||
if commands.len() > 10_000 {
|
||||
bail!("paint command budget exceeded");
|
||||
}
|
||||
}
|
||||
frame.commands = commands;
|
||||
frame.command_clips = clips;
|
||||
frame.command_views = views;
|
||||
frame.command_mounts = owners;
|
||||
let registry = object(vm.get_attr(desktop, "types")?)?;
|
||||
let reads = reads
|
||||
.into_iter()
|
||||
|
||||
Reference in New Issue
Block a user