Skip to main content

flutter3d_education 1.0.0-rc.2 copy "flutter3d_education: ^1.0.0-rc.2" to clipboard
flutter3d_education: ^1.0.0-rc.2 copied to clipboard

Education on flutter3d: virtual laboratory simulations a server can replay, the experiment document a lesson is written in, and a lesson's steps. Plain Dart, no Flutter.

flutter3d_education #

Education on flutter3d, in plain Dart: lab simulations a server replays to check a student's run, the experiment document a lesson is written in, and a lesson's steps read out of a level. The chemistry bench in example/ is the Flutter half: it draws, so it is an application of its own rather than a library here.

The LTI 1.3 and xAPI side a learning platform talks to is flutter3d_education_lti, a package of its own: its cryptography and HTTP client are a service's, and an editor or a lesson that reads an experiment does not carry them.

Library Was What it is
experiment.dart new The experiment document, f3d.experiment: a level, the substances it uses by catalog id, the probes it reads and a scenario of steps with the readings each expects and the question each asks; and CheckQuestion, the question a lesson or an experiment step asks
lab.dart flutter3d_lab Virtual laboratory simulations built on flutter3d_sim's stepping and recording primitives
lesson.dart new A lesson's steps read out of a level: the edu_sequence and edu_step entities, in the order a viewer plays them

flutter3d_education.dart exports all three.

experiment.dart #

An experiment written down, so that a teacher can write a lab and a server can check a student's run against it. ExperimentDocument holds:

  • level, the level it happens in, as a path beside the document;
  • substances by their id in the materials catalog (f3d.water), never by their numbers, so a corrected catalog corrects every experiment (substancesMissingFrom(catalog) names the ids a catalog lacks);
  • parameters, the numbers it can be run with, each with optional bounds a student's panel keeps it inside;
  • probes, each a flutter3d_sim Probe on a level entity;
  • steps, the scenario: an ExperimentStep sets parameters, runs the simulation for a time, expects readings (ExpectedReading, a value within a tolerance in the probe's unit), and may ask a CheckQuestion.

It is checked as it is read. A step that sets a parameter the document does not declare, or expects a reading of a probe it does not have, is refused with a DocumentFormatException naming both, so a typo is found when the file opens rather than when a student reaches the step. profile is deterministic unless it says otherwise, which is what a server needs to replay a run and land on the same bits.

import 'package:flutter3d_education/experiment.dart';

final heart = ExperimentDocument(
  name: 'heart',
  title: 'The chambers of the heart',
  level: 'heart.level.json',
  steps: <ExperimentStep>[
    ExperimentStep(name: 'look', title: 'Turn the heart round'),
    ExperimentStep(
      name: 'find',
      title: 'Tap the chamber that pumps blood to the body',
      check: CheckQuestion(
        question: 'Which chamber pumps blood to the body?',
        answers: <String>['left ventricle'],
        attempts: 2,
      ),
    ),
  ],
);

final text = heart.encode();                  // a .f3d.experiment file
final again = ExperimentDocument.parse(text); // read back, and checked

CheckQuestion.accepts compares an answer ignoring case and the white space around it. The answer may be typed, or it may be the name of the part a student tapped, which is how a "tap the structure" quiz is asked; the education page shows that. Reporting an answer to a learning platform is CheckReporter in flutter3d_education_lti. The level editor edits these documents (flutter3d_editor_core's experiment editing), and so does an agent through the editor's MCP server.

What is not here yet: nothing in rc.2 plays a scenario by itself, setting each step's parameters, running it and comparing the probes with what the step expects. An application does that with its loop and ExpectedReading.agrees. unknowns and observations, for estimating a parameter from readings of the real thing, are read and written, and nothing estimates them yet.

lesson.dart #

A lesson is written into a level as entities: an edu_sequence whose steps name edu_step entities in order, each saying where the viewer stands, which nodes show, and optionally a check (the same CheckQuestion). orderedSteps(level, name) resolves a sequence to its steps, skipping a name no entity carries, and firstLessonSteps(level) reads the first sequence in the level. apps/flutter3d_lesson_viewer plays them on a flat screen, and flutter3d_stereo's LessonStereoView in a phone holder.

lab.dart #

Until 1.0.0-rc.1, flutter3d_lab.

Virtual laboratory simulations built on flutter3d_sim's stepping and recording primitives. The first is the pendulum from edu-04.

Plain Dart, no Flutter SDK. A server verifies a student's submitted lab run the same way it verifies a game run: it replays the run in a container that has no Flutter SDK in it.

0
likes
150
points
249
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Education on flutter3d: virtual laboratory simulations a server can replay, the experiment document a lesson is written in, and a lesson's steps. Plain Dart, no Flutter.

Topics

#education #simulation #laboratory

License

MIT (license)

Dependencies

flutter3d_foundation, flutter3d_matter, flutter3d_sim

More

Packages that depend on flutter3d_education