mirror of
https://github.com/FyroxEngine/Fyrox.git
synced 2026-10-12 02:02:20 +00:00
fixed tests + clippy warnings
This commit is contained in:
+1
-1
@@ -58,7 +58,7 @@ impl SceneLoader {
|
||||
},
|
||||
)
|
||||
.unwrap();
|
||||
let material = MaterialResource::new_ok(Default::default(), material, true);
|
||||
let material = MaterialResource::new_ok(Default::default(), material);
|
||||
|
||||
// Add some sprites.
|
||||
for y in 0..10 {
|
||||
|
||||
+1
-6
@@ -80,7 +80,6 @@ async fn create_scene(resource_manager: ResourceManager) -> GameScene {
|
||||
.with_material(MaterialResource::new_ok(
|
||||
Default::default(),
|
||||
cursor_material,
|
||||
true,
|
||||
))
|
||||
.build()])
|
||||
.build(&mut scene.graph);
|
||||
@@ -103,11 +102,7 @@ async fn create_scene(resource_manager: ResourceManager) -> GameScene {
|
||||
.with_surfaces(vec![SurfaceBuilder::new(SurfaceSharedData::new(
|
||||
SurfaceData::make_sphere(10, 10, 0.2, &Matrix4::identity()),
|
||||
))
|
||||
.with_material(MaterialResource::new_ok(
|
||||
Default::default(),
|
||||
agent_material,
|
||||
true,
|
||||
))
|
||||
.with_material(MaterialResource::new_ok(Default::default(), agent_material))
|
||||
.build()])
|
||||
.build(&mut scene.graph);
|
||||
|
||||
|
||||
@@ -114,19 +114,17 @@ mod test {
|
||||
fn resource_graph_node_pretty_print() {
|
||||
let mut s = String::new();
|
||||
let mut node = ResourceGraphNode::new(&UntypedResource::new_pending(
|
||||
PathBuf::from("/foo"),
|
||||
PathBuf::from("/foo").into(),
|
||||
Uuid::default(),
|
||||
true,
|
||||
));
|
||||
let node2 = ResourceGraphNode::new(&UntypedResource::new_pending(
|
||||
PathBuf::from("/bar"),
|
||||
PathBuf::from("/bar").into(),
|
||||
Uuid::default(),
|
||||
true,
|
||||
));
|
||||
node.children.push(node2);
|
||||
node.pretty_print(1, &mut s);
|
||||
|
||||
assert_eq!(s, "\t/foo\n\t\t/bar\n".to_string());
|
||||
assert_eq!(s, "\tExternal (/foo)\n\t\tExternal (/bar)\n".to_string());
|
||||
}
|
||||
|
||||
#[test]
|
||||
@@ -152,37 +150,33 @@ mod test {
|
||||
#[test]
|
||||
fn resource_dependency_pretty_print() {
|
||||
let mut graph = ResourceDependencyGraph::new(&UntypedResource::new_pending(
|
||||
PathBuf::from("/foo"),
|
||||
PathBuf::from("/foo").into(),
|
||||
Uuid::default(),
|
||||
true,
|
||||
));
|
||||
graph
|
||||
.root
|
||||
.children
|
||||
.push(ResourceGraphNode::new(&UntypedResource::new_pending(
|
||||
PathBuf::from("/bar"),
|
||||
PathBuf::from("/bar").into(),
|
||||
Uuid::default(),
|
||||
true,
|
||||
)));
|
||||
|
||||
let s = graph.pretty_print();
|
||||
assert_eq!(s, "/foo\n\t/bar\n".to_string());
|
||||
assert_eq!(s, "External (/foo)\n\tExternal (/bar)\n".to_string());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn resource_dependency_for_each() {
|
||||
let mut graph = ResourceDependencyGraph::new(&UntypedResource::new_pending(
|
||||
PathBuf::from("/foo"),
|
||||
PathBuf::from("/foo").into(),
|
||||
Uuid::default(),
|
||||
true,
|
||||
));
|
||||
graph
|
||||
.root
|
||||
.children
|
||||
.push(ResourceGraphNode::new(&UntypedResource::new_pending(
|
||||
PathBuf::from("/bar"),
|
||||
PathBuf::from("/bar").into(),
|
||||
Uuid::default(),
|
||||
true,
|
||||
)));
|
||||
|
||||
let mut uuids = Vec::new();
|
||||
|
||||
@@ -209,13 +209,7 @@ mod test {
|
||||
Default::default()
|
||||
}
|
||||
|
||||
fn load(
|
||||
&self,
|
||||
_resource: UntypedResource,
|
||||
_event_broadcaster: ResourceEventBroadcaster,
|
||||
_reload: bool,
|
||||
_io: Arc<dyn ResourceIo>,
|
||||
) -> BoxedLoaderFuture {
|
||||
fn load(&self, _path: PathBuf, _io: Arc<dyn ResourceIo>) -> BoxedLoaderFuture {
|
||||
todo!()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -687,7 +687,7 @@ impl ResourceManagerState {
|
||||
mod test {
|
||||
use std::{fs::File, time::Duration};
|
||||
|
||||
use crate::loader::{BoxedLoaderFuture, ResourceLoader};
|
||||
use crate::loader::{BoxedLoaderFuture, LoaderPayload, ResourceLoader};
|
||||
|
||||
use super::*;
|
||||
|
||||
@@ -730,17 +730,8 @@ mod test {
|
||||
<Stub as TypeUuidProvider>::type_uuid()
|
||||
}
|
||||
|
||||
fn load(
|
||||
&self,
|
||||
resource: UntypedResource,
|
||||
event_broadcaster: ResourceEventBroadcaster,
|
||||
reload: bool,
|
||||
_io: Arc<dyn ResourceIo>,
|
||||
) -> BoxedLoaderFuture {
|
||||
Box::pin(async move {
|
||||
resource.commit_ok(Stub::default());
|
||||
event_broadcaster.broadcast_loaded_or_reloaded(resource, reload);
|
||||
})
|
||||
fn load(&self, _path: PathBuf, _io: Arc<dyn ResourceIo>) -> BoxedLoaderFuture {
|
||||
Box::pin(async move { Ok(LoaderPayload::new(Stub::default())) })
|
||||
}
|
||||
}
|
||||
|
||||
@@ -753,8 +744,8 @@ mod test {
|
||||
|
||||
let cx = ResourceWaitContext {
|
||||
resources: vec![
|
||||
UntypedResource::new_pending(path.clone(), type_uuid, true),
|
||||
UntypedResource::new_load_error(path.clone(), Default::default(), type_uuid, true),
|
||||
UntypedResource::new_pending(path.clone().into(), type_uuid),
|
||||
UntypedResource::new_load_error(path.clone().into(), Default::default(), type_uuid),
|
||||
],
|
||||
};
|
||||
assert!(!cx.is_all_loaded());
|
||||
@@ -796,14 +787,13 @@ mod test {
|
||||
|
||||
let path = PathBuf::from("test.txt");
|
||||
let type_uuid = Uuid::default();
|
||||
state.push(UntypedResource::new_pending(path.clone(), type_uuid, true));
|
||||
state.push(UntypedResource::new_pending(path.clone().into(), type_uuid));
|
||||
state.push(UntypedResource::new_load_error(
|
||||
path.clone(),
|
||||
path.clone().into(),
|
||||
Default::default(),
|
||||
type_uuid,
|
||||
true,
|
||||
));
|
||||
state.push(UntypedResource::new_ok(Default::default(), true, Stub {}));
|
||||
state.push(UntypedResource::new_ok(Default::default(), Stub {}));
|
||||
|
||||
assert_eq!(state.count_loaded_resources(), 1);
|
||||
assert_eq!(state.count_pending_resources(), 1);
|
||||
@@ -819,14 +809,13 @@ mod test {
|
||||
|
||||
let path = PathBuf::from("test.txt");
|
||||
let type_uuid = Uuid::default();
|
||||
state.push(UntypedResource::new_pending(path.clone(), type_uuid, true));
|
||||
state.push(UntypedResource::new_pending(path.clone().into(), type_uuid));
|
||||
state.push(UntypedResource::new_load_error(
|
||||
path.clone(),
|
||||
path.clone().into(),
|
||||
Default::default(),
|
||||
type_uuid,
|
||||
true,
|
||||
));
|
||||
state.push(UntypedResource::new_ok(Default::default(), true, Stub {}));
|
||||
state.push(UntypedResource::new_ok(Default::default(), Stub {}));
|
||||
|
||||
assert_eq!(state.loading_progress(), 33);
|
||||
}
|
||||
@@ -839,7 +828,7 @@ mod test {
|
||||
|
||||
let path = PathBuf::from("test.txt");
|
||||
let type_uuid = Uuid::default();
|
||||
let resource = UntypedResource::new_pending(path.clone(), type_uuid, true);
|
||||
let resource = UntypedResource::new_pending(path.clone().into(), type_uuid);
|
||||
state.push(resource.clone());
|
||||
|
||||
assert_eq!(state.find(path), Some(&resource));
|
||||
@@ -853,9 +842,10 @@ mod test {
|
||||
|
||||
let path = PathBuf::from("test.txt");
|
||||
let type_uuid = Uuid::default();
|
||||
let r1 = UntypedResource::new_pending(path.clone(), type_uuid, true);
|
||||
let r2 = UntypedResource::new_load_error(path.clone(), Default::default(), type_uuid, true);
|
||||
let r3 = UntypedResource::new_ok(Default::default(), true, Stub {});
|
||||
let r1 = UntypedResource::new_pending(path.clone().into(), type_uuid);
|
||||
let r2 =
|
||||
UntypedResource::new_load_error(path.clone().into(), Default::default(), type_uuid);
|
||||
let r3 = UntypedResource::new_ok(Default::default(), Stub {});
|
||||
state.push(r1.clone());
|
||||
state.push(r2.clone());
|
||||
state.push(r3.clone());
|
||||
@@ -869,9 +859,8 @@ mod test {
|
||||
let mut state = ResourceManagerState::new();
|
||||
|
||||
state.push(UntypedResource::new_pending(
|
||||
PathBuf::from("test.txt"),
|
||||
PathBuf::from("test.txt").into(),
|
||||
Uuid::default(),
|
||||
true,
|
||||
));
|
||||
assert_eq!(state.len(), 1);
|
||||
|
||||
@@ -886,7 +875,7 @@ mod test {
|
||||
let type_uuid = Uuid::default();
|
||||
|
||||
let resource =
|
||||
UntypedResource::new_load_error(path.clone(), Default::default(), type_uuid, true);
|
||||
UntypedResource::new_load_error(path.clone().into(), Default::default(), type_uuid);
|
||||
state.push(resource.clone());
|
||||
|
||||
let res = state.request(path);
|
||||
@@ -895,7 +884,7 @@ mod test {
|
||||
let path = PathBuf::from("foo.txt");
|
||||
let res = state.request(path.clone());
|
||||
|
||||
assert_eq!(res.path(), path.clone());
|
||||
assert_eq!(res.kind(), ResourceKind::External(path.clone()));
|
||||
assert_eq!(res.type_uuid(), type_uuid);
|
||||
assert!(!res.is_loading());
|
||||
}
|
||||
@@ -906,10 +895,9 @@ mod test {
|
||||
state.loaders.set(Stub {});
|
||||
|
||||
let resource = UntypedResource::new_load_error(
|
||||
PathBuf::from("test.txt"),
|
||||
PathBuf::from("test.txt").into(),
|
||||
Default::default(),
|
||||
Uuid::default(),
|
||||
true,
|
||||
);
|
||||
state.push(resource.clone());
|
||||
|
||||
@@ -923,7 +911,7 @@ mod test {
|
||||
fn resource_manager_state_get_wait_context() {
|
||||
let mut state = ResourceManagerState::new();
|
||||
|
||||
let resource = UntypedResource::new_ok(Default::default(), true, Stub {});
|
||||
let resource = UntypedResource::new_ok(Default::default(), Stub {});
|
||||
state.push(resource.clone());
|
||||
let cx = state.get_wait_context();
|
||||
|
||||
@@ -944,11 +932,11 @@ mod test {
|
||||
let path = PathBuf::from("test.txt");
|
||||
let type_uuid = Uuid::default();
|
||||
|
||||
let resource = UntypedResource::new_pending(path.clone(), type_uuid, true);
|
||||
let resource = UntypedResource::new_pending(path.clone().into(), type_uuid);
|
||||
let res = manager.register(resource.clone(), path.clone(), |_, __| true);
|
||||
assert!(res.is_err());
|
||||
|
||||
let resource = UntypedResource::new_ok(Default::default(), true, Stub {});
|
||||
let resource = UntypedResource::new_ok(Default::default(), Stub {});
|
||||
let res = manager.register(resource.clone(), path.clone(), |_, __| true);
|
||||
assert!(res.is_ok());
|
||||
}
|
||||
@@ -956,7 +944,7 @@ mod test {
|
||||
#[test]
|
||||
fn resource_manager_request() {
|
||||
let manager = ResourceManager::new();
|
||||
let untyped = UntypedResource::new_ok(Default::default(), true, Stub {});
|
||||
let untyped = UntypedResource::new_ok(Default::default(), Stub {});
|
||||
let res = manager.register(untyped.clone(), PathBuf::from("foo.txt"), |_, __| true);
|
||||
assert!(res.is_ok());
|
||||
|
||||
@@ -973,7 +961,7 @@ mod test {
|
||||
#[test]
|
||||
fn resource_manager_request_untyped() {
|
||||
let manager = ResourceManager::new();
|
||||
let resource = UntypedResource::new_ok(Default::default(), true, Stub {});
|
||||
let resource = UntypedResource::new_ok(Default::default(), Stub {});
|
||||
let res = manager.register(resource.clone(), PathBuf::from("foo.txt"), |_, __| true);
|
||||
assert!(res.is_ok());
|
||||
|
||||
|
||||
@@ -81,6 +81,12 @@ impl From<Option<PathBuf>> for ResourceKind {
|
||||
}
|
||||
}
|
||||
|
||||
impl From<PathBuf> for ResourceKind {
|
||||
fn from(value: PathBuf) -> Self {
|
||||
Self::External(value)
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a> From<&'a str> for ResourceKind {
|
||||
fn from(value: &'a str) -> Self {
|
||||
Self::External(value.into())
|
||||
@@ -468,23 +474,28 @@ mod test {
|
||||
|
||||
#[test]
|
||||
fn untyped_resource_new_pending() {
|
||||
let r = UntypedResource::new_pending(PathBuf::from("/foo"), Uuid::default(), true);
|
||||
let r = UntypedResource::new_pending(PathBuf::from("/foo").into(), Uuid::default());
|
||||
|
||||
assert_eq!(r.0.lock().type_uuid, Uuid::default());
|
||||
assert_eq!(r.0.lock().path, PathBuf::from("/foo"));
|
||||
assert_eq!(
|
||||
r.0.lock().kind,
|
||||
ResourceKind::External(PathBuf::from("/foo"))
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn untyped_resource_new_load_error() {
|
||||
let r = UntypedResource::new_load_error(
|
||||
PathBuf::from("/foo"),
|
||||
PathBuf::from("/foo").into(),
|
||||
Default::default(),
|
||||
Uuid::default(),
|
||||
true,
|
||||
);
|
||||
|
||||
assert_eq!(r.0.lock().type_uuid, Uuid::default());
|
||||
assert_eq!(r.0.lock().path, PathBuf::from("/foo"));
|
||||
assert_eq!(
|
||||
r.0.lock().kind,
|
||||
ResourceKind::External(PathBuf::from("/foo"))
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
@@ -498,9 +509,8 @@ mod test {
|
||||
fn untyped_resource_try_cast() {
|
||||
let r = UntypedResource::default();
|
||||
let r2 = UntypedResource::new_pending(
|
||||
PathBuf::from("/foo"),
|
||||
PathBuf::from("/foo").into(),
|
||||
Uuid::from_u128(0xa1a2a3a4b1b2c1c2d1d2d3d4d5d6d7d8u128),
|
||||
true,
|
||||
);
|
||||
|
||||
assert!(r.try_cast::<Stub>().is_some());
|
||||
@@ -512,11 +522,11 @@ mod test {
|
||||
let path = PathBuf::from("/foo");
|
||||
let stub = Stub {};
|
||||
|
||||
let r = UntypedResource::new_pending(path.clone(), Default::default(), true);
|
||||
assert_eq!(r.0.lock().path, path);
|
||||
let r = UntypedResource::new_pending(path.clone().into(), Default::default());
|
||||
assert_eq!(r.0.lock().kind, ResourceKind::External(path.clone()));
|
||||
|
||||
r.commit(ResourceState::Ok(Box::new(stub)));
|
||||
assert_eq!(r.0.lock().path, path);
|
||||
assert_eq!(r.0.lock().kind, ResourceKind::External(path));
|
||||
}
|
||||
|
||||
#[test]
|
||||
@@ -524,11 +534,11 @@ mod test {
|
||||
let path = PathBuf::from("/foo");
|
||||
let stub = Stub {};
|
||||
|
||||
let r = UntypedResource::new_pending(path.clone(), Default::default(), true);
|
||||
assert_eq!(r.0.lock().path, path);
|
||||
let r = UntypedResource::new_pending(path.clone().into(), Default::default());
|
||||
assert_eq!(r.0.lock().kind, ResourceKind::External(path.clone()));
|
||||
|
||||
r.commit_ok(stub);
|
||||
assert_eq!(r.0.lock().path, path);
|
||||
assert_eq!(r.0.lock().kind, ResourceKind::External(path));
|
||||
}
|
||||
|
||||
#[test]
|
||||
@@ -536,9 +546,9 @@ mod test {
|
||||
let path = PathBuf::from("/foo");
|
||||
let path2 = PathBuf::from("/bar");
|
||||
|
||||
let r = UntypedResource::new_pending(path.clone(), Default::default(), true);
|
||||
assert_eq!(r.0.lock().path, path);
|
||||
assert_ne!(r.0.lock().path, path2);
|
||||
let r = UntypedResource::new_pending(path.clone().into(), Default::default());
|
||||
assert_eq!(r.0.lock().kind, ResourceKind::External(path));
|
||||
assert_ne!(r.0.lock().kind, ResourceKind::External(path2));
|
||||
}
|
||||
|
||||
#[test]
|
||||
@@ -550,17 +560,15 @@ mod test {
|
||||
let mut cx = task::Context::from_waker(&waker);
|
||||
|
||||
let mut r = UntypedResource(Arc::new(Mutex::new(ResourceHeader {
|
||||
path: path.clone(),
|
||||
kind: path.clone().into(),
|
||||
type_uuid: Uuid::default(),
|
||||
is_embedded: true,
|
||||
state: ResourceState::Ok(Box::new(stub)),
|
||||
})));
|
||||
assert!(Pin::new(&mut r).poll(&mut cx).is_ready());
|
||||
|
||||
let mut r = UntypedResource(Arc::new(Mutex::new(ResourceHeader {
|
||||
path: path.clone(),
|
||||
kind: path.clone().into(),
|
||||
type_uuid: Uuid::default(),
|
||||
is_embedded: true,
|
||||
state: ResourceState::LoadError {
|
||||
error: Default::default(),
|
||||
},
|
||||
|
||||
@@ -34,7 +34,7 @@ fn main() {
|
||||
context
|
||||
.state()
|
||||
.set_renderer(Renderer::HrtfRenderer(HrtfRenderer::new(
|
||||
HrirSphereResource::from_hrir_sphere(hrir_sphere, hrir_path, true),
|
||||
HrirSphereResource::from_hrir_sphere(hrir_sphere, hrir_path.into()),
|
||||
)));
|
||||
|
||||
// Create some sounds.
|
||||
|
||||
@@ -34,7 +34,7 @@ fn main() {
|
||||
context
|
||||
.state()
|
||||
.set_renderer(Renderer::HrtfRenderer(HrtfRenderer::new(
|
||||
HrirSphereResource::from_hrir_sphere(hrir_sphere, hrir_path, true),
|
||||
HrirSphereResource::from_hrir_sphere(hrir_sphere, hrir_path.into()),
|
||||
)));
|
||||
|
||||
{
|
||||
|
||||
@@ -49,7 +49,7 @@ impl ResourceLoader for SoundBufferLoader {
|
||||
|
||||
let source = DataSource::from_file(&path, io)
|
||||
.await
|
||||
.map_err(|e| LoadError::new(e))?;
|
||||
.map_err(LoadError::new)?;
|
||||
|
||||
let result = if import_options.stream {
|
||||
SoundBuffer::raw_streaming(source)
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
//! let hrir_path = PathBuf::from("examples/data/IRC_1002_C.bin");
|
||||
//! let hrir_sphere = HrirSphere::from_file(&hrir_path, context::SAMPLE_RATE).unwrap();
|
||||
//!
|
||||
//! context.state().set_renderer(Renderer::HrtfRenderer(HrtfRenderer::new(HrirSphereResource::from_hrir_sphere(hrir_sphere, hrir_path, true))));
|
||||
//! context.state().set_renderer(Renderer::HrtfRenderer(HrtfRenderer::new(HrirSphereResource::from_hrir_sphere(hrir_sphere, hrir_path.into()))));
|
||||
//! }
|
||||
//! ```
|
||||
//!
|
||||
@@ -227,9 +227,9 @@ impl ResourceLoader for HrirSphereLoader {
|
||||
|
||||
fn load(&self, path: PathBuf, io: Arc<dyn ResourceIo>) -> BoxedLoaderFuture {
|
||||
Box::pin(async move {
|
||||
let reader = io.file_reader(&path).await.map_err(|e| LoadError::new(e))?;
|
||||
let reader = io.file_reader(&path).await.map_err(LoadError::new)?;
|
||||
let hrir_sphere =
|
||||
HrirSphere::new(reader, context::SAMPLE_RATE).map_err(|e| LoadError::new(e))?;
|
||||
HrirSphere::new(reader, context::SAMPLE_RATE).map_err(LoadError::new)?;
|
||||
Ok(LoaderPayload::new(HrirSphereResourceData {
|
||||
hrir_sphere: Some(hrir_sphere),
|
||||
}))
|
||||
|
||||
@@ -32,7 +32,7 @@ impl ResourceLoader for MaterialLoader {
|
||||
Box::pin(async move {
|
||||
let material = Material::from_file(&path, io.as_ref(), resource_manager)
|
||||
.await
|
||||
.map_err(|e| LoadError::new(e))?;
|
||||
.map_err(LoadError::new)?;
|
||||
Ok(LoaderPayload::new(material))
|
||||
})
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ impl ResourceLoader for ShaderLoader {
|
||||
Box::pin(async move {
|
||||
let shader_state = Shader::from_file(&path, io.as_ref())
|
||||
.await
|
||||
.map_err(|e| LoadError::new(e))?;
|
||||
.map_err(LoadError::new)?;
|
||||
Ok(LoaderPayload::new(shader_state))
|
||||
})
|
||||
}
|
||||
|
||||
@@ -737,7 +737,7 @@ mod test {
|
||||
)
|
||||
"#;
|
||||
|
||||
let shader = ShaderResource::from_str(code, "test", true).unwrap();
|
||||
let shader = ShaderResource::from_str(code, "test".into()).unwrap();
|
||||
let data = shader.data_ref();
|
||||
|
||||
let reference_definition = ShaderDefinition {
|
||||
|
||||
@@ -27,7 +27,7 @@ impl ResourceLoader for CurveLoader {
|
||||
Box::pin(async move {
|
||||
let curve_state = CurveResourceState::from_file(&path, io.as_ref())
|
||||
.await
|
||||
.map_err(|e| LoadError::new(e))?;
|
||||
.map_err(LoadError::new)?;
|
||||
Ok(LoaderPayload::new(curve_state))
|
||||
})
|
||||
}
|
||||
|
||||
@@ -56,7 +56,7 @@ impl ResourceLoader for ModelLoader {
|
||||
import_options,
|
||||
)
|
||||
.await
|
||||
.map_err(|e| LoadError::new(e))?;
|
||||
.map_err(LoadError::new)?;
|
||||
|
||||
Ok(LoaderPayload::new(model))
|
||||
})
|
||||
|
||||
@@ -42,7 +42,7 @@ impl ResourceLoader for TextureLoader {
|
||||
|
||||
let raw_texture = Texture::load_from_file(&path, io, import_options)
|
||||
.await
|
||||
.map_err(|e| LoadError::new(e))?;
|
||||
.map_err(LoadError::new)?;
|
||||
|
||||
Ok(LoaderPayload::new(raw_texture))
|
||||
})
|
||||
|
||||
@@ -1735,7 +1735,7 @@ pub mod test {
|
||||
},
|
||||
TexturePixelKind::RGBA8,
|
||||
vec![1, 1, 1, 1],
|
||||
false,
|
||||
Default::default(),
|
||||
)
|
||||
.unwrap()
|
||||
}
|
||||
|
||||
@@ -201,7 +201,7 @@ impl Visit for ParticleSystemRng {
|
||||
/// )
|
||||
/// .with_radius(0.01)
|
||||
/// .build()])
|
||||
/// .with_material(MaterialResource::new_ok(Default::default(), material, true))
|
||||
/// .with_material(MaterialResource::new_ok(Default::default(), material))
|
||||
/// .build(graph);
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
+1
-1
@@ -125,7 +125,7 @@ impl VertexTrait for SpriteVertex {
|
||||
/// .unwrap();
|
||||
///
|
||||
/// SpriteBuilder::new(BaseBuilder::new())
|
||||
/// .with_material(MaterialResource::new_ok(Default::default(), material, true))
|
||||
/// .with_material(MaterialResource::new_ok(Default::default(), material))
|
||||
/// .build(graph)
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
Reference in New Issue
Block a user