Skip to content

Commit

Permalink
Un-export Timer
Browse files Browse the repository at this point in the history
  • Loading branch information
ufrshubham committed Mar 13, 2024
1 parent c950d1b commit 977eaca
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion packages/forge2d/example/web/demo.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import 'dart:async';
import 'dart:html' hide Body;

import 'package:forge2d/forge2d_browser.dart' hide Timer;
import 'package:forge2d/forge2d_browser.dart';

/// An abstract class for any Demo of the Forge2D library.
abstract class Demo {
Expand Down
1 change: 0 additions & 1 deletion packages/forge2d/lib/src/common.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,5 @@ export 'common/color3i.dart';
export 'common/raycast_result.dart';
export 'common/rot.dart';
export 'common/sweep.dart';
export 'common/timer.dart';
export 'common/transform.dart';
export 'common/viewport_transform.dart';
7 changes: 4 additions & 3 deletions packages/forge2d/lib/src/dynamics/world.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import 'dart:math';

import 'package:forge2d/forge2d.dart';
import 'package:forge2d/src/common/timer.dart';
import 'package:forge2d/src/settings.dart' as settings;

/// The world class manages all physics entities, dynamic simulation, and
Expand Down Expand Up @@ -514,7 +515,7 @@ class World {

final Island island = Island();
final List<Body> stack = [];
final Timer broadphaseTimer = Timer();
final Timer _broadphaseTimer = Timer();

void solve(TimeStep step) {
_profile.solveInit.startAccum();
Expand Down Expand Up @@ -648,7 +649,7 @@ class World {
_profile.solveVelocity.endAccum();
_profile.solvePosition.endAccum();

broadphaseTimer.reset();
_broadphaseTimer.reset();
// Synchronize fixtures, check for out of range bodies.
for (final b in bodies) {
// If a body was not in an island then it did not move.
Expand All @@ -666,7 +667,7 @@ class World {

// Look for new contacts.
contactManager.findNewContacts();
_profile.broadphase.record(broadphaseTimer.getMilliseconds());
_profile.broadphase.record(_broadphaseTimer.getMilliseconds());
}

final Island _toiIsland = Island();
Expand Down
4 changes: 2 additions & 2 deletions packages/forge2d/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ environment:
sdk: ">=3.0.0 <4.0.0"

dependencies:
meta: ^1.9.1
meta: ^1.11.0
vector_math: ^2.1.4

dev_dependencies:
dartdoc: ^7.0.2
flame_lint: ^1.1.1
mocktail: ^1.0.1
test: any
test: ^1.24.9

0 comments on commit 977eaca

Please sign in to comment.