chore: Fix some spelling mistakes (#2148)

Fix all* typos reported by CSpell, and add some more words into the dictionaries.

(Except for two in the flame_isolate/example package).
This commit is contained in:
Pasha Stetsenko
2022-11-06 06:06:44 -08:00
committed by GitHub
parent 9c25e631e2
commit cbfa789e75
39 changed files with 142 additions and 79 deletions

View File

@ -1,14 +1,25 @@
Artboard
Aseprite
Audioplayers
BGUG
Dashbook
Fireslime
Kawabunga
Kinect
Klingsbo
Lukas
Nakama
Patreon
Skia
Spritecow
Tiled
Tiled's
Tilemap
caveace
erayzesen
padracing
ptero
spydon
tavian
trex
wolfenrain

View File

@ -10,12 +10,14 @@ NPC
NPCs
RGBA
RGBO
SVGs
WASD
WBMP
WebP
abelian
ambiguate
antialiasing
arial
autofocus
backpressure
backtick
@ -24,29 +26,48 @@ bitfield
blockquote
bloodlust
broadphase
cathetus
clusterize
clusterized
collidable
collidables
composability
conformant
coord
coords
dartdoc
dartdocs
deduplication
deletable
discoverability
draggable
draggables
drawable
drawables
easings
flippable
focusable
fullscreen
gamepad
gamepads
gameplay
gapless
glyph
glyph's
grayscale
goldens
hardcoding
highscore
hitbox
hitboxes
hoverable
hoverables
ints
jank
janky
lerp
lexer
lexer's
microtask
mixin
mixins
@ -54,6 +75,8 @@ monospace
multitap
mutator
mutators
netcode
numpad
overmind
overridable
pathfinding
@ -64,6 +87,7 @@ positionable
postmultiply
preload
preorder
prerender
prerendered
pressable
proxying
@ -71,33 +95,54 @@ pubdev
pubspec
queryable
raycast
raycasting
raycasts
raytrace
raytraces
raytracing
rebalance
rect
rects
refactor
refactoring
refactorings
reimplement
reimplemented
renderable
rescan
respawn
respawned
rrect
rrects
rsts
scos
serializable
socio
spritesheet
spritesheets
ssin
strikethrough
stylesheet
subfolder
subfolders
sublist
sublists
tappable
tappables
tileset
tilesets
toolset
tween
tweening
typedef
typedefs
ui's
unfollow
unmount
unproject
unscale
viewport
viewport's
viewports
vsync
widget's

10
.github/cspell.json vendored
View File

@ -3,7 +3,15 @@
"language": "en",
"flagWords": [],
"ignorePaths": ["**/media/**", "**/assets/**", "**/test/**"],
"ignoreRegExpList": ["@\\w+", "\\$\\w+", "\\{\\w+", "\\`\\w+", "\\:\\w+", "\\/\\w+", "\\#\\w+"],
"ignoreRegExpList": [
"@[\\w\\-]+",
"\\$\\w+",
"\\{\\w+",
"\\`\\w+",
"\\:\\w+",
"\\/\\w+",
"\\#[\\w\\-]+"
],
"dictionaries": [
"en_US",
"softwareTerms",

View File

@ -160,7 +160,7 @@ Packages with dependency updates only:
- **FIX**: SpriteAnimationWidget can now be update animation safely ([#1738](https://github.com/flame-engine/flame/issues/1738)). ([eb070195](https://github.com/flame-engine/flame/commit/eb0701951c165576fac1f540c8860e560a8961e6))
- **FIX**: JoystickComponent drags using the delta Viewport ([#1831](https://github.com/flame-engine/flame/issues/1831)). ([54e40de6](https://github.com/flame-engine/flame/commit/54e40de674f628282ea19af4f5ce2173ee48fd6e))
- **FIX**: Specify size for the SpriteWidget ([#1760](https://github.com/flame-engine/flame/issues/1760)). ([82f75fcb](https://github.com/flame-engine/flame/commit/82f75fcb57c8185a7138ee6ceb9082a418099df8))
- **FEAT**: New colours to palette.dart ([#1783](https://github.com/flame-engine/flame/issues/1783)). ([85cd60e1](https://github.com/flame-engine/flame/commit/85cd60e16c7b4dafdf1823bf85a7ae8a50fd05f2))
- **FEAT**: New colors to palette.dart ([#1783](https://github.com/flame-engine/flame/issues/1783)). ([85cd60e1](https://github.com/flame-engine/flame/commit/85cd60e16c7b4dafdf1823bf85a7ae8a50fd05f2))
- **FEAT**: add `children` argument to `SpriteComponent.fromImage` ([#1793](https://github.com/flame-engine/flame/issues/1793)). ([80a63362](https://github.com/flame-engine/flame/commit/80a633622a5784f377ef08515115d66ff200b848))
- **FEAT**: Added Decorator class and HasDecorator mixin ([#1781](https://github.com/flame-engine/flame/issues/1781)). ([8d00847c](https://github.com/flame-engine/flame/commit/8d00847cfcecb60a96772ccba1bcf3aec56b78ff))
- **FEAT**: Added TextFormatter classes ([#1720](https://github.com/flame-engine/flame/issues/1720)). ([c44272be](https://github.com/flame-engine/flame/commit/c44272be45eadfabc8f03ef250eb663e59ef2aab))
@ -329,7 +329,7 @@ Packages with other changes:
- **FIX**: ButtonComponent behavior when the engine is paused ([#1726](https://github.com/flame-engine/flame/issues/1726)). ([197e63d6](https://github.com/flame-engine/flame/commit/197e63d69e2a4c6779e49b918d05a60447ce9462))
- **FIX**: Add missing paint arguments on shapes ([#1727](https://github.com/flame-engine/flame/issues/1727)). ([e59f3428](https://github.com/flame-engine/flame/commit/e59f3428469e4298d812bb665171679df8895daf))
- **FIX**: Merge basic and advanced gesture detectors ([#1718](https://github.com/flame-engine/flame/issues/1718)). ([f08f8e12](https://github.com/flame-engine/flame/commit/f08f8e12f5322c7bea1491908f06b350e13c14b7))
- **FEAT**: New colours to palette.dart ([#1783](https://github.com/flame-engine/flame/issues/1783)). ([85cd60e1](https://github.com/flame-engine/flame/commit/85cd60e16c7b4dafdf1823bf85a7ae8a50fd05f2))
- **FEAT**: New colors to palette.dart ([#1783](https://github.com/flame-engine/flame/issues/1783)). ([85cd60e1](https://github.com/flame-engine/flame/commit/85cd60e16c7b4dafdf1823bf85a7ae8a50fd05f2))
- **FEAT**: Added TextFormatter classes ([#1720](https://github.com/flame-engine/flame/issues/1720)). ([c44272be](https://github.com/flame-engine/flame/commit/c44272be45eadfabc8f03ef250eb663e59ef2aab))
- **FEAT**: Drag events that dispatch using componentsAtPoint ([#1715](https://github.com/flame-engine/flame/issues/1715)). ([10669c12](https://github.com/flame-engine/flame/commit/10669c12702a3a82fcf5be9161107dce4349a79f))
- **FEAT**: add `HasAncestor` mixin ([#1711](https://github.com/flame-engine/flame/issues/1711)). ([987a44f4](https://github.com/flame-engine/flame/commit/987a44f441429534c743388b44e6d84b28e8f5ca))
@ -1280,4 +1280,3 @@ Packages with other changes:
#### `flame_tiled` - `v1.2.0`
- **FEAT**: modifiable Layer and TileData in RenderableTileMap (#1324).

View File

@ -68,7 +68,7 @@ them, and also some recommendations of packages/services that can be used:
Flame doesn't bundle any network feature, which may be needed to write online multiplayer games.
If you are building a multipler game, here are some recommendations of packages/services:
If you are building a multiplayer game, here are some recommendations of packages/services:
- [Nakama](https://github.com/Allan-Nava/nakama-flutter): Nakama is an open-source server designed
to power modern games and apps.

View File

@ -197,7 +197,7 @@ const Documentation = {
},
/**
* Initialise the domain index toggle buttons
* Initialize the domain index toggle buttons
*/
initDomainIndexTable: () => {
const toggler = (el) => {

View File

@ -59,7 +59,7 @@ rate drop, and the looped audio will have a small gap between iterations.
You can use [the `Bgm` class](bgm.md) (via `FlameAudio.bgm`) to play looping background music
tracks. The `Bgm` class lets Flame automatically manage the pausing and resuming of background music
tracks when the game is backgrounded or comes back to the foreground.
tracks when the game is sent to background or comes back to the foreground.
You can use [the `AudioPool` class](audio_pool.md) if you want to fire quick sound effects in a very
efficient manner. `AudioPool` will keep a pool of `AudioPlayer`s preloaded with a given sound, and

View File

@ -147,8 +147,8 @@ Here's what the different options mean:
## Standardization and Templates
For every section or package added to the documentation, naming conventions, pathing, and
standardized table of contents are important. Every section and package must have a table of
For every section or package added to the documentation, naming conventions, directory structure,
and standardized table of contents are important. Every section and package must have a table of
contents or an entry in the parent markdown file to allow navigation from the left sidebar menu in
logical or alphabetical order. Additionally, naming conventions should be followed for organization,
such as:

View File

@ -193,7 +193,7 @@ In some cases you may want to merge multiple images into a single image; this is
[Compositing](https://en.wikipedia.org/wiki/Compositing). This can be useful for example when
working with the [SpriteBatch](#spritebatch) API to optimize your drawing calls.
For such usecases Flame comes with the `ImageComposition` class. This allows you to add multiple
For such use cases Flame comes with the `ImageComposition` class. This allows you to add multiple
images, each at their own position, onto a new image:
```dart
@ -278,7 +278,7 @@ final animation = SpriteAnimation.fromAsepriteData(image, jsonData);
```
**Note:** trimmed sprite sheets are not supported by flame, so if you export your sprite sheet this
kway, it will have the trimmed size, not the sprite original size.
way, it will have the trimmed size, not the sprite original size.
Animations, after created, have an update and render method; the latter renders the current frame,
and the former ticks the internal clock to update the frames.

View File

@ -127,7 +127,7 @@ class SimpleUpdateSystem extends System with UpdateSystem {
### BaseSystem
The `BaseSystem` is an abstract class whoms logic can be compared to the `PositionComponent`
The `BaseSystem` is an abstract class whose logic can be compared to the `PositionComponent`
from FCS. The `BaseSystem` automatically filters all entities that have the `PositionComponent`
and `SizeComponent` from `flame_oxygen`. On top of that you can add your own filters by defining
a getter called `filters`. These filters are then used to filter down the entities you are

View File

@ -364,9 +364,9 @@ Here we need to have two paint objects, one for the border and one for the suits
```
The suit paint uses `BlendMode.luminosity` in order to convert the regular yellow/blue colors of
the suit sprites into greyscale. The "color" of the paint is different depending whether the suit
the suit sprites into grayscale. The "color" of the paint is different depending whether the suit
is red or black because the original luminosity of those sprites is different. Therefore, I had to
pick two different colors in order to make them look the same in greyscale.
pick two different colors in order to make them look the same in grayscale.
### Tableau Piles

View File

Before

Width:  |  Height:  |  Size: 4.5 KiB

After

Width:  |  Height:  |  Size: 4.5 KiB

View File

Before

Width:  |  Height:  |  Size: 4.3 KiB

After

Width:  |  Height:  |  Size: 4.3 KiB

View File

@ -175,7 +175,7 @@ class PadRacingGame extends Forge2DGame with KeyboardEvents {
if (car.lapNotifier.value > numberOfLaps) {
isGameOver = true;
winner = car;
overlays.add('gameover');
overlays.add('game_over');
lapText.addAll([
ScaleEffect.by(
Vector2.all(1.5),
@ -243,7 +243,7 @@ class PadRacingGame extends Forge2DGame with KeyboardEvents {
keyMap.clear();
}
_timePassed = 0;
overlays.remove('gameover');
overlays.remove('game_over');
openMenu();
for (final car in cars) {
car.removeFromParent();

View File

@ -64,7 +64,7 @@ class PadracingWidget extends StatelessWidget {
),
overlayBuilderMap: {
'menu': (_, game) => Menu(game),
'gameover': (_, game) => GameOver(game),
'game_over': (_, game) => GameOver(game),
},
initialActiveOverlays: const ['menu'],
),

View File

@ -3,7 +3,7 @@ import 'package:flame/game.dart';
class AsepriteExample extends FlameGame {
static const String description = '''
This example shows how to load animations from a asprite json file and a
This example shows how to load animations from an Aseprite json file and a
sprite sheet. There is no interaction on this example.
''';

View File

@ -10,7 +10,7 @@ class RevoluteJointExample extends Forge2DGame with TapDetector {
This example showcases a revolute joint, which is the spinning balls in the
center.
If you tap the screen some colourful balls are added and will
If you tap the screen some colorful balls are added and will
interact with the bodies tied to the revolute joint once they have fallen
down the funnel.
''';

View File

@ -23,7 +23,7 @@ components.
Some bricks are highlighted when placed on an edge of a quadrant. It is
important to understand that handling hitboxes on edges requires more
resources.
Blue lines visualise the quad tree's quadrant positions.
Blue lines visualize the quad tree's quadrant positions.
Use WASD to move the player and use the mouse scroll to change zoom.
Hold direction button and press space to fire a bullet.
@ -224,7 +224,7 @@ class Player extends SpriteComponent
) {
final myCenter =
Vector2(position.x + tileSize / 2, position.y + tileSize / 2);
if (other is GameCollideable) {
if (other is GameCollidable) {
final diffX = myCenter.x - other.cachedCenter.x;
if (diffX < 0) {
canMoveRight = false;
@ -301,7 +301,7 @@ class Bullet extends PositionComponent with CollisionCallbacks, HasPaint {
//#region Environment
class Brick extends SpriteComponent
with CollisionCallbacks, GameCollideable, UpdateOnce {
with CollisionCallbacks, GameCollidable, UpdateOnce {
Brick({
required super.position,
required super.size,
@ -323,7 +323,7 @@ class Brick extends SpriteComponent
}
class Water extends SpriteComponent
with CollisionCallbacks, GameCollideable, UpdateOnce {
with CollisionCallbacks, GameCollidable, UpdateOnce {
Water({
required super.position,
required super.size,
@ -335,7 +335,7 @@ class Water extends SpriteComponent
}
}
mixin GameCollideable on PositionComponent {
mixin GameCollidable on PositionComponent {
void initCollision() {
add(RectangleHitbox()..collisionType = CollisionType.passive);
}

View File

@ -178,8 +178,8 @@ class ParticlesExample extends FlameGame {
);
}
/// Same example as above, but
/// with easing, utilising [CurvedParticle] extension
/// Same example as above, but with easing, utilizing [CurvedParticle]
/// extension.
Particle easedMovingParticle() {
return Particle.generate(
count: 5,

View File

@ -5,7 +5,7 @@ import 'package:flame/game.dart';
import 'package:flame/sprite.dart';
import 'package:flutter/material.dart';
class SpritebatchExample extends FlameGame {
class SpriteBatchExample extends FlameGame {
static const String description = '''
In this example we show how to render many sprites in a batch for
efficiency, this is done with `SpriteBatch` and the `SpriteBatchComponent`.

View File

@ -5,7 +5,7 @@ import 'package:flame/game.dart';
import 'package:flame/sprite.dart';
import 'package:flutter/material.dart';
class SpritebatchLoadExample extends FlameGame {
class SpriteBatchLoadExample extends FlameGame {
static const String description = '''
In this example we do the same thing as in the normal sprite batch example,
but in this example the logic and loading is moved into a component that
@ -19,7 +19,7 @@ class SpritebatchLoadExample extends FlameGame {
}
class MySpriteBatchComponent extends SpriteBatchComponent
with HasGameRef<SpritebatchLoadExample> {
with HasGameRef<SpriteBatchLoadExample> {
@override
Future<void> onLoad() async {
final spriteBatch = await gameRef.loadSpriteBatch('boom.png');

View File

@ -29,16 +29,16 @@ void addSpritesStories(Dashbook dashbook) {
info: SpritesheetExample.description,
)
..add(
'Spritebatch',
(_) => GameWidget(game: SpritebatchExample()),
'SpriteBatch',
(_) => GameWidget(game: SpriteBatchExample()),
codeLink: baseLink('sprites/spritebatch_example.dart'),
info: SpritebatchExample.description,
info: SpriteBatchExample.description,
)
..add(
'Spritebatch Auto Load',
(_) => GameWidget(game: SpritebatchLoadExample()),
'SpriteBatch Auto Load',
(_) => GameWidget(game: SpriteBatchLoadExample()),
codeLink: baseLink('sprites/spritebatch_load_example.dart'),
info: SpritebatchLoadExample.description,
info: SpriteBatchLoadExample.description,
)
..add(
'SpriteGroup',

View File

@ -49,8 +49,8 @@ class Background extends SvgComponent with HasGameRef<SvgComponentExample> {
}
}
class Ballons extends SvgComponent with HasGameRef<SvgComponentExample> {
Ballons()
class Balloons extends SvgComponent with HasGameRef<SvgComponentExample> {
Balloons()
: super(
priority: 2,
size: Vector2(75, 125),
@ -63,17 +63,18 @@ class Ballons extends SvgComponent with HasGameRef<SvgComponentExample> {
final color = Random().nextBool() ? 'red' : 'green';
svg = await gameRef.loadSvg('svgs/${color}_ballons.svg');
svg = await gameRef.loadSvg('svgs/${color}_balloons.svg');
}
}
class SvgComponentExample extends FlameGame
with TapDetector, DoubleTapDetector {
static const description = '''
Simple game showcasing how to use SVGs inside a flame game. This game uses several svgs
for its graphics. Click or touch the screen to make the player move, and double click/tap
to add a new set of ballons on the clicked position.
''';
Simple game showcasing how to use SVGs inside a flame game. This game
uses several SVGs for its graphics. Click or touch the screen to make the
player move, and double click/tap to add a new set of balloons at the
clicked position.
''';
late Player player;
@ -86,31 +87,31 @@ class SvgComponentExample extends FlameGame
add(Background());
add(
Ballons()
Balloons()
..x = -10
..y = -20,
);
add(
Ballons()
Balloons()
..x = -100
..y = -150,
);
add(
Ballons()
Balloons()
..x = -200
..y = -140,
);
add(
Ballons()
Balloons()
..x = 100
..y = 130,
);
add(
Ballons()
Balloons()
..x = 50
..y = -130,
);
@ -123,6 +124,6 @@ class SvgComponentExample extends FlameGame
@override
void onDoubleTapDown(TapDownInfo info) {
add(Ballons()..position = info.eventPosition.game);
add(Balloons()..position = info.eventPosition.game);
}
}

View File

@ -55,7 +55,7 @@
- **FIX**: SpriteAnimationWidget can now be update animation safely ([#1738](https://github.com/flame-engine/flame/issues/1738)). ([eb070195](https://github.com/flame-engine/flame/commit/eb0701951c165576fac1f540c8860e560a8961e6))
- **FIX**: JoystickComponent drags using the delta Viewport ([#1831](https://github.com/flame-engine/flame/issues/1831)). ([54e40de6](https://github.com/flame-engine/flame/commit/54e40de674f628282ea19af4f5ce2173ee48fd6e))
- **FIX**: Specify size for the SpriteWidget ([#1760](https://github.com/flame-engine/flame/issues/1760)). ([82f75fcb](https://github.com/flame-engine/flame/commit/82f75fcb57c8185a7138ee6ceb9082a418099df8))
- **FEAT**: New colours to palette.dart ([#1783](https://github.com/flame-engine/flame/issues/1783)). ([85cd60e1](https://github.com/flame-engine/flame/commit/85cd60e16c7b4dafdf1823bf85a7ae8a50fd05f2))
- **FEAT**: New colors to palette.dart ([#1783](https://github.com/flame-engine/flame/issues/1783)). ([85cd60e1](https://github.com/flame-engine/flame/commit/85cd60e16c7b4dafdf1823bf85a7ae8a50fd05f2))
- **FEAT**: add `children` argument to `SpriteComponent.fromImage` ([#1793](https://github.com/flame-engine/flame/issues/1793)). ([80a63362](https://github.com/flame-engine/flame/commit/80a633622a5784f377ef08515115d66ff200b848))
- **FEAT**: Added Decorator class and HasDecorator mixin ([#1781](https://github.com/flame-engine/flame/issues/1781)). ([8d00847c](https://github.com/flame-engine/flame/commit/8d00847cfcecb60a96772ccba1bcf3aec56b78ff))
- **FEAT**: Added TextFormatter classes ([#1720](https://github.com/flame-engine/flame/issues/1720)). ([c44272be](https://github.com/flame-engine/flame/commit/c44272be45eadfabc8f03ef250eb663e59ef2aab))
@ -94,7 +94,7 @@
- **FIX**: ButtonComponent behavior when the engine is paused ([#1726](https://github.com/flame-engine/flame/issues/1726)). ([197e63d6](https://github.com/flame-engine/flame/commit/197e63d69e2a4c6779e49b918d05a60447ce9462))
- **FIX**: Add missing paint arguments on shapes ([#1727](https://github.com/flame-engine/flame/issues/1727)). ([e59f3428](https://github.com/flame-engine/flame/commit/e59f3428469e4298d812bb665171679df8895daf))
- **FIX**: Merge basic and advanced gesture detectors ([#1718](https://github.com/flame-engine/flame/issues/1718)). ([f08f8e12](https://github.com/flame-engine/flame/commit/f08f8e12f5322c7bea1491908f06b350e13c14b7))
- **FEAT**: New colours to palette.dart ([#1783](https://github.com/flame-engine/flame/issues/1783)). ([85cd60e1](https://github.com/flame-engine/flame/commit/85cd60e16c7b4dafdf1823bf85a7ae8a50fd05f2))
- **FEAT**: New colors to palette.dart ([#1783](https://github.com/flame-engine/flame/issues/1783)). ([85cd60e1](https://github.com/flame-engine/flame/commit/85cd60e16c7b4dafdf1823bf85a7ae8a50fd05f2))
- **FEAT**: Added TextFormatter classes ([#1720](https://github.com/flame-engine/flame/issues/1720)). ([c44272be](https://github.com/flame-engine/flame/commit/c44272be45eadfabc8f03ef250eb663e59ef2aab))
- **FEAT**: Drag events that dispatch using componentsAtPoint ([#1715](https://github.com/flame-engine/flame/issues/1715)). ([10669c12](https://github.com/flame-engine/flame/commit/10669c12702a3a82fcf5be9161107dce4349a79f))
- **FEAT**: add `HasAncestor` mixin ([#1711](https://github.com/flame-engine/flame/issues/1711)). ([987a44f4](https://github.com/flame-engine/flame/commit/987a44f441429534c743388b44e6d84b28e8f5ca))

View File

@ -25,7 +25,7 @@ mixin HasQuadTreeCollisionDetection on FlameGame
_collisionDetection = cd;
}
/// Initialise the QuadTree.
/// Initialize the QuadTree.
///
/// - [mapDimensions] describes the collision area coordinates and size.
/// Should match to game map's position and size.

View File

@ -14,8 +14,8 @@ class TimerComponent extends Component {
/// [period] The period of time in seconds that the tick will be called
/// [repeat] When true, this will continue running after [period] is reached
/// [autoStart] When true, will start upon instantiation (default is true)
/// [onTick] When provided, will be called everytime [period] is reached. This
/// overrides the [onTick] method
/// [onTick] When provided, will be called every time [period] is reached.
/// This overrides the [onTick] method
TimerComponent({
required double period,
bool repeat = false,
@ -31,9 +31,9 @@ class TimerComponent extends Component {
);
}
/// Called everytime the [timer] reached a tick.
/// Called every time the [timer] reached a tick.
/// The default implementation calls the closure received on the
/// constructor and can be overriden to add custom logic.
/// constructor and can be overridden to add custom logic.
void onTick() {
_onTick?.call();
}

View File

@ -5,11 +5,11 @@ import 'package:meta/meta.dart';
/// An [Effect] is a component that changes properties or appearance of another
/// component over time.
///
/// For example, suppose you have an object "Foo", and you want to move it
/// For example, suppose you have an object "Goo", and you want to move it
/// to some other point on the screen. Directly changing that object's position
/// will cause it to teleport to the new location, which is likely undesired.
/// A second approach that you can take is to modify Foo's `update()` method
/// to implement the logic that will move Foo to the new position smoothly.
/// A second approach that you can take is to modify Goo's `update()` method
/// to implement the logic that will move Goo to the new position smoothly.
/// However, implementing such logic for every component that you may need to
/// move is cumbersome. A better approach then is to implement that logic as a
/// separate "movement" component that can attach to Foo or to any other

View File

@ -127,7 +127,7 @@ class DefaultViewport extends Viewport {
/// used it will try to adapt the best as possible.
class FixedResolutionViewport extends Viewport {
/// By default, this viewport will clip anything rendered outside.
/// Use this variable to control that behaviour.
/// Use this variable to control that behavior.
bool clip;
@override

View File

@ -57,9 +57,9 @@ class SpriteFont {
final double ascent;
/// Contains information about the characters of the font. The keys in this
/// map are the characters' codepoints. If a particular "character" has a
/// length greater than 1, then the key will be the first codepoint of this
/// character, and all subsequent codepoints will be stored within the
/// map are the characters' code points. If a particular "character" has a
/// length greater than 1, then the key will be the first code point of this
/// character, and all subsequent code points will be stored within the
/// [_Chain].
final Map<int, _Chain> _data;

View File

@ -40,7 +40,7 @@ To have your components listen to state change, the `BlocComponent` mixin can be
```dart
class PlayerComponent with BlocComponent<InventoryBloc, InventoryState> {
// onNewState can be overriden to so the component
// onNewState can be overridden to so the component
// can be notified on state changes
@override
void onNewState(InventoryState state) {

View File

@ -68,7 +68,7 @@ mixin FlameBlocListenable<B extends BlocBase<S>, S> on Component {
/// Default implementation returns true.
bool listenWhen(S previousState, S newState) => true;
/// Listener called everytime a new state is emitted to this component.
/// Listener called every time a new state is emitted to this component.
///
/// Default implementation is a no-op.
void onNewState(S state) {}

View File

@ -21,9 +21,8 @@ class FlameBlocProvider<B extends BlocBase<S>, S> extends Component {
/// {@macro flame_bloc_provider}
///
/// Will provide the given [value] to its children,
/// when this constructor is used, the user is responsable for
/// disposing the bloc.
/// Will provide the given [value] to its children, when this constructor is
/// used, the user is responsible for disposing of the bloc.
FlameBlocProvider.value({
required B value,
List<Component>? children,
@ -41,7 +40,7 @@ class FlameBlocProvider<B extends BlocBase<S>, S> extends Component {
}
}
/// Return the [Bloc] provided by this [FlameBlocProvider]
/// Returns the [Bloc] provided by this [FlameBlocProvider]
B get bloc => _bloc;
@override

View File

@ -189,7 +189,7 @@ class FlareActorAnimation {
c.clipRect(size.toRect());
}
// boxfit
// box fit
switch (fit) {
case BoxFit.fill:
scaleX = size.x / contentWidth;

View File

@ -2,6 +2,6 @@ void main() {
// There will be a new example in here after Google I/O, stay tuned!
// If you want to see the previous examples, go to the flame_forge2d section
// of https://examples.flame-engine.org
// The sourcecode lives here:
// The source code lives here:
// https://github.com/flame-engine/flame/tree/main/examples/lib/stories/bridge_libraries/forge2d
}

View File

@ -26,15 +26,15 @@ class WorldContactListener extends ContactListener {
Contact contact,
void Function(ContactCallbacks contactCallback, Object other) callback,
) {
final userDatas = {
final userData = {
contact.bodyA.userData,
contact.fixtureA.userData,
contact.bodyB.userData,
contact.fixtureB.userData,
}.whereType<Object>();
for (final contactCallback in userDatas.whereType<ContactCallbacks>()) {
for (final object in userDatas) {
for (final contactCallback in userData.whereType<ContactCallbacks>()) {
for (final object in userData) {
if (object != contactCallback) {
callback(contactCallback, object);
}

View File

@ -197,7 +197,7 @@ class _Parser {
if (parts.length == 1) {
return parts.first;
} else if (parts.length > 1) {
return Concat(parts);
return Concatenate(parts);
} else {
return constEmptyString;
}
@ -571,7 +571,7 @@ class _Parser {
return Add(lhs as NumExpression, rhs as NumExpression);
}
if (lhs.isString && rhs.isString) {
return Concat([lhs as StringExpression, rhs as StringExpression]);
return Concatenate([lhs as StringExpression, rhs as StringExpression]);
}
position = opPosition;
typeError('both lhs and rhs of + must be numeric or strings');

View File

@ -1,7 +1,7 @@
import 'package:jenny/src/structure/expressions/expression.dart';
class Concat extends StringExpression {
const Concat(this.parts);
class Concatenate extends StringExpression {
const Concatenate(this.parts);
final List<StringExpression> parts;

View File

@ -18,7 +18,7 @@ class ObjectLayer extends RenderableLayer<ObjectGroup> {
// nothing to do
}
// ignore unrenderable layers when looping over the layers to render
// ignore non-renderable layers when looping over the layers to render
@override
bool get visible => false;

View File

@ -365,7 +365,7 @@ class FlameTileLayer extends RenderableLayer<TileLayer> {
var staggerY = 0.0;
var staggerX = 0.0;
// Hexagonal Ponity Tiles move down by a fractional amount.
// Hexagonal Pointy Tiles move down by a fractional amount.
if (map.staggerAxis == StaggerAxis.y) {
staggerY = size.y * 0.75;
} else