expose method for retrieving all child entities
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import 'dart:async';
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
@@ -129,7 +130,7 @@ class ExampleWidgetState extends State<ExampleWidget> {
|
||||
),
|
||||
EntityListWidget(controller: _filamentController),
|
||||
Positioned(
|
||||
bottom: 0,
|
||||
bottom: Platform.isIOS ? 30 : 0,
|
||||
left: 0,
|
||||
right: 10,
|
||||
height: 30,
|
||||
@@ -164,9 +165,8 @@ class ExampleWidgetState extends State<ExampleWidget> {
|
||||
),
|
||||
GestureDetector(
|
||||
onTap: () async {
|
||||
await _filamentController!.loadGlb(
|
||||
'assets/shapes/shapes.glb',
|
||||
numInstances: 10);
|
||||
await _filamentController!
|
||||
.loadGlb('assets/shapes/shapes.glb', numInstances: 1);
|
||||
},
|
||||
child: Container(
|
||||
color: Colors.transparent,
|
||||
|
||||
@@ -215,6 +215,13 @@ class _AssetSubmenuState extends State<AssetSubmenu> {
|
||||
},
|
||||
child: const Text("Add point light"),
|
||||
),
|
||||
MenuItemButton(
|
||||
onPressed: () async {
|
||||
await widget.controller
|
||||
.addLight(3, 6500, 15000000, 0, 1, 0, 0, -1, 0, true);
|
||||
},
|
||||
child: const Text("Add spot light"),
|
||||
),
|
||||
MenuItemButton(
|
||||
onPressed: () async {
|
||||
await widget.controller.clearLights();
|
||||
|
||||
Reference in New Issue
Block a user