Skip to content

Pen tool #524

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

Merged
merged 88 commits into from
Sep 7, 2018
Merged

Pen tool #524

merged 88 commits into from
Sep 7, 2018

Conversation

InfiniteLee
Copy link
Contributor

@InfiniteLee InfiniteLee commented Aug 23, 2018

Adds a pen interactable that allows for 3d spatial drawing.

Generates procedural geometry using (modified) @fernandojsg's sharedbuffergeometry.js and sharedbuffergeometrymanager.js from A-Painter.

Adds a concept of "toggleable" for interactables. Objects that have a "toggle" class defined will not be dropped from your hand/cursor after initial grab. Only subsequent releases using the "primary" button will cause the object to be dropped. E.g. if grip is considered primary and trigger is secondary, grip or trigger will pick up the object, but after initial release, only the grip can cause the object to be dropped. (grabbable-toggle was added which is 90% the same as super-hands grabbable but has some additional logic to handle this concept.)

Relies on a new component activatable in super-hands: c-frame/aframe-super-hands-component#148 which allows secondary activations on grabbed/hovered objects.

TODO:

  • remove pen interactable from being hard-coded into hub.html and instead add them to the environments
  • fix regression with how "toggle" objects are transitioned from one hand to another
  • update duck in mr-social-assets to not require super-spawner to have hard-coded duck src (maybe part of a different PR)

…up and reorganized code; light optimization pass
# Conflicts:
#	src/hub.html
#	src/network-schemas.js
Added activatable component, which allows a button to cause secondary activations to occur while an object is grabbed. Also made the pen "sticky" so it stays attached to your hand when you grab it. It can then only be dropped by using the "primary" grab button (e.g. grip buttons). The triggers now are "secondary_action" buttons, which work like normal except in the case that you are holding a sticky object, in which case they will not cause the object to be dropped.
… odd segments. Added timed delete per line. Fixed networking bug where line data could be sent before remote clients were fully initialized. Adding drawing manager that prevents multiple pens from drawing on the same drawing at the same time.
@buildsize
Copy link

buildsize bot commented Sep 5, 2018

