EyeLoader that creates and manages animated eye and mouth components.

šŸ§© EyeLoader

An extension for MIT App Inventor 2.
This component is developed by th using Fast.
EyeLoader that creates and manages animated eye and mouth components.
This class provides a comprehensive set of controls for creating interactive, expressive eyesrn and mouth that can be used in various applications, such as animated characters or robots.
Telegram | GitHub
Blogger | YouTube
Find More Extension
Terms & Conditions

:memo: Specifications


:package: Package: io.th.eyeloader.eyeloader
:floppy_disk: Size: 17.96 KB
:gear: Version: 1.0
:iphone: Minimum API Level: 7
:date: Updated On: 2025-04-03T18:30:00Z
:computer: Built & documented using: FAST-CLI v2.8.1
io.th.eyeloader.eyeloader.aix (18.0 KB)
eye.aia (21.7 KB)
:arrow_down: Find apk and more info on GitHub
io.th.eyeloader.eyeloaderV1.3.aix (25.6 KB)
eyeV1.3.aia (35.0 KB)

New Update

V1.3 (06-04-2025)

ShowStatusBar_Set_Property

:green_heart: ShowStatusBar

Set the visibility of the status bar

  • Input type: boolean
    ShowNavigationBar_Set_Property

:green_heart: ShowNavigationBar

Set the visibility of the navigation bar
*> Input type: boolean

Output

V1.2 Update 2025-04-04T18:30:00Z

io.th.eyeloader.eyeloaderV1.2.aix (25.1 KB)
Aia Soon...

:purple_heart: IrisShape

Set the iris shape for both eyes. Available shapes in helper class: ELLIPSE, CIRCLE, TRIANGLE, TRAPEZIUM, LEAF, RHOMBUS, HEART_I, HEART_II, DROP, STAR, STAR_II, DIAMOND, PENTAGON.

IrisShape_Method

:green_circle: IrisColor

Get the iris color for both eyes

  • Return type: number

:green_circle: PupilColor

Get the pupil color for both eyes

  • Return type: number

:green_circle: SadExpression

Check if expression is sad

  • Return type: boolean

:green_circle: HappyExpression

Check if expression is happy

  • Return type: boolean

:green_circle: AngryExpression

Check if expression is angry

  • Return type: boolean

:green_circle: SurprisedExpression

Check if expression is surprised

  • Return type: boolean

:green_heart: TeethShape

Set the teeth shape (ROUND or ZIGZAG)

  • Input type: text
  • Helper class: TeethStyle
  • Helper enums: ROUND, ZIGZAG

SadExpression_Get_Property
PupilColor_Get_Property
IrisColor_Get_Property
HappyExpression_Get_Property
AngryExpression_Get_Property
TeethShape_Set_Property
SurprisedExpression_Get_Property

Without Mouth
7a0ee527-d490-48d5-a19a-5a15f6572b1d

16b1decf-a3fa-4650-9ca9-d0825e2f7fe2

With Mouth
921a819a-8a76-4b79-b2ce-a2126c518321





Blocks

BothEyesBlinked_Event
RightEyeBlinked_Event
LeftEyeBlinked_Event
EyesMoved_Event


LookAt_Method
LeftEyeSize_Method
LeftEyePosition_Method
LeftEyeLookAt_Method
InitializeEyesWithSize_Method
CreateEyesWithMouth_Method
BlinkRightEye_Method
BlinkLeftEye_Method
BlinkBothEyes_Method
ShowSurprisedExpression_Method
ShowSadExpression_Method
ShowHappyExpression_Method
ShowAngryExpression_Method
RightEyeSize_Method
RightEyePosition_Method
RightEyeLookAt_Method
ResetEyePositions_Method
ResetExpression_Method
MouthSize_Method
MouthPosition_Method


EyeSpacing_Set_Property
EyeHeight_Set_Property
BlinkSpeed_Set_Property
BlinkInterval_Set_Property
TeethColor_Set_Property
ShowTeeth_Set_Property
RightEyeColor_Set_Property
RightEyeColor_Get_Property
ReflectionSize_Set_Property
PupilColor_Set_Property
OutlineThickness_Set_Property
MouthLineStyle_Set_Property
MouthLineColor_Set_Property
LeftEyeColor_Set_Property
LeftEyeColor_Get_Property
IrisColor_Set_Property
EyeWidth_Set_Property

Demo

DemoV1.3

Screen2blocks

blocks

eye2
eye1


photo_2025-04-05_07-33-59

Events:

EyeLoader has total 4 events.

:yellow_heart: LeftEyeBlinked

Event triggered when the left eye blinks

:yellow_heart: RightEyeBlinked

Event triggered when the right eye blinks

:yellow_heart: BothEyesBlinked

Event triggered when both eyes complete blinking

:yellow_heart: EyesMoved

Event triggered when eyes move beyond threshold

Parameter Type
angleX number
angleY number

Methods:

EyeLoader has total 20 methods.

:purple_heart: CreateEyesWithMouth

Initialize eyes and mouth inside an arrangement

Parameter Type
arrangement component

:purple_heart: InitializeEyesWithSize

Initialize both eyes inside an arrangement with custom size

Parameter Type
arrangement component
eyeWidth number
eyeHeight number

:purple_heart: LeftEyePosition

