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

feat(text,gameObject): add Text object and parent GameObject #132

Merged
merged 5 commits into from Nov 8, 2019
Merged

Conversation

straker
Copy link
Owner

@straker straker commented Nov 8, 2019

New Text object that can be used to render text to the game. Can handle newline characters \n and automatic linebreaks by passing a width property. Also will detect dir=rtl on the canvas to support RTL languages. Docs and tests forthcoming.

With the addition of new objects that needed to be rendered like a sprite but aren't a sprite, figured it was time to create a base class everything else could inherit from. So now Sprite is just for rect/image/animation sprites and the GameObject is for everything else dealing with position, movement, rotation, anchors, etc.

@coveralls
Copy link

coveralls commented Nov 8, 2019

Coverage Status

Coverage decreased (-0.3%) to 99.298% when pulling ce325c4 on group into 38dab5f on v7.

@straker straker merged commit 52597b7 into v7 Nov 8, 2019
@straker straker deleted the group branch November 8, 2019 23:56
@straker straker mentioned this pull request Jan 5, 2020
straker added a commit that referenced this pull request Aug 11, 2020
* Extract Sprite#collidesWith (#123)

* chore: extract collision detection

* feat(sprite): extract collision detection

* apply suggested changes

* feat(sprite): allow preprocessing of file through rollup-plugin

* feat(sprite): allow preprocessing of file through rollup-plugin

* fix test

* add docs

* add docs

* change flag names to denote sprite

* update docs

* update gulpfile with new names

* fix minified output

* feat(text,gameObject): add Text object and parent GameObject (#132)

* cleanup text

* final code

* transfer permutations to gameObject

* fix travis

* ignore

* fix(gitignore)

* feat: add typescript declaration file and tests (#134)

* feat: add typescript support

* got it working

* type testing

* finished

* build

* fix test

* add typings to npm test

* update comments

* fix bad type

* fix comments

* chore: add contributing guidelines

* chore: add comments, fix typos

* add link

* feat(button): accessible button and pointer onOut (#141)

* feat(button): accessible button

* update pointer tests

* revert playground

* feat(scene): accessible scene (#142)

* feat(vector,helpers): add more vector functions, add helper functions (#146)

* feat(vector,helpers): add more vector functions, add helper functions

* update custom build docs

* fix length prop name for livingcss bug

* add missing normalize test

* fix links in doc

* use math.hypot

* correct typo

* fix typos

* feat(helpers): add helper functions lerp, inverseLerp, clamp, angleToTarget, seedRand (#147)

* feat(helpers): add lerp, inverseLerp, clamp

* add angleToTarget

* add random seed generator

* fix up docs

* fix(*): use draw for drawing instead of _dc

* docs: typo in documentation of `Button` (#157)

* feat(gridManager): add grid manager (#158)

* ui manager

* update doc usability and addChild

* use scale instead of font

* fix tests; move collision and store to helpers

* have button inherit from sprite

* finalize

* build

* fix(tileEngine): don't error for object layers (#135)

* docs: assetLoaded progress example (#143)

* build

* fix audit

* ignore generated files

* only publish main files

* ignore generated type file

* ci: build gh-pages (#159)

* build gh-pages

* fix test

* fix permutation test

* ci: split into jobs (#160)

* ci: split into jobs

* fix jobs

* test deploy job

* full test

* build docs before deploy

* ci: correct command

* tests: fix tests, add coverage for new features

* ci: run permutations in parallel (#161)

* ci: run longer permutations first

* tests: update typscript tests

* chore: use clamp helper in tileEngline

* feat(gameObject): add opacity

* chore: add semicolons, refactor events

* chore: refactor code

* put docs in right place

* put docs in right place

* docs: add docs for gameobject properties, no strict on output

* docs: fix docs in updatable to be in gameObject

* fix(text): get text working

* feat: world calculations

* fix: proxy too slow at scale, create examples

* feat(scene,gameObject): lookAt object, scale gameObject in place

* fix gridManager

* feature complete?

* feat: pointer works with multiple canvases on same page

* rename gridManger to grid

* docs: finalized

* tests: fix tests

* tests: finish tests

* ci: permutations

* ci: docs

* ci: fix typescript

* ci: cause permutation test to fail build

* ci: cause permutation test to fail build

* ci: ensure tests fail build

* ci: should be working now

* cleanup

Co-authored-by: Daniel <daniel.t.dt@gmail.com>
Co-authored-by: Dennis Meckel <meckel@datenschuppen.de>
Co-authored-by: Andre D. Lima <andre.dantas.lima@gmail.com>
Co-authored-by: Wini3D <12629729+wini3d@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants