Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Prepare package for generic display list #9

Open
wants to merge 31 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
b51291b
add minimal interfaces to abstract an generic display list structure
tiagoschenkel Aug 23, 2018
69ac33f
use abstract display list interfaces to decouple extensions from open…
tiagoschenkel Aug 23, 2018
66b8ca8
use tsconfig.example.json to compile example project
tiagoschenkel Aug 23, 2018
5a31a4a
initialize display object observer factory
tiagoschenkel Aug 23, 2018
da1f7b7
initialize display object observer factory
tiagoschenkel Aug 23, 2018
d5a1050
activate MediatorMap unit tests
tiagoschenkel Aug 23, 2018
ac2010f
initialize display object observer factory
tiagoschenkel Aug 23, 2018
ecc5edf
validate event handlers before call them
tiagoschenkel Aug 23, 2018
02c7e42
creates only one observer per display object
tiagoschenkel Aug 23, 2018
8453d2e
initialize display object observer factory
tiagoschenkel Aug 23, 2018
85cd509
initialize display object observer factory
tiagoschenkel Aug 23, 2018
13c651a
fix compilation errors
tiagoschenkel Aug 23, 2018
cbaa84c
allows the creation of only one observer per container
tiagoschenkel Aug 23, 2018
2782b1d
initialize display object observer factory
tiagoschenkel Aug 23, 2018
074ebf0
initialize display object observer factory
tiagoschenkel Aug 23, 2018
d51e7c1
initialize display object observer factory
tiagoschenkel Aug 23, 2018
3e6152d
initialize display object observer factory
tiagoschenkel Aug 23, 2018
ca878a8
initialize display object observer factory
tiagoschenkel Aug 23, 2018
2840331
initialize display object observer factory
tiagoschenkel Aug 23, 2018
51b4e8e
move interface to display object package
tiagoschenkel Aug 30, 2018
c0a67a1
move interface to display object package
tiagoschenkel Aug 30, 2018
dc756b4
move interface to display object package
tiagoschenkel Aug 30, 2018
8e6b77b
move interface to display object package
tiagoschenkel Aug 30, 2018
50777e3
update import statements
tiagoschenkel Aug 30, 2018
95ca2ec
update import statements
tiagoschenkel Aug 30, 2018
8ce8ba3
use const instead of let on exported symbol
tiagoschenkel Aug 30, 2018
b7ecd30
use const instead of let on exported symbol
tiagoschenkel Aug 30, 2018
ed601ab
use const instead of let on exported symbol
tiagoschenkel Aug 30, 2018
6f35ef0
update validation of parent
tiagoschenkel Aug 30, 2018
ab0fdc6
create only one observer per container and clean-up observers on dest…
tiagoschenkel Aug 30, 2018
84dc8d7
destroy display object observers on destroy method
tiagoschenkel Aug 30, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
add minimal interfaces to abstract an generic display list structure
tiagoschenkel committed Aug 23, 2018
commit b51291ba2a84e6711d2117efce17a60bf96ba6a9
13 changes: 13 additions & 0 deletions src/robotlegs/bender/extensions/displayList/api/IDisplayObject.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// ------------------------------------------------------------------------------
// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved.
//
// NOTICE: You are permitted to use, modify, and distribute this file
// in accordance with the terms of the license agreement accompanying it.
// ------------------------------------------------------------------------------

import { IDisplayObjectContainer } from "./IDisplayObjectContainer";

export let IDisplayObject = Symbol("IDisplayObject");
export interface IDisplayObject {
parent: IDisplayObjectContainer;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// ------------------------------------------------------------------------------
// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved.
//
// NOTICE: You are permitted to use, modify, and distribute this file
// in accordance with the terms of the license agreement accompanying it.
// ------------------------------------------------------------------------------

import { IDisplayObject } from "./IDisplayObject";

export let IDisplayObjectContainer = Symbol("IDisplayObjectContainer");
export interface IDisplayObjectContainer extends IDisplayObject {
children?: IDisplayObject[];

numChildren?: number;
getChildAt?(index: number): IDisplayObject;

contains(child: IDisplayObject): boolean;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
// ------------------------------------------------------------------------------
// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved.
//
// NOTICE: You are permitted to use, modify, and distribute this file
// in accordance with the terms of the license agreement accompanying it.
// ------------------------------------------------------------------------------

import { IDisplayObject } from "./IDisplayObject";

/**
*
*/
export interface IDisplayObjectObserver {
displayObject: IDisplayObject;

addAddedToStageHandler(handler: Function): void;

addRemovedFromStageHandler(handler: Function): void;

addConfigureViewHandler(handler: Function): void;

destroy(): void;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// ------------------------------------------------------------------------------
// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved.
//
// NOTICE: You are permitted to use, modify, and distribute this file
// in accordance with the terms of the license agreement accompanying it.
// ------------------------------------------------------------------------------

import { IDisplayObject } from "./IDisplayObject";
import { IDisplayObjectObserver } from "./IDisplayObjectObserver";

/**
*
*/
export let IDisplayObjectObserverFactory = Symbol("IDisplayObjectObserverFactory");
export type IDisplayObjectObserverFactory = (view: IDisplayObject, useCapture: boolean) => IDisplayObjectObserver;