update example project
This commit is contained in:
@@ -32,22 +32,29 @@ class _MyAppState extends State<MyApp> {
|
|||||||
home: Scaffold(
|
home: Scaffold(
|
||||||
backgroundColor: Colors.transparent,
|
backgroundColor: Colors.transparent,
|
||||||
body: Column(children: [
|
body: Column(children: [
|
||||||
Expanded(child:SizedBox(
|
Expanded(child:SizedBox(
|
||||||
height:200, width:200,
|
height:200, width:200,
|
||||||
child:FilamentWidget(
|
child:FilamentWidget(
|
||||||
controller: _filamentController,
|
controller: _filamentController,
|
||||||
))),
|
))),
|
||||||
|
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Wrap(
|
child: SingleChildScrollView(child:Wrap(
|
||||||
alignment: WrapAlignment.end,
|
alignment: WrapAlignment.end,
|
||||||
crossAxisAlignment: WrapCrossAlignment.end,
|
crossAxisAlignment: WrapCrossAlignment.end,
|
||||||
children: [
|
children: [
|
||||||
|
ElevatedButton(
|
||||||
|
child: const Text('load background image'),
|
||||||
|
onPressed: () async {
|
||||||
|
await _filamentController.setBackgroundImage(
|
||||||
|
'assets/background3.png');
|
||||||
|
}),
|
||||||
ElevatedButton(
|
ElevatedButton(
|
||||||
child: const Text('load skybox'),
|
child: const Text('load skybox'),
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
await _filamentController.loadSkybox(
|
await _filamentController.loadSkybox(
|
||||||
'assets/default_env/default_env_skybox.ktx',
|
'assets/default_env/default_env_skybox.ktx');
|
||||||
|
await _filamentController.loadSkybox(
|
||||||
'assets/default_env/default_env_ibl.ktx');
|
'assets/default_env/default_env_ibl.ktx');
|
||||||
}),
|
}),
|
||||||
ElevatedButton(
|
ElevatedButton(
|
||||||
@@ -206,7 +213,7 @@ class _MyAppState extends State<MyApp> {
|
|||||||
child: Text("Pan right"))
|
child: Text("Pan right"))
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
)),
|
||||||
])),
|
])),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user