File name Previous Size New Size Change
avatar-selector.html 608 bytes 608 bytes 0 bytes (0%)
favicon.ico 33.69 KB 33.69 KB 0 bytes (0%)
hub-preview.png 22.78 KB 22.78 KB 0 bytes (0%)
hub.html 20.27 KB 24.86 KB 4.58 KB (23%)
index.html 784 bytes 784 bytes 0 bytes (0%)
link.html 804 bytes 804 bytes 0 bytes (0%)
LoadingObject_Atom-[hash].glb 27.43 KB 27.43 KB 0 bytes (0%)
waternormals-[hash].jpg 242.98 KB 242.98 KB 0 bytes (0%)
bubble_off-[hash].png 8.58 KB 8.58 KB 0 bytes (0%)
bubble_off-hover-[hash].png 10.41 KB 10.41 KB 0 bytes (0%)
bubble_on-[hash].png 9.24 KB 9.24 KB 0 bytes (0%)
bubble_on-hover-[hash].png 8.88 KB 8.88 KB 0 bytes (0%)
create_object-[hash].png 15.05 KB 15.05 KB 0 bytes (0%)
create_object-hover-[hash].png 15.87 KB 15.87 KB 0 bytes (0%)
freeze_off-[hash].png 12.24 KB 12.24 KB 0 bytes (0%)
freeze_off-hover-[hash].png 12.82 KB 12.82 KB 0 bytes (0%)
freeze_on-[hash].png 12.83 KB 12.83 KB 0 bytes (0%)
freeze_on-hover-[hash].png 13.31 KB 13.31 KB 0 bytes (0%)
mute_off-[hash].png 4.81 KB 4.81 KB 0 bytes (0%)
mute_off-hover-[hash].png 6.08 KB 6.08 KB 0 bytes (0%)
mute_on-[hash].png 9.57 KB 9.57 KB 0 bytes (0%)
mute_on-hover-[hash].png 8.61 KB 8.61 KB 0 bytes (0%)
spawn_photo-[hash].png 5.78 KB 5.78 KB 0 bytes (0%)
tooltip.9-[hash].png 815 bytes 815 bytes 0 bytes (0%)
watch-[hash].glb 880.11 KB 880.11 KB 0 bytes (0%)
account-[hash].svg 826 bytes 826 bytes 0 bytes (0%)
daydream_entry-[hash].svg 7.13 KB 7.13 KB 0 bytes (0%)
default_thumbnail-[hash].png 3.23 KB 3.23 KB 0 bytes (0%)
desktop_screen_entry-[hash].svg 604 bytes 604 bytes 0 bytes (0%)
device_entry-[hash].svg 3.66 KB 3.66 KB 0 bytes (0%)
dropdown_arrow-[hash].png 206 bytes 206 bytes 0 bytes (0%)
dropdown_arrow@2x-[hash].png 302 bytes 302 bytes 0 bytes (0%)
gearvr_entry-[hash].svg 574 bytes 574 bytes 0 bytes (0%)
generic_vr_entry-[hash].svg 1.15 KB 1.15 KB 0 bytes (0%)
giphy_logo-[hash].png 1.38 KB 1.38 KB 0 bytes (0%)
help-hud-[hash].png 11.76 KB 11.76 KB 0 bytes (0%)
help-hud@2x-[hash].png 18.87 KB 18.87 KB 0 bytes (0%)
level_background-[hash].png 4.97 KB 4.97 KB 0 bytes (0%)
level_background@2x-[hash].png 6.46 KB 6.46 KB 0 bytes (0%)
level_fill-[hash].png 1.71 KB 1.71 KB 0 bytes (0%)
level_fill@2x-[hash].png 3.38 KB 3.38 KB 0 bytes (0%)
logo-[hash].svg 14.21 KB 14.21 KB 0 bytes (0%)
mic_denied-[hash].png 4.11 KB 4.11 KB 0 bytes (0%)
mic_denied@2x-[hash].png 8.08 KB 8.08 KB 0 bytes (0%)
mic_granted-[hash].png 3.71 KB 3.71 KB 0 bytes (0%)
mic_granted@2x-[hash].png 7.43 KB 7.43 KB 0 bytes (0%)
mic_level-[hash].png 990 bytes 990 bytes 0 bytes (0%)
mic_level@2x-[hash].png 2.32 KB 2.32 KB 0 bytes (0%)
mic_small-[hash].png 298 bytes 298 bytes 0 bytes (0%)
mic_small@2x-[hash].png 298 bytes 298 bytes 0 bytes (0%)
mobile_screen_entry-[hash].svg 1.28 KB 1.28 KB 0 bytes (0%)
speaker_level-[hash].png 953 bytes 953 bytes 0 bytes (0%)
speaker_level@2x-[hash].png 2.13 KB 2.13 KB 0 bytes (0%)
warning_icon-[hash].png 582 bytes 582 bytes 0 bytes (0%)
warning_icon@2x-[hash].png 1.05 KB 1.05 KB 0 bytes (0%)
aframe-inspector.min-[hash].js 384.44 KB 384.44 KB 0 bytes (0%)
avatar-selector-[hash].js 32.42 KB 32.48 KB 54 bytes (0%)
avatar-selector-[hash].js.map 73.79 KB 73.78 KB -16 bytes (0%)
engine-[hash].js 1.42 MB 1.42 MB 7 bytes (0%)
engine-[hash].js.map 4.47 MB 4.47 MB 0 bytes (0%)
gifparsing.worker-[hash].js 1.91 KB 1.91 KB 0 bytes (0%)
gifparsing.worker-[hash].js.map 8.32 KB 8.32 KB 0 bytes (0%)
hub-[hash].js 252.95 KB 281.53 KB 28.58 KB (11%)
hub-[hash].js.map 606.05 KB 685.16 KB 79.11 KB (13%)
index-[hash].js 50.47 KB 50.47 KB 0 bytes (0%)
index-[hash].js.map 92.81 KB 92.81 KB 0 bytes (0%)
link-[hash].js 23.17 KB 23.17 KB 0 bytes (0%)
link-[hash].js.map 45.91 KB 45.91 KB 0 bytes (0%)
sketchfab-zip.worker-[hash].js 155.49 KB 155.49 KB 0 bytes (0%)
sketchfab-zip.worker-[hash].js.map 774.45 KB 774.45 KB 0 bytes (0%)
vendor-[hash].js 525.95 KB 528.27 KB 2.31 KB (0%)
vendor-[hash].js.map 1.78 MB 1.78 MB 4.8 KB (0%)
quack-[hash].mp3 7.03 KB 7.03 KB 0 bytes (0%)
specialquack-[hash].mp3 11.57 KB 11.57 KB 0 bytes (0%)
tone-[hash].mp3 53.92 KB 53.92 KB 0 bytes (0%)
tone-[hash].wav 385.29 KB 385.29 KB 0 bytes (0%)
tone-[hash].webm 32.04 KB 32.04 KB 0 bytes (0%)
tone-[hash].ogg 32.55 KB 32.55 KB 0 bytes (0%)
avatar-selector-[hash].css 1.12 KB 1.12 KB 0 bytes (0%)
avatar-selector-[hash].css.map 136 bytes 136 bytes 0 bytes (0%)
hub-[hash].css 42.55 KB 42.85 KB 300 bytes (1%)
hub-[hash].css.map 124 bytes 124 bytes 0 bytes (0%)
index-[hash].css 34.53 KB 34.53 KB 0 bytes (0%)
index-[hash].css.map 126 bytes 126 bytes 0 bytes (0%)
link-[hash].css 4.64 KB 4.64 KB 0 bytes (0%)
link-[hash].css.map 125 bytes 125 bytes 0 bytes (0%)
home-[hash].mp4 2 MB 2 MB 0 bytes (0%)
home-[hash].webm 1.81 MB 1.81 MB 0 bytes (0%)
negx-[hash].jpg 54.45 KB 54.45 KB 0 bytes (0%)
negy-[hash].jpg 50.97 KB 50.97 KB 0 bytes (0%)
negz-[hash].jpg 53.29 KB 53.29 KB 0 bytes (0%)
posx-[hash].jpg 58.64 KB 58.64 KB 0 bytes (0%)
posy-[hash].jpg 19.17 KB 19.17 KB 0 bytes (0%)
posz-[hash].jpg 57.49 KB 57.49 KB 0 bytes (0%)
spawn_pen-[hash].png [new file] 4.6 KB
spawn_pen-hover-[hash].png [new file] 5.25 KB