Set the position of the left eye. For example, SetLeftEyePosition(100, 100) will position the left eye at coordinates (100, 100) on the screen.

Parameter Type
x number
y number

:purple_heart: RightEyePosition

Set the position of the right eye. For example, SetRightEyePosition(300, 100) will position the right eye at coordinates (300, 100) on the screen.

Parameter Type
x number
y number

:purple_heart: LookAt

Make both eyes look at a point. For example, LookAt(100, 200) will make both eyes look at the point (100, 200) on the screen.

Parameter Type
x number
y number

:purple_heart: LeftEyeLookAt

Make left eye look at a point

Parameter Type
x number
y number

:purple_heart: RightEyeLookAt

Make right eye look at a point

Parameter Type
x number
y number

:purple_heart: ResetEyePositions

Reset eye positions to center

:purple_heart: BlinkBothEyes

Blink both eyes

:purple_heart: BlinkLeftEye

Make left eye blink

:purple_heart: BlinkRightEye

Make right eye blink

:purple_heart: LeftEyeSize

Set individual dimensions for left eye in pixels

Parameter Type
width number
height number

:purple_heart: RightEyeSize

Set individual dimensions for right eye in pixels

Parameter Type
width number
height number

:purple_heart: ShowSurprisedExpression

Make eyes appear surprised

:purple_heart: ShowAngryExpression

Make eyes appear angry

:purple_heart: ResetExpression

Reset eye expression to normal

:purple_heart: MouthPosition

Set mouth position

Parameter Type
x number
y number

:purple_heart: MouthSize

Set mouth size

Parameter Type
width number
height number

:purple_heart: ShowHappyExpression

Show happy expression

:purple_heart: ShowSadExpression

Show sad expression

Setters:

EyeLoader has total 15 setter properties.

:green_heart: RightEyeColor

Set the right eye color

  • Input type: number

:green_heart: LeftEyeColor

Set the left eye color

  • Input type: number

:green_heart: IrisColor

Set the iris color for both eyes

  • Input type: number

:green_heart: PupilColor

Set the pupil color for both eyes

  • Input type: number

:green_heart: BlinkInterval

Set the blink interval in milliseconds

  • Input type: number

:green_heart: BlinkSpeed

Set the blink speed (1-10, where 1 is fastest)

  • Input type: number

:green_heart: EyeSpacing

Set the spacing between eyes. For example, SetEyeSpacing(200) will place the eyes 200 pixels apart horizontally.

  • Input type: number

:green_heart: EyeWidth

Set the width of both eyes in pixels

  • Input type: number

:green_heart: EyeHeight

Set the height of both eyes in pixels

  • Input type: number

:green_heart: OutlineThickness

Set the outline thickness for both eyes

  • Input type: number

:green_heart: ReflectionSize

Set the reflection size (0-1)

  • Input type: number

:green_heart: MouthLineStyle

Set mouth line style (1=round, 2=square, 3=stroke)

  • Input type: number

:green_heart: ShowTeeth

Show or hide teeth

  • Input type: boolean

:green_heart: TeethColor

Set teeth color

  • Input type: number

:green_heart: MouthLineColor

Set the mouth line color

  • Input type: number

Getters:

EyeLoader has total 2 getter properties.

:green_circle: RightEyeColor

Set the right eye color

  • Return type: number

:green_circle: LeftEyeColor

Set the left eye color

  • Return type: number

Thanks

Techhamara

In what circumstances this can be used?

I am creating this type animation prank

2 Likes

New Update

V1.2 Update 2025-04-04T18:30:00Z

:purple_heart: IrisShape

Set the iris shape for both eyes. Available shapes in helper class: ELLIPSE, CIRCLE, TRIANGLE, TRAPEZIUM, LEAF, RHOMBUS, HEART_I, HEART_II, DROP, STAR, STAR_II, DIAMOND, PENTAGON.

IrisShape_Method

:green_circle: IrisColor

Get the iris color for both eyes

  • Return type: number

:green_circle: PupilColor

Get the pupil color for both eyes

  • Return type: number

:green_circle: SadExpression

Check if expression is sad

  • Return type: boolean

:green_circle: HappyExpression

Check if expression is happy

  • Return type: boolean

:green_circle: AngryExpression

Check if expression is angry

  • Return type: boolean

:green_circle: SurprisedExpression

Check if expression is surprised

  • Return type: boolean

:green_heart: TeethShape

Set the teeth shape (ROUND or ZIGZAG)

  • Input type: text
  • Helper class: TeethStyle
  • Helper enums: ROUND, ZIGZAG

SadExpression_Get_Property
PupilColor_Get_Property
IrisColor_Get_Property
HappyExpression_Get_Property
AngryExpression_Get_Property
TeethShape_Set_Property
SurprisedExpression_Get_Property
Output
921a819a-8a76-4b79-b2ce-a2126c518321


16b1decf-a3fa-4650-9ca9-d0825e2f7fe2

New Update

V1.3 (06-04-2025)

ShowStatusBar_Set_Property

:green_heart: ShowStatusBar

Set the visibility of the status bar

  • Input type: boolean
    ShowNavigationBar_Set_Property

:green_heart: ShowNavigationBar

Set the visibility of the navigation bar
*> Input type: boolean

Output

Usually the helper blocks also follow the UpperCamelCase naming conventions...

ELLIPSE --> Ellipse

Taifun

1 Like