@@ -1,5 +1,6 @@
import "./components/gltf-model-plus";

AFRAME.GLTFModelPlus.registerComponent("duck", "duck");
AFRAME.GLTFModelPlus.registerComponent("quack", "quack");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

most important part of this PR

"#FF6600",
"#FFFFFF",
"#AAAAAA",
"#777777",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

probably due to the unlit shader but to actually get a gradient of greys I bet it has to be something like #000000, #111111, #222222 or something

also we need brown so i can draw a proper goomba

https://www.mariowiki.com/images/thumb/9/9c/Goomba_-_MarioPartyStarRush.png/200px-Goomba_-_MarioPartyStarRush.png

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh, we might want to include one or more flesh tones too

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so you can draw faces

@gfodor
Copy link
Contributor

gfodor commented Sep 7, 2018

truly amazing work! having it be a workable sculpting tool was a great surprise too.

media tools + pen tool = something magical is happening

… fix issue where media-loader wasn't setting the bounding box corrrectly in certain cases
@InfiniteLee InfiniteLee merged commit fc19e7d into master Sep 7, 2018
@brianpeiris brianpeiris deleted the feature/drawing branch September 24, 2018 17:29
@brianpeiris brianpeiris changed the title Feature/drawing Pen tool Oct 22, 2018
@brianpeiris brianpeiris added the whats new Include this PR on the "What's New" page label Oct 22, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
whats new Include this PR on the "What's New" page
